diff --git a/sgzb-modules/sgzb-base/src/main/java/com/bonus/sgzb/app/service/impl/TmTaskServiceImpl.java b/sgzb-modules/sgzb-base/src/main/java/com/bonus/sgzb/app/service/impl/TmTaskServiceImpl.java index 444f9a1c..57f50b38 100644 --- a/sgzb-modules/sgzb-base/src/main/java/com/bonus/sgzb/app/service/impl/TmTaskServiceImpl.java +++ b/sgzb-modules/sgzb-base/src/main/java/com/bonus/sgzb/app/service/impl/TmTaskServiceImpl.java @@ -92,19 +92,20 @@ public class TmTaskServiceImpl implements TmTaskService { // 再审核领料任务信息表 List leaseApplyInfoList = record.getLeaseApplyInfoList(); if (CollUtil.isNotEmpty(leaseApplyInfoList)) { - Integer companyId1 = leaseApplyInfoList.get(0).getCompanyId(); - List applyInfoList = new ArrayList<>(); - if (companyId1 != null && companyId1 == 101) { - applyInfoList = leaseApplyInfoList.stream().filter(t -> t.getCompanyId().equals(101)).collect(Collectors.toList()); - } else if (companyId1 != null && companyId1 == 102) { - applyInfoList = leaseApplyInfoList.stream().filter(t -> t.getCompanyId().equals(102)).collect(Collectors.toList()); - } - if (CollUtil.isNotEmpty(applyInfoList)) { - for (LeaseApplyInfo leaseApplyInfo : applyInfoList) { - taskId = leaseApplyInfo.getTaskId(); - if (leaseApplyInfo != null) { + for (LeaseApplyInfo leaseApplyInfo : leaseApplyInfoList) { + Integer companyId1 = leaseApplyInfo.getCompanyId(); + List applyInfoList = new ArrayList<>(); + if (companyId1 != null && companyId1 == 101) { + applyInfoList = leaseApplyInfoList.stream().filter(t -> t.getCompanyId().equals(101)).collect(Collectors.toList()); + } else if (companyId1 != null && companyId1 == 102) { + applyInfoList = leaseApplyInfoList.stream().filter(t -> t.getCompanyId().equals(102)).collect(Collectors.toList()); + } + if (CollUtil.isNotEmpty(applyInfoList)) { + for (LeaseApplyInfo applyInfo : applyInfoList) { + taskId = applyInfo.getTaskId(); //leaseApplyInfo.setExamineStatusId(record.getExamineStatusId()); - result += tmTaskMapper.updateLeaseApplyInfoAuditInfo(leaseApplyInfo); + result += tmTaskMapper.updateLeaseApplyInfoAuditInfo(applyInfo); + } } } @@ -138,19 +139,19 @@ public class TmTaskServiceImpl implements TmTaskService { // 再审核领料任务信息表 List leaseApplyInfoList = record.getLeaseApplyInfoList(); if (CollUtil.isNotEmpty(leaseApplyInfoList)) { - Integer companyId1 = leaseApplyInfoList.get(0).getCompanyId(); - List applyInfoList = new ArrayList<>(); - if (companyId1 != null && companyId1 == 101) { - applyInfoList = leaseApplyInfoList.stream().filter(t -> t.getCompanyId().equals(101)).collect(Collectors.toList()); - } else if (companyId1 != null && companyId1 == 102) { - applyInfoList = leaseApplyInfoList.stream().filter(t -> t.getCompanyId().equals(102)).collect(Collectors.toList()); - } - if (CollUtil.isNotEmpty(applyInfoList)) { - for (LeaseApplyInfo leaseApplyInfo : applyInfoList) { - taskId = leaseApplyInfo.getTaskId(); - if (leaseApplyInfo != null) { + for (LeaseApplyInfo leaseApplyInfo : leaseApplyInfoList) { + Integer companyId1 = leaseApplyInfo.getCompanyId(); + List applyInfoList = new ArrayList<>(); + if (companyId1 != null && companyId1 == 101) { + applyInfoList = leaseApplyInfoList.stream().filter(t -> t.getCompanyId().equals(101)).collect(Collectors.toList()); + } else if (companyId1 != null && companyId1 == 102) { + applyInfoList = leaseApplyInfoList.stream().filter(t -> t.getCompanyId().equals(102)).collect(Collectors.toList()); + } + if (CollUtil.isNotEmpty(applyInfoList)) { + for (LeaseApplyInfo applyInfo : applyInfoList) { + taskId = applyInfo.getTaskId(); //leaseApplyInfo.setExamineStatusId(record.getExamineStatusId()); - result += tmTaskMapper.updateLeaseApplyInfoAuditInfo(leaseApplyInfo); + result += tmTaskMapper.updateLeaseApplyInfoAuditInfo(applyInfo); } } } diff --git a/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/material/service/impl/RepairAuditDetailsServiceImpl.java b/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/material/service/impl/RepairAuditDetailsServiceImpl.java index 47122803..c4543ce2 100644 --- a/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/material/service/impl/RepairAuditDetailsServiceImpl.java +++ b/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/material/service/impl/RepairAuditDetailsServiceImpl.java @@ -265,7 +265,7 @@ public class RepairAuditDetailsServiceImpl implements IRepairAuditDetailsService taskCode = purchaseCodeRule(TaskTypeConstants.YBF, TaskTypeEnum.REPAIR_TO_BE_SCRAPPED.getCode()); /*taskStatus = 58; taskType = 57;*/ - //创建报废任务 + //创建待报废任务 long scrapTaskId = genTask(taskCode, TaskTypeEnum.REPAIR_TO_BE_SCRAPPED.getCode(), Integer.parseInt(TaskStatusEnum.PENDING_REVIEW.getCode()), tmTaskAgreement, companyId); for (RepairAuditDetails scrapDetails : scrapNumList) { RepairAuditDetails byRepairId = scrapApplyDetailsMapper.getByRepairId(String.valueOf(scrapDetails.getRepairId())); diff --git a/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/material/vo/ScrapApplyDetailsVO.java b/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/material/vo/ScrapApplyDetailsVO.java index f0244e40..32701ec8 100644 --- a/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/material/vo/ScrapApplyDetailsVO.java +++ b/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/material/vo/ScrapApplyDetailsVO.java @@ -59,6 +59,14 @@ public class ScrapApplyDetailsVO { */ @Excel(name = "维修单号",sort = 6) private String repairNum; + /** + * 单位id + */ + private String unitId; + /** + * 工程id + */ + private String projectId; /** * 审核状态 diff --git a/sgzb-modules/sgzb-material/src/main/resources/mapper/material/ScrapApplyDetailsMapper.xml b/sgzb-modules/sgzb-material/src/main/resources/mapper/material/ScrapApplyDetailsMapper.xml index b7860aaa..c13581ce 100644 --- a/sgzb-modules/sgzb-material/src/main/resources/mapper/material/ScrapApplyDetailsMapper.xml +++ b/sgzb-modules/sgzb-material/src/main/resources/mapper/material/ScrapApplyDetailsMapper.xml @@ -428,7 +428,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" tk.CODE scrapNum, tk.task_status taskStatus, dic.NAME taskStatusName, + bui.unit_id unitId, bui.unit_name unitName, + bpl.lot_id projectId, bpl.lot_name projectName, su.nick_name createBy, tk.create_time createTime, @@ -447,8 +449,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" LEFT JOIN scrap_apply_details sad ON tk.task_id = sad.task_id LEFT JOIN repair_audit_details rad ON sad.parent_id = rad.id LEFT JOIN back_apply_info rad3 ON sad.parent_id = rad3.id - LEFT JOIN repair_apply_details rad2 ON rad.repair_id = rad2.id - LEFT JOIN tm_task tk1 ON rad2.task_id = tk1.task_id + LEFT JOIN tm_task tk1 ON rad.task_id = tk1.task_id LEFT JOIN ( SELECT id, @@ -464,18 +465,18 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" WHERE sad.scrap_source IN ( '1', '2' ) AND tk.task_type IN ('20' , '21') - - AND (locate(#{keyword}, tk.create_by) > 0 - or locate(#{keyword}, tk.CODE) > 0 - or locate(#{keyword}, bui.unit_name) > 0 - or locate(#{keyword}, bpl.lot_name) > 0 - or locate(#{keyword}, tk1.CODE) > 0) + + AND (locate(#{keywords}, tk.create_by) > 0 + or locate(#{keywords}, tk.CODE) > 0 + or locate(#{keywords}, bui.unit_name) > 0 + or locate(#{keywords}, bpl.lot_name) > 0 + or locate(#{keywords}, tk1.CODE) > 0) and bui.unit_id = #{backUnit} - - and tk.task_status = #{repairStatus} + + and tk.task_status = #{taskStatus} and tk.task_id in #{taskIdList} @@ -483,14 +484,17 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" and bpl.lot_id = #{backPro} + + and sad.scrap_source = #{scrapSource} + and mt1.type_id = #{type} and locate(#{backCode}, tk.code) > 0 - - and tk.create_time between #{params.beginTime} and #{params.endTime} + + and DATE(tk.create_time) between #{beginTime} and #{endTime} GROUP BY tk.CODE order by tk.create_time desc diff --git a/sgzb-screen/src/components/home/centerFold.vue b/sgzb-screen/src/components/home/centerFold.vue index ef23de5a..fef228c7 100644 --- a/sgzb-screen/src/components/home/centerFold.vue +++ b/sgzb-screen/src/components/home/centerFold.vue @@ -17,7 +17,7 @@
-
+
{{ item.value }}
@@ -48,7 +48,7 @@ export default { isCollapse: false, newArrOne: [ { name: '施工机具总保有量', value: 9999 }, - // { url: GROUP, name: '工器具总保有量', value: 9999 }, + { url: GROUP, name: '工器具总保有量', value: 9999 }, ], newArr: [ { url: GROUP, name: '在库机具', value: 999 }, @@ -62,7 +62,6 @@ export default { { url: GROUP, name: '报废机具', value: 999 }, { url: GROUP, name: '报废机具', value: 999 }, ], - maType: 1 } }, mounted() { @@ -73,12 +72,6 @@ export default { setInterval(() => { this.getTotalOwnershipApiPage() }, 60 * 1000); - this.$eventBus.$on('maType', (maType) => { - this.maType = maType - }); - }, - destroyed() { - this.$eventBus.$off('maType'); }, methods: { getTotalOwnershipApiPage() { @@ -116,10 +109,13 @@ export default { this.$refs['box1'].style.height = height } }, - handleClickItem() { - setTimeout(() => { - this.$refs.inventoryDialog.setOpen({ open: true, maType: this.maType }) - }, 10) + handleClickItem(index) { + // console.log('🚀 ~ handleClickItem ~ index:', index); + if (index < 5) { + this.$refs.inventoryDialog.setOpen({ open: true, maType: 1 }) + } else { + this.$refs.inventoryDialog.setOpen({ open: true, maType: 2 }) + } } } } diff --git a/sgzb-screen/src/components/home/countFlopOne.vue b/sgzb-screen/src/components/home/countFlopOne.vue index 0b0b5dd0..e949d2a6 100644 --- a/sgzb-screen/src/components/home/countFlopOne.vue +++ b/sgzb-screen/src/components/home/countFlopOne.vue @@ -1,7 +1,7 @@