From eb9f571239adb41409708e9847288100a5bc70d3 Mon Sep 17 00:00:00 2001 From: mashuai Date: Wed, 3 Dec 2025 16:08:23 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../bonus/common/biz/domain/TypeTreeNode.java | 3 ++ .../material/back/domain/vo/MaCodeVo.java | 3 ++ .../back/mapper/BackApplyInfoMapper.java | 9 ++++ .../impl/BackApplyInfoServiceImpl.java | 41 ++++++++++++++- .../basic/domain/BmAgreementInfo.java | 2 + .../material/common/mapper/SelectMapper.java | 30 +++++++++++ .../service/impl/SelectServiceImpl.java | 44 +++++++++++++++- .../controller/DirectRotationController.java | 21 +++++++- .../ma/domain/DirectApplyExportInfo.java | 18 +++++-- .../material/ma/domain/DirectApplyInfo.java | 6 +++ .../ma/mapper/DirectRotationMapper.java | 7 +++ .../ma/service/DirectRotationService.java | 7 +++ .../ma/service/impl/DirectRotationImpl.java | 15 ++++++ .../material/back/BackApplyInfoMapper.xml | 31 +++++++++++ .../mapper/material/common/SelectMapper.xml | 51 +++++++++++++++++++ .../material/ma/DirectRotationMapper.xml | 23 +++++++-- .../mapper/material/ma/MachineMapper.xml | 1 + .../ma/WorkSiteDirectManageMapper.xml | 6 +++ .../settlement/SltAgreementInfoMapper.xml | 17 +++++++ 19 files changed, 323 insertions(+), 12 deletions(-) diff --git a/bonus-common-biz/src/main/java/com/bonus/common/biz/domain/TypeTreeNode.java b/bonus-common-biz/src/main/java/com/bonus/common/biz/domain/TypeTreeNode.java index 13f99ab9..153016c1 100644 --- a/bonus-common-biz/src/main/java/com/bonus/common/biz/domain/TypeTreeNode.java +++ b/bonus-common-biz/src/main/java/com/bonus/common/biz/domain/TypeTreeNode.java @@ -57,4 +57,7 @@ public class TypeTreeNode { @ApiModelProperty(value = "是否检验(0不检验,1检验)") private String isCheck; + + @ApiModelProperty("是否提示 当前工器具仍有班组在用,请核实退料单位") + private Boolean isAlert = false; } diff --git a/bonus-modules/bonus-material/src/main/java/com/bonus/material/back/domain/vo/MaCodeVo.java b/bonus-modules/bonus-material/src/main/java/com/bonus/material/back/domain/vo/MaCodeVo.java index a8e47b5f..77ad3b9b 100644 --- a/bonus-modules/bonus-material/src/main/java/com/bonus/material/back/domain/vo/MaCodeVo.java +++ b/bonus-modules/bonus-material/src/main/java/com/bonus/material/back/domain/vo/MaCodeVo.java @@ -106,4 +106,7 @@ public class MaCodeVo { @ApiModelProperty(value = "发布批次") private String publishTask; + + @ApiModelProperty("是否提示 当前工器具仍有班组在用,请核实退料单位") + private Boolean isAlert = false; } diff --git a/bonus-modules/bonus-material/src/main/java/com/bonus/material/back/mapper/BackApplyInfoMapper.java b/bonus-modules/bonus-material/src/main/java/com/bonus/material/back/mapper/BackApplyInfoMapper.java index 5ba5fd65..9dd823f7 100644 --- a/bonus-modules/bonus-material/src/main/java/com/bonus/material/back/mapper/BackApplyInfoMapper.java +++ b/bonus-modules/bonus-material/src/main/java/com/bonus/material/back/mapper/BackApplyInfoMapper.java @@ -10,6 +10,7 @@ import com.bonus.material.back.domain.vo.BackApplyInfoVo; import com.bonus.material.back.domain.vo.BackApplyVo; import com.bonus.material.back.domain.vo.BackExportDetailsVo; import com.bonus.material.back.domain.vo.MaCodeVo; +import com.bonus.material.basic.domain.BmAgreementInfo; import com.bonus.material.clz.domain.back.MaterialBackApplyDetails; import com.bonus.material.settlement.domain.SltAgreementInfo; import org.apache.ibatis.annotations.Param; @@ -568,4 +569,12 @@ public interface BackApplyInfoMapper { * @return */ int updateClzInfo(SltAgreementInfo info); + + /** + * 查询材料站在用 + * @param maCodeVo + * @param listAgreement + * @return + */ + SltAgreementInfo getClzUseInfoList(@Param("info") MaCodeVo maCodeVo, @Param("agreementIds") List listAgreement); } diff --git a/bonus-modules/bonus-material/src/main/java/com/bonus/material/back/service/impl/BackApplyInfoServiceImpl.java b/bonus-modules/bonus-material/src/main/java/com/bonus/material/back/service/impl/BackApplyInfoServiceImpl.java index d3fc6f33..b6c2cbac 100644 --- a/bonus-modules/bonus-material/src/main/java/com/bonus/material/back/service/impl/BackApplyInfoServiceImpl.java +++ b/bonus-modules/bonus-material/src/main/java/com/bonus/material/back/service/impl/BackApplyInfoServiceImpl.java @@ -1201,7 +1201,27 @@ public class BackApplyInfoServiceImpl implements IBackApplyInfoService { if (StringUtils.isBlank(dto.getTypeId())) { return AjaxResult.error(HttpCodeEnum.FAIL.getCode(), "机具类型ID为空"); } - return AjaxResult.success(backApplyInfoMapper.getMachineById(dto)); + // 根据单位id查询是否属于项目部退料 + boolean isXmb = false; + List listAgreement = new ArrayList<>(); + TypeTreeNode node = mapper.getTypeId(dto); + if (node != null && node.getTypeId() == 36) { + listAgreement = mapper.getAgreementIdByProId(dto); + if (org.apache.commons.collections4.CollectionUtils.isNotEmpty(listAgreement)) { + isXmb = true; + } + } + List list = backApplyInfoMapper.getMachineById(dto); + if (isXmb) { + for (MaCodeVo maCodeVo : list) { + // 根据typeId及maId及材料站协议查询该设备是否在材料站在用 + SltAgreementInfo info = backApplyInfoMapper.getClzUseInfoList(maCodeVo, listAgreement); + if (info != null) { + maCodeVo.setIsAlert(true); + } + } + } + return AjaxResult.success(list); } /** @@ -2130,6 +2150,25 @@ public class BackApplyInfoServiceImpl implements IBackApplyInfoService { filter(info -> !maCodes.contains(info.getMaCode())). collect(Collectors.toList()); } + // 根据单位id查询是否属于项目部退料 + boolean isXmb = false; + List listAgreement = new ArrayList<>(); + TypeTreeNode node = mapper.getTypeId(dto); + if (node != null && node.getTypeId() == 36) { + listAgreement = mapper.getAgreementIdByProId(dto); + if (org.apache.commons.collections4.CollectionUtils.isNotEmpty(listAgreement)) { + isXmb = true; + } + } + if (isXmb) { + for (MaCodeVo maCodeVo : list) { + // 根据typeId及maId及材料站协议查询该设备是否在材料站在用 + SltAgreementInfo info = backApplyInfoMapper.getClzUseInfoList(maCodeVo, listAgreement); + if (info != null) { + maCodeVo.setIsAlert(true); + } + } + } } return list; } diff --git a/bonus-modules/bonus-material/src/main/java/com/bonus/material/basic/domain/BmAgreementInfo.java b/bonus-modules/bonus-material/src/main/java/com/bonus/material/basic/domain/BmAgreementInfo.java index 6a8ac1f1..827e8ff6 100644 --- a/bonus-modules/bonus-material/src/main/java/com/bonus/material/basic/domain/BmAgreementInfo.java +++ b/bonus-modules/bonus-material/src/main/java/com/bonus/material/basic/domain/BmAgreementInfo.java @@ -155,4 +155,6 @@ public class BmAgreementInfo extends BaseEntity @ApiModelProperty(value = "所属项目部名称") private String projectUnitName; + + private long typeId; } diff --git a/bonus-modules/bonus-material/src/main/java/com/bonus/material/common/mapper/SelectMapper.java b/bonus-modules/bonus-material/src/main/java/com/bonus/material/common/mapper/SelectMapper.java index 71e98fb0..702147b3 100644 --- a/bonus-modules/bonus-material/src/main/java/com/bonus/material/common/mapper/SelectMapper.java +++ b/bonus-modules/bonus-material/src/main/java/com/bonus/material/common/mapper/SelectMapper.java @@ -5,6 +5,7 @@ import com.bonus.common.biz.domain.TreeNode; import com.bonus.common.biz.domain.TypeTreeNode; import com.bonus.material.back.domain.BackApplyDetails; import com.bonus.material.back.domain.BackApplyInfo; +import com.bonus.material.basic.domain.BmAgreementInfo; import com.bonus.material.basic.domain.BmProject; import com.bonus.material.basic.domain.BmUnit; import com.bonus.material.clz.domain.back.MaterialBackPreApply; @@ -506,4 +507,33 @@ public interface SelectMapper { * @return */ List getAgreeUnitList(BmUnit bmUnit); + + /** + * 根据单位id查询是否属于项目部退料 + * @param bean + * @return + */ + TypeTreeNode getTypeId(BackApplyInfo bean); + + /** + * 根据工程id查询协议id + * @param bean + * @return + */ + List getAgreementIdByProId(BackApplyInfo bean); + + /** + * 根据类型id查询使用量 + * @param listAgreement + * @param typeTreeNode + * @return + */ + TypeTreeNode getClzUseByTypeId(@Param("agreementIds") List listAgreement,@Param("type") TypeTreeNode typeTreeNode); + + /** + * 根据协议id查询协议信息 + * @param bean + * @return + */ + BmAgreementInfo getInfoList(BackApplyInfo bean); } diff --git a/bonus-modules/bonus-material/src/main/java/com/bonus/material/common/service/impl/SelectServiceImpl.java b/bonus-modules/bonus-material/src/main/java/com/bonus/material/common/service/impl/SelectServiceImpl.java index 9ecb2243..bc202328 100644 --- a/bonus-modules/bonus-material/src/main/java/com/bonus/material/common/service/impl/SelectServiceImpl.java +++ b/bonus-modules/bonus-material/src/main/java/com/bonus/material/common/service/impl/SelectServiceImpl.java @@ -7,12 +7,11 @@ import com.bonus.common.biz.domain.*; import com.bonus.common.core.web.domain.AjaxResult; import com.bonus.common.security.utils.SecurityUtils; import com.bonus.material.back.domain.BackApplyInfo; +import com.bonus.material.basic.domain.BmAgreementInfo; import com.bonus.material.basic.domain.BmProject; import com.bonus.material.basic.domain.BmUnit; -import com.bonus.material.basic.mapper.BmUnitMapper; import com.bonus.material.clz.domain.BmTeam; import com.bonus.material.clz.domain.vo.MaterialRetainedEquipmentInfo; -import com.bonus.material.clz.service.MaterialLeaseInfoService; import com.bonus.material.common.domain.dto.SelectDto; import com.bonus.material.common.domain.vo.AgreementVo; import com.bonus.material.common.domain.vo.SelectVo; @@ -944,6 +943,16 @@ public class SelectServiceImpl implements SelectService { */ @Override public AjaxResult getUseTypeTree(BackApplyInfo bean) { + // 根据单位id查询是否属于项目部退料 + boolean isXmb = false; + List listAgreement = new ArrayList<>(); + TypeTreeNode node = mapper.getTypeId(bean); + if (node != null && node.getTypeId() == 36) { + listAgreement = mapper.getAgreementIdByProId(bean); + if (CollectionUtils.isNotEmpty(listAgreement)) { + isXmb = true; + } + } List groupList = new ArrayList<>(); List list = new ArrayList<>(); List listL4 = new ArrayList<>(); @@ -953,6 +962,17 @@ public class SelectServiceImpl implements SelectService { // 先查第四层类型 listL4 = mapper.getUseTypeTreeL4(bean); if (CollectionUtils.isNotEmpty(listL4)) { + if (isXmb) { + for (TypeTreeNode typeTreeNode : listL4) { + // 针对于数量设备根据协议查询是否存在班组在用 + if (StringUtils.isNotBlank(typeTreeNode.getManageType()) && "1".equals(typeTreeNode.getManageType())) { + TypeTreeNode info = mapper.getClzUseByTypeId(listAgreement, typeTreeNode); + if (info != null) { + typeTreeNode.setIsAlert(true); + } + } + } + } List list4ParentIds = listL4.stream().map(TypeTreeNode::getParentId).collect(Collectors.toList()); // 根据第四层parentId 查第三层类型 listL3 = mapper.getUseTypeTreeL3(list4ParentIds); @@ -982,12 +1002,32 @@ public class SelectServiceImpl implements SelectService { */ @Override public AjaxResult getUseType(BackApplyInfo bean) { + // 根据协议id查询是否是项目部退料 + boolean isXmb = false; + List listAgreement = new ArrayList<>(); + BmAgreementInfo bmAgreementInfo = mapper.getInfoList(bean); + if (bmAgreementInfo != null && bmAgreementInfo.getTypeId() == 36) { + bean.setProId(bmAgreementInfo.getProjectId()); + listAgreement = mapper.getAgreementIdByProId(bean); + if (CollectionUtils.isNotEmpty(listAgreement)) { + isXmb = true; + } + } //四级类型只查询数量管理类型数据 bean.setUserId(SecurityUtils.getLoginUser().getUserid()); List listL4 = mapper.getUseTypeTreeApp(bean); if (CollectionUtils.isEmpty(listL4)) { return AjaxResult.success(); } + if (isXmb) { + for (TypeTreeNode typeTreeNode : listL4) { + // 针对于数量设备根据协议查询是否存在班组在用 + TypeTreeNode info = mapper.getClzUseByTypeId(listAgreement, typeTreeNode); + if (info != null) { + typeTreeNode.setIsAlert(true); + } + } + } // 根据四级查询三级类型信息 List list4ParentIds = listL4.stream() .map(TypeTreeNode::getParentId) diff --git a/bonus-modules/bonus-material/src/main/java/com/bonus/material/ma/controller/DirectRotationController.java b/bonus-modules/bonus-material/src/main/java/com/bonus/material/ma/controller/DirectRotationController.java index 1631212d..9fb6e404 100644 --- a/bonus-modules/bonus-material/src/main/java/com/bonus/material/ma/controller/DirectRotationController.java +++ b/bonus-modules/bonus-material/src/main/java/com/bonus/material/ma/controller/DirectRotationController.java @@ -1,5 +1,6 @@ package com.bonus.material.ma.controller; +import com.bonus.common.core.utils.DateUtils; import com.bonus.common.core.utils.poi.ExcelUtil; import com.bonus.common.core.web.controller.BaseController; import com.bonus.common.core.web.domain.AjaxResult; @@ -195,9 +196,16 @@ public class DirectRotationController extends BaseController { */ @PostMapping("/export") public void export(HttpServletResponse response, DirectApplyInfo directApplyInfo) { + String fileName = "直转记录查询"; List list = service.getList(directApplyInfo); + // 根据list集合数,去填充序号 + for (int i = 0; i < list.size(); i++) { + list.get(i).setSerialNumber(i + 1); + } ExcelUtil util = new ExcelUtil<>(DirectApplyExportInfo.class); - util.exportExcel(response, list, "直转记录数据"); + // 获取当前年月日时分秒导出时间,用括号拼接在后面 + String title = "直转记录查询" + "(" + "导出时间:" + DateUtils.getTime() + ")"; + util.exportExcel(response, list, fileName, title); } /** @@ -273,5 +281,16 @@ public class DirectRotationController extends BaseController { public AjaxResult getSignatureList(SltAgreementInfo sltAgreementInfo) { return service.getSignatureList(sltAgreementInfo); } + + /** + * 获取业务联系单号下拉 + * @param directApplyInfo + * @return + */ + @ApiOperation(value = "获取业务联系单号下拉") + @GetMapping("/getCodeList") + public AjaxResult getCodeList(DirectApplyInfo directApplyInfo) { + return service.getCodeList(directApplyInfo); + } } diff --git a/bonus-modules/bonus-material/src/main/java/com/bonus/material/ma/domain/DirectApplyExportInfo.java b/bonus-modules/bonus-material/src/main/java/com/bonus/material/ma/domain/DirectApplyExportInfo.java index 834042e7..d2771777 100644 --- a/bonus-modules/bonus-material/src/main/java/com/bonus/material/ma/domain/DirectApplyExportInfo.java +++ b/bonus-modules/bonus-material/src/main/java/com/bonus/material/ma/domain/DirectApplyExportInfo.java @@ -18,6 +18,10 @@ import java.util.List; @Data public class DirectApplyExportInfo { + @ApiModelProperty(value = "序号") + @Excel(name = "序号", isSequence = true, sort = 0, width = 5) + private Integer serialNumber; + /** * id */ @@ -43,7 +47,7 @@ public class DirectApplyExportInfo { private String createBy; @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") - @Excel(name = "申请时间", sort = 1, width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss") + @Excel(name = "申请时间", sort = 1, dateFormat = "yyyy-MM-dd HH:mm:ss") private Date createTime; private String updateBy; @@ -55,7 +59,7 @@ public class DirectApplyExportInfo { /** * 退料工程名称 */ - @Excel(name = "转出工程", sort = 4) + @Excel(name = "转出工程", sort = 4, width = 30) private String backProName; /** @@ -66,7 +70,7 @@ public class DirectApplyExportInfo { /** * 退料单位名称 */ - @Excel(name = "转出单位", sort = 3) + @Excel(name = "转出单位", sort = 3, width = 30) private String backUnitName; /** @@ -76,7 +80,7 @@ public class DirectApplyExportInfo { /** * 领料工程名称 */ - @Excel(name = "转入工程", sort = 6) + @Excel(name = "转入工程", sort = 6, width = 30) private String leaseProName; /** * 领料单位id @@ -85,7 +89,7 @@ public class DirectApplyExportInfo { /** * 领料单位名称 */ - @Excel(name = "转入单位", sort = 5) + @Excel(name = "转入单位", sort = 5, width = 30) private String leaseUnitName; /** * 退料人 @@ -208,4 +212,8 @@ public class DirectApplyExportInfo { @ApiModelProperty(value = "结束时间") private String endTime; + + @ApiModelProperty(value = "业务联系单号") + @Excel(name = "业务联单", sort = 9, width = 20) + private String businessCode; } diff --git a/bonus-modules/bonus-material/src/main/java/com/bonus/material/ma/domain/DirectApplyInfo.java b/bonus-modules/bonus-material/src/main/java/com/bonus/material/ma/domain/DirectApplyInfo.java index 104fb6b3..3e19de70 100644 --- a/bonus-modules/bonus-material/src/main/java/com/bonus/material/ma/domain/DirectApplyInfo.java +++ b/bonus-modules/bonus-material/src/main/java/com/bonus/material/ma/domain/DirectApplyInfo.java @@ -228,4 +228,10 @@ public class DirectApplyInfo extends BaseEntity { @ApiModelProperty(value = "退料项目部") private String backDepartName; + + @ApiModelProperty(value = "业务办理单号") + private String businessCode; + + @ApiModelProperty(value = "业务联单集合") + private List codeList; } diff --git a/bonus-modules/bonus-material/src/main/java/com/bonus/material/ma/mapper/DirectRotationMapper.java b/bonus-modules/bonus-material/src/main/java/com/bonus/material/ma/mapper/DirectRotationMapper.java index a32af718..721c0161 100644 --- a/bonus-modules/bonus-material/src/main/java/com/bonus/material/ma/mapper/DirectRotationMapper.java +++ b/bonus-modules/bonus-material/src/main/java/com/bonus/material/ma/mapper/DirectRotationMapper.java @@ -126,4 +126,11 @@ public interface DirectRotationMapper { * @return */ BmUnit getTeam(SltAgreementInfo sltAgreementInfo); + + /** + * 获取业务联系单号下拉 + * @param directApplyInfo + * @return + */ + List getCodeList(DirectApplyInfo directApplyInfo); } diff --git a/bonus-modules/bonus-material/src/main/java/com/bonus/material/ma/service/DirectRotationService.java b/bonus-modules/bonus-material/src/main/java/com/bonus/material/ma/service/DirectRotationService.java index bf3a5bf6..823050cc 100644 --- a/bonus-modules/bonus-material/src/main/java/com/bonus/material/ma/service/DirectRotationService.java +++ b/bonus-modules/bonus-material/src/main/java/com/bonus/material/ma/service/DirectRotationService.java @@ -122,4 +122,11 @@ public interface DirectRotationService { * @return */ BmUnit getTeam(SltAgreementInfo sltAgreementInfo); + + /** + * 获取业务联系单号下拉 + * @param directApplyInfo + * @return + */ + AjaxResult getCodeList(DirectApplyInfo directApplyInfo); } diff --git a/bonus-modules/bonus-material/src/main/java/com/bonus/material/ma/service/impl/DirectRotationImpl.java b/bonus-modules/bonus-material/src/main/java/com/bonus/material/ma/service/impl/DirectRotationImpl.java index 546fa496..f7cd851f 100644 --- a/bonus-modules/bonus-material/src/main/java/com/bonus/material/ma/service/impl/DirectRotationImpl.java +++ b/bonus-modules/bonus-material/src/main/java/com/bonus/material/ma/service/impl/DirectRotationImpl.java @@ -358,6 +358,10 @@ public class DirectRotationImpl implements DirectRotationService { directApplyInfos.setDirUrl(String.join(",", urls)); } directApplyInfos.setCreateBy(SecurityUtils.getLoginUser().getUserid().toString()); + if (CollectionUtils.isNotEmpty(directApplyInfos.getCodeList())) { + // 将领料单号集合转换成字符串 + directApplyInfos.setBusinessCode(String.join(",", directApplyInfos.getCodeList())); + } //将数据插入直转表direct_apply_info int res = workSiteDirectManageService.saveDirectApplyInfo(directApplyInfos); int id =directApplyInfos.getId(); @@ -581,6 +585,17 @@ public class DirectRotationImpl implements DirectRotationService { return mapper.getTeam(sltAgreementInfo); } + /** + * 获取业务联系单号下拉 + * @param directApplyInfo + * @return + */ + @Override + public AjaxResult getCodeList(DirectApplyInfo directApplyInfo) { + List list = mapper.getCodeList(directApplyInfo); + return AjaxResult.success(list); + } + // 将签名分类的逻辑提取到一个单独的方法 private void classifySignature(ClzDirectApplyInfo clzDirectApplyInfo, LeaseOutSign leaseOutSign, List list1, List list2, List list3) { diff --git a/bonus-modules/bonus-material/src/main/resources/mapper/material/back/BackApplyInfoMapper.xml b/bonus-modules/bonus-material/src/main/resources/mapper/material/back/BackApplyInfoMapper.xml index 0b7cdeab..b44ec5cf 100644 --- a/bonus-modules/bonus-material/src/main/resources/mapper/material/back/BackApplyInfoMapper.xml +++ b/bonus-modules/bonus-material/src/main/resources/mapper/material/back/BackApplyInfoMapper.xml @@ -1876,4 +1876,35 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" ORDER BY bcd.create_time desc + + diff --git a/bonus-modules/bonus-material/src/main/resources/mapper/material/common/SelectMapper.xml b/bonus-modules/bonus-material/src/main/resources/mapper/material/common/SelectMapper.xml index a57f688e..d62e4574 100644 --- a/bonus-modules/bonus-material/src/main/resources/mapper/material/common/SelectMapper.xml +++ b/bonus-modules/bonus-material/src/main/resources/mapper/material/common/SelectMapper.xml @@ -1717,4 +1717,55 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" ORDER BY LEVEL + + + + + + + + diff --git a/bonus-modules/bonus-material/src/main/resources/mapper/material/ma/DirectRotationMapper.xml b/bonus-modules/bonus-material/src/main/resources/mapper/material/ma/DirectRotationMapper.xml index 416ea702..e41f7dde 100644 --- a/bonus-modules/bonus-material/src/main/resources/mapper/material/ma/DirectRotationMapper.xml +++ b/bonus-modules/bonus-material/src/main/resources/mapper/material/ma/DirectRotationMapper.xml @@ -109,7 +109,8 @@ bpl1.pro_id AS leaseProId, bpl1.pro_name AS leaseProName, GROUP_CONCAT(DISTINCT mt2.type_name) as typeName, - IFNULL(swr.workflow_status,2) as status + IFNULL(swr.workflow_status,2) as status, + dai.business_code as businessCode FROM direct_apply_info dai LEFT JOIN bm_agreement_info bai ON dai.back_agreement_id = bai.agreement_id @@ -149,7 +150,8 @@ INSTR(a.backUnitName,#{keyWord}) > 0 OR INSTR(a.backProName,#{keyWord}) > 0 OR INSTR(a.leaseUnitName,#{keyWord}) > 0 OR - INSTR(a.leaseProName,#{keyWord}) > 0 + INSTR(a.leaseProName,#{keyWord}) > 0 OR + INSTR(a.businessCode,#{keyWord}) > 0 ) @@ -179,7 +181,8 @@ dai.dir_url AS dirUrl, dai.`status`, bpl.external_id AS backExternalId, - bpl1.external_id AS leaseExternalId + bpl1.external_id AS leaseExternalId, + dai.business_code AS businessCode FROM direct_apply_info dai LEFT JOIN direct_apply_details dad ON dai.id = dad.direct_id @@ -439,4 +442,18 @@ WHERE agreement_id = #{agreementId} + + diff --git a/bonus-modules/bonus-material/src/main/resources/mapper/material/ma/MachineMapper.xml b/bonus-modules/bonus-material/src/main/resources/mapper/material/ma/MachineMapper.xml index e11f3228..342d32ae 100644 --- a/bonus-modules/bonus-material/src/main/resources/mapper/material/ma/MachineMapper.xml +++ b/bonus-modules/bonus-material/src/main/resources/mapper/material/ma/MachineMapper.xml @@ -256,6 +256,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" and manage_type=#{manageType} + GROUP BY type_name diff --git a/bonus-modules/bonus-material/src/main/resources/mapper/material/ma/WorkSiteDirectManageMapper.xml b/bonus-modules/bonus-material/src/main/resources/mapper/material/ma/WorkSiteDirectManageMapper.xml index 71f5ef63..3efc227c 100644 --- a/bonus-modules/bonus-material/src/main/resources/mapper/material/ma/WorkSiteDirectManageMapper.xml +++ b/bonus-modules/bonus-material/src/main/resources/mapper/material/ma/WorkSiteDirectManageMapper.xml @@ -47,6 +47,9 @@ create_by, + + business_code, + create_time ) values ( @@ -91,6 +94,9 @@ #{createBy}, + + #{businessCode}, + NOW() ) diff --git a/bonus-modules/bonus-material/src/main/resources/mapper/material/settlement/SltAgreementInfoMapper.xml b/bonus-modules/bonus-material/src/main/resources/mapper/material/settlement/SltAgreementInfoMapper.xml index 24d8b307..fed70b9d 100644 --- a/bonus-modules/bonus-material/src/main/resources/mapper/material/settlement/SltAgreementInfoMapper.xml +++ b/bonus-modules/bonus-material/src/main/resources/mapper/material/settlement/SltAgreementInfoMapper.xml @@ -1377,6 +1377,23 @@ AND sd.dept_name = #{impUnitName} + + AND mt1.type_name = #{typeName} + + + AND mt.type_name = #{modelName} + + + AND ( + bai.agreement_code like concat('%',#{keyWord},'%') + OR bp.pro_name like concat('%',#{keyWord},'%') + OR mt1.type_name like concat('%',#{keyWord},'%') + OR mt.type_name like concat('%',#{keyWord},'%') + OR mt.unit_name like concat('%',#{keyWord},'%') + OR ifnull(sad.unit_name ,bui.unit_name) like concat('%',#{keyWord},'%') + OR sd.dept_name like concat('%',#{keyWord},'%') + ) + ) res