zhangyuewww 2 years ago
parent
commit
749d34a66f

+ 11 - 5
winsea-haixin-plugin-yiliangyiyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/entity/TranSettlementReport.java

@@ -169,6 +169,16 @@ public class TranSettlementReport extends BaseModel<TranSettlementReport> {
      * 付款截图
      */
     private String paymentScreenshot;
+    /**
+     * 请款人
+     */
+    private String requester;
+    /**
+     * 请款日期
+     */
+    @JsonFormat(pattern = "yyyy-MM-dd")
+    @DateTimeFormat(pattern = "yyyy-MM-dd")
+    private Date requestDate;
     /**
      * 审核流id
      */
@@ -266,11 +276,7 @@ public class TranSettlementReport extends BaseModel<TranSettlementReport> {
     //记录
     @TableField(exist = false)
     private List<TranPriceApprove> tranPriceApproveList;
-    /**
-     * 发起人
-     */
-    @TableField(exist = false)
-    private String creater;
+
 
     @Override
     protected Serializable pkVal() {

+ 2 - 4
winsea-haixin-plugin-yiliangyiyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/service/impl/TranSettlementReportServiceImpl.java

@@ -79,10 +79,6 @@ public class TranSettlementReportServiceImpl extends ServiceImpl<TranSettlementR
         if(!CollectionUtils.isEmpty(tranSettlementReports)){
             for(int i=0;i<tranSettlementReports.size();i++){
                 TranSettlementReport tranSettlementReport= tranSettlementReports.get(i);
-                if(tranSettlementReport.getCreateUserId() != null){
-                    CommonStaff commonStaff = staffService.getInfo(tranSettlementReport.getCreateUserId());
-                    tranSettlementReport.setCreater(commonStaff.getStaffName());
-                }
                 TranCarInfo tranCarInfo=tranCarInfoService.selectById(tranSettlementReport.getCarId());
                 if (tranCarInfo!=null){
                     TranProcessInfo tranProcessInfo=tranProcessInfoService.selectById(tranCarInfo.getProcessId());
@@ -530,6 +526,8 @@ public class TranSettlementReportServiceImpl extends ServiceImpl<TranSettlementR
         //批量
         if (!CollectionUtils.isEmpty(tranSettlementReportList)) {
             for (TranSettlementReport tranSettlementReport1 : tranSettlementReportList) {
+                tranSettlementReport1.setRequestDate(new Date());
+                tranSettlementReport1.setRequester(AuthSecurityUtils.getStaffById(AuthSecurityUtils.getCurrentUserId()).getStaffName());
                 tranSettlementReport1.setBatchId(batchReviewInfo.getId());
                 this.updateById(tranSettlementReport1);
             }

+ 1 - 3
winsea-haixin-plugin-yiliangyiyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/workflow/TranSettlementReportListener.java

@@ -89,10 +89,8 @@ public class TranSettlementReportListener extends AbstractWorkflowTaskListener {
                 settlementReport.setWorkflowId(batchReviewInfo.getWorkflowId());
                 settlementReport.setStatus(batchReviewInfo.getStatus());
                 settlementReport.setApproveStatus(batchReviewInfo.getApproveStatus());
-
+                tranSettlementReportService.updateAllColumnById(settlementReport);
             }
-            tranSettlementReportService.updateBatchById(tranSettlementReports);
-
         }
 
     }