Przeglądaj źródła

其他收入/支出增加币别汇率

chenw 7 lat temu
rodzic
commit
8bf9ca5919

+ 1 - 1
applications/money/money-server/src/main/java/com/usoftchina/saas/money/mapper/OthreceiptsdetailMapper.java

@@ -12,7 +12,7 @@ public interface OthreceiptsdetailMapper {
 
     int insertSelective(Othreceiptsdetail record);
 
-    List<Othreceiptsdetail> selectByPrimaryKey(Integer ordId);
+    List<Othreceiptsdetail> selectByPrimaryKey(Long orId);
 
     int updateByPrimaryKeySelective(Othreceiptsdetail record);
 

+ 27 - 0
applications/money/money-server/src/main/java/com/usoftchina/saas/money/po/Othreceipts.java

@@ -53,6 +53,26 @@ public class Othreceipts extends CommonBaseEntity implements Serializable {
 
     private Date or_auditdate;
 
+    private String or_currency;
+
+    private Double or_rate;
+
+    public String getOr_currency() {
+        return or_currency;
+    }
+
+    public void setOr_currency(String or_currency) {
+        this.or_currency = or_currency;
+    }
+
+    public Double getOr_rate() {
+        return or_rate;
+    }
+
+    public void setOr_rate(Double or_rate) {
+        this.or_rate = or_rate;
+    }
+
     public String getOr_auditman() {
         return or_auditman;
     }
@@ -268,6 +288,13 @@ public class Othreceipts extends CommonBaseEntity implements Serializable {
                 ", or_text3='" + or_text3 + '\'' +
                 ", or_text4='" + or_text4 + '\'' +
                 ", or_text5='" + or_text5 + '\'' +
+                ", ord_type='" + ord_type + '\'' +
+                ", ord_nowbalance=" + ord_nowbalance +
+                ", ord_remark='" + ord_remark + '\'' +
+                ", or_auditman='" + or_auditman + '\'' +
+                ", or_auditdate=" + or_auditdate +
+                ", or_currency='" + or_currency + '\'' +
+                ", or_rate=" + or_rate +
                 '}';
     }
 }

+ 20 - 0
applications/money/money-server/src/main/java/com/usoftchina/saas/money/po/Othreceiptsdetail.java

@@ -32,6 +32,26 @@ public class Othreceiptsdetail extends CommonBaseEntity implements Serializable
 
     private String ord_text5;
 
+    private String ord_currency;
+
+    private Double ord_rate;
+
+    public String getOrd_currency() {
+        return ord_currency;
+    }
+
+    public void setOrd_currency(String ord_currency) {
+        this.ord_currency = ord_currency;
+    }
+
+    public Double getOrd_rate() {
+        return ord_rate;
+    }
+
+    public void setOrd_rate(Double ord_rate) {
+        this.ord_rate = ord_rate;
+    }
+
     public Date getOr_date() {
         return or_date;
     }

+ 20 - 0
applications/money/money-server/src/main/java/com/usoftchina/saas/money/po/Othspendings.java

@@ -54,6 +54,26 @@ public class Othspendings extends CommonBaseEntity implements Serializable {
 
     private Date os_auditdate;
 
+    private String os_currency;
+
+    private Double os_rate;
+
+    public String getOs_currency() {
+        return os_currency;
+    }
+
+    public void setOs_currency(String os_currency) {
+        this.os_currency = os_currency;
+    }
+
+    public Double getOs_rate() {
+        return os_rate;
+    }
+
+    public void setOs_rate(Double os_rate) {
+        this.os_rate = os_rate;
+    }
+
     public String getOs_auditman() {
         return os_auditman;
     }

+ 20 - 0
applications/money/money-server/src/main/java/com/usoftchina/saas/money/po/Othspendingsdetail.java

@@ -33,6 +33,26 @@ public class Othspendingsdetail extends CommonBaseEntity implements Serializable
 
     private String osd_text5;
 
+    private String osd_currency;
+
+    private Double osd_rate;
+
+    public String getOsd_currency() {
+        return osd_currency;
+    }
+
+    public void setOsd_currency(String osd_currency) {
+        this.osd_currency = osd_currency;
+    }
+
+    public Double getOsd_rate() {
+        return osd_rate;
+    }
+
+    public void setOsd_rate(Double osd_rate) {
+        this.osd_rate = osd_rate;
+    }
+
     public Date getOs_date() {
         return os_date;
     }

+ 5 - 2
applications/money/money-server/src/main/java/com/usoftchina/saas/money/service/impl/OthreceiptsServiceImpl.java

@@ -77,6 +77,7 @@ public class OthreceiptsServiceImpl extends CommonBaseServiceImpl<OthreceiptsMap
         DocBaseDTO baseDTO = new DocBaseDTO();
         if (othreceipts.getId() > 0){
             othreceiptsMapper.updateByPrimaryKeySelective(othreceipts);
+            othreceiptsdetail = othreceiptsdetailMapper.selectByPrimaryKey(othreceipts.getId());
             baseDTO = getBaseDTOById(id);
             if (!("AUDITED".equals(othreceipts.getOr_statuscode()))) {
                 //日志记录
@@ -101,6 +102,8 @@ public class OthreceiptsServiceImpl extends CommonBaseServiceImpl<OthreceiptsMap
             othreceiptsdetail1.setOrd_orid(Math.toIntExact(id));
             othreceiptsdetail1.setCompanyId(BaseContextHolder.getCompanyId());
             othreceiptsdetail1.setOr_date(othreceipts.getOr_date());
+            othreceiptsdetail1.setOrd_currency(othreceipts.getOr_currency());
+            othreceiptsdetail1.setOrd_rate(othreceipts.getOr_rate());
             if (othreceiptsdetail1.getId() > 0 ){
                 othreceiptsdetailMapper.updateByPrimaryKeySelective(othreceiptsdetail1);
             }else {
@@ -223,7 +226,7 @@ public class OthreceiptsServiceImpl extends CommonBaseServiceImpl<OthreceiptsMap
 
         //更新资金
         Double amount = banksubledgerMapper.selectThisamount(othreceipts.getOr_bankcode(), BaseContextHolder.getCompanyId());
-        List<Othreceiptsdetail> othreceiptsdetailList = othreceiptsdetailMapper.selectByPrimaryKey(id);
+        List<Othreceiptsdetail> othreceiptsdetailList = othreceiptsdetailMapper.selectByPrimaryKey(Long.valueOf(id));
         Iterator isList = othreceiptsdetailList.iterator();
         while (isList.hasNext()){
             Othreceiptsdetail othreceiptsdetail = (Othreceiptsdetail) isList.next();
@@ -309,7 +312,7 @@ public class OthreceiptsServiceImpl extends CommonBaseServiceImpl<OthreceiptsMap
     public Othte select(int id) {
         Othte othte = new Othte();
         othte.setMain(othreceiptsMapper.selectByPrimaryKey(id));
-        othte.setItems(othreceiptsdetailMapper.selectByPrimaryKey(id));
+        othte.setItems(othreceiptsdetailMapper.selectByPrimaryKey(Long.valueOf(id)));
         return othte;
     }
 

+ 3 - 0
applications/money/money-server/src/main/java/com/usoftchina/saas/money/service/impl/OthspendingsServiceImpl.java

@@ -72,6 +72,7 @@ public class OthspendingsServiceImpl extends CommonBaseServiceImpl<OthspendingsM
         DocBaseDTO baseDTO = new DocBaseDTO();
         if (othspendings.getId() > 0){
             othspendingsMapper.updateByPrimaryKeySelective(othspendings);
+            othspendingsdetails = othspendingsdetailMapper.selectByPrimaryKey(Integer.parseInt(String.valueOf(othspendings.getId())));
             baseDTO = getBaseDTOById(id);
             //日志记录
             if (!("AUDITED".equals(othspendings.getOs_statuscode()))) {
@@ -97,6 +98,8 @@ public class OthspendingsServiceImpl extends CommonBaseServiceImpl<OthspendingsM
             othspendingsdetail.setOsd_osid(Math.toIntExact(id));
             othspendingsdetail.setCompanyId(BaseContextHolder.getCompanyId());
             othspendingsdetail.setOs_date(othspendings.getOs_date());
+            othspendingsdetail.setOsd_currency(othspendings.getOs_currency());
+            othspendingsdetail.setOsd_rate(othspendings.getOs_rate());
             if (othspendingsdetail.getId() > 0 ){
                 othspendingsdetailMapper.updateByPrimaryKeySelective(othspendingsdetail);
             }else {

+ 21 - 1
applications/money/money-server/src/main/resources/mapper/OthreceiptsMapper.xml

@@ -31,12 +31,14 @@
     <result column="or_auditman" property="or_auditman" jdbcType="VARCHAR" />
     <result column="or_auditdate" property="or_auditdate" jdbcType="TIMESTAMP" />
     <result column="createTime" property="createTime" jdbcType="TIMESTAMP" />
+    <result column="or_currency" property="or_currency" jdbcType="VARCHAR" />
+    <result column="or_rate" property="or_rate" jdbcType="DOUBLE" />
   </resultMap>
   <sql id="Base_Column_List" >
     or_id, or_code, or_date, or_custid, or_custcode, or_custname, or_bankcode, or_bankid, 
     or_bankname, or_amount, or_status, or_statuscode,
     or_remark, Othreceipts.companyId, Othreceipts.updaterId, Othreceipts.updatedate, or_text1,
-    or_text2, or_text3, or_text4, or_text5, othreceipts.creatorName, othreceipts.createTime, or_auditman, or_auditdate
+    or_text2, or_text3, or_text4, or_text5, othreceipts.creatorName, othreceipts.createTime, or_auditman, or_auditdate,or_currency,or_rate
   </sql>
   <sql id="Detail_Column_List" >
     ord_type,ord_nowbalance,ord_remark
@@ -142,6 +144,12 @@
       <if test="createTime != null" >
         createTime,
       </if>
+      <if test="or_currency != null" >
+        or_currency,
+      </if>
+      <if test="or_rate != null" >
+        or_rate,
+      </if>
     </trim>
     <trim prefix="values (" suffix=")" suffixOverrides="," >
       <if test="or_code != null" >
@@ -207,6 +215,12 @@
       <if test="createTime != null" >
         #{createTime,jdbcType=TIMESTAMP},
       </if>
+      <if test="or_currency != null" >
+        #{or_currency,jdbcType=VARCHAR},
+      </if>
+      <if test="or_rate != null" >
+        #{or_rate,jdbcType=DOUBLE},
+      </if>
     </trim>
     <selectKey resultType="Long" keyProperty="id" order="AFTER">
       SELECT LAST_INSERT_ID()
@@ -272,6 +286,12 @@
       <if test="or_text5 != null" >
         or_text5 = #{or_text5,jdbcType=VARCHAR},
       </if>
+      <if test="or_currency != null" >
+        or_currency = #{or_currency,jdbcType=VARCHAR},
+      </if>
+      <if test="or_rate != null" >
+        or_rate = #{or_rate,jdbcType=DOUBLE},
+      </if>
       or_auditman = #{or_auditman,jdbcType=VARCHAR},
       or_auditdate = #{or_auditdate,jdbcType=TIMESTAMP}
     </set>

+ 22 - 2
applications/money/money-server/src/main/resources/mapper/OthreceiptsdetailMapper.xml

@@ -18,12 +18,14 @@
     <result column="ord_text3" property="ord_text3" jdbcType="VARCHAR" />
     <result column="ord_text4" property="ord_text4" jdbcType="VARCHAR" />
     <result column="ord_text5" property="ord_text5" jdbcType="VARCHAR" />
+    <result column="ord_currency" property="ord_currency" jdbcType="VARCHAR" />
+    <result column="ord_rate" property="ord_rate" jdbcType="DOUBLE" />
   </resultMap>
   <sql id="Base_Column_List" >
     ord_id, ord_orid, ord_detno, ord_ym, ord_type, ord_nowbalance, ord_remark, companyId, 
-    updaterId, updatedate, ord_text1, ord_text2, ord_text3, ord_text4, ord_text5
+    updaterId, updatedate, ord_text1, ord_text2, ord_text3, ord_text4, ord_text5,ord_currency,ord_rate
   </sql>
-  <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Integer" >
+  <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Long" >
     select 
     <include refid="Base_Column_List" />
     from othreceiptsdetail
@@ -98,6 +100,12 @@
       <if test="ord_text5 != null" >
         ord_text5,
       </if>
+      <if test="ord_currency != null" >
+        ord_currency,
+      </if>
+      <if test="ord_rate != null" >
+        ord_rate,
+      </if>
     </trim>
     <trim prefix="values (" suffix=")" suffixOverrides="," >
       <if test="ord_orid != null" >
@@ -142,6 +150,12 @@
       <if test="ord_text5 != null" >
         #{ord_text5,jdbcType=VARCHAR},
       </if>
+      <if test="ord_currency != null" >
+        #{ord_currency,jdbcType=VARCHAR},
+      </if>
+      <if test="ord_rate != null" >
+        #{ord_rate,jdbcType=VARCHAR},
+      </if>
     </trim>
   </insert>
   <update id="updateByPrimaryKeySelective" parameterType="com.usoftchina.saas.money.po.Othreceiptsdetail" >
@@ -186,6 +200,12 @@
       <if test="ord_text5 != null" >
         ord_text5 = #{ord_text5,jdbcType=VARCHAR},
       </if>
+      <if test="ord_currency != null" >
+        ord_currency = #{ord_currency,jdbcType=VARCHAR},
+      </if>
+      <if test="ord_rate != null" >
+        ord_rate = #{ord_rate,jdbcType=DOUBLE},
+      </if>
     </set>
     where ord_id = #{id,jdbcType=INTEGER}
   </update>

+ 21 - 1
applications/money/money-server/src/main/resources/mapper/OthspendingsMapper.xml

@@ -30,13 +30,15 @@
     <result column="createTime" property="createTime" jdbcType="TIMESTAMP" />
     <result column="os_auditman" property="os_auditman" jdbcType="VARCHAR" />
     <result column="os_auditdate" property="os_auditdate" jdbcType="TIMESTAMP" />
+    <result column="os_currency" property="os_currency" jdbcType="VARCHAR" />
+    <result column="os_rate" property="os_rate" jdbcType="DOUBLE" />
   </resultMap>
   <sql id="Base_Column_List" >
     os_id, os_code, os_date, os_vendid, os_vendcode, os_vendname, os_bankid, os_bankcode, 
     os_bankname, os_amount, os_status, os_statuscode,
     os_remark, othspendings.companyId, othspendings.updaterId,
     othspendings.updatedate, os_text1, os_text2, os_text3, os_text4,
-    os_text5,othspendings.creatorName, othspendings.createTime, os_auditman, os_auditdate
+    os_text5,othspendings.creatorName, othspendings.createTime, os_auditman, os_auditdate,os_currency,os_rate
   </sql>
   <sql id="Detail_Column_List" >
     osd_type,osd_nowbalance,osd_remark
@@ -136,6 +138,12 @@
       <if test="createTime != null" >
         createTime,
       </if>
+      <if test="os_currency != null" >
+        os_currency,
+      </if>
+      <if test="os_rate != null" >
+        os_rate,
+      </if>
     </trim>
     <trim prefix="values (" suffix=")" suffixOverrides="," >
       <if test="os_code != null" >
@@ -201,6 +209,12 @@
       <if test="createTime != null" >
         #{createTime,jdbcType=TIMESTAMP},
       </if>
+      <if test="os_currency != null" >
+        #{os_currency,jdbcType=VARCHAR},
+      </if>
+      <if test="os_rate != null" >
+        #{os_rate,jdbcType=DOUBLE},
+      </if>
     </trim>
     <selectKey resultType="Long" keyProperty="id" order="AFTER">
       SELECT LAST_INSERT_ID()
@@ -267,6 +281,12 @@
       <if test="os_text5 != null" >
         os_text5 = #{os_text5,jdbcType=VARCHAR},
       </if>
+      <if test="os_currency != null" >
+        os_currency = #{os_currency,jdbcType=VARCHAR},
+      </if>
+      <if test="os_rate != null" >
+        os_rate = #{os_rate,jdbcType=VARCHAR},
+      </if>
       os_auditman = #{os_auditman,jdbcType=VARCHAR},
       os_auditdate = #{os_auditdate,jdbcType=TIMESTAMP}
     </set>

+ 21 - 1
applications/money/money-server/src/main/resources/mapper/OthspendingsdetailMapper.xml

@@ -18,10 +18,12 @@
     <result column="osd_text3" property="osd_text3" jdbcType="VARCHAR" />
     <result column="osd_text4" property="osd_text4" jdbcType="VARCHAR" />
     <result column="osd_text5" property="osd_text5" jdbcType="VARCHAR" />
+    <result column="osd_currency" property="osd_currency" jdbcType="VARCHAR" />
+    <result column="osd_rate" property="osd_rate" jdbcType="DOUBLE" />
   </resultMap>
   <sql id="Base_Column_List" >
     osd_id, osd_osid, osd_detno, osd_ym, osd_type, osd_nowbalance, osd_remark, companyId,
-    updaterId, updatedate, osd_text1, osd_text2, osd_text3, osd_text4, osd_text5
+    updaterId, updatedate, osd_text1, osd_text2, osd_text3, osd_text4, osd_text5,osd_currency,osd_rate
   </sql>
   <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Integer" >
     select 
@@ -98,6 +100,12 @@
       <if test="osd_text5 != null" >
         osd_text5,
       </if>
+      <if test="osd_currency != null" >
+        osd_currency,
+      </if>
+      <if test="osd_rate != null" >
+        osd_rate,
+      </if>
     </trim>
     <trim prefix="values (" suffix=")" suffixOverrides="," >
       <if test="osd_osid != null" >
@@ -142,6 +150,12 @@
       <if test="osd_text5 != null" >
         #{osd_text5,jdbcType=VARCHAR},
       </if>
+      <if test="osd_currency != null" >
+        #{osd_currency,jdbcType=VARCHAR},
+      </if>
+      <if test="osd_rate != null" >
+        #{osd_rate,jdbcType=DOUBLE},
+      </if>
     </trim>
     <selectKey resultType="Long" keyProperty="id" order="AFTER">
       SELECT LAST_INSERT_ID()
@@ -192,6 +206,12 @@
       <if test="osd_text5 != null" >
         osd_text5 = #{osd_text5,jdbcType=VARCHAR},
       </if>
+      <if test="osd_currency != null" >
+        osd_currency = #{osd_currency,jdbcType=VARCHAR},
+      </if>
+      <if test="osd_rate != null" >
+        osd_rate = #{osd_rate,jdbcType=VARCHAR},
+      </if>
     </set>
     where osd_id = #{id,jdbcType=INTEGER}
   </update>