浏览代码

垫款 初版1.5优化修改

zhaoxian 2 年之前
父节点
当前提交
2823e9f389

+ 1 - 1
jeecg-boot-module-system/src/main/java/cn/com/ctop/finance/payment/mapper/xml/FinancePaymentRechargeApplicationMapper.xml

@@ -80,7 +80,7 @@
             </if>
         </where>
         GROUP BY t1.id
-        order by t1.update_time desc
+        order by t1.create_time desc
     </select>
 
 </mapper>

+ 3 - 0
jeecg-boot-module-system/src/main/java/cn/com/ctop/finance/payment/service/impl/FinancePaymentApplicationServiceImpl.java

@@ -160,6 +160,8 @@ public class FinancePaymentApplicationServiceImpl extends ServiceImpl<FinancePay
         //获取审核人
         getRevieweder(application);
         this.updateById(application);
+        //添加拒绝记录
+        insertRecord(application.getId(), oldApplication.getApplicanterId(), oldApplication.getAuditStatus(), oldApplication.getApprovalContent(), oldApplication.getFiles(), oldApplication.getUpdateTime());
         //添加修改记录
         insertRecord(application.getId(), application.getApplicanterId(), "-1", null, application.getFiles(), new Date());
         //消息通知内容
@@ -226,6 +228,7 @@ public class FinancePaymentApplicationServiceImpl extends ServiceImpl<FinancePay
         if ("1".equals(rebateType)) {
             //返回财务
             application.setReviewederId("financialReview");
+            application.setRevieweder("-");
         } else {
             String paymentMedia = application.getPaymentMedia();//媒体类型 1-头条、2-快手、7-磁力金牛、9-广点通
             if ("7".equals(paymentMedia)) {

+ 8 - 1
jeecg-boot-module-system/src/main/java/cn/com/ctop/finance/payment/service/impl/FinancePaymentRechargeApplicationServiceImpl.java

@@ -163,6 +163,7 @@ public class FinancePaymentRechargeApplicationServiceImpl extends ServiceImpl<Fi
     public Result<Object> edit(JSONObject data) {
         JSONArray list = data.getJSONArray("list");
         FinancePaymentRechargeApplication recharge = JSONObject.parseObject(JSONObject.toJSONString(data), FinancePaymentRechargeApplication.class);
+        FinancePaymentRechargeApplication oldRecharge = this.getById(recharge.getId());
         FinancePaymentPool pool = financePaymentPoolService.getIdByUniqueKey(recharge.getAdvertiserId(), recharge.getProductId(), recharge.getPaymentMedia());
         if (Check.isNull(pool) || Check.isNull(list)) {
             return Result.error("数据异常");
@@ -214,7 +215,8 @@ public class FinancePaymentRechargeApplicationServiceImpl extends ServiceImpl<Fi
         }
         rechargeAccountService.delByRechargeId(recharge.getId());
         rechargeAccountService.saveBatch(accountList);
-
+        //添 拒绝记录
+        insertRecord(recharge.getId(), oldRecharge.getApplicanterId(), oldRecharge.getAuditStatus(), oldRecharge.getApprovalContent(), oldRecharge.getFiles(), oldRecharge.getUpdateTime());
         //添加申请记录 -1 退回修改
         insertRecord(recharge.getId(), recharge.getApplicanterId(), "-1", null, recharge.getFiles(), new Date());
         //消息通知内容
@@ -337,15 +339,20 @@ public class FinancePaymentRechargeApplicationServiceImpl extends ServiceImpl<Fi
         String financialReview = recharge.getFinancialReview();
         if (!Check.isNull(financialReview) && "1".equals(financialReview)) {
             recharge.setReviewederId("financialReview");
+            recharge.setRevieweder("-");
             recharge.setAuditStatus("1");//待审核
         } else {
             //媒介
             recharge.setReviewederId("meidaManager");
+            recharge.setRevieweder("-");
             recharge.setAuditStatus("2");//待充值
         }
     }
 
     private void insertRecord(Long rechargeId, String operatorId, String status, String txt, String files, Date time) {
+        if ("1".equals(status) || "2".equals(status)) {
+            return;
+        }
         FinancePaymentRechargeApplicationRecord record = new FinancePaymentRechargeApplicationRecord();
         record.setRechargeId(rechargeId);
         record.setReviewederId(operatorId);