Browse Source

[CODE]: 财务添加 字段、优化查询方法

maxianghua 4 years ago
parent
commit
ca5b7b7011

+ 15 - 0
ruoyi-warehouse/src/main/java/com/ruoyi/finance/domain/TFeeDo.java

@@ -40,6 +40,12 @@ public class TFeeDo extends BaseEntity {
     private Long fSrcid;
 
     /**
+     * 来源id
+     */
+    @Excel(name = "来源id")
+    private Long fSrcpid;
+
+    /**
      * 来源行号
      */
     @Excel(name = "来源行号")
@@ -168,6 +174,14 @@ public class TFeeDo extends BaseEntity {
         return delFlag;
     }
 
+    public Long getfSrcpid() {
+        return fSrcpid;
+    }
+
+    public void setfSrcpid(Long fSrcpid) {
+        this.fSrcpid = fSrcpid;
+    }
+
     @Override
     public String toString() {
         return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
@@ -175,6 +189,7 @@ public class TFeeDo extends BaseEntity {
                 .append("fPid", getfPid())
                 .append("fLineno", getfLineno())
                 .append("fSrcid", getfSrcid())
+                .append("fSrcpid", getfSrcpid())
                 .append("fSrclineno", getfSrclineno())
                 .append("fSrcdc", getfSrcdc())
                 .append("fFeeid", getfFeeid())

+ 3 - 3
ruoyi-warehouse/src/main/java/com/ruoyi/finance/domain/TWareHouseFees.java

@@ -36,7 +36,7 @@ public class TWareHouseFees {
      * 费用名称,存储id 显示名称,t_fees 中的no或 name,模糊查找选择后,存储f_id,显示name
      */
     @Excel(name = "费用名称,存储id 显示名称,t_fees 中的no或 name,模糊查找选择后,存储f_id,显示name")
-    private String fFeeid;
+    private Long[] fFeeid;
 
     /**
      * 入(出)库日期
@@ -130,11 +130,11 @@ public class TWareHouseFees {
         this.fDc = fDc;
     }
 
-    public String getfFeeid() {
+    public Long[] getfFeeid() {
         return fFeeid;
     }
 
-    public void setfFeeid(String fFeeid) {
+    public void setfFeeid(Long[] fFeeid) {
         this.fFeeid = fFeeid;
     }
 

+ 0 - 13
ruoyi-warehouse/src/main/java/com/ruoyi/finance/service/impl/TFeeServiceImpl.java

@@ -164,20 +164,7 @@ public class TFeeServiceImpl implements ITFeeService {
 
     @Override
     public List<Map<String, Object>> warehouseBillsFeesList(TWareHouseFees tWareHouseFees) {
-        // 获取费用list
-        List<Long> feeIdList =new ArrayList<Long>();
-        if(tWareHouseFees.getfFeeid() != null ){
-            List<String> lis = Arrays.asList(tWareHouseFees.getfFeeid().split(","));
-            for (String string : lis) {
-                feeIdList.add(Long.parseLong(string));
-            }
-        }
         Map<String, Object> map = new HashMap<>();
-        if(feeIdList != null && !feeIdList.isEmpty()){
-            map.put("feeIdList", feeIdList);
-        }else{
-            map.put("feeIdList", "");
-        }
         map.put("tWareHouseFees", tWareHouseFees);
         return tFeeMapper.warehouseBillsFeesList(map);
     }

+ 6 - 1
ruoyi-warehouse/src/main/resources/mapper/finance/TFeeDoMapper.xml

@@ -9,6 +9,7 @@
         <result property="fPid" column="f_pid"/>
         <result property="fLineno" column="f_lineno"/>
         <result property="fSrcid" column="f_srcid"/>
+        <result property="fSrcpid" column="f_srcpid"/>
         <result property="fSrclineno" column="f_srclineno"/>
         <result property="fSrcdc" column="f_srcdc"/>
         <result property="fFeeid" column="f_feeid"/>
@@ -23,7 +24,7 @@
     </resultMap>
 
     <sql id="selectTFeeDoVo">
-        select f_id, f_pid, f_lineno, f_srcid, f_srclineno, f_srcdc, f_feeid, f_amtdr, f_amt, f_status, del_flag, create_by, create_time, update_by, update_time from t_fee_do
+        select f_id, f_pid, f_lineno, f_srcid, f_srcpid, f_srclineno, f_srcdc, f_feeid, f_amtdr, f_amt, f_status, del_flag, create_by, create_time, update_by, update_time from t_fee_do
     </sql>
 
     <select id="selectTFeeDoList" parameterType="TFeeDo" resultMap="TFeeDoResult">
@@ -32,6 +33,7 @@
             <if test="fPid != null ">and f_pid = #{fPid}</if>
             <if test="fLineno != null ">and f_lineno = #{fLineno}</if>
             <if test="fSrcid != null ">and f_srcid = #{fSrcid}</if>
+            <if test="fSrcpid != null ">and f_srcpid = #{fSrcpid}</if>
             <if test="fSrclineno != null ">and f_srclineno = #{fSrclineno}</if>
             <if test="fSrcdc != null  and fSrcdc != ''">and f_srcdc = #{fSrcdc}</if>
             <if test="fFeeid != null ">and f_feeid = #{fFeeid}</if>
@@ -53,6 +55,7 @@
             <if test="fPid != null">f_pid,</if>
             <if test="fLineno != null">f_lineno,</if>
             <if test="fSrcid != null">f_srcid,</if>
+            <if test="fSrcpid != null">f_srcpid,</if>
             <if test="fSrclineno != null">f_srclineno,</if>
             <if test="fSrcdc != null">f_srcdc,</if>
             <if test="fFeeid != null">f_feeid,</if>
@@ -70,6 +73,7 @@
             <if test="fPid != null">#{fPid},</if>
             <if test="fLineno != null">#{fLineno},</if>
             <if test="fSrcid != null">#{fSrcid},</if>
+            <if test="fSrcpid != null">#{fSrcpid},</if>
             <if test="fSrclineno != null">#{fSrclineno},</if>
             <if test="fSrcdc != null">#{fSrcdc},</if>
             <if test="fFeeid != null">#{fFeeid},</if>
@@ -90,6 +94,7 @@
             <if test="fPid != null">f_pid = #{fPid},</if>
             <if test="fLineno != null">f_lineno = #{fLineno},</if>
             <if test="fSrcid != null">f_srcid = #{fSrcid},</if>
+            <if test="fSrcpid != null">f_srcpid = #{fSrcpid},</if>
             <if test="fSrclineno != null">f_srclineno = #{fSrclineno},</if>
             <if test="fSrcdc != null">f_srcdc = #{fSrcdc},</if>
             <if test="fFeeid != null">f_feeid = #{fFeeid},</if>

+ 9 - 7
ruoyi-warehouse/src/main/resources/mapper/finance/TFeeMapper.xml

@@ -126,6 +126,8 @@
 
     <select id="warehouseBillsFeesList" resultType="java.util.Map">
         SELECT
+        w.f_id AS  fSrcid,
+        t.f_id AS  fSrcpid,
         t.f_corpid AS fCorpid,
         c.f_name AS fName,
         w.fId AS fId,
@@ -136,11 +138,11 @@
         t.f_bsdate AS fBsdate,
         t.f_billtype AS fBilltype,
         t.f_review_date AS fReviewDate,
-        w.f_amount AS fOldAmount,
+        w.f_amount AS fAmtdr,
         w.f_feeid AS fFeeid,
         f.f_name AS fFeeName,
-        w.f_dc AS fDc,
-        w.f_amount AS fNewAmount
+        w.f_dc AS fSrcdc,
+        w.f_amount AS fAmt
         FROM
         t_warehousebills t
         LEFT JOIN t_corps c ON c.f_id = t.f_corpid
@@ -191,17 +193,17 @@
                     and  w.f_accamount_date IS  NULL
                 </otherwise>
             </choose>
-            <choose>
+            <!--<choose>
                 <when test="map.tWareHouseFees.fDc != null and map.tWareHouseFees.fDc != '' and map.tWareHouseFees.fDc == 'D' ">
                     and  w.f_dc = #{map.tWareHouseFees.fDc}
                 </when>
                 <otherwise>
                     and  w.f_dc = #{map.tWareHouseFees.fDc}
                 </otherwise>
-            </choose>
-            <if test="map.feeIdList != null  and  map.feeIdList != '' ">
+            </choose>-->
+            <if test="map.tWareHouseFees.fFeeid != null  and  map.tWareHouseFees.fFeeid != '' ">
                 and  w.f_feeid in
-                <foreach collection="feeIdList" item="id" index="index" open="(" close=")" separator=",">
+                <foreach collection="map.tWareHouseFees.fFeeid" item="id" index="index" open="(" close=")" separator=",">
                     #{id}
                 </foreach>
             </if>