From 03232682f866ebe1ca78c964d4d7735f038241c7 Mon Sep 17 00:00:00 2001 From: liux <963924687@qq.com> Date: Wed, 14 Jan 2026 09:44:23 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B5=8B=E8=AF=95=E9=97=AE=E9=A2=98=E4=BF=AE?= =?UTF-8?q?=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../lease/controller/LeaseTaskController.java | 4 +- .../domain/RepairAuditDetailsExport.java | 6 +++ .../settlement/domain/vo/SltInfoVo.java | 2 + .../impl/SltAgreementInfoServiceImpl.java | 49 ++++++++++++++----- .../mapper/material/repair/RepairMapper.xml | 22 +++++++-- 5 files changed, 65 insertions(+), 18 deletions(-) diff --git a/bonus-modules/bonus-material/src/main/java/com/bonus/material/lease/controller/LeaseTaskController.java b/bonus-modules/bonus-material/src/main/java/com/bonus/material/lease/controller/LeaseTaskController.java index 5a1df75a..815b295b 100644 --- a/bonus-modules/bonus-material/src/main/java/com/bonus/material/lease/controller/LeaseTaskController.java +++ b/bonus-modules/bonus-material/src/main/java/com/bonus/material/lease/controller/LeaseTaskController.java @@ -167,8 +167,8 @@ public class LeaseTaskController extends BaseController { @ApiOperation(value = "领用发布查询") @GetMapping("/getPublishList") public AjaxResult getPublishList(LeaseApplyInfo leaseApplyInfo) { - /*Long deptId = typeService.getUserDeptId(); - leaseApplyInfo.setCompanyId(deptId);*/ + Long deptId = typeService.getUserDeptId(); + leaseApplyInfo.setCompanyId(deptId); Integer pageIndex = Convert.toInt(ServletUtils.getParameter("pageNum"), 1); Integer pageSize = Convert.toInt(ServletUtils.getParameter("pageSize"), 10); try { diff --git a/bonus-modules/bonus-material/src/main/java/com/bonus/material/repair/domain/RepairAuditDetailsExport.java b/bonus-modules/bonus-material/src/main/java/com/bonus/material/repair/domain/RepairAuditDetailsExport.java index ab8bc8d5..08555231 100644 --- a/bonus-modules/bonus-material/src/main/java/com/bonus/material/repair/domain/RepairAuditDetailsExport.java +++ b/bonus-modules/bonus-material/src/main/java/com/bonus/material/repair/domain/RepairAuditDetailsExport.java @@ -49,12 +49,18 @@ public class RepairAuditDetailsExport { * 退料单位名称 */ @ApiModelProperty(value = "退料单位名称") + @Excel(name = "退料单位名称") private String backUnit; /** * 退料工程名称 */ @ApiModelProperty(value = "退料工程名称") + @Excel(name = "退料工程名称") private String backPro; + + @ApiModelProperty(value = "分公司") + @Excel(name = "分公司") + private String impUnitName; /** * 退料单号 */ diff --git a/bonus-modules/bonus-material/src/main/java/com/bonus/material/settlement/domain/vo/SltInfoVo.java b/bonus-modules/bonus-material/src/main/java/com/bonus/material/settlement/domain/vo/SltInfoVo.java index 931697e3..f20a96aa 100644 --- a/bonus-modules/bonus-material/src/main/java/com/bonus/material/settlement/domain/vo/SltInfoVo.java +++ b/bonus-modules/bonus-material/src/main/java/com/bonus/material/settlement/domain/vo/SltInfoVo.java @@ -190,4 +190,6 @@ public class SltInfoVo { private Date actualEndDate; private List signUrlList; + + private Long companyId; } diff --git a/bonus-modules/bonus-material/src/main/java/com/bonus/material/settlement/service/impl/SltAgreementInfoServiceImpl.java b/bonus-modules/bonus-material/src/main/java/com/bonus/material/settlement/service/impl/SltAgreementInfoServiceImpl.java index 78fb6ab3..f67273fb 100644 --- a/bonus-modules/bonus-material/src/main/java/com/bonus/material/settlement/service/impl/SltAgreementInfoServiceImpl.java +++ b/bonus-modules/bonus-material/src/main/java/com/bonus/material/settlement/service/impl/SltAgreementInfoServiceImpl.java @@ -21,6 +21,7 @@ import com.bonus.material.basic.mapper.BmAgreementInfoMapper; import com.bonus.material.basic.mapper.BmConfigMapper; import com.bonus.material.common.domain.dto.SelectDto; import com.bonus.material.common.domain.vo.AgreementVo; +import com.bonus.material.ma.service.ITypeService; import com.bonus.material.settlement.domain.SltAgreementApply; import com.bonus.material.settlement.domain.SltAgreementReduce; import com.bonus.material.settlement.domain.SltAgreementRelation; @@ -92,6 +93,9 @@ public class SltAgreementInfoServiceImpl implements ISltAgreementInfoService { @Resource private SltAgreementReduceMapper sltAgreementRecudceMapper; + @Resource + private ITypeService typeService; + // 定义线程级缓存 private static final ThreadLocal> leaseListCache = new ThreadLocal<>(); // 丢失结算列表缓存 @@ -709,6 +713,8 @@ public class SltAgreementInfoServiceImpl implements ISltAgreementInfoService { @Override @Transactional(rollbackFor = Exception.class) public int submitCosts(@NotNull(message = "结算信息不能为空") SltInfoVo sltInfoVo) { + Long deptId = typeService.getUserDeptId(); + sltInfoVo.setCompanyId(deptId); // 检查登录用户是否有结算权限 // int loginUserSettlementTypePermission = this.checkLoginUserHasSettlementPermission(); // sltInfoVo.setSettlementType(loginUserSettlementTypePermission); @@ -724,16 +730,21 @@ public class SltAgreementInfoServiceImpl implements ISltAgreementInfoService { UUID uuid = UUID.randomUUID(); String sltTask = uuid.toString(); String sltAuditor = null; - if (sltInfoVo.getSettlementType() == null) { - sltAuditor = "待张志峰,刘春杰审核"; - } else if (sltInfoVo.getSettlementType() == 1) { - sltAuditor = "待张志峰审核"; - }else if (sltInfoVo.getSettlementType() == 2) { - sltAuditor = "待刘春杰审核"; + if(GlobalConstants.LONG_JJ == deptId){ + if (sltInfoVo.getSettlementType() == null) { + sltAuditor = "待张志峰,刘春杰审核"; + } else if (sltInfoVo.getSettlementType() == 1) { + sltAuditor = "待张志峰审核"; + }else if (sltInfoVo.getSettlementType() == 2) { + sltAuditor = "待刘春杰审核"; + }else{ + sltAuditor = "待审核"; + } + }else if(GlobalConstants.LONG_HY == deptId){ + sltAuditor = "顾国强或王文斌审核"; }else{ sltAuditor = "待审核"; } - Long[] agreementIds = sltInfoVo.getAgreementIds(); if (agreementIds != null && agreementIds.length > 0) { Long agreementId = agreementIds[0]; @@ -1140,7 +1151,8 @@ public class SltAgreementInfoServiceImpl implements ISltAgreementInfoService { @Override @Transactional(rollbackFor = Exception.class) public AjaxResult costExamine(SltAgreementApply sltAgreementApply) { - + Long deptId = typeService.getUserDeptId(); + sltAgreementApply.setCompanyId(deptId); if (Objects.isNull(sltAgreementApply) || Objects.isNull(sltAgreementApply.getStatus())) { return AjaxResult.error("结算信息为空,请刷新后重试!"); @@ -1161,12 +1173,23 @@ public class SltAgreementInfoServiceImpl implements ISltAgreementInfoService { Integer checkSettlementType = checkSltPer.getSettlementType(); - if(checkSettlementType == 1 && "73".equals(userId)){ - sltSwitch = true; - } + if(GlobalConstants.LONG_JJ == deptId){ + if(checkSettlementType == 1 && "73".equals(userId)){ + sltSwitch = true; + } - if(checkSettlementType == 2 && "1549".equals(userId)){ - sltSwitch = true; + if(checkSettlementType == 2 && "1549".equals(userId)){ + sltSwitch = true; + } + }else if(GlobalConstants.LONG_HY == deptId){ + //顾国强 + if("193".equals(userId)){ + sltSwitch = true; + } + //王文斌 + if("124".equals(userId)){ + sltSwitch = true; + } } if(sltSwitch){ diff --git a/bonus-modules/bonus-material/src/main/resources/mapper/material/repair/RepairMapper.xml b/bonus-modules/bonus-material/src/main/resources/mapper/material/repair/RepairMapper.xml index 20124f50..d9b3fe0c 100644 --- a/bonus-modules/bonus-material/src/main/resources/mapper/material/repair/RepairMapper.xml +++ b/bonus-modules/bonus-material/src/main/resources/mapper/material/repair/RepairMapper.xml @@ -1659,7 +1659,7 @@ #{id} - + ) @@ -1820,10 +1820,18 @@ mt.type_name as typeName, SUM(rad.repair_num) as repairNum, SUM(rad.repaired_num) as repairedNum, - SUM(rad.scrap_num) as scrapNum + SUM(rad.scrap_num) as scrapNum, + bui.unit_name AS backUnit, + bpl.pro_name AS backPro, + sd.dept_name as impUnitName FROM repair_audit_details rad LEFT JOIN tm_task tt on tt.task_id = rad.task_id LEFT JOIN tm_task tt2 ON tt2.task_id = rad.repair_id + LEFT JOIN tm_task_agreement tta ON rad.repair_id = tta.task_id + LEFT JOIN bm_agreement_info bai ON tta.agreement_id = bai.agreement_id + LEFT JOIN bm_project bpl ON bai.project_id = bpl.pro_id + LEFT JOIN bm_unit bui ON bai.unit_id = bui.unit_id + left join sys_dept sd on sd.dept_id = bpl.imp_unit LEFT JOIN ma_type mt ON rad.type_id = mt.type_id LEFT JOIN ma_type mt2 ON mt.parent_id = mt2.type_id @@ -1862,10 +1870,18 @@ mt.type_name as typeName, SUM(rad.repair_num) as repairNum, SUM(rad.repaired_num) as repairedNum, - SUM(rad.scrap_num) as scrapNum + SUM(rad.scrap_num) as scrapNum, + bui.unit_name AS backUnit, + bpl.pro_name AS backPro, + sd.dept_name as impUnitName FROM repair_audit_details rad LEFT JOIN tm_task tt on tt.task_id = rad.task_id LEFT JOIN tm_task tt2 ON tt2.task_id = tt.pre_task_id + LEFT JOIN tm_task_agreement tta ON rad.repair_id = tta.task_id + LEFT JOIN bm_agreement_info bai ON tta.agreement_id = bai.agreement_id + LEFT JOIN bm_project bpl ON bai.project_id = bpl.pro_id + LEFT JOIN bm_unit bui ON bai.unit_id = bui.unit_id + left join sys_dept sd on sd.dept_id = bpl.imp_unit LEFT JOIN ma_type mt ON rad.type_id = mt.type_id LEFT JOIN ma_type mt2 ON mt.parent_id = mt2.type_id