diff --git a/sgzb-modules/sgzb-base/src/main/resources/mapper/largeScreen/LargeScreenMapper.xml b/sgzb-modules/sgzb-base/src/main/resources/mapper/largeScreen/LargeScreenMapper.xml index 9dbfbe72..162dde6e 100644 --- a/sgzb-modules/sgzb-base/src/main/resources/mapper/largeScreen/LargeScreenMapper.xml +++ b/sgzb-modules/sgzb-base/src/main/resources/mapper/largeScreen/LargeScreenMapper.xml @@ -766,7 +766,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" AND sd.dept_name = #{maTypeName} - AND lai.`code` LIKE CONCAT('%',#{materialCode},'%') + AND ba.`code` LIKE CONCAT('%',#{materialCode},'%') AND bai.unit_id = #{unitId} diff --git a/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/material/controller/ScrapApplyDetailsController.java b/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/material/controller/ScrapApplyDetailsController.java index 3a290d10..96191d17 100644 --- a/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/material/controller/ScrapApplyDetailsController.java +++ b/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/material/controller/ScrapApplyDetailsController.java @@ -35,15 +35,14 @@ import com.bonus.sgzb.common.core.web.page.TableDataInfo; /** * 报废任务详细 - * + * * @author bonus * @date 2023-12-15 */ @RestController @Api(value = "报废任务详细") @RequestMapping("/scrap") -public class ScrapApplyDetailsController extends BaseController -{ +public class ScrapApplyDetailsController extends BaseController { @Resource private IScrapApplyDetailsService scrapApplyDetailsService; @@ -52,15 +51,14 @@ public class ScrapApplyDetailsController extends BaseController */ @ApiOperation("查询报废任务列表") @GetMapping("/getScrapTaskList") - public TableDataInfo list(ScrapApplyDetails scrapApplyDetails) - { + public TableDataInfo list(ScrapApplyDetails scrapApplyDetails) { startPage(); Map params = scrapApplyDetails.getParams(); - if (!params.isEmpty()){ + if (!params.isEmpty()) { String beginTime = (String) params.get("beginTime"); String endTime = (String) params.get("endTime"); - params.put("beginTime", beginTime+" 00:00:00"); - params.put("endTime", endTime+" 23:59:59"); + params.put("beginTime", beginTime + " 00:00:00"); + params.put("endTime", endTime + " 23:59:59"); scrapApplyDetails.setParams(params); } List list = scrapApplyDetailsService.selectScrapApplyDetailsList(scrapApplyDetails); @@ -72,14 +70,13 @@ public class ScrapApplyDetailsController extends BaseController */ @Log(title = "导出报废任务列表", businessType = BusinessType.EXPORT) @PostMapping("/export") - public void export(HttpServletResponse response, ScrapApplyDetails bean) - { + public void export(HttpServletResponse response, ScrapApplyDetails bean) { Map params = bean.getParams(); - if (params!=null && !params.isEmpty()){ + if (params != null && !params.isEmpty()) { String beginTime = (String) params.get("beginTime"); String endTime = (String) params.get("endTime"); - params.put("beginTime", beginTime+" 00:00:00"); - params.put("endTime", endTime+" 23:59:59"); + params.put("beginTime", beginTime + " 00:00:00"); + params.put("endTime", endTime + " 23:59:59"); bean.setParams(params); } List list = scrapApplyDetailsService.exportScrapApplyDetailsList(bean); @@ -92,8 +89,7 @@ public class ScrapApplyDetailsController extends BaseController */ @ApiOperation("查看报废任务详细列表") @GetMapping("/getScrapAuditList") - public TableDataInfo getScrapAuditList(ScrapApplyDetails scrapApplyDetails) - { + public TableDataInfo getScrapAuditList(ScrapApplyDetails scrapApplyDetails) { startPage(); List list = scrapApplyDetailsService.getScrapAuditList(scrapApplyDetails); return getDataTable(list); @@ -114,8 +110,7 @@ public class ScrapApplyDetailsController extends BaseController */ @ApiOperation("查看报废明细") @GetMapping("/getScrapRecord") - public TableDataInfo getScrapRecord(ScrapApplyDetails scrapApplyDetails) - { + public TableDataInfo getScrapRecord(ScrapApplyDetails scrapApplyDetails) { startPage(); List list = scrapApplyDetailsService.getScrapRecord(scrapApplyDetails); return getDataTable(list); @@ -126,8 +121,7 @@ public class ScrapApplyDetailsController extends BaseController */ @ApiOperation("查看报废照片") @GetMapping("/getFileUrl") - public AjaxResult getFileUrl(String fileIds) - { + public AjaxResult getFileUrl(String fileIds) { List list = scrapApplyDetailsService.getFileUrl(fileIds); return AjaxResult.success(list); } @@ -137,15 +131,14 @@ public class ScrapApplyDetailsController extends BaseController */ @ApiOperation("查询预报废任务列表") @PostMapping("/getScrapApplyList") - public TableDataInfo getScrapApplyList(ScrapApplyDetails scrapApplyDetails) - { + public TableDataInfo getScrapApplyList(ScrapApplyDetails scrapApplyDetails) { startPage(); Map params = scrapApplyDetails.getParams(); - if (!params.isEmpty()){ + if (!params.isEmpty()) { String beginTime = (String) params.get("beginTime"); String endTime = (String) params.get("endTime"); - params.put("beginTime", beginTime+" 00:00:00"); - params.put("endTime", endTime+" 23:59:59"); + params.put("beginTime", beginTime + " 00:00:00"); + params.put("endTime", endTime + " 23:59:59"); scrapApplyDetails.setParams(params); } List list = scrapApplyDetailsService.getScrapApplyList(scrapApplyDetails); @@ -169,7 +162,7 @@ public class ScrapApplyDetailsController extends BaseController @ApiOperation("报废任务提交审计信息") @Log(title = "报废任务提交审计信息", businessType = BusinessType.UPDATE) @PostMapping("/submitScrapTask") - public AjaxResult submitScrapTask(@RequestBody ScrapAudit scrapAudit){ + public AjaxResult submitScrapTask(@RequestBody ScrapAudit scrapAudit) { return toAjax(scrapApplyDetailsService.submitScrapTask(scrapAudit)); } @@ -178,15 +171,14 @@ public class ScrapApplyDetailsController extends BaseController */ @ApiOperation("查询报废审核任务列表") @PostMapping("/scrapTaskReviewList") - public TableDataInfo scrapTaskReviewList(ScrapApplyDetails scrapApplyDetails) - { + public TableDataInfo scrapTaskReviewList(ScrapApplyDetails scrapApplyDetails) { startPage(); Map params = scrapApplyDetails.getParams(); - if (!params.isEmpty()){ + if (!params.isEmpty()) { String beginTime = (String) params.get("beginTime"); String endTime = (String) params.get("endTime"); - params.put("beginTime", beginTime+" 00:00:00"); - params.put("endTime", endTime+" 23:59:59"); + params.put("beginTime", beginTime + " 00:00:00"); + params.put("endTime", endTime + " 23:59:59"); scrapApplyDetails.setParams(params); } List list = scrapApplyDetailsService.scrapTaskReviewList(scrapApplyDetails); @@ -214,11 +206,11 @@ public class ScrapApplyDetailsController extends BaseController public TableDataInfo obtainDisposalList(@RequestBody ScrapApplyDetails scrapApplyDetails) { startPage(); Map params = scrapApplyDetails.getParams(); - if (!params.isEmpty()){ + if (!params.isEmpty()) { String beginTime = (String) params.get("beginTime"); String endTime = (String) params.get("endTime"); - params.put("beginTime", beginTime+" 00:00:00"); - params.put("endTime", endTime+" 23:59:59"); + params.put("beginTime", beginTime + " 00:00:00"); + params.put("endTime", endTime + " 23:59:59"); scrapApplyDetails.setParams(params); } List list = scrapApplyDetailsService.obtainDisposalList(scrapApplyDetails); @@ -242,14 +234,13 @@ public class ScrapApplyDetailsController extends BaseController */ @Log(title = "导出预报废审核列表", businessType = BusinessType.EXPORT) @PostMapping("/exportForecastWaste") - public void exportForecastWaste(HttpServletResponse response, ScrapApplyDetails scrapApplyDetails) - { + public void exportForecastWaste(HttpServletResponse response, ScrapApplyDetails scrapApplyDetails) { Map params = scrapApplyDetails.getParams(); - if (params!=null && !params.isEmpty()){ + if (params != null && !params.isEmpty()) { String beginTime = (String) params.get("beginTime"); String endTime = (String) params.get("endTime"); - params.put("beginTime", beginTime+" 00:00:00"); - params.put("endTime", endTime+" 23:59:59"); + params.put("beginTime", beginTime + " 00:00:00"); + params.put("endTime", endTime + " 23:59:59"); scrapApplyDetails.setParams(params); } //获取预报废列表 diff --git a/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/material/domain/ScrapApplyDetails.java b/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/material/domain/ScrapApplyDetails.java index 3af1725a..221da851 100644 --- a/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/material/domain/ScrapApplyDetails.java +++ b/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/material/domain/ScrapApplyDetails.java @@ -31,6 +31,11 @@ public class ScrapApplyDetails extends BaseEntity @ApiModelProperty(value = "任务ID") private Long taskId; + /** + * 审核状态 + */ + private Integer taskStatus; + /** 上级ID */ @ApiModelProperty(value = "上级ID") private Long parentId; @@ -51,6 +56,10 @@ public class ScrapApplyDetails extends BaseEntity @ApiModelProperty(value = "(1退料2,维修审核,3盘点)") private String scrapSource; + /** 报废单号 */ + @ApiModelProperty(value = "报废单号") + private String scrapCode; + /** (0自然,1人为) */ @ApiModelProperty(value = "0=自然,1人为") private String scrapType; @@ -109,13 +118,19 @@ public class ScrapApplyDetails extends BaseEntity @ApiModelProperty(value = "数据状态") private Integer repairStatus; - private String keyword; + private String keywords; private String typeName; /** 任务ID集合 --导出时可以选择导出*/ @ApiModelProperty(value = "任务ID集合") private String taskIdList; + @ApiModelProperty(value = "开始时间") + private String beginTime; + + @ApiModelProperty(value = "结束时间") + private String endTime; + public void setId(Long id) { 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 fd9388d5..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 @@ -72,30 +72,36 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" WHERE sad.scrap_source IN ( '1', '2' ) AND tk.task_type = 57 - - 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 bpl.lot_id = #{backPro} + + and tk.CODE like concat('%', #{scrapCode}, '%') + + + and tk.task_status = #{taskStatus} + + + 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 @@ -422,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, @@ -457,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} @@ -476,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 @@