From a6065ec2896253691dea79625bb070bbe9b64926 Mon Sep 17 00:00:00 2001 From: "1539530615@qq.com" <1539530615@qq.com> Date: Mon, 11 Mar 2024 17:35:30 +0800 Subject: [PATCH] =?UTF-8?q?=E9=97=AE=E9=A2=98=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../resources/mapper/app/PurchaseInputMapper.xml | 2 +- .../resources/mapper/base/BmUnitInfoMapper.xml | 10 +++++----- .../resources/mapper/base/MaLabelBindMapper.xml | 6 +++--- .../mapper/base/MaMachineTypeMapper.xml | 6 +++--- .../resources/mapper/base/MaPropInfoMapper.xml | 2 +- .../mapper/base/MaintenanceGangMapper.xml | 9 ++++----- .../main/resources/mapper/base/RepairMapper.xml | 16 ++++++++-------- .../mapper/base/WarehouseKeeperMapper.xml | 6 +++--- .../controller/SltAgreementInfoController.java | 6 ++---- .../material/mapper/SltAgreementInfoMapper.java | 2 +- .../impl/SltAgreementInfoServiceImpl.java | 13 +++++++++++++ .../mapper/material/BackRecordMapper.xml | 4 ++-- .../mapper/material/LeaseRecordMapper.xml | 4 ++-- .../mapper/material/PurchaseCheckInfoMapper.xml | 4 ++-- .../mapper/material/RepairAuditDetailsMapper.xml | 8 ++++---- .../mapper/material/ScrapApplyDetailsMapper.xml | 4 ++-- .../mapper/material/SltAgreementInfoMapper.xml | 5 +++++ .../resources/mapper/system/SelectMapper.xml | 4 ++-- 18 files changed, 63 insertions(+), 48 deletions(-) diff --git a/sgzb-modules/sgzb-base/src/main/resources/mapper/app/PurchaseInputMapper.xml b/sgzb-modules/sgzb-base/src/main/resources/mapper/app/PurchaseInputMapper.xml index 5cd9ab47..78dcd88d 100644 --- a/sgzb-modules/sgzb-base/src/main/resources/mapper/app/PurchaseInputMapper.xml +++ b/sgzb-modules/sgzb-base/src/main/resources/mapper/app/PurchaseInputMapper.xml @@ -114,7 +114,7 @@ SELECT b.label_id,a.id,b.is_bind,b.label_code,a.bind_time,b.label_type,mt.type_id,mt.type_name, mt2.type_id as modelId , mt2.type_name as modelName,mt3.type_name as wpName, - mt4.type_name as kindName ,a.status,a.binder,dic.name,ma.ma_code,user.user_name + mt4.type_name as kindName ,a.status,a.binder,dic.name,ma.ma_code,user.nick_name FROM ma_machine_label b left join ma_label_bind a on a.ma_id = b.ma_id LEFT JOIN ma_type mt ON a.type_id = mt.type_id @@ -73,7 +73,7 @@ SELECT mt.type_id as modelId ,mt.type_name as modelName, - mt2.type_id, mt2.type_name , + mt2.type_id, mt2.type_name, mt3.type_id as typeId,mt3.type_name as typeName, mt3.type_id as kindId,mt4.type_name as kindName, - su.user_id as userId, su.user_name as userName + su.user_id as userId, su.nick_name as userName FROM ma_type mt LEFT JOIN ma_type mt2 ON mt2.type_id = mt.parent_id AND mt2.`level` = '3' LEFT JOIN ma_type mt3 ON mt2.parent_id = mt3.type_id AND mt3.`level` = '2' @@ -34,7 +34,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" LEFT JOIN ma_type_repair mtk ON mtk.type_id = mt.type_id LEFT JOIN sys_user su ON su.user_id = mtk.user_id WHERE mt.`level` = '4' AND mt.`del_flag` = '0' - AND mt3.type_name like concat('%', #{typeName}, '%') @@ -42,12 +41,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" diff --git a/sgzb-modules/sgzb-base/src/main/resources/mapper/base/RepairMapper.xml b/sgzb-modules/sgzb-base/src/main/resources/mapper/base/RepairMapper.xml index 00c6b4fb..048103a5 100644 --- a/sgzb-modules/sgzb-base/src/main/resources/mapper/base/RepairMapper.xml +++ b/sgzb-modules/sgzb-base/src/main/resources/mapper/base/RepairMapper.xml @@ -74,7 +74,7 @@ tt.CODE AS repairCode, bui.unit_name AS backUnit, bpi.lot_name AS backPro, - su.user_name AS createName, + su.nick_name AS createName, tt.create_time AS createTime, bai.CODE AS backCode, sd.name AS repairStatus, @@ -95,7 +95,7 @@ left join sys_dic sd on sd.id = tt.task_status where 1=1 - AND (locate(#{keyword}, su.user_name) > 0 + AND (locate(#{keyword}, su.nick_name) > 0 or locate(#{keyword}, tt.CODE) > 0) @@ -116,7 +116,7 @@ AND tt.create_time BETWEEN CONCAT(#{startTime}, ' 00:00:00') AND CONCAT(#{endTime}, ' 23:59:59') - GROUP BY rd.task_id,bui.unit_name,bpi.lot_name,bai.code,su.user_name + GROUP BY rd.task_id,bui.unit_name,bpi.lot_name,bai.code,su.nick_name order by tt.create_time desc @@ -126,7 +126,7 @@ tt.CODE AS repairCode, bui.unit_name AS backUnit, bpi.lot_name AS backPro, - su.user_name AS createName, + su.nick_name AS createName, tt.create_time AS createTime, bai.CODE AS backCode, sd.NAME AS repairStatus, @@ -139,7 +139,7 @@ rd.repaired_num AS repairedNum, rd.scrap_num AS scrapNum, case rd.status when '0' then '未完成' when '1' then '已完成' else '' end as status, - su2.user_name as repairer, + su2.nick_name as repairer, rd.update_time as updateTime FROM repair_apply_details rd @@ -157,7 +157,7 @@ LEFT JOIN ma_machine mm ON mm.ma_id = rd.ma_id where 1=1 - AND (locate(#{keyword}, su.user_name) > 0 + AND (locate(#{keyword}, su.nick_name) > 0 or locate(#{keyword}, tt.CODE) > 0) @@ -193,7 +193,7 @@ rad.repaired_num as repairedNum, rad.scrap_num as scrapNum, rad.status as status, - su.user_name as repairer, + su.nick_name as repairer, rad.update_time as updateTime, rad.type_id as typeId from repair_apply_details rad @@ -204,7 +204,7 @@ where rad.task_id = #{taskId} and rad.company_id = #{companyId} AND (locate(#{keyword}, mm.ma_code) > 0 - or locate(#{keyword}, su.user_name) > 0 + or locate(#{keyword}, su.nick_name) > 0 or locate(#{keyword}, mt2.type_name) > 0 or locate(#{keyword}, mt.type_name) > 0) diff --git a/sgzb-modules/sgzb-base/src/main/resources/mapper/base/WarehouseKeeperMapper.xml b/sgzb-modules/sgzb-base/src/main/resources/mapper/base/WarehouseKeeperMapper.xml index 8a42026a..8a4a8426 100644 --- a/sgzb-modules/sgzb-base/src/main/resources/mapper/base/WarehouseKeeperMapper.xml +++ b/sgzb-modules/sgzb-base/src/main/resources/mapper/base/WarehouseKeeperMapper.xml @@ -26,7 +26,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" mt2.type_id, mt2.type_name , mt3.type_id as typeId,mt3.type_name as typeName, mt3.type_id as kindId,mt4.type_name as kindName, - su.user_id as userId, su.user_name as userName + su.user_id as userId, su.nick_name as userName FROM ma_type mt LEFT JOIN ma_type mt2 ON mt2.type_id = mt.parent_id AND mt2.`level` = '3' LEFT JOIN ma_type mt3 ON mt2.parent_id = mt3.type_id AND mt3.`level` = '2' @@ -42,12 +42,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" diff --git a/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/material/controller/SltAgreementInfoController.java b/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/material/controller/SltAgreementInfoController.java index 07840eb0..5003db01 100644 --- a/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/material/controller/SltAgreementInfoController.java +++ b/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/material/controller/SltAgreementInfoController.java @@ -39,8 +39,7 @@ public class SltAgreementInfoController extends BaseController { */ @ApiOperation(value = "根据条件获取协议结算列表") @GetMapping("/getSltAgreementInfo") - public TableDataInfo getSltAgreementInfo(AgreementInfo bean) - { + public TableDataInfo getSltAgreementInfo(AgreementInfo bean) { startPage(); List list = new ArrayList<>(); if (bean.getUnitId() == null && bean.getProjectId() == null && bean.getSltStatus()== null){ @@ -56,8 +55,7 @@ public class SltAgreementInfoController extends BaseController { */ @ApiOperation(value = "根据协议获取结算清单") @PostMapping("/getSltInfo") - public AjaxResult getSltInfo(@RequestBody List list) - { + public AjaxResult getSltInfo(@RequestBody List list) { SltInfoVo bean = service.getSltInfo(list); return AjaxResult.success(bean); } diff --git a/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/material/mapper/SltAgreementInfoMapper.java b/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/material/mapper/SltAgreementInfoMapper.java index aafeb321..598e2a8c 100644 --- a/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/material/mapper/SltAgreementInfoMapper.java +++ b/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/material/mapper/SltAgreementInfoMapper.java @@ -49,5 +49,5 @@ public interface SltAgreementInfoMapper { int updateApply(SltAgreementApply apply); - + int updateMaStatus(SltAgreementInfo agreementInfo); } diff --git a/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/material/service/impl/SltAgreementInfoServiceImpl.java b/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/material/service/impl/SltAgreementInfoServiceImpl.java index db631717..0f976181 100644 --- a/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/material/service/impl/SltAgreementInfoServiceImpl.java +++ b/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/material/service/impl/SltAgreementInfoServiceImpl.java @@ -87,6 +87,19 @@ public class SltAgreementInfoServiceImpl implements SltAgreementInfoService { int i = mapper.updateRelation(apply); int j = 0; if (i > 0){ + List relations = mapper.getRelations(apply); + List infos = new ArrayList<>(); + for (SltAgreementRelation bean : relations){ + AgreementInfo info = new AgreementInfo(); + info.setAgreementId(Long.valueOf(bean.getAgreementId())); + infos.add(info); + } + List loseList = getLoseList(infos); + for (SltAgreementInfo agreementInfo : loseList){ + if (agreementInfo.getMaId() != null && agreementInfo.getMaId().isEmpty()){ + mapper.updateMaStatus(agreementInfo); + } + } j = mapper.updateApply(apply); }else { throw new ServiceException("结算审核失败"); diff --git a/sgzb-modules/sgzb-material/src/main/resources/mapper/material/BackRecordMapper.xml b/sgzb-modules/sgzb-material/src/main/resources/mapper/material/BackRecordMapper.xml index 78901d13..8478a475 100644 --- a/sgzb-modules/sgzb-material/src/main/resources/mapper/material/BackRecordMapper.xml +++ b/sgzb-modules/sgzb-material/src/main/resources/mapper/material/BackRecordMapper.xml @@ -11,7 +11,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" baif.`code`, mm.ma_code AS maCode, bcd.back_num AS backNum, - su.user_name AS backPerson, + su.nick_name AS backPerson, bcd.create_time AS createTime, bpl.lot_name AS proName, bui.unit_name AS unitName @@ -30,7 +30,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" and (baif.`code` like concat('%',#{keyWord},'%') or mm.ma_code like concat('%',#{keyWord},'%') or - su.user_name like concat('%',#{keyWord},'%')) + su.nick_name like concat('%',#{keyWord},'%')) and mt2.type_name like concat('%',#{typeName},'%') diff --git a/sgzb-modules/sgzb-material/src/main/resources/mapper/material/LeaseRecordMapper.xml b/sgzb-modules/sgzb-material/src/main/resources/mapper/material/LeaseRecordMapper.xml index 13b90c6f..42b78a64 100644 --- a/sgzb-modules/sgzb-material/src/main/resources/mapper/material/LeaseRecordMapper.xml +++ b/sgzb-modules/sgzb-material/src/main/resources/mapper/material/LeaseRecordMapper.xml @@ -11,7 +11,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" mm.ma_code as maCode, mt.unit_name as unit, lod.out_num as preNum, - su.user_name as leasePerson, + su.nick_name as leasePerson, lod.create_time as createTime, bpl.lot_name as proName, bui.unit_name as unitName @@ -30,7 +30,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" and (bai.agreement_code like concat('%',#{keyWord},'%') or mm.ma_code like concat('%',#{keyWord},'%') or mt.unit_name like concat('%',#{keyWord},'%') or - su.user_name like concat('%',#{keyWord},'%')) + su.nick_name like concat('%',#{keyWord},'%')) and mt2.type_name like concat('%',#{typeName},'%') diff --git a/sgzb-modules/sgzb-material/src/main/resources/mapper/material/PurchaseCheckInfoMapper.xml b/sgzb-modules/sgzb-material/src/main/resources/mapper/material/PurchaseCheckInfoMapper.xml index 04e8f45a..e55a11e2 100644 --- a/sgzb-modules/sgzb-material/src/main/resources/mapper/material/PurchaseCheckInfoMapper.xml +++ b/sgzb-modules/sgzb-material/src/main/resources/mapper/material/PurchaseCheckInfoMapper.xml @@ -25,7 +25,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" SELECT bai.agreement_id, bai.agreement_code , contract_code,file_url ,file_name,sign_time, bui.unit_id,bui.unit_name , bp.lot_id as projectId , bp.lot_name as projectName, diff --git a/sgzb-modules/sgzb-system/src/main/resources/mapper/system/SelectMapper.xml b/sgzb-modules/sgzb-system/src/main/resources/mapper/system/SelectMapper.xml index 7be9ed64..996269f8 100644 --- a/sgzb-modules/sgzb-system/src/main/resources/mapper/system/SelectMapper.xml +++ b/sgzb-modules/sgzb-system/src/main/resources/mapper/system/SelectMapper.xml @@ -169,7 +169,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"