Browse Source

1.核销明细表优化
2.应收应付总账优化

heqinwei 7 years ago
parent
commit
6624180c27

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

@@ -20,6 +20,33 @@ public class AccountDetailsView {
     private Double total;
     private Date date;
     private Long companyId;
+    private Double sl_orderamount;
+    private Double pbd_nowbalance;
+    private Date pb_date;
+
+    public Double getPbd_nowbalance() {
+        return pbd_nowbalance;
+    }
+
+    public void setPbd_nowbalance(Double pbd_nowbalance) {
+        this.pbd_nowbalance = pbd_nowbalance;
+    }
+
+    public Date getPb_date() {
+        return pb_date;
+    }
+
+    public void setPb_date(Date pb_date) {
+        this.pb_date = pb_date;
+    }
+
+    public Double getSl_orderamount() {
+        return sl_orderamount;
+    }
+
+    public void setSl_orderamount(Double sl_orderamount) {
+        this.sl_orderamount = sl_orderamount;
+    }
 
     public String getCu_name() {
         return cu_name;

+ 4 - 1
applications/money/money-server/src/main/resources/mapper/AccountDetailsViewMapper.xml

@@ -12,7 +12,10 @@
     <result column="pb_code" property="pb_code" jdbcType="VARCHAR" />
     <result column="total" property="total" jdbcType="DOUBLE" />
     <result column="date" property="date" jdbcType="TIMESTAMP" />
+    <result column="sl_orderamount" property="sl_orderamount" jdbcType="DOUBLE" />
+    <result column="pb_date" property="pb_date" jdbcType="TIMESTAMP" />
     <result column="companyId" property="companyId" jdbcType="INTEGER" />
+    <result column="pbd_nowbalance" property="pbd_nowbalance" jdbcType="DOUBLE" />
   </resultMap>
   <select id="selectByCondition" resultMap="BaseResultMap">
     select  *  from account_details_view
@@ -24,7 +27,7 @@
         and  companyId = #{companyId}
       </if>
     </where>
-    order by sl_code desc ,date desc
+    order by sl_code desc ,pb_date desc
   </select>
 
   <select id="selectCalculateFields" resultType="string">

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

@@ -29,7 +29,7 @@
         ${con}
       </if>
       <if test="companyId != null">
-        and  companyId = #{companyId} and (cm_endamount +cm_nowamount+ cm_nowpreamount + cm_beginamount) != 0
+        and  companyId = #{companyId} and abs(cm_beginamount)+abs(cm_beginpreamount)+abs(cm_nowamount)+abs(cm_nowpreamount)>0
       </if>
     </where>
     order by cm_yearmonth desc,cm_custcode

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

@@ -29,7 +29,7 @@
         ${con}
       </if>
       <if test="companyId != null">
-        and  companyid = #{companyId} and (vm_endamount+ vm_nowamount+vm_nowpreamount+vm_beginamount) != 0
+        and  companyid = #{companyId} and abs(vm_beginamount)+abs(vm_beginpreamount)+abs(vm_nowamount)+abs(vm_nowpreamount)>0
       </if>
     </where>
     order by vm_yearmonth desc,vm_vendcode

+ 8 - 8
frontend/saas-web/app/view/money/report/AccountDetails.js

@@ -30,7 +30,7 @@ Ext.define('saas.view.money.report.AccountDetails', {
             ["销售退货单", "销售退货单"]
         ]
     }, {
-        name: 'date',
+        name: 'pb_date',
         xtype: 'condatefield',
         emptyText: '日期',
         columnWidth: 0.3
@@ -62,11 +62,6 @@ Ext.define('saas.view.money.report.AccountDetails', {
         text: '单据类型',
         dataIndex: 'sl_kind',
         width: 110
-    }, {
-        text: '单据日期',
-        dataIndex: 'date',
-        xtype: 'datecolumn',
-        width: 110
     }, {
         text: '供应商名称',
         dataIndex: 've_name',
@@ -79,9 +74,14 @@ Ext.define('saas.view.money.report.AccountDetails', {
         text: '核销单号',
         dataIndex: 'pb_code',
         width: 200
+    }, {
+        text: '单据日期',
+        dataIndex: 'pb_date',
+        xtype: 'datecolumn',
+        width: 110
     }, {
         text: '本期核销金额',
-        dataIndex: 'sl_amount',
+        dataIndex: 'pbd_nowbalance',
         exportFormat: 'Amount',
         xtype: 'numbercolumn',
         width: 130,
@@ -93,7 +93,7 @@ Ext.define('saas.view.money.report.AccountDetails', {
         }
     }, {
         text: '总金额',
-        dataIndex: 'total',
+        dataIndex: 'sl_orderamount',
         xtype: 'numbercolumn',
         exportFormat: 'Amount',
         width: 110,