diff --git a/sgzb-common/sgzb-common-core/src/main/java/com/bonus/sgzb/common/core/constant/Constants.java b/sgzb-common/sgzb-common-core/src/main/java/com/bonus/sgzb/common/core/constant/Constants.java index e282522..5e5ae6d 100644 --- a/sgzb-common/sgzb-common-core/src/main/java/com/bonus/sgzb/common/core/constant/Constants.java +++ b/sgzb-common/sgzb-common-core/src/main/java/com/bonus/sgzb/common/core/constant/Constants.java @@ -159,4 +159,7 @@ public class Constants */ public static final String privateKey = "MIIBVAIBADANBgkqhkiG9w0BAQEFAASCAT4wggE6AgEAAkEAqhHyZfSsYourNxaY7Nt+PrgrxkiA50efORdI5U5lsW79MmFnusUA355oaSXcLhu5xxB38SMSyP2KvuKNPuH3owIDAQABAkAfoiLyL+Z4lf4Myxk6xUDgLaWGximj20CUf+5BKKnlrK+Ed8gAkM0HqoTt2UZwA5E2MzS4EI2gjfQhz5X28uqxAiEA3wNFxfrCZlSZHb0gn2zDpWowcSxQAgiCstxGUoOqlW8CIQDDOerGKH5OmCJ4Z21v+F25WaHYPxCFMvwxpcw99EcvDQIgIdhDTIqD2jfYjPTY8Jj3EDGPbH2HHuffvflECt3Ek60CIQCFRlCkHpi7hthhYhovyloRYsM+IS9h/0BzlEAuO0ktMQIgSPT3aFAgJYwKpqRYKlLDVcflZFCKY7u3UP8iWi1Qw0Y="; + public static final String INNER_PROTOCAL = "1"; //内部单位协议 + + public static final String OUTER_PROTOCAL = "2"; //外部单位协议 } diff --git a/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/app/service/impl/LeaseOutDetailsServiceImpl.java b/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/app/service/impl/LeaseOutDetailsServiceImpl.java index 5c9292c..af654f8 100644 --- a/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/app/service/impl/LeaseOutDetailsServiceImpl.java +++ b/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/app/service/impl/LeaseOutDetailsServiceImpl.java @@ -10,6 +10,7 @@ import com.bonus.sgzb.base.api.domain.*; import com.bonus.sgzb.base.mapper.MaLabelBindMapper; import com.bonus.sgzb.base.mapper.MaMachineMapper; import com.bonus.sgzb.base.vo.MaLabelBindVO; +import com.bonus.sgzb.common.core.constant.Constants; import com.bonus.sgzb.common.core.utils.StringUtils; import com.bonus.sgzb.common.core.web.domain.AjaxResult; import com.bonus.sgzb.common.security.utils.SecurityUtils; @@ -361,9 +362,9 @@ public class LeaseOutDetailsServiceImpl implements LeaseOutDetailsService { if (StringUtils.isEmpty(protocol)) { ma.setFinalPrice(ma.getLeasePrice()); } else { - if ("1".equals(protocol)) { + if (Constants.INNER_PROTOCAL.equals(protocol)) { ma.setFinalPrice(ma.getLeasePrice()); - } else if ("2".equals(protocol)) { + } else if (Constants.OUTER_PROTOCAL.equals(protocol)) { ma.setFinalPrice(ma.getRentPrice()); } else { ma.setFinalPrice(ma.getLeasePrice()); 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 2899990..6790b9f 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 @@ -101,6 +101,7 @@ public class SltAgreementInfoController extends BaseController { List sltInfoMonth = sltAgreementInfoService.getSltInfoMonth(list); List> allLists = new ArrayList<>(); for (AgreementInfo agreementInfo : list) { + List list1 = new ArrayList<>(); for (SltAgreementInfo sltAgreementInfo : sltInfoMonth) { // 单个协议导出 if (StringUtils.isNotBlank(agreementInfo.getCodeNum())) { @@ -109,16 +110,19 @@ public class SltAgreementInfoController extends BaseController { if (s.equals(sltAgreementInfo.getCodeNum().toString())) { List node = sltAgreementInfo.getNode(); List leaseInfoList = Convert.toList(MonthRepairInfo.class, node); - allLists.add(leaseInfoList); + list1.addAll(leaseInfoList); } } } else { - // 多个协议导出 - List node = sltAgreementInfo.getNode(); - List leaseInfoList = Convert.toList(MonthRepairInfo.class, node); - allLists.add(leaseInfoList); + if (String.valueOf(agreementInfo.getAgreementId()).equals(sltAgreementInfo.getAgreementId())){ + // 多个协议导出 + List node = sltAgreementInfo.getNode(); + List leaseInfoList = Convert.toList(MonthRepairInfo.class, node); + list1.addAll(leaseInfoList); + } } } + allLists.add(list1); } exportMultipleLists(allLists, response); } @@ -283,7 +287,7 @@ public class SltAgreementInfoController extends BaseController { ExcelWriter excelWriter = EasyExcel.write(response.getOutputStream(), MonthRepairInfo.class).build(); for (int i = 0; i < lists.size(); i++) { - WriteSheet writeSheet = EasyExcel.writerSheet("Sheet" + (i + 1)).build(); + WriteSheet writeSheet = EasyExcel.writerSheet(lists.get(i).get(0).getProjectName()).build(); excelWriter.write(lists.get(i), writeSheet); } diff --git a/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/material/mapper/BackApplyMapper.java b/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/material/mapper/BackApplyMapper.java index 69b857f..1526f05 100644 --- a/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/material/mapper/BackApplyMapper.java +++ b/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/material/mapper/BackApplyMapper.java @@ -118,8 +118,6 @@ public interface BackApplyMapper { * @param bean * @return */ - List getUseTypeTree(BackApplyInfo bean); - List getUseTypeTreeL4(BackApplyInfo bean); List getUseTypeTreeL3(List list); diff --git a/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/material/service/impl/BackApplyServiceImpl.java b/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/material/service/impl/BackApplyServiceImpl.java index e9eb008..cb01580 100644 --- a/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/material/service/impl/BackApplyServiceImpl.java +++ b/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/material/service/impl/BackApplyServiceImpl.java @@ -369,11 +369,13 @@ public class BackApplyServiceImpl implements BackApplyService { List listL3 = new ArrayList<>(); List listL21 = new ArrayList<>(); try { - //list = backApplyMapper.getUseTypeTree(bean); + // 先查第四层类型 listL4 = backApplyMapper.getUseTypeTreeL4(bean); List list4ParentIds = listL4.stream().map(o -> o.getParentId()).collect(Collectors.toList()); + // 根据第四层parentId 查第三层类型 listL3 = backApplyMapper.getUseTypeTreeL3(list4ParentIds); List list3ParentIds = listL3.stream().map(o -> o.getParentId()).collect(Collectors.toList()); + // 根据第三层parentId 查第1.2层类型 listL21 = backApplyMapper.getUseTypeTreeL21(list3ParentIds); list.addAll(listL4); list.addAll(listL3); diff --git a/sgzb-modules/sgzb-material/src/main/resources/mapper/material/AgreementInfoMapper.xml b/sgzb-modules/sgzb-material/src/main/resources/mapper/material/AgreementInfoMapper.xml index 41ce2d3..f6d67a8 100644 --- a/sgzb-modules/sgzb-material/src/main/resources/mapper/material/AgreementInfoMapper.xml +++ b/sgzb-modules/sgzb-material/src/main/resources/mapper/material/AgreementInfoMapper.xml @@ -61,7 +61,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" #{authPerson}, #{phone}, #{updateBy}, - #{protocol}, + 1, NOW(), #{remark}, #{companyId}, diff --git a/sgzb-modules/sgzb-material/src/main/resources/mapper/material/BackApplyMapper.xml b/sgzb-modules/sgzb-material/src/main/resources/mapper/material/BackApplyMapper.xml index 9b5deab..1102058 100644 --- a/sgzb-modules/sgzb-material/src/main/resources/mapper/material/BackApplyMapper.xml +++ b/sgzb-modules/sgzb-material/src/main/resources/mapper/material/BackApplyMapper.xml @@ -610,106 +610,22 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" - -