hyingbo
5 天以前 650b17081633bd2cce2a07d8fb4ebbfbd50a8edf
lxzn-module-eam/src/main/java/org/jeecg/modules/eam/service/impl/EamInspectionOrderServiceImpl.java
@@ -6,6 +6,7 @@
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.core.toolkit.CollectionUtils;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.fasterxml.jackson.core.JsonProcessingException;
@@ -35,6 +36,7 @@
import org.jeecg.modules.eam.service.IEamInspectionOrderDetailService;
import org.jeecg.modules.eam.service.IEamInspectionOrderService;
import org.jeecg.modules.eam.service.IEamReportRepairService;
import org.jeecg.modules.eam.vo.InspectionVo;
import org.jeecg.modules.flowable.apithird.business.entity.FlowMyBusiness;
import org.jeecg.modules.flowable.apithird.business.service.impl.FlowMyBusinessServiceImpl;
import org.jeecg.modules.flowable.apithird.service.FlowCallBackServiceI;
@@ -195,8 +197,7 @@
        } else {
            eamInspectionOrder.setEquipmentCode(equipment.getEquipmentCode());
        }
        System.out.println("设备点检:" + eamInspectionOrder.getId());
        flowCommonService.initActBusiness("工单号:" + eamInspectionOrder.getOrderNum() + "设备编号" + eamInspectionOrder.getEquipmentCode() + "进行设备点检",
        flowCommonService.initActBusiness("工单号: " + eamInspectionOrder.getOrderNum() + ";设备编号: " + eamInspectionOrder.getEquipmentCode() + ";安装位置: " + equipment.getInstallationPosition(),
                eamInspectionOrder.getId(), "IEamInspectionOrderService", "eam_inspection", null);
        Map<String, Object> variables = new HashMap<>();
        variables.put("dataId", eamInspectionOrder.getId());
@@ -464,6 +465,10 @@
        List<EamInspectionOrderDetail> eamInspectionOrderDetails = eamInspectionOrderDetailService
                .list(new QueryWrapper<EamInspectionOrderDetail>()
                        .eq("order_id", eamInspectionOrder.getId()).eq("report_flag", "1").eq("inspection_result", "2"));
        //只有保养项明细中“点检结果”为“异常”,并且"异常是否报修"为“是”的情况才会生成故障数据,其他情况则不生成
        if (CollectionUtils.isEmpty(eamInspectionOrderDetails)) {
            return;
        }
        eamReportRepairService.reportRepairFromInspection(eamInspectionOrder.getEquipmentId(), eamInspectionOrder.getOperator(), eamInspectionOrderDetails);
    }
@@ -541,4 +546,19 @@
        Object object = values.get("NextAssignee");
        return (List<String>) object;
    }
    @Override
    public List<InspectionVo> findInspectionResult(String equipmentId,String itemDemand,String yearMonth) {
        return this.baseMapper.findInspectionResult(equipmentId,itemDemand,yearMonth);
    }
    @Override
    public List<InspectionVo> findInspectionUser(String equipmentId,String yearMonth) {
        return this.baseMapper.findInspectionUser(equipmentId,yearMonth);
    }
    @Override
    public List<Map<String, Object>> findInspectionStandard(String equipmentId) {
        return this.baseMapper.findInspectionStandard(equipmentId);
    }
}