Browse Source

Merge branch 'dev' of ssh://10.10.100.21/source/saas-platform into dev

chenw 6 years ago
parent
commit
00ecad2003

+ 139 - 0
applications/money/money-server/src/main/java/com/usoftchina/saas/money/po/Custmonth.java

@@ -35,4 +35,143 @@ public class Custmonth {
 
     private String cm_currency;
 
+    private Double cm_amount_cr;
+
+    private Double cm_rate;
+
+    public Integer getCm_id() {
+        return cm_id;
+    }
+
+    public void setCm_id(Integer cm_id) {
+        this.cm_id = cm_id;
+    }
+
+    public Integer getCm_yearmonth() {
+        return cm_yearmonth;
+    }
+
+    public void setCm_yearmonth(Integer cm_yearmonth) {
+        this.cm_yearmonth = cm_yearmonth;
+    }
+
+    public Integer getCm_custid() {
+        return cm_custid;
+    }
+
+    public void setCm_custid(Integer cm_custid) {
+        this.cm_custid = cm_custid;
+    }
+
+    public String getCm_custcode() {
+        return cm_custcode;
+    }
+
+    public void setCm_custcode(String cm_custcode) {
+        this.cm_custcode = cm_custcode;
+    }
+
+    public String getCm_custname() {
+        return cm_custname;
+    }
+
+    public void setCm_custname(String cm_custname) {
+        this.cm_custname = cm_custname;
+    }
+
+    public Double getCm_beginamount() {
+        return cm_beginamount;
+    }
+
+    public void setCm_beginamount(Double cm_beginamount) {
+        this.cm_beginamount = cm_beginamount;
+    }
+
+    public Double getCm_nowamount() {
+        return cm_nowamount;
+    }
+
+    public void setCm_nowamount(Double cm_nowamount) {
+        this.cm_nowamount = cm_nowamount;
+    }
+
+    public Double getCm_nowpreamount() {
+        return cm_nowpreamount;
+    }
+
+    public void setCm_nowpreamount(Double cm_nowpreamount) {
+        this.cm_nowpreamount = cm_nowpreamount;
+    }
+
+    public Double getCm_endamount() {
+        return cm_endamount;
+    }
+
+    public void setCm_endamount(Double cm_endamount) {
+        this.cm_endamount = cm_endamount;
+    }
+
+    public Integer getCompanyid() {
+        return companyid;
+    }
+
+    public void setCompanyid(Integer companyid) {
+        this.companyid = companyid;
+    }
+
+    public Double getCm_beginpreamount() {
+        return cm_beginpreamount;
+    }
+
+    public void setCm_beginpreamount(Double cm_beginpreamount) {
+        this.cm_beginpreamount = cm_beginpreamount;
+    }
+
+    public Double getCm_nowpayamount() {
+        return cm_nowpayamount;
+    }
+
+    public void setCm_nowpayamount(Double cm_nowpayamount) {
+        this.cm_nowpayamount = cm_nowpayamount;
+    }
+
+    public Double getCm_nowprepayamount() {
+        return cm_nowprepayamount;
+    }
+
+    public void setCm_nowprepayamount(Double cm_nowprepayamount) {
+        this.cm_nowprepayamount = cm_nowprepayamount;
+    }
+
+    public Double getCm_endpreamount() {
+        return cm_endpreamount;
+    }
+
+    public void setCm_endpreamount(Double cm_endpreamount) {
+        this.cm_endpreamount = cm_endpreamount;
+    }
+
+    public String getCm_currency() {
+        return cm_currency;
+    }
+
+    public void setCm_currency(String cm_currency) {
+        this.cm_currency = cm_currency;
+    }
+
+    public Double getCm_amount_cr() {
+        return cm_amount_cr;
+    }
+
+    public void setCm_amount_cr(Double cm_amount_cr) {
+        this.cm_amount_cr = cm_amount_cr;
+    }
+
+    public Double getCm_rate() {
+        return cm_rate;
+    }
+
+    public void setCm_rate(Double cm_rate) {
+        this.cm_rate = cm_rate;
+    }
 }

+ 139 - 0
applications/money/money-server/src/main/java/com/usoftchina/saas/money/po/Vendmonth.java

@@ -35,4 +35,143 @@ public class Vendmonth {
 
     private String vm_currency;
 
+    private Double vm_amount_cr;
+
+    private Double vm_rate;
+
+    public Integer getVm_id() {
+        return vm_id;
+    }
+
+    public void setVm_id(Integer vm_id) {
+        this.vm_id = vm_id;
+    }
+
+    public Integer getVm_yearmonth() {
+        return vm_yearmonth;
+    }
+
+    public void setVm_yearmonth(Integer vm_yearmonth) {
+        this.vm_yearmonth = vm_yearmonth;
+    }
+
+    public Integer getVm_vendid() {
+        return vm_vendid;
+    }
+
+    public void setVm_vendid(Integer vm_vendid) {
+        this.vm_vendid = vm_vendid;
+    }
+
+    public String getVm_vendcode() {
+        return vm_vendcode;
+    }
+
+    public void setVm_vendcode(String vm_vendcode) {
+        this.vm_vendcode = vm_vendcode;
+    }
+
+    public String getVm_vendname() {
+        return vm_vendname;
+    }
+
+    public void setVm_vendname(String vm_vendname) {
+        this.vm_vendname = vm_vendname;
+    }
+
+    public Double getVm_beginamount() {
+        return vm_beginamount;
+    }
+
+    public void setVm_beginamount(Double vm_beginamount) {
+        this.vm_beginamount = vm_beginamount;
+    }
+
+    public Double getVm_nowamount() {
+        return vm_nowamount;
+    }
+
+    public void setVm_nowamount(Double vm_nowamount) {
+        this.vm_nowamount = vm_nowamount;
+    }
+
+    public Double getVm_nowpreamount() {
+        return vm_nowpreamount;
+    }
+
+    public void setVm_nowpreamount(Double vm_nowpreamount) {
+        this.vm_nowpreamount = vm_nowpreamount;
+    }
+
+    public Double getVm_endamount() {
+        return vm_endamount;
+    }
+
+    public void setVm_endamount(Double vm_endamount) {
+        this.vm_endamount = vm_endamount;
+    }
+
+    public Integer getCompanyid() {
+        return companyid;
+    }
+
+    public void setCompanyid(Integer companyid) {
+        this.companyid = companyid;
+    }
+
+    public Double getVm_beginpreamount() {
+        return vm_beginpreamount;
+    }
+
+    public void setVm_beginpreamount(Double vm_beginpreamount) {
+        this.vm_beginpreamount = vm_beginpreamount;
+    }
+
+    public Double getVm_nowpayamount() {
+        return vm_nowpayamount;
+    }
+
+    public void setVm_nowpayamount(Double vm_nowpayamount) {
+        this.vm_nowpayamount = vm_nowpayamount;
+    }
+
+    public Double getVm_nowprepayamount() {
+        return vm_nowprepayamount;
+    }
+
+    public void setVm_nowprepayamount(Double vm_nowprepayamount) {
+        this.vm_nowprepayamount = vm_nowprepayamount;
+    }
+
+    public Double getVm_endpreamount() {
+        return vm_endpreamount;
+    }
+
+    public void setVm_endpreamount(Double vm_endpreamount) {
+        this.vm_endpreamount = vm_endpreamount;
+    }
+
+    public String getVm_currency() {
+        return vm_currency;
+    }
+
+    public void setVm_currency(String vm_currency) {
+        this.vm_currency = vm_currency;
+    }
+
+    public Double getVm_amount_cr() {
+        return vm_amount_cr;
+    }
+
+    public void setVm_amount_cr(Double vm_amount_cr) {
+        this.vm_amount_cr = vm_amount_cr;
+    }
+
+    public Double getVm_rate() {
+        return vm_rate;
+    }
+
+    public void setVm_rate(Double vm_rate) {
+        this.vm_rate = vm_rate;
+    }
 }

+ 6 - 3
applications/money/money-server/src/main/resources/mapper/CustmonthMapper.xml

@@ -8,9 +8,11 @@
     <result column="cm_custcode" property="cm_custcode" jdbcType="VARCHAR" />
     <result column="cm_custname" property="cm_custname" jdbcType="VARCHAR" />
     <result column="cm_beginamount" property="cm_beginamount" jdbcType="DOUBLE" />
-   <result column="cm_nowamount" property="cm_nowamount" jdbcType="DOUBLE" />
+    <result column="cm_nowamount" property="cm_nowamount" jdbcType="DOUBLE" />
     <result column="cm_nowpreamount" property="cm_nowpreamount" jdbcType="DOUBLE" />
     <result column="cm_endamount" property="cm_endamount" jdbcType="DOUBLE" />
+    <result column="cm_amount_cr" property="cm_amount_cr" jdbcType="DOUBLE" />
+    <result column="cm_rate" property="cm_rate" jdbcType="DOUBLE" />
     <result column="companyid" property="companyid" jdbcType="INTEGER" />
     <result column="cm_beginpreamount" property="cm_beginpreamount" jdbcType="DOUBLE" />
     <result column="cm_nowpayamount" property="cm_nowpayamount" jdbcType="DOUBLE" />
@@ -24,13 +26,14 @@
   </sql>
 
   <select id="selectByCondition" resultMap="BaseResultMap">
-    select  *  from custmonth
+      select  a.*,cr_rate cm_rate, cr_rate*(cm_endamount-cm_endpreamount) cm_amount_cr from custmonth a
+      left join currencys on cr_name = a.cm_currency and currencys.companyId = a.companyid
     <where>
       <if test="con != null">
         ${con}
       </if>
       <if test="companyId != null">
-        and  companyId = #{companyId} and abs(cm_beginamount)+abs(cm_beginpreamount)+abs(cm_nowamount)+abs(cm_nowpreamount)+abs(cm_nowprepayamount)+abs(cm_nowpayamount)>0
+        and  a.companyId = #{companyId} and abs(cm_beginamount)+abs(cm_beginpreamount)+abs(cm_nowamount)+abs(cm_nowpreamount)+abs(cm_nowprepayamount)+abs(cm_nowpayamount)>0
       </if>
     </where>
     order by cm_yearmonth desc,cm_custcode

+ 5 - 2
applications/money/money-server/src/main/resources/mapper/VendmonthMapper.xml

@@ -11,6 +11,8 @@
     <result column="vm_nowamount" property="vm_nowamount" jdbcType="DOUBLE" />
     <result column="vm_nowpreamount" property="vm_nowpreamount" jdbcType="DOUBLE" />
     <result column="vm_endamount" property="vm_endamount" jdbcType="DOUBLE" />
+    <result column="vm_amount_cr" property="vm_amount_cr" jdbcType="DOUBLE" />
+    <result column="vm_rate" property="vm_rate" jdbcType="DOUBLE" />
     <result column="companyid" property="companyid" jdbcType="INTEGER" />
     <result column="vm_beginpreamount" property="vm_beginpreamount" jdbcType="DOUBLE" />
     <result column="vm_nowpayamount" property="vm_nowpayamount" jdbcType="DOUBLE" />
@@ -24,13 +26,14 @@
   </sql>
 
   <select id="selectByCondition" resultMap="BaseResultMap">
-    select  *  from vendmonth
+    select  a.*,cr_rate vm_rate, cr_rate*(vm_endamount-vm_endpreamount) vm_amount_cr from vendmonth a
+    left join currencys on cr_name = a.vm_currency and currencys.companyId = a.companyid
     <where>
       <if test="con != null">
         ${con}
       </if>
       <if test="companyId != null">
-        and  companyid = #{companyId} and abs(vm_beginamount)+abs(vm_beginpreamount)+abs(vm_nowamount)+abs(vm_nowpreamount)+abs(vm_nowprepayamount)+abs(vm_nowpayamount)>0
+        and  a.companyid = #{companyId} and abs(vm_beginamount)+abs(vm_beginpreamount)+abs(vm_nowamount)+abs(vm_nowpreamount)+abs(vm_nowprepayamount)+abs(vm_nowpayamount)>0
       </if>
     </where>
     order by vm_yearmonth desc,vm_vendcode

+ 2 - 0
applications/transfers/transfers-server/src/main/java/com/usoftchina/saas/transfers/service/impl/SaleDownServiceImpl.java

@@ -86,6 +86,8 @@ public class SaleDownServiceImpl implements SaleDownService{
             main.setCompanyId(companyId);
             main.setSa_status(Status.UNAUDITED.getDisplay());
             main.setSa_statuscode(Status.UNAUDITED.name());
+            main.setSa_turnstatus("未转销售");
+            main.setSa_turnstatuscode("UNTURNSALE");
             main.setSa_seller(emp.getData().getRealname());
             main.setSa_sellerid(emp.getData().getId());
             saledownMapper.insertSelective(main);

+ 12 - 0
applications/transfers/transfers-server/src/main/resources/mapper/SaledownMapper.xml

@@ -200,6 +200,12 @@
       <if test="updaterId != null" >
         updaterId,
       </if>
+      <if test="sa_turnstatus != null" >
+        sa_turnstatus,
+      </if>
+      <if test="sa_turnstatuscode != null" >
+        sa_turnstatuscode,
+      </if>
     </trim>
     <trim prefix="values (" suffix=")" suffixOverrides="," >
       <if test="sa_code != null" >
@@ -289,6 +295,12 @@
       <if test="updaterId != null" >
         #{updaterId,jdbcType=INTEGER},
       </if>
+      <if test="sa_turnstatus != null" >
+        #{sa_turnstatus,jdbcType=VARCHAR},
+      </if>
+      <if test="sa_turnstatuscode != null" >
+        #{sa_turnstatuscode,jdbcType=VARCHAR},
+      </if>
     </trim>
   </insert>
   <update id="updateByPrimaryKeySelective" parameterType="com.usoftchina.saas.transfers.po.SaleDown" >

+ 18 - 1
frontend/saas-web/app/view/money/report/TotalPayDetail.js

@@ -44,6 +44,14 @@ Ext.define('saas.view.money.report.TotalPayDetail', {
         dataIndex: 'vm_currency',
         align:'center',
         width: 65,
+    }, {
+        text: '汇率',
+        dataIndex: 'vm_rate',
+        align:'center',
+        width: 65,
+        renderer: function (v, m, r) {
+            return saas.util.BaseUtil.numberFormat(v, 6, false);
+        }
     }, {
         text: '期初',
         columns: [{
@@ -130,11 +138,20 @@ Ext.define('saas.view.money.report.TotalPayDetail', {
         exportFormat: 'Amount',
         xtype: 'numbercolumn',
         width: 120,
+        renderer: function(v, m, r) {
+            return saas.util.BaseUtil.numberFormat(v, 2, true);
+        }
+    },{
+        text: '应付余额(本位币)(元)',
+        dataIndex: 'vm_amount_cr',
+        exportFormat: 'Amount',
+        xtype: 'numbercolumn',
+        width: 160,
         renderer: function(v, m, r) {
             return saas.util.BaseUtil.numberFormat(v, 2, true);
         },
         summaryType: 'sum',
-        summaryLabel: '应付余额',
+        summaryLabel: '应付余额(本位币)',
         summaryRenderer: function(v, d, f, m) {
             return saas.util.BaseUtil.numberFormat(v, 2, true);
         }

+ 15 - 1
frontend/saas-web/app/view/money/report/TotalRecDetail.js

@@ -44,6 +44,11 @@ Ext.define('saas.view.money.report.TotalRecDetail', {
         dataIndex: 'cm_currency',
         align:'center',
         width: 65,
+    }, {
+        text: '汇率',
+        dataIndex: 'cm_rate',
+        align:'center',
+        width: 65,
     }, {
         text: '期初',
         columns: [{
@@ -130,11 +135,20 @@ Ext.define('saas.view.money.report.TotalRecDetail', {
         exportFormat: 'Amount',
         xtype: 'numbercolumn',
         width: 120,
+        renderer: function(v, m, r) {
+            return saas.util.BaseUtil.numberFormat(v, 2, true);
+        }
+    }, {
+        text: '应收余额(本位币)(元)',
+        dataIndex: 'cm_amount_cr',
+        exportFormat: 'Amount',
+        xtype: 'numbercolumn',
+        width: 160,
         renderer: function(v, m, r) {
             return saas.util.BaseUtil.numberFormat(v, 2, true);
         },
         summaryType: 'sum',
-        summaryLabel: '应收余额',
+        summaryLabel: '应收余额(本位币)',
         summaryRenderer: function(v, d, f, m) {
             return saas.util.BaseUtil.numberFormat(v, 2, true);
         }

+ 2 - 2
frontend/saas-web/app/view/sale/b2b/PurchaseDetail.js

@@ -62,9 +62,9 @@ Ext.define('saas.view.sale.b2b.PurchaseDetail', {
                     vtype: 'positiveNumber'
                 }
             }, {
-                name: "sa_status",
+                name: "sa_turnstatus",
                 xtype: "textfield",
-                fieldLabel: "单状态",
+                fieldLabel: "单状态",
                 readOnly: true
             }, {
                 xtype: 'textfield',