diff --git a/bonus-common-biz/src/main/java/com/bonus/common/biz/domain/ProjectTreeNode.java b/bonus-common-biz/src/main/java/com/bonus/common/biz/domain/ProjectTreeNode.java index 31723a48..106df49b 100644 --- a/bonus-common-biz/src/main/java/com/bonus/common/biz/domain/ProjectTreeNode.java +++ b/bonus-common-biz/src/main/java/com/bonus/common/biz/domain/ProjectTreeNode.java @@ -22,6 +22,8 @@ public class ProjectTreeNode { @JsonInclude(JsonInclude.Include.NON_EMPTY) private String level; + private String typeKey; + @JsonInclude(JsonInclude.Include.NON_EMPTY) private List children = new ArrayList<>(); } diff --git a/bonus-common-biz/src/main/java/com/bonus/common/biz/domain/lease/LeaseApplyInfo.java b/bonus-common-biz/src/main/java/com/bonus/common/biz/domain/lease/LeaseApplyInfo.java index 36a34495..4b6b91e6 100644 --- a/bonus-common-biz/src/main/java/com/bonus/common/biz/domain/lease/LeaseApplyInfo.java +++ b/bonus-common-biz/src/main/java/com/bonus/common/biz/domain/lease/LeaseApplyInfo.java @@ -41,6 +41,14 @@ public class LeaseApplyInfo extends BaseEntity{ @ApiModelProperty(value = "申请人") private String createBy; + @ApiModelProperty(value = "实施单位") + @Excel(name = "实施单位") + private String impUnitName; + + @ApiModelProperty(value = "合同主体") + @Excel(name = "合同主体") + private String contractPart; + @ApiModelProperty(value = "领料单位") @Excel(name = "租赁单位") private String leaseUnit; @@ -59,7 +67,6 @@ public class LeaseApplyInfo extends BaseEntity{ * 领料物资名称汇总 */ @ApiModelProperty(value = "领料物资名称汇总") - @Excel(name = "领料物资类型") private String maTypeNames; @ApiModelProperty(value = "协议号") @@ -80,7 +87,6 @@ public class LeaseApplyInfo extends BaseEntity{ @ApiModelProperty(value = "领料人") private String leasePerson; - @Excel(name = "领料人电话") @ApiModelProperty(value = "联系方式") private String phone; diff --git a/bonus-modules/bonus-material/src/main/java/com/bonus/material/basic/domain/MachineHistoryRecordBean.java b/bonus-modules/bonus-material/src/main/java/com/bonus/material/basic/domain/MachineHistoryRecordBean.java index 038eb582..4f81710c 100644 --- a/bonus-modules/bonus-material/src/main/java/com/bonus/material/basic/domain/MachineHistoryRecordBean.java +++ b/bonus-modules/bonus-material/src/main/java/com/bonus/material/basic/domain/MachineHistoryRecordBean.java @@ -25,6 +25,14 @@ public class MachineHistoryRecordBean { @ApiModelProperty(value = "工程Id") private Integer proId; + @ApiModelProperty(value = "实施单位") + @Excel(name = "实施单位") + private String impUnitName; + + @ApiModelProperty(value = "合同主体") + @Excel(name = "合同主体") + private String contractPart; + @ApiModelProperty(value = "工程名称") @Excel(name = "工程名称") private String proName; diff --git a/bonus-modules/bonus-material/src/main/java/com/bonus/material/basic/domain/OutRecordInfo.java b/bonus-modules/bonus-material/src/main/java/com/bonus/material/basic/domain/OutRecordInfo.java index fd8159cd..c5e34c6d 100644 --- a/bonus-modules/bonus-material/src/main/java/com/bonus/material/basic/domain/OutRecordInfo.java +++ b/bonus-modules/bonus-material/src/main/java/com/bonus/material/basic/domain/OutRecordInfo.java @@ -38,6 +38,14 @@ public class OutRecordInfo { @Excel(name = "协议号") private String agreementCode; + @ApiModelProperty(value = "实施单位") + @Excel(name = "实施单位") + private String impUnitName; + + @ApiModelProperty(value = "合同主体") + @Excel(name = "合同主体") + private String contractPart; + @ApiModelProperty(value = "物资名称") @Excel(name = "物资名称") private String typeName; diff --git a/bonus-modules/bonus-material/src/main/java/com/bonus/material/basic/domain/ProjUsingRecord.java b/bonus-modules/bonus-material/src/main/java/com/bonus/material/basic/domain/ProjUsingRecord.java index 672f22fd..9353fa28 100644 --- a/bonus-modules/bonus-material/src/main/java/com/bonus/material/basic/domain/ProjUsingRecord.java +++ b/bonus-modules/bonus-material/src/main/java/com/bonus/material/basic/domain/ProjUsingRecord.java @@ -42,6 +42,14 @@ public class ProjUsingRecord { @Excel(name = "往来单位") private String unitName; + @ApiModelProperty(value = "实施单位") + @Excel(name = "实施单位") + private String impUnitName; + + @ApiModelProperty(value = "合同主体") + @Excel(name = "合同主体") + private String contractPart; + @ApiModelProperty(value = "物资名称") @Excel(name = "物资名称") private String typeName; diff --git a/bonus-modules/bonus-material/src/main/java/com/bonus/material/basic/service/impl/BmUnitPersonServiceImpl.java b/bonus-modules/bonus-material/src/main/java/com/bonus/material/basic/service/impl/BmUnitPersonServiceImpl.java index 0fa74d2b..05a0c051 100644 --- a/bonus-modules/bonus-material/src/main/java/com/bonus/material/basic/service/impl/BmUnitPersonServiceImpl.java +++ b/bonus-modules/bonus-material/src/main/java/com/bonus/material/basic/service/impl/BmUnitPersonServiceImpl.java @@ -149,9 +149,9 @@ public class BmUnitPersonServiceImpl implements IBmUnitPersonService //根据单位id去人员绑定中查询是否绑定,赋值绑定状态 unit.setIsBind(bmUnitMapper.countBmUnitPersonByUnitId(unit.getUnitId()) > 0 ? 1 : 0); } - if (unit.getTypeId() != null) { + /*if (unit.getTypeId() != null) { unit.setTypeName(labelMap.get(unit.getTypeId().toString()) == null ? "" : labelMap.get(unit.getTypeId().toString())); - } + }*/ if (StringUtils.isNotBlank(unit.getTelphone())) { unit.setTelphone(Sm4Utils.decrypt(unit.getTelphone())); } diff --git a/bonus-modules/bonus-material/src/main/java/com/bonus/material/lease/service/impl/LeaseApplyInfoServiceImpl.java b/bonus-modules/bonus-material/src/main/java/com/bonus/material/lease/service/impl/LeaseApplyInfoServiceImpl.java index e838795e..bc8dabf1 100644 --- a/bonus-modules/bonus-material/src/main/java/com/bonus/material/lease/service/impl/LeaseApplyInfoServiceImpl.java +++ b/bonus-modules/bonus-material/src/main/java/com/bonus/material/lease/service/impl/LeaseApplyInfoServiceImpl.java @@ -119,11 +119,7 @@ public class LeaseApplyInfoServiceImpl implements ILeaseApplyInfoService { @Override public List selectLeaseApplyInfoList(LeaseApplyInfo leaseApplyInfo) { leaseApplyInfo.setUserId(SecurityUtils.getUserId()); - List list = leaseApplyInfoMapper.selectLeaseApplyInfoList(leaseApplyInfo); - /*for (LeaseApplyInfo applyInfo : list) { - applyInfo.setMaTypeNames(leaseApplyDetailsMapper.selectMaTypeNameByParentId(applyInfo.getId())); - }*/ - return list; + return leaseApplyInfoMapper.selectLeaseApplyInfoList(leaseApplyInfo); } /** diff --git a/bonus-modules/bonus-material/src/main/resources/mapper/material/basic/BmUnitPersonMapper.xml b/bonus-modules/bonus-material/src/main/resources/mapper/material/basic/BmUnitPersonMapper.xml index 093340f5..e34482d0 100644 --- a/bonus-modules/bonus-material/src/main/resources/mapper/material/basic/BmUnitPersonMapper.xml +++ b/bonus-modules/bonus-material/src/main/resources/mapper/material/basic/BmUnitPersonMapper.xml @@ -39,10 +39,13 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" bu.update_by AS updateBy, bu.update_time AS updateTime, bu.remark AS remark, - bup.user_id as userId + bup.user_id as userId, + sdd.dict_label as typeName FROM bm_unit bu left join bm_unit_person bup ON bu.unit_id = bup.unit_id + left join sys_dict_data sdd on bu.type_id = sdd.dict_code + and sdd.dict_type = 'bm_unit_type' AND bup.user_id = #{userId} diff --git a/bonus-modules/bonus-material/src/main/resources/mapper/material/basic/ComplexQueryMapper.xml b/bonus-modules/bonus-material/src/main/resources/mapper/material/basic/ComplexQueryMapper.xml index 02e22a90..1037f227 100644 --- a/bonus-modules/bonus-material/src/main/resources/mapper/material/basic/ComplexQueryMapper.xml +++ b/bonus-modules/bonus-material/src/main/resources/mapper/material/basic/ComplexQueryMapper.xml @@ -9,6 +9,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" subquery1.agreementCode as agreementCode, subquery1.unitName as unitName, subquery1.proName as proName, + subquery1.contractPart as contractPart, + subquery1.impUnitName as impUnitName, subquery1.typeName as typeName, subquery1.typeModelName as typeModelName, subquery1.unit as unit, @@ -35,6 +37,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" bai.agreement_code AS agreementCode, bui.unit_name AS unitName, bpl.pro_name AS proName, + bpl.contract_part as contractPart, + sd.dept_name as impUnitName, mt2.type_name AS typeName, mt.type_name AS typeModelName, mt.unit_name AS unit, @@ -56,6 +60,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" GROUP BY agreement_id ) sai ON bai.agreement_id = sai.agreement_id LEFT JOIN bm_project bpl ON bpl.pro_id = bai.project_id + LEFT JOIN sys_dept sd on sd.dept_id = bpl.imp_unit LEFT JOIN bm_unit bui ON bui.unit_id = bai.unit_id LEFT JOIN ma_type mt ON mt.type_id = lod.type_id LEFT JOIN ma_type mt2 ON mt2.type_id = mt.parent_id @@ -67,7 +72,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" bpl.pro_name like concat('%',#{keyWord},'%') or mt2.type_name like concat('%',#{keyWord},'%') or mt.type_name like concat('%',#{keyWord},'%') or - mt.unit_name like concat('%',#{keyWord},'%') + mt.unit_name like concat('%',#{keyWord},'%') or + bpl.contract_part like concat('%', #{keyWord}, '%') or + sd.dept_name like concat('%', #{keyWord}, '%') ) @@ -99,6 +106,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" mt2.type_name AS typeName, mt.type_name AS typeModelName, mt.unit_name AS unit, + bpl.contract_part as contractPart, + sd.dept_name as impUnitName, SUM(IFNULL(bcd.back_num, 0)) backNum, sai.is_slt as isSlt, CASE @@ -117,6 +126,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" GROUP BY agreement_id ) sai ON bai.agreement_id = sai.agreement_id LEFT JOIN bm_project bpl ON bpl.pro_id = bai.project_id + LEFT JOIN sys_dept sd on sd.dept_id = bpl.imp_unit LEFT JOIN bm_unit bui ON bui.unit_id = bai.unit_id LEFT JOIN ma_type mt ON mt.type_id = bcd.type_id LEFT JOIN ma_type mt2 ON mt2.type_id = mt.parent_id @@ -128,7 +138,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" bpl.pro_name like concat('%',#{keyWord},'%') or mt2.type_name like concat('%',#{keyWord},'%') or mt.type_name like concat('%',#{keyWord},'%') or - mt.unit_name like concat('%',#{keyWord},'%') + mt.unit_name like concat('%',#{keyWord},'%') or + bpl.contract_part like concat('%', #{keyWord}, '%') or + sd.dept_name like concat('%', #{keyWord}, '%') ) @@ -161,6 +173,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" bai.agreement_code AS agreementCode, bui.unit_name AS unitName, bpl.pro_name AS proName, + bpl.contract_part as contractPart, + sd.dept_name as impUnitName, mt2.type_name AS typeName, mt.type_name AS typeModelName, mt.unit_name AS unit, @@ -179,6 +193,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" LEFT JOIN tm_task_agreement tta ON tta.task_id = lai.task_id LEFT JOIN bm_agreement_info bai ON bai.agreement_id = tta.agreement_id LEFT JOIN bm_project bpl ON bpl.pro_id = bai.project_id + LEFT JOIN sys_dept sd on sd.dept_id = bpl.imp_unit LEFT JOIN bm_unit bui ON bui.unit_id = bai.unit_id LEFT JOIN ma_type mt ON mt.type_id = lod.type_id LEFT JOIN ma_type mt2 ON mt2.type_id = mt.parent_id @@ -197,7 +212,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" mt.unit_name like concat('%',#{keyWord},'%') or mm.ma_code like concat('%',#{keyWord},'%') or lai.lease_person like concat('%',#{keyWord},'%') or - baif.back_person like concat('%',#{keyWord},'%') + baif.back_person like concat('%',#{keyWord},'%') or + bpl.contract_part like concat('%', #{keyWord}, '%') or + sd.dept_name like concat('%', #{keyWord}, '%') ) @@ -287,6 +304,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" SELECT bpl.pro_name AS proName, bui.unit_name AS unitName, + bpl.contract_part as contractPart, + sd.dept_name as impUnitName, bai.agreement_code AS agreementCode, mt1.type_name as typeName, mt.type_name as typeModelName, @@ -308,6 +327,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" LEFT JOIN tm_task_agreement tta ON tta.task_id = bs.task_id LEFT JOIN bm_agreement_info bai ON bai.agreement_id = tta.agreement_id LEFT JOIN bm_project bpl ON bpl.pro_id = bai.project_id + LEFT JOIN sys_dept sd on sd.dept_id = bpl.imp_unit LEFT JOIN bm_unit bui ON bui.unit_id = bai.unit_id LEFT JOIN ma_type mt ON bs.type_id = mt.type_id AND mt.del_flag = '0' 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 47d1ac29..dc5bfe9e 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 @@ -14,7 +14,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" CONCAT( 'dw', sd.dept_id ) AS id, sd.dept_name AS NAME, 0 AS parentId, - 1 AS LEVEL + 1 AS LEVEL, + null AS typeKey FROM sys_dept sd LEFT JOIN bm_unit bu ON sd.dept_id = bu.dept_id @@ -34,10 +35,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" CONCAT( 'lx', bu.dept_id, '-', sda.dict_code ) AS id, sda.dict_label AS NAME, CONCAT( 'dw', bu.dept_id ) AS parentId, - 2 AS LEVEL + 2 AS LEVEL, + sda.dict_value AS typeKey FROM bm_unit bu - LEFT JOIN sys_dict_data sda ON bu.type_id = sda.dict_value + LEFT JOIN sys_dict_data sda ON bu.type_id = sda.dict_code AND sda.dict_type = 'bm_unit_type' LEFT JOIN bm_agreement_info bai ON bu.unit_id = bai.unit_id AND bai.`status` = '1' @@ -54,10 +56,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" bu.unit_id AS id, bu.unit_name AS NAME, CONCAT( 'lx', bu.dept_id, '-', sda.dict_code ) AS parentId, - 3 AS LEVEL + 3 AS LEVEL, + sda.dict_value AS typeKey FROM bm_unit bu - LEFT JOIN sys_dict_data sda ON bu.type_id = sda.dict_value + LEFT JOIN sys_dict_data sda ON bu.type_id = sda.dict_code AND sda.dict_type = 'bm_unit_type' LEFT JOIN bm_agreement_info bai ON bu.unit_id = bai.unit_id AND bai.`status` = '1' diff --git a/bonus-modules/bonus-material/src/main/resources/mapper/material/lease/LeaseApplyDetailsMapper.xml b/bonus-modules/bonus-material/src/main/resources/mapper/material/lease/LeaseApplyDetailsMapper.xml index 013ff9ed..adc9386e 100644 --- a/bonus-modules/bonus-material/src/main/resources/mapper/material/lease/LeaseApplyDetailsMapper.xml +++ b/bonus-modules/bonus-material/src/main/resources/mapper/material/lease/LeaseApplyDetailsMapper.xml @@ -288,7 +288,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" mt.test_load AS testLoad, mt.holding_time AS holdingTime, DATE(lod.create_time) AS testTime, - pcd.check_result AS checkResult, + '合格' AS checkResult, lad.remark AS remark, DATE(DATE_SUB(DATE_ADD(lod.create_time, INTERVAL 1 YEAR), INTERVAL 1 DAY)) AS nextTestTime -- 计算 nextTestTime FROM diff --git a/bonus-modules/bonus-material/src/main/resources/mapper/material/lease/LeaseApplyInfoMapper.xml b/bonus-modules/bonus-material/src/main/resources/mapper/material/lease/LeaseApplyInfoMapper.xml index 6d2570b1..e43134bc 100644 --- a/bonus-modules/bonus-material/src/main/resources/mapper/material/lease/LeaseApplyInfoMapper.xml +++ b/bonus-modules/bonus-material/src/main/resources/mapper/material/lease/LeaseApplyInfoMapper.xml @@ -47,7 +47,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" sda.dict_label as taskStatusName, IFNULL(sum(lad.pre_num),0) as preCountNum, IFNULL(sum(lad.al_num),0) as alNum, - GROUP_CONCAT(mt1.type_name) as maTypeNames + GROUP_CONCAT(mt1.type_name) as maTypeNames, + bp.contract_part as contractPart, + sd.dept_name as impUnitName from lease_apply_info lai left join tm_task tt on lai.task_id = tt.task_id @@ -56,6 +58,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" left join bm_agreement_info bai on tta.agreement_id = bai.agreement_id left join bm_unit bu on bu.unit_id = bai.unit_id left join bm_project bp on bp.pro_id = bai.project_id + left join sys_dept sd on sd.dept_id = bp.imp_unit left join sys_dict_data sda on tt.task_status = sda.dict_value and sda.dict_type = 'lease_task_status' left join ma_type mt on lad.type_id = mt.type_id and mt.del_flag = '0' @@ -95,7 +98,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" lai.code like concat('%', #{keyWord}, '%') or lai.create_by like concat('%', #{keyWord}, '%') or lai.lease_person like concat('%', #{keyWord}, '%') or - lai.phone like concat('%', #{keyWord}, '%')) + lai.phone like concat('%', #{keyWord}, '%') or + bp.contract_part like concat('%', #{keyWord}, '%') or + sd.dept_name like concat('%', #{keyWord}, '%') + )