瀏覽代碼

1 修改费用类型赋值

11816 23 小時之前
父節點
當前提交
a2cee03e16

+ 5
- 0
src/main/java/com/example/backend/pAndSExe/mapper/PurMultiSettleMapper.java 查看文件

@@ -2,8 +2,10 @@ package com.example.backend.pAndSExe.mapper;
2 2
 
3 3
 import com.baomidou.mybatisplus.annotation.InterceptorIgnore;
4 4
 import com.baomidou.mybatisplus.core.mapper.BaseMapper;
5
+import com.example.backend.pAndSExe.model.Feiyongleixing;
5 6
 import com.example.backend.pAndSExe.model.PurMultiSettle;
6 7
 import org.apache.ibatis.annotations.Param;
8
+import org.apache.ibatis.annotations.Select;
7 9
 import org.apache.ibatis.annotations.Update;
8 10
 
9 11
 /**
@@ -24,4 +26,7 @@ public interface PurMultiSettleMapper extends BaseMapper<PurMultiSettle> {
24 26
     @InterceptorIgnore(blockAttack="true")
25 27
     @Update("{call SGGMIIP.pro_feelInvReq_save300(#{settleId})}")
26 28
     void insertfeeId(Long settleId);
29
+
30
+    @Select("select cateCode,cateName,feeCd,feeNm from fytypedtl where ifnull(del_flag, 0) != 1  and feeNm=#{feeNm} order by cateCode,feeCd limit 1")
31
+    Feiyongleixing selectFeeCateNameByFeeNm(String feeNm);
27 32
 }

+ 19
- 0
src/main/java/com/example/backend/pAndSExe/model/Feiyongleixing.java 查看文件

@@ -0,0 +1,19 @@
1
+package com.example.backend.pAndSExe.model;
2
+
3
+import com.baomidou.mybatisplus.annotation.TableField;
4
+import lombok.Data;
5
+
6
+@Data
7
+public class Feiyongleixing{
8
+
9
+    @TableField("cateCode")
10
+    private String cateCode;
11
+    @TableField("cateName")
12
+    private String cateName;
13
+    @TableField("feeCd")
14
+    private String feeCd;
15
+    @TableField("feeNm")
16
+    private String feeNm;
17
+}
18
+
19
+

+ 5
- 0
src/main/java/com/example/backend/pAndSExe/service/impl/FeeInvoiceSettleServiceImpl.java 查看文件

@@ -72,6 +72,10 @@ public class FeeInvoiceSettleServiceImpl implements FeeInvoiceSettleService {
72 72
                 settle.setTaxInvType(inf.getTaxInvType()); // 映射中间表发票类型
73 73
                 settle.setExpNode(inf.getExpNode());   // 映射中间表业务类别
74 74
                 settle.setCateName(inf.getCateName()); // 映射中间表类别名称
75
+
76
+                Feiyongleixing feiyongleixing=purMultiSettleMapper.selectFeeCateNameByFeeNm(inf.getFeeNm());
77
+                settle.setCateName(feiyongleixing.getCateName());
78
+                settle.setCateCode(feiyongleixing.getCateCode());
75 79
                 // 公用字段赋值
76 80
                 settle.setQichu("1"); // 固定值1
77 81
                 settle.setSoloId(inf.getId()); // 关联中间表的ID
@@ -176,6 +180,7 @@ public class FeeInvoiceSettleServiceImpl implements FeeInvoiceSettleService {
176 180
                 dtl.setNtPoAmt(inf.getNtPoAmt());   // 映射中间表无税金额
177 181
                 dtl.setInTaxRate(inf.getInTaxRate()); // 映射中间表税率
178 182
                 dtl.setFeeNm(inf.getFeeNm());       // 映射中间表费用名称
183
+                dtl.setFeeCd(feiyongleixing.getFeeCd());
179 184
                 dtl.setCurcypo(inf.getCurcypo());   // 映射中间表币别
180 185
                 dtl.setPoamt(inf.getPoamt());
181 186
                 dtl.setPoprice(inf.getPoprice());

Loading…
取消
儲存