Browse Source

启用前更新

wucl 7 months ago
parent
commit
bb0d1dc0db

+ 6 - 4
dao/src/main/resources/mapper/CommissionDeclareMapper.xml

@@ -59,11 +59,12 @@
         cc2.NAME AS clienteleSubName,
         mp.NAME,
         mp.report_no,
-        mp.created
+        mp.created,
+        (case mp.production when 'STATEMENT' THEN '意见书' when 'LETTER' THEN '复评函' else '报告' end ) production
         FROM
         (SELECT @i := 0) AS sort,
         major m
-        LEFT JOIN ( SELECT id, NAME, major_id, report_no, created FROM major_production WHERE deleted = 0 ) mp ON m.id = mp.major_id
+        LEFT JOIN ( SELECT id, NAME, major_id, report_no, created,production FROM major_production WHERE deleted = 0 ) mp ON m.id = mp.major_id
         LEFT JOIN `user` u ON u.id = m.client_manager_id
         LEFT JOIN `user` u1 ON u1.id = m.principal_id
         LEFT JOIN customer_company cc1 ON cc1.id = m.clientele_id
@@ -152,10 +153,11 @@
         cc2.NAME AS clienteleSubName,
         mp.NAME,
         mp.report_no ,
-        mp.created
+        mp.created,
+        (case mp.production when 'STATEMENT' THEN '意见书' when 'LETTER' THEN '复评函' else '报告' end ) production
         FROM (SELECT @i := 0) AS sort,
         major m
-        LEFT JOIN ( SELECT id, NAME, major_id, report_no,created FROM major_production WHERE deleted = 0 ) mp ON m.id = mp.major_id
+        LEFT JOIN ( SELECT id, NAME, major_id, report_no,created,production FROM major_production WHERE deleted = 0 ) mp ON m.id = mp.major_id
         LEFT JOIN user u ON u.id = m.client_manager_id
         LEFT JOIN user u1 ON u1.id = m.principal_id
         LEFT JOIN customer_company cc1 ON cc1.id = m.clientele_id

+ 5 - 0
domain/src/main/java/com/dayou/vo/CommissionDeclareVO.java

@@ -127,4 +127,9 @@ public class CommissionDeclareVO {
      */
     private Boolean delivery;
 
+    /**
+     * 产品类型
+     */
+    private String production;
+
 }

+ 15 - 22
service/src/main/java/com/dayou/dyoa/DyoaHistoryServiceImpl.java

@@ -68,13 +68,13 @@ public class DyoaHistoryServiceImpl implements IDyoaHistoryService{
 
     private Map<String,Long> departments = new HashMap<>();
 
-    private Map<String,Long> realAmounts = new HashMap<>();
+//    private Map<String,Long> realAmounts = new HashMap<>();
 
-    private Map<String,Long> orderFundIds = new HashMap<>();
+//    private Map<String,Long> orderFundIds = new HashMap<>();
 
-    private Map<String,Long> productionFundIds = new HashMap<>();
-
-    private Map<Long,Long> orderFundIdProdFundIds = new HashMap<>();
+//    private Map<String,Long> productionFundIds = new HashMap<>();
+//
+//    private Map<Long,Long> orderFundIdProdFundIds = new HashMap<>();
 
     private static final Map<String,String> MAJOR_ORDER_COLUM = new HashMap<>();
 
@@ -682,10 +682,8 @@ public class DyoaHistoryServiceImpl implements IDyoaHistoryService{
     }
 
     private Long getProductionFundIdByOrderFundId(Long orderFundMbsId) {
-        if (CollectionUtil.isEmpty(orderFundIdProdFundIds)) {
-            orderFundIdProdFundIds = productionFundService.getProductionFundIdByOrderFundId().stream().collect(Collectors.toMap(ProductionFund::getOrderFundId,BaseEntity::getId));
-        }
-        return orderFundIdProdFundIds.get(orderFundMbsId);
+        Map<Long, Long> collect = productionFundService.getProductionFundIdByOrderFundId().stream().collect(Collectors.toMap(ProductionFund::getOrderFundId, BaseEntity::getId));
+        return collect.get(orderFundMbsId);
     }
 
 
@@ -1103,11 +1101,10 @@ public class DyoaHistoryServiceImpl implements IDyoaHistoryService{
     }
 
     private Long findRealAmountMbsId(String columValue) {
-        if (CollectionUtil.isEmpty(realAmounts)){
-            realAmounts = dyoaRecordService.list(new LambdaQueryWrapper<DyoaRecord>().select(DyoaRecord::getMbsId, DyoaRecord::getDyoaId)
-                    .eq(DyoaRecord::getMbsType, REAL_AMOUNT.name())).stream().collect(Collectors.toMap(DyoaRecord::getDyoaId, DyoaRecord::getMbsId));
-        }
-        return realAmounts.get(columValue);
+
+        Map<String, Long> collect = dyoaRecordService.list(new LambdaQueryWrapper<DyoaRecord>().select(DyoaRecord::getMbsId, DyoaRecord::getDyoaId)
+                .eq(DyoaRecord::getMbsType, REAL_AMOUNT.name())).stream().collect(Collectors.toMap(DyoaRecord::getDyoaId, DyoaRecord::getMbsId));
+        return collect.get(columValue);
     }
 
     private String getProductionType(String value) {
@@ -1230,17 +1227,13 @@ public class DyoaHistoryServiceImpl implements IDyoaHistoryService{
     }
 
     private Long findOrderFundId(String columValue){
-        if (CollectionUtil.isEmpty(orderFundIds)){
-            orderFundIds = dyoaRecordService.selectOrderFundIdByDyoaOrderId().stream().collect(Collectors.toMap(DyoaRecord::getDyoaId,DyoaRecord::getMbsId));
-        }
-        return orderFundIds.get(columValue);
+        Map<String, Long> collect = dyoaRecordService.selectOrderFundIdByDyoaOrderId().stream().collect(Collectors.toMap(DyoaRecord::getDyoaId, DyoaRecord::getMbsId));
+        return collect.get(columValue);
     }
 
     private Long findProductionFundId(String columValue) {
-        if (CollectionUtil.isEmpty(productionFundIds)){
-            productionFundIds = productionFundService.selectProductionFundIdByDyoaReportNo().stream().collect(Collectors.toMap(ProductionFund::getProductionNo,ProductionFund::getId));
-        }
-        return productionFundIds.get(columValue);
+        Map<String, Long> collect = productionFundService.selectProductionFundIdByDyoaReportNo().stream().collect(Collectors.toMap(ProductionFund::getProductionNo, ProductionFund::getId));
+        return collect.get(columValue);
     }
 
 //    private Long getMbsWorkFlows(String flowCode){

+ 18 - 19
service/src/main/java/com/dayou/service/impl/MajorProductionServiceImpl.java

@@ -505,39 +505,38 @@ public class MajorProductionServiceImpl extends ServiceImpl<MajorProductionMappe
             majorProduction.setSecondCheck(ReportStatus.不审.name());
             majorProduction.setThirdCheck(ReportStatus.不审.name());
         }else {
-            //土地审核规则
-            if (businessObjectType.equals(TakeNumberEnum.LAND_NUMBER.getType()) && REPORT.name().equals(production)){
-                if (majorProduction.getIsRecord()){
-                    //要备案
-                    if (evaluateAmount.compareTo(EVALUATE_MAX)<=0){
-                        majorProduction.setSecondCheck(ReportStatus.待审核.name());
-                        majorProduction.setThirdCheck(ReportStatus.不审.name());
-                    }else{
+            if (evaluateAim.equals(PLEDGE)){
+                if (businessObjectType.equals(TakeNumberEnum.LAND_NUMBER.getType())){
+                    if (majorProduction.getIsRecord() && REPORT.name().equals(production)){
                         majorProduction.setSecondCheck(ReportStatus.待审核.name());
                         majorProduction.setThirdCheck(ReportStatus.待审核.name());
+                    }else{
+                        if (evaluateAmount.compareTo(EVALUATE_MAX)<=0){
+                            majorProduction.setSecondCheck(ReportStatus.待审核.name());
+                            majorProduction.setThirdCheck(ReportStatus.不审.name());
+                        }else{
+                            majorProduction.setSecondCheck(ReportStatus.待审核.name());
+                            majorProduction.setThirdCheck(ReportStatus.待审核.name());
+                        }
                     }
                 }else{
-                    //不备案
-                    majorProduction.setSecondCheck(ReportStatus.待审核.name());
-                    majorProduction.setThirdCheck(ReportStatus.待审核.name());
-                }
-            }else{
-                //房地产审核规则 抵押类是否需要复审和三审逻辑 ?
-                if (evaluateAim.equals(PLEDGE)){
                     if (evaluateAmount.compareTo(EVALUATE_MIN)<=0){
                         majorProduction.setSecondCheck(ReportStatus.不审.name());
                         majorProduction.setThirdCheck(ReportStatus.不审.name());
-                    }
-                    if (evaluateAmount.compareTo(EVALUATE_MIN)>0 && evaluateAmount.compareTo(EVALUATE_MAX)<=0){
+                    }else if (evaluateAmount.compareTo(EVALUATE_MAX)<=0
+                            && evaluateAmount.compareTo(EVALUATE_MIN)>0){
                         majorProduction.setSecondCheck(ReportStatus.待审核.name());
                         majorProduction.setThirdCheck(ReportStatus.不审.name());
-                    }
-                    if (evaluateAmount.compareTo(EVALUATE_MAX)>0){
+                    }else {
                         majorProduction.setSecondCheck(ReportStatus.待审核.name());
                         majorProduction.setThirdCheck(ReportStatus.待审核.name());
                     }
                 }
             }
+            else{
+                majorProduction.setSecondCheck(ReportStatus.待审核.name());
+                majorProduction.setThirdCheck(ReportStatus.待审核.name());
+            }
         }
     }