ソースを参照

采购付款逻辑更改

caozj 1 年間 前
コミット
3ce8587dda

+ 6 - 1
hx-purchase/src/main/java/com/fjhx/purchase/entity/pay/po/Pay.java

@@ -115,11 +115,16 @@ public class Pay extends BasePo {
     private String payStatus;
 
     /**
-     * 
+     * 
      */
     private BigDecimal rate;
 
     /**
+     * 税率
+     */
+    private BigDecimal taxRate;
+
+    /**
      * 付款类型  0:未核销  1发票核销
      */
     private String type;

+ 2 - 1
hx-purchase/src/main/java/com/fjhx/purchase/flow/PayFlow.java

@@ -96,6 +96,7 @@ public class PayFlow extends FlowDelegate {
             Assert.notEmpty(pay.getId(), "采购付款id不能为空");
         }
         pay.setCurrency("CNY");//默认币种人民币
+        pay.setRate(new BigDecimal("1"));//默认币种人民币
         pay.setStatus(PayStatusEnum.UNDER_REVIEW.getKey());
         payService.saveOrUpdate(pay);
 
@@ -137,7 +138,7 @@ public class PayFlow extends FlowDelegate {
         pay.setStatus(PayStatusEnum.PASS.getKey());
         pay.setApprovedDate(new Date());
         payService.updateById(pay);
-        if(!StringUtils.equals(pay.getPayType(),"3")){
+        if(!StringUtils.equals(pay.getType(),"3")){
 
             // 添加一条付款流水
             AccountPayment payment = new AccountPayment();

+ 1 - 1
hx-purchase/src/main/resources/mapper/pay/PayDetailMapper.xml

@@ -48,7 +48,7 @@
         pay_detail t1
         LEFT JOIN pay t2 ON t1.pay_id = t2.id
         <where>
-            pay_type != 3
+            `type` != 3
             <if test="purchaseIds neq null and purchaseIds.size() > 0">
                 <foreach collection="purchaseIds" item="purchaseId" open="AND purchase_id IN (" separator="," close=")">
                     #{purchaseId}