Browse Source

【多币别】【供应商、客户放大镜新增币别、汇率;采购验收验退、销售出货退货、采购单新增币别必须与来源单据一致限制;采购明细表、销售明细表、销售利润表、毛利润分析表、出入库明细表、核销明细表、应付/应收总账等报表新增币别字段】【后端处理】

rainco 7 years ago
parent
commit
f058eca6ab

+ 3 - 143
applications/document/document-dto/src/main/java/com/usoftchina/saas/document/entities/Bankinformation.java

@@ -1,10 +1,12 @@
 package com.usoftchina.saas.document.entities;
 
 import com.usoftchina.saas.base.entity.CommonBaseEntity;
+import lombok.Data;
 
 import java.io.Serializable;
 import java.util.Date;
 
+@Data
 public class Bankinformation extends CommonBaseEntity implements Serializable {
 
     private String bk_bankcode;
@@ -43,148 +45,6 @@ public class Bankinformation extends CommonBaseEntity implements Serializable {
 
     private String bk_currency;
 
-    public String getBk_currency() {
-        return bk_currency;
-    }
+    private Double cr_rate;
 
-    public void setBk_currency(String bk_currency) {
-        this.bk_currency = bk_currency;
-    }
-
-    public Double getBk_income() {
-        return bk_income;
-    }
-
-    public void setBk_income(Double bk_income) {
-        this.bk_income = bk_income;
-    }
-
-    public Double getBk_spending() {
-        return bk_spending;
-    }
-
-    public void setBk_spending(Double bk_spending) {
-        this.bk_spending = bk_spending;
-    }
-
-    public String getBk_bankcode() {
-        return bk_bankcode;
-    }
-
-    public void setBk_bankcode(String bk_bankcode) {
-        this.bk_bankcode = bk_bankcode;
-    }
-
-    public String getBk_bankname() {
-        return bk_bankname;
-    }
-
-    public void setBk_bankname(String bk_bankname) {
-        this.bk_bankname = bk_bankname;
-    }
-
-    public Date getBk_date() {
-        return bk_date;
-    }
-
-    public void setBk_date(Date bk_date) {
-        this.bk_date = bk_date;
-    }
-
-    public String getBk_type() {
-        return bk_type;
-    }
-
-    public void setBk_type(String bk_type) {
-        this.bk_type = bk_type;
-    }
-
-    public Double getBk_beginamount() {
-        return bk_beginamount;
-    }
-
-    public void setBk_beginamount(Double bk_beginamount) {
-        this.bk_beginamount = bk_beginamount;
-    }
-
-    public Double getBk_thisamount() {
-        return bk_thisamount;
-    }
-
-    public void setBk_thisamount(Double bk_thisamount) {
-        this.bk_thisamount = bk_thisamount;
-    }
-
-    public String getBk_status() {
-        return bk_status;
-    }
-
-    public void setBk_status(String bk_status) {
-        this.bk_status = bk_status;
-    }
-
-    public String getBk_statuscode() {
-        return bk_statuscode;
-    }
-
-    public void setBk_statuscode(String bk_statuscode) {
-        this.bk_statuscode = bk_statuscode;
-    }
-
-
-    public Integer getBk_ym() {
-        return bk_ym;
-    }
-
-    public void setBk_ym(Integer bk_ym) {
-        this.bk_ym = bk_ym;
-    }
-
-    public String getBk_text1() {
-        return bk_text1;
-    }
-
-    public void setBk_text1(String bk_text1) {
-        this.bk_text1 = bk_text1;
-    }
-
-    public String getBk_text2() {
-        return bk_text2;
-    }
-
-    public void setBk_text2(String bk_text2) {
-        this.bk_text2 = bk_text2;
-    }
-
-    public String getBk_text3() {
-        return bk_text3;
-    }
-
-    public void setBk_text3(String bk_text3) {
-        this.bk_text3 = bk_text3;
-    }
-
-    public String getBk_text4() {
-        return bk_text4;
-    }
-
-    public void setBk_text4(String bk_text4) {
-        this.bk_text4 = bk_text4;
-    }
-
-    public String getBk_text5() {
-        return bk_text5;
-    }
-
-    public void setBk_text5(String bk_text5) {
-        this.bk_text5 = bk_text5;
-    }
-
-    public String getBk_remark() {
-        return bk_remark;
-    }
-
-    public void setBk_remark(String bk_remark) {
-        this.bk_remark = bk_remark;
-    }
 }

+ 4 - 2
applications/document/document-server/src/main/resources/mapper/BankinformationMapper.xml

@@ -24,14 +24,15 @@
     <result column="bk_spending" property="bk_spending" jdbcType="DOUBLE" />
     <result column="bk_income" property="bk_income" jdbcType="DOUBLE" />
     <result column="bk_currency" property="bk_currency" jdbcType="VARCHAR" />
+    <result column="cr_rate" property="cr_rate" jdbcType="DOUBLE" />
   </resultMap>
   <resultMap id="ResultMapWithBLOBs" type="com.usoftchina.saas.document.entities.Bankinformation" extends="BaseResultMap" >
     <result column="bk_remark" property="bk_remark" jdbcType="LONGVARCHAR" />
   </resultMap>
   <sql id="Base_Column_List" >
     bk_id, bk_bankcode, bk_bankname, bk_date, bk_type, bk_beginamount, bk_thisamount, 
-    bk_status, bk_statuscode, bk_ym, companyid,
-    updaterId, updateTime, bk_text1, bk_text2, bk_text3, bk_text4, bk_text5, bk_remark,bk_currency
+    bk_status, bk_statuscode, bk_ym, bankinformation.companyid companyid,
+    bankinformation.updaterId updaterId, bankinformation.updateTime updateTime, bk_text1, bk_text2, bk_text3, bk_text4, bk_text5, bk_remark,bk_currency,cr_rate
   </sql>
   <sql id="Blob_Column_List" >
     bk_remark
@@ -320,6 +321,7 @@
     select
     <include refid="Base_Column_List" />
     from bankinformation
+    left join currencys on currencys.companyId = Bankinformation.companyid and cr_name = bk_currency
     <where>
       <if test="con != null">
         ${con}

+ 2 - 0
applications/purchase/purchase-server/src/main/java/com/usoftchina/saas/purchase/po/PurchaseList.java

@@ -77,6 +77,8 @@ public class PurchaseList extends CommonBaseEntity implements Serializable {
 
     private String pu_currency;
 
+    private Double pu_rate;
+
     //从表字段
     private Long pd_id;
 

+ 4 - 4
applications/purchase/purchase-server/src/main/java/com/usoftchina/saas/purchase/service/impl/PurchaseServiceImpl.java

@@ -187,10 +187,10 @@ public class PurchaseServiceImpl extends CommonBaseServiceImpl<PurchaseMapper, P
             return baseDTO;
         }
         //校验有来源的验收验退币别是否与源单据一致
-        String puCode = purchaseMapper.validateCurrency(pu_id,purchase.getPu_currency());
-        if(puCode!=null){
-            throw new BizException(BizExceptionCode.CURRENCY_VALID);
-        }
+       // String puCode = purchaseMapper.validateCurrency(pu_id,purchase.getPu_currency());
+//        if(puCode!=null){
+//            throw new BizException(BizExceptionCode.CURRENCY_VALID);
+//        }
         //更新操作
         purchaseMapper.updateByPrimaryKeySelective(purchase);
         //添加从表传输对象

+ 1 - 0
applications/purchase/purchase-server/src/main/resources/mapper/PurchaseListMapper.xml

@@ -37,6 +37,7 @@
         <result column="pu_said" property="pu_said" jdbcType="INTEGER" />
         <result column="pu_sacode" property="pu_sacode" jdbcType="VARCHAR" />
         <result column="pu_currency" property="pu_currency" jdbcType="VARCHAR" />
+        <result column="pu_rate" property="pu_rate" jdbcType="DOUBLE" />
         <result column="PD_ID" property="pd_id" jdbcType="INTEGER" />
         <result column="PD_PUID" property="pd_puid" jdbcType="INTEGER" />
         <result column="PD_CODE" property="pd_code" jdbcType="VARCHAR" />