Browse Source

1.其他收支明细表

heqinwei 7 years ago
parent
commit
9adff599d0

+ 3 - 3
applications/money/money-server/src/main/java/com/usoftchina/saas/money/controller/MoneyReportColltroller.java

@@ -80,9 +80,9 @@ public class MoneyReportColltroller {
     }
     }
 
 
     //其他收支明细表
     //其他收支明细表
-    @GetMapping("/othrinoutdetails")
-    public Result othrinoutdetails(PageRequest page, ListReqDTO req) {
-        Map<String, Object> listData = moneyReportService.othrinoutdetails(page, req);
+    @GetMapping("/otheriodetail")
+    public Result otheriodetail(PageRequest page, ListReqDTO req) {
+        Map<String, Object> listData = moneyReportService.otheriodetail(page, req);
         return Result.success(listData);
         return Result.success(listData);
     }
     }
 
 

+ 1 - 1
applications/money/money-server/src/main/java/com/usoftchina/saas/money/service/MoneyReportService.java

@@ -19,6 +19,6 @@ public interface MoneyReportService {
     Map<String, Object> accountdetails(PageRequest page, ListReqDTO req);
     Map<String, Object> accountdetails(PageRequest page, ListReqDTO req);
     Map<String, Object> vendormonthdetails(PageRequest page, ListReqDTO req);
     Map<String, Object> vendormonthdetails(PageRequest page, ListReqDTO req);
     Map<String, Object> custormonthdetails(PageRequest page, ListReqDTO req);
     Map<String, Object> custormonthdetails(PageRequest page, ListReqDTO req);
-    Map<String, Object> othrinoutdetails(PageRequest page, ListReqDTO req);
+    Map<String, Object> otheriodetail(PageRequest page, ListReqDTO req);
     Map<String, Object> profitdetails(PageRequest page, ListReqDTO req);
     Map<String, Object> profitdetails(PageRequest page, ListReqDTO req);
 }
 }

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

@@ -41,6 +41,8 @@ public class MoneyReportServiceImpl implements MoneyReportService {
     private VendmonthMapper vendmonthMapper;
     private VendmonthMapper vendmonthMapper;
     @Autowired
     @Autowired
     private CustmonthMapper custmonthMapper;
     private CustmonthMapper custmonthMapper;
+    @Autowired
+    private BanksubledgerMapper banksubledgerMapper;
 
 
     @Override
     @Override
     public Map<String, Object> vendorCheck(PageRequest page, ListReqDTO req) {
     public Map<String, Object> vendorCheck(PageRequest page, ListReqDTO req) {
@@ -83,8 +85,8 @@ public class MoneyReportServiceImpl implements MoneyReportService {
     }
     }
 
 
     @Override
     @Override
-    public Map<String, Object> othrinoutdetails(PageRequest page, ListReqDTO req) {
-        return getListDATA(page, req, "othrinoutdetails");
+    public Map<String, Object> otheriodetail(PageRequest page, ListReqDTO req) {
+        return getListDATA(page, req, "otheriodetail");
     }
     }
 
 
     @Override
     @Override
@@ -253,9 +255,13 @@ public class MoneyReportServiceImpl implements MoneyReportService {
             list = vendmonthMapper.selectByCondition(con, companyId);
             list = vendmonthMapper.selectByCondition(con, companyId);
             res = null;
             res = null;
         }else if ("custormonthdetails".equals(type)){
         }else if ("custormonthdetails".equals(type)){
-            System.out.println("companyid"+companyId);
             list = custmonthMapper.selectByCondition(con, companyId);
             list = custmonthMapper.selectByCondition(con, companyId);
             res = null;
             res = null;
+        }else if ("otheriodetail".equals(type)){
+            list = banksubledgerMapper.selectByCondition(con, companyId);
+            if (!StringUtils.isEmpty(calculateFieldsSql)) {
+                res = banksubledgerMapper.selectCalculateFields(calculateFieldsSql, con, companyId);
+            }
         }
         }
 
 
         try {
         try {

+ 6 - 4
applications/money/money-server/src/main/resources/mapper/BanksubledgerMapper.xml

@@ -455,14 +455,16 @@
 
 
 
 
     <select id="selectByCondition" resultMap="BaseResultMap">
     <select id="selectByCondition" resultMap="BaseResultMap">
-        select  bl_date, bl_code, bl_kind,bl_bankcode,bl_bankid, bl_bankname, bl_income, bl_spending, bl_assname, bl_remark
-        from banksubledger
+        select *
+        from
+        (select  bl_date, bl_code, bl_kind,bl_bankcode,bl_bankid, bl_bankname, bl_income, bl_spending, bl_assname, bl_remark, companyid
+        from banksubledger where bl_kind in ('其他收入单', '其他支出单'))a
         <where>
         <where>
             <if test="con != null">
             <if test="con != null">
-                ${con}
+            ${con}
             </if>
             </if>
             <if test="companyId != null">
             <if test="companyId != null">
-                and  companyId = #{companyId} and bl_kind = '其他支出单' or bl_kind = '其他收入单'
+            and  companyId = #{companyId}
             </if>
             </if>
         </where>
         </where>
         order by bl_bankname asc, bl_date desc,bl_bankcode desc
         order by bl_bankname asc, bl_date desc,bl_bankcode desc

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

@@ -36,7 +36,7 @@
         and  companyId = #{companyId} and pd_query =1
         and  companyId = #{companyId} and pd_query =1
       </if>
       </if>
     </where>
     </where>
-    order by pd_vendname asc, pd_detno desc, pd_date desc
+    order by pd_vendname asc, pd_detno asc, pd_date desc
   </select>
   </select>
 
 
   <select id="selectCalculateFields" resultType="string">
   <select id="selectCalculateFields" resultType="string">

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

@@ -36,7 +36,7 @@
         and  companyId = #{companyId} and rd_query = 1
         and  companyId = #{companyId} and rd_query = 1
       </if>
       </if>
     </where>
     </where>
-    order by rd_custname asc, rd_detno desc, rd_date desc
+    order by rd_custname asc, rd_detno asc, rd_date desc
   </select>
   </select>
 
 
   <select id="selectCalculateFields" resultType="string">
   <select id="selectCalculateFields" resultType="string">

+ 79 - 25
frontend/saas-web/app/view/money/report/OtherIODetail.js

@@ -10,61 +10,115 @@ Ext.define('saas.view.money.report.OtherIODetail', {
 
 
     viewName: 'money-report-otheriodetail',
     viewName: 'money-report-otheriodetail',
 
 
-    groupField: null,
-    // listUrl: '/api/money/report/recDetail',
+    groupField: 'bl_bankname',
+    listUrl: '/api/money/report/otheriodetail',
     defaultCondition: null,
     defaultCondition: null,
     reportTitle: '其他收支明细表',
     reportTitle: '其他收支明细表',
-    QueryWidth: 0.25,
+    QueryWidth: 0.2,
     searchItems: [{
     searchItems: [{
-        xtype: 'customerDbfindTrigger',
-        name: 'pi_custname',
-        fieldLabel: '资金账户',
-        columnWidth: 0.25
+        xtype: 'bandinfoDbfindTrigger',
+        name: 'bl_bankname',
+        emptyText: '资金账户',
+        columnWidth: 0.15,
+        dbfinds:[
+            {
+                from:'bk_bankname',to:'bl_bankname'
+            }]
     }, {
     }, {
-        xtype : "remotecombo", 
-        storeUrl:'/api/document/customerkind/getCombo',
-        name : "cu_type", 
-        emptyText : "收支类别", 
-        columnWidth: 0.25,
-        hiddenBtn:true
+        // xtype : "remotecombo",
+        // storeUrl:'/api/document/customerkind/getCombo',
+        // name : "bl_kind",
+        // emptyText : "收支类别",
+        // columnWidth: 0.25,
+        // hiddenBtn:true,
+        xtype: 'combobox',
+        name: 'bl_kind',
+        queryMode: 'local',
+        displayField: 'display',
+        valueField: 'value',
+        emptyText : '收支类别',
+        editable:false,
+        columnWidth: 0.15,
+        store: Ext.create('Ext.data.ArrayStore', {
+            fields: ['value', 'display'],
+            data: [
+                ["ALL", "全部"],
+                ["其他支出单", "其他支出单"],
+                ["其他收入单", "其他收入单"]
+            ]
+        }),
+        getCondition: function(value) {
+            if(value == 'ALL'||value == null) {
+                return '1=1';
+            }else {
+                return 'bl_kind=\'' + value + '\'';
+            }
+        }
+
     }, {
     }, {
         xtype: 'condatefield',
         xtype: 'condatefield',
-        name: 'rb_date',
+        name: 'bl_date',
         fieldLabel: '日期',
         fieldLabel: '日期',
-        columnWidth: 0.25
+        columnWidth: 0.5
     }],
     }],
 
 
     reportColumns: [{
     reportColumns: [{
         text: '日期',
         text: '日期',
-        dataIndex: 'pi_inoutno',
+        dataIndex: 'bl_date',
         width: 200
         width: 200
     }, {
     }, {
         text: '单据编号',
         text: '单据编号',
-        dataIndex: 'pi_custcode',
+        dataIndex: 'bl_code',
         width: 200,
         width: 200,
     }, {
     }, {
         text: '收支类别',
         text: '收支类别',
-        dataIndex: 'pi_custname',
+        dataIndex: 'bl_kind',
         width: 200,
         width: 200,
     }, {
     }, {
         text: '资金账户',
         text: '资金账户',
-        dataIndex: 'pi_class',
+        dataIndex: 'bl_bankname',
         width: 150
         width: 150
     }, {
     }, {
         text: '收入',
         text: '收入',
-        dataIndex: 'pu_buyername',
-        width: 150
+        dataIndex: 'bl_income',
+        width: 150,
+        renderer : function(v) {
+            var arr = (v + '.').split('.');
+            var xr = (new Array(arr[1].length > 2 ? 2 : arr[1].length)).fill('0');
+            var format = '0,000.' + xr.join();
+            return Ext.util.Format.number(v, format);
+        },
+        summaryType: 'sum',
+        summaryRenderer: function(v) {
+            var arr = (v + '.').split('.');
+            var xr = (new Array(arr[1].length > 2 ? 2 : arr[1].length)).fill('0');
+            var format = '0,000.' + xr.join();
+            return Ext.util.Format.number(v, format);
+        }
     }, {
     }, {
         text: '支出',
         text: '支出',
-        dataIndex: 'rb_date',
-        width: 150
+        dataIndex: 'bl_spending',
+        width: 150,
+        renderer : function(v) {
+            var arr = (v + '.').split('.');
+            var xr = (new Array(arr[1].length > 2 ? 2 : arr[1].length)).fill('0');
+            var format = '0,000.' + xr.join();
+            return Ext.util.Format.number(v, format);
+        },
+        summaryType: 'sum',
+        summaryRenderer: function(v) {
+            var arr = (v + '.').split('.');
+            var xr = (new Array(arr[1].length > 2 ? 2 : arr[1].length)).fill('0');
+            var format = '0,000.' + xr.join();
+            return Ext.util.Format.number(v, format);
+        }
     }, {
     }, {
         text: '往来单位',
         text: '往来单位',
-        dataIndex: 'pd_pdno',
+        dataIndex: 'bl_assname',
         width: 150,
         width: 150,
     }, {
     }, {
         text: '备注',
         text: '备注',
-        dataIndex: 'cu_beginaramount',
+        dataIndex: 'bl_remark',
         width: 150
         width: 150
     }]
     }]
 });
 });

+ 4 - 0
frontend/saas-web/resources/json/navigation.json

@@ -74,6 +74,10 @@
             "text": "客户对账单",
             "text": "客户对账单",
             "id": "monry-report-customercheck",
             "id": "monry-report-customercheck",
             "viewType":"monry-report-customercheck"
             "viewType":"monry-report-customercheck"
+        },{
+            "text":"其他收支明细表",
+            "id":"money-report-otheriodetail",
+            "viewType":"monry-report-otheriodetail"
         }]
         }]
     }]
     }]
 }, {
 }, {