Browse Source

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

hy 7 years ago
parent
commit
0f6240bc14

+ 1 - 1
applications/document/document-server/src/main/java/com/usoftchina/saas/document/mapper/BankinformationMapper.java

@@ -25,7 +25,7 @@ public interface BankinformationMapper extends CommonBaseMapper<Bankinformation>
     List<Bankinformation> selectBankinformationBycondition(@Param("con") String con, @Param("companyId") Long companyId);
 
     List<ComboDTO> getCombo(@Param("companyId") Long companyId);
-    String selectBankcode(@Param("bk_bankcode") String bk_bankcode, @Param("companyId") Long companyId);
+    int selectBankcode(@Param("bk_bankcode") String bk_bankcode, @Param("id") Long id);
     Long selectBankId(@Param("bk_bankcode") String bk_bankcode, @Param("companyId") Long companyId);
 
     void check(Map<String, Object> map);

+ 7 - 11
applications/document/document-server/src/main/java/com/usoftchina/saas/document/service/impl/BankinformationServiceImpl.java

@@ -61,15 +61,13 @@ public class BankinformationServiceImpl extends CommonBaseServiceImpl<Bankinform
         DocBaseDTO docBaseDTO = new DocBaseDTO();
 
         String bk_code = RegexpUtils.replaceSpecCharacter(bankinformation.getBk_bankcode());
-        String code = pushMaxnubmer(bk_code, bankinformation.getId());
+        String code = null;
 
-        String bktion = bankinformationMapper.selectBankcode(bankinformation.getBk_bankcode() ,BaseContextHolder.getCompanyId());
+        int bktion = bankinformationMapper.selectBankcode(bankinformation.getBk_bankcode() ,bankinformation.getId());
         //先判断ID,再判断编号
         if (bankinformation.getId() == 0)
         {
-            if (bktion != null){
-                throw new BizException(500, BizExceptionCode.ACCOUNT_EXISTS.getMessage());
-            }
+            code = pushMaxnubmer(bk_code, bankinformation.getId());
             bankinformation.setBk_thisamount(bankinformation.getBk_beginamount());
             bankinformation.setBk_bankcode(code);
             bankinformationMapper.insertSelective(bankinformation);
@@ -103,15 +101,13 @@ public class BankinformationServiceImpl extends CommonBaseServiceImpl<Bankinform
                 }
             }
 
-            Long id = bankinformationMapper.selectBankId(bankinformation.getBk_bankcode(), BaseContextHolder.getCompanyId());
-            if (bktion != null){
-                if (id.equals(bankinformation.getId())){
+//            Long id = bankinformationMapper.selectBankId(bankinformation.getBk_bankcode(), BaseContextHolder.getCompanyId());
+            if (bktion > 0){
                     bankinformationMapper.updateByPrimaryKeySelective(bankinformation);
                     messageLogService.update(docBaseDTO);
-                }else {
-                    throw new BizException(500, BizExceptionCode.ACCOUNT_EXISTS.getMessage());
-                }
             }else {
+                code = pushMaxnubmer(bk_code, bankinformation.getId());
+                bankinformation.setBk_bankcode(code);
                 bankinformationMapper.updateByPrimaryKeySelective(bankinformation);
                 messageLogService.update(docBaseDTO);
             }

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

@@ -324,9 +324,9 @@
     </select>
 
 
-  <select id="selectBankcode" resultType="java.lang.String">
-        select bk_bankcode from bankinformation where
-        bk_bankcode = #{bk_bankcode,jdbcType=VARCHAR} and companyId = #{companyId}
+  <select id="selectBankcode" resultType="java.lang.Integer">
+        select count(0) from bankinformation where
+        bk_bankcode = #{bk_bankcode,jdbcType=VARCHAR} and bk_id = #{id}
     </select>
 
   <select id="selectBankId" resultType="java.lang.Long">

+ 19 - 0
applications/money/money-server/src/main/java/com/usoftchina/saas/money/po/VendorAcountView.java

@@ -21,6 +21,9 @@ public class VendorAcountView {
 
     private String pr_spec;
 
+    private String pr_orispeccode;
+    private String pr_brand;
+
     private String pd_unit;
 
     private Double qty;
@@ -38,6 +41,22 @@ public class VendorAcountView {
     private String pd_remark;
     private int ym;
 
+    public String getPr_orispeccode() {
+        return pr_orispeccode;
+    }
+
+    public void setPr_orispeccode(String pr_orispeccode) {
+        this.pr_orispeccode = pr_orispeccode;
+    }
+
+    public String getPr_brand() {
+        return pr_brand;
+    }
+
+    public void setPr_brand(String pr_brand) {
+        this.pr_brand = pr_brand;
+    }
+
     public int getYm() {
         return ym;
     }

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

@@ -36,7 +36,7 @@
         and  companyId = #{companyId} and pd_query =1 and (pd_addpay + pd_addpre + pd_remain) != 0
       </if>
     </where>
-    order by pd_vendname asc, pd_detno asc, pd_date desc
+    order by pd_vendid desc, pd_detno asc, pd_date desc
   </select>
 
   <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 (rd_addrec + rd_addpre + rd_remain) != 0
       </if>
     </where>
-    order by rd_custname asc, rd_detno asc, rd_date desc
+    order by rd_custid desc, rd_detno asc, rd_date desc
   </select>
 
   <select id="selectCalculateFields" resultType="string">

+ 2 - 0
applications/money/money-server/src/main/resources/mapper/VendorAcountViewMapper.xml

@@ -12,6 +12,8 @@
     <result column="pr_detail" property="pr_detail" jdbcType="VARCHAR" />
     <result column="pr_spec" property="pr_spec" jdbcType="VARCHAR" />
     <result column="pd_unit" property="pd_unit" jdbcType="VARCHAR" />
+    <result column="pr_brand" property="pr_brand" jdbcType="VARCHAR" />
+    <result column="pr_orispeccode" property="pr_orispeccode" jdbcType="VARCHAR" />
     <result column="qty" property="qty" jdbcType="DOUBLE" />
     <result column="pd_orderprice" property="pd_orderprice" jdbcType="DOUBLE" />
     <result column="pd_taxrate" property="pd_taxrate" jdbcType="DOUBLE" />

+ 3 - 3
base-servers/account/account-server/src/main/java/com/usoftchina/saas/account/po/Account.java

@@ -25,7 +25,7 @@ public class Account implements Serializable {
      * 账号类型 0 - 管理员
      */
     private Integer type;
-    private boolean enabled;
+    private Boolean enabled;
     private Date createTime;
     private long creatorId;
     private Date updateTime;
@@ -96,11 +96,11 @@ public class Account implements Serializable {
         this.type = type;
     }
 
-    public boolean isEnabled() {
+    public Boolean isEnabled() {
         return enabled;
     }
 
-    public void setEnabled(boolean enabled) {
+    public void setEnabled(Boolean enabled) {
         this.enabled = enabled;
     }
 

+ 2 - 2
frontend/saas-web/app/model/report/Purchase.js

@@ -24,10 +24,10 @@ Ext.define('saas.model.report.Purchase', {
         { name: 'pd_taxtotal', type: 'float' },
         { name: 'pd_taxamount', type: 'float',
             convert: function(v, rec) {
-                debugger;
                 var t = (rec.get('pd_total') || 0.0) - (rec.get('pd_taxtotal') || 0.0);
                 return Number(saas.util.BaseUtil.numberFormat(t, 2, false));
-            }
+            },
+            depends: ['pd_total', 'pd_taxtotal']
         },
         { name: 'pd_acceptqty', type: 'float' },
         { name: 'pd_accepttotal', type: 'float' },

+ 35 - 0
frontend/saas-web/app/model/report/Sale.js

@@ -0,0 +1,35 @@
+Ext.define('saas.model.report.Sale', {
+    extend: 'saas.model.Base',
+
+    fields: [
+        { name: 'id', type: 'int' },
+        { name: 'sa_code', type: 'string' },
+        { name: 'sa_custname', type: 'string' },
+        { name: 'sa_sendstatus', type: 'string' },
+        { name: 'sa_seller', type: 'string' },
+        { name: 'sa_date', type: 'date' },
+        { name: 'sd_prodcode', type: 'string' },
+        { name: 'pr_brand', type: 'string' },
+        { name: 'pr_detail', type: 'string' },
+        { name: 'pr_orispeccode', type: 'string' },
+        { name: 'pr_spec', type: 'string' },
+        { name: 'sd_qty', type: 'float' },
+        { name: 'pr_unit', type: 'string' },
+        { name: 'sd_price', type: 'float' },
+        { name: 'sd_netprice', type: 'float' },
+        { name: 'sd_price', type: 'float' },
+        { name: 'sd_nettotal', type: 'float' },
+        { name: 'sd_taxrate', type: 'float' },
+        { name: 'sd_taxamount', type: 'float',
+            convert: function(v, rec) {
+                debugger;
+                var t = (rec.get('sd_total') || 0.0) - (rec.get('sd_nettotal') || 0.0);
+                return Number(saas.util.BaseUtil.numberFormat(t, 2, false));
+            },
+            depends: ['sd_total', 'sd_nettotal']
+        },
+        { name: 'sd_total', type: 'float' },
+        { name: 'sd_pdsendqty', type: 'float' },
+        { name: 'sd_remark', type: 'string' },
+    ],
+});

+ 2 - 2
frontend/saas-web/app/view/core/report/ReportPanel.js

@@ -196,8 +196,8 @@ Ext.define('saas.view.core.report.ReportPanel', {
             }
         }
         var store = Ext.create('Ext.data.Store', Ext.Object.merge({
-            fields: me.getFields(),
-            // model: me.reportModel,
+            //fields: me.getFields(),
+            model: me.reportModel,
             autoLoad: me.autoLoad,
             pageSize: 15,
             data: [],

+ 1 - 1
frontend/saas-web/app/view/sale/report/Sale.js

@@ -36,7 +36,7 @@ Ext.define('saas.view.sale.report.Sale', {
             ["CLOSE", "已关闭"]
         ]
     }],
-
+    reportModel: 'saas.model.report.Sale',
     reportColumns: [
     {
         text: 'id',

+ 25 - 14
frontend/saas-web/app/view/sale/report/SaleRec.js

@@ -33,17 +33,10 @@ Ext.define('saas.view.sale.report.SaleRec', {
         text: '收款单号',
         dataIndex: 'rb_code',
         width: 150
-    }, {
-        text: '客户编号',
-        dataIndex: 'rb_custcode',
-        width: 150
     }, {
         text: '客户名称',
         dataIndex: 'rb_custname',
         width: 200
-    }, {
-        text: '业务员',
-        dataIndex: 'rb_manname'
     }, {
         text: '日期',
         dataIndex: 'rb_date',
@@ -53,13 +46,13 @@ Ext.define('saas.view.sale.report.SaleRec', {
         dataIndex: 'rbd_slcode',
         width: 150
     }, {
-        text: '类型',
+        text: '业务类型',
         dataIndex: 'rbd_slkind'
     }, {
-        text: '销售金额(元)',
+        text: '金额(元)',
         xtype: 'numbercolumn',
         exportFormat: 'Amount',
-        dataIndex: 'rbd_amount',
+        dataIndex: 'pi_nettotal',
         renderer : function(v) {
             var arr = (v + '.').split('.');
             var xr = (new Array(arr[1].length > 2 ? 2 : arr[1].length)).fill('0');
@@ -67,10 +60,10 @@ Ext.define('saas.view.sale.report.SaleRec', {
             return Ext.util.Format.number(v, format);
         }
     }, {
-        text: '收款金额(元)',
+        text: '额(元)',
         xtype: 'numbercolumn',
         exportFormat: 'Amount',
-        dataIndex: 'rbd_nowbalance',
+        dataIndex: 'rbd_taxamount',
         renderer : function(v) {
             var arr = (v + '.').split('.');
             var xr = (new Array(arr[1].length > 2 ? 2 : arr[1].length)).fill('0');
@@ -85,10 +78,28 @@ Ext.define('saas.view.sale.report.SaleRec', {
             return Ext.util.Format.number(v, format);
         }
     }, {
-        text: '应收余额',
+        text: '价税合计(元)',
         xtype: 'numbercolumn',
         exportFormat: 'Amount',
-        dataIndex: 'rb_rbdamount',
+        dataIndex: 'pi_total',
+        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: '收款余额(元)',
+        xtype: 'numbercolumn',
+        exportFormat: 'Amount',
+        dataIndex: 'rbd_nowbalance',
         hidden:true,
         renderer : function(v) {
             var arr = (v + '.').split('.');