瀏覽代碼

Merge branch 'test' of http://git.tjyourong.com.cn/ctop/adsp-cloud into test

zhaoxian 3 年之前
父節點
當前提交
81974c0a18

+ 1 - 0
jeecg-boot-finance/src/main/java/org/jeecg/ctop/finance/settlement/entity/pojo/CtopCwjsSlettementReport.java

@@ -25,4 +25,5 @@ public class CtopCwjsSlettementReport implements Serializable {
     private String policyDate;
     private Integer mediaType;
     private String createUserId;
+    private Integer promotionType;
 }

+ 5 - 2
jeecg-boot-finance/src/main/java/org/jeecg/ctop/finance/settlement/mapper/xml/CwjsProfitMapper.xml

@@ -11,7 +11,8 @@
             policy_date,
             create_user_id,
             media_type,
-            policy_id
+            policy_id,
+        promotion_type
             )
             values
             <foreach collection="list" item="l" separator=",">
@@ -21,7 +22,9 @@
                 #{l.policyDate},
                 #{l.createUserId},
                 #{l.mediaType},
-                #{l.policyId})
+                #{l.policyId},
+                #{l.promotionType}
+                )
             </foreach>
     </insert>
 

+ 6 - 5
jeecg-boot-finance/src/main/java/org/jeecg/ctop/finance/settlement/service/serviceImpl/ReportSettlementServiceImpl.java

@@ -297,7 +297,7 @@ public class ReportSettlementServiceImpl implements IReportSettlementService {
         return mergeAccountId(settlementAccountList,allocations,uploadYears);
     }
 
-    private List<String> mergeAccountId(List<String> settlementAccountList, List<UserAllocation> allocations,String uploadYears) {
+    private List<String> mergeAccountId(List<String> settlementAccountList, List<UserAllocation> allocations,String downloadYear) {
         List<String>salesAccount = new ArrayList<>();
         for(UserAllocation allocation:allocations){
             if(allocation.getAccountStatus() == 0){
@@ -305,10 +305,10 @@ public class ReportSettlementServiceImpl implements IReportSettlementService {
             }
             if(allocation.getAccountStatus() == 1){
                 //被关停的账户
-                Long updateDateNum = Long.parseLong(DateUtils.formatDate(allocation.getUpdateTime(),"yyyymm"));
-                uploadYears = uploadYears.replace("-","");
-                Long uploadYearNum = Long.parseLong(uploadYears);
-                if(updateDateNum>=uploadYearNum){
+                Long updateDateNum = Long.parseLong(DateUtils.formatDate(allocation.getUpdateTime(),"yyyyMM"));
+                downloadYear = downloadYear.replace("-","");
+                Long downloadYearNum = Long.parseLong(downloadYear);
+                if(updateDateNum >= downloadYearNum){
                     salesAccount.add(allocation.getAccountId()+"");
                 }
             }
@@ -910,6 +910,7 @@ public class ReportSettlementServiceImpl implements IReportSettlementService {
                         report.setMediaType(cwjsPolicyInfo.getMediaType());
                         report.setCreateUserId(cwjsPolicyInfo.getCreateUserId());
                         report.setPolicyDate(day);
+                        report.setPromotionType(cwjsPolicyInfo.getPromotionType());
                         reportList.add(report);
                     }
                 }