Преглед изворни кода

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

chenw пре 7 година
родитељ
комит
c88f9e4d37

+ 0 - 1
applications/purchase/purchase-server/src/main/java/com/usoftchina/saas/purchase/controller/ProdInOutController.java

@@ -16,7 +16,6 @@ import org.springframework.web.bind.annotation.*;
  * Created by zdw
  * 2018-10-17 11:41.
  */
-@CrossOrigin
 @RestController
 @RequestMapping("/prodinout")
 public class ProdInOutController {

+ 0 - 1
applications/purchase/purchase-server/src/main/java/com/usoftchina/saas/purchase/controller/PurchaseController.java

@@ -18,7 +18,6 @@ import org.springframework.web.bind.annotation.*;
  * @author yingp
  * @date 2018/10/9
  */
-@CrossOrigin
 @RestController
 @RequestMapping("/purchase")
 public class PurchaseController {

+ 0 - 1
applications/sale/sale-server/src/main/java/com/usoftchina/saas/sale/controller/ProdInOutController.java

@@ -18,7 +18,6 @@ import org.springframework.web.bind.annotation.*;
  * Created by wyx
  * 2018-10-23.
  */
-@CrossOrigin
 @RestController
 @RequestMapping("/prodinout")
 public class ProdInOutController {

+ 0 - 1
applications/sale/sale-server/src/main/java/com/usoftchina/saas/sale/controller/SaleController.java

@@ -16,7 +16,6 @@ import org.springframework.web.bind.annotation.*;
  * @author: guq
  * @create: 2018-10-22 11:28
  **/
-@CrossOrigin
 @RestController
 @RequestMapping("/sale")
 public class SaleController {

+ 1 - 0
applications/sale/sale-server/src/main/java/com/usoftchina/saas/sale/service/impl/SaleServiceImpl.java

@@ -160,6 +160,7 @@ public class SaleServiceImpl implements SaleService{
             SaleDetail detail = BeanMapper.map(item, SaleDetail.class);
             detail.setSd_said(sa_id);
             detail.setSd_code(sa_code);
+            detail.setCompanyId(companyId);
             if (StringUtils.isEmpty(detail.getId()) || "0".equals(detail.getId().toString())) {
                 insertDetails.add(detail);
             } else {

+ 7 - 6
base-servers/gateway-server/src/main/java/com/usoftchina/saas/gateway/config/AuthFilter.java

@@ -23,7 +23,7 @@ import reactor.core.publisher.Mono;
 
 import java.util.List;
 import java.util.Set;
-import java.util.stream.Stream;
+import java.util.stream.Collectors;
 
 /**
  * 全局过滤器鉴权
@@ -66,19 +66,20 @@ public class AuthFilter implements GlobalFilter, Ordered {
             List<UrlResourceDTO> resources = ResourceCache.of(jwt.getAppId()).getUrlResources();
             if (!CollectionUtils.isEmpty(resources)) {
                 // 本次请求相关的资源
-                Stream<UrlResourceDTO> permissions = resources.parallelStream().filter(resource -> {
+                List<UrlResourceDTO> permissions = resources.parallelStream().filter(resource -> {
                     AntPathRequestMatcher matcher = new AntPathRequestMatcher(resource.getUrl(), resource.getMethod());
                     return matcher.matches(request);
-                });
-                if (permissions.count() > 0) {
+                }).collect(Collectors.toList());
+                if (!CollectionUtils.isEmpty(permissions)) {
                     Set<Long> resourceIds = accountDTO.getResources(jwt.getAppId(), jwt.getCompanyId());
                     boolean permitted = false;
                     if (null != resourceIds) {
                         // 权限匹配
-                        permitted = permissions.anyMatch(resource -> resourceIds.contains(resource.getId()));
+                        permitted = permissions.stream()
+                                .anyMatch(resource -> resourceIds.contains(resource.getId()));
                     }
                     if (!permitted) {
-                        throw new PermissionException(permissions.findFirst().get());
+                        throw new PermissionException(permissions.get(0));
                     }
                 }
             }

+ 1 - 1
frontend/saas-web/app/model/sale/ProdIODetail.js

@@ -14,7 +14,7 @@ Ext.define('saas.model.sale.ProdIODetail', {
         { name: 'pd_prodcode', type: 'string' },
         { name: 'pd_unit', type: 'string' },
         { name: 'pd_inqty', type: 'int' },
-        { name: 'pd_outqty', type: 'int' },
+        { name: 'pd_outqty', type: 'float' },
         { name: 'pd_orderprice', type: 'float' },
         { name: 'pd_sendprice', type: 'float' },
         { name: 'pd_price', type: 'float' },

+ 2 - 1
frontend/saas-web/app/model/sale/Saledetail.js

@@ -12,7 +12,8 @@ Ext.define('saas.model.sale.Saledetail', {
         { name: 'sd_total', type: 'float' },
         { name: 'sd_delivery', type: 'date' },
         { name: 'sd_taxtotal', type: 'float' },
-        { name: 'sd_pucode', type: 'string' }
+        { name: 'sd_pucode', type: 'string' },
+        { name: 'sd_text1', type: 'string' }
     ],
     //一对一映射
     associations: [{ type: 'hasOne', model: 'saas.model.document.Product', associationKey: 'productDTO'}]

+ 22 - 17
frontend/saas-web/app/view/money/payBalance/FormPanel.js

@@ -40,11 +40,7 @@ Ext.define('saas.view.money.payBalance.FormPanel', {
         name: 'pb_kind',
         fieldLabel: '单据类型',
         defaultValue: '付款单'
-    }, {
-        xtype: "datefield",
-        name: "pb_date",
-        fieldLabel: "日期"
-    }, {
+    },  {
         xtype: 'hidden',
         name: 'pb_vendid',
         fieldLabel: '供应商ID'
@@ -56,30 +52,38 @@ Ext.define('saas.view.money.payBalance.FormPanel', {
         xtype: "dbfindtrigger",
         name: "pb_vendname",
         fieldLabel: "供应商名称"
+    },{
+        xtype: "datefield",
+        name: "pb_date",
+        fieldLabel: "日期"
     }, {
-        xtype: 'textfield',
+        xtype: 'hidden',
         name: 'pb_manname',
         fieldLabel: '收款人'
     }, {
-        xtype: 'numberfield',
+        xtype: 'hidden',
         name: 'pb_pdamount',
         fieldLabel: '付款金额'
     }, {
-        xtype: "numberfield",
+        xtype: "hidden",
         name: "pb_pbdamount",
         fieldLabel: "本次核销金额"
     }, {
-        xtype: "numberfield",
+        xtype: "hidden",
         name: "pb_preamount",
         fieldLabel: "本次预付款"
     }, {
-        xtype: 'numberfield',
+        xtype: 'hidden',
         name: 'pb_discounts',
         fieldLabel: '整单折扣'
     }, {
-        xtype: 'numberfield',
+        xtype: 'hidden',
         name: 'pb_havebalance',
         fieldLabel: '已核销金额'
+    },{
+        xtype: 'textfield',
+        name: 'cu_leftamount',
+        fieldLabel: '总欠款金额'
     }, {
         xtype: "detailGridField",
         storeModel: 'saas.model.money.PayBalance1',
@@ -92,6 +96,7 @@ Ext.define('saas.view.money.payBalance.FormPanel', {
         }, {
             text: '期间',
             dataIndex: 'pd_ym',
+            hidden:true
             // editor: {
             //     xtype: 'hidden',
                 // xtype: 'textfield,
@@ -107,7 +112,7 @@ Ext.define('saas.view.money.payBalance.FormPanel', {
         //     text: '结算账户编号',
         //     dataIndex: 'paybalancedet'
         // }, {
-            text: '结算账户',
+            text: '资金账户',
             dataIndex: 'pd_bankname'
         }, {
             text: "付款金额",
@@ -165,11 +170,11 @@ Ext.define('saas.view.money.payBalance.FormPanel', {
                 xtype:'hidden'
             }
         }, {
-            text: '源单号',
+            text: '源单号',
             dataIndex: 'pbd_slcode'
-        // }, {
-        //     text: "单据类型",
-        //     dataIndex: "pbd_slkind",
+        }, {
+            text: "业务类型",
+            dataIndex: "pbd_slkind",
         }, {
             text: "单据日期",
             dataIndex: "pbd_sldate",
@@ -260,7 +265,7 @@ Ext.define('saas.view.money.payBalance.FormPanel', {
             dataIndex: 'pbd_remark',
             width: 250,
             editor:{
-                xtype: 'textfield'
+                xtype: 'hidden'
             }
         }]
     }, {

+ 1 - 1
frontend/saas-web/app/view/purchase/purchase/FormPanelController.js

@@ -111,7 +111,7 @@ Ext.define('saas.view.purchase.purchase.FormPanelController', {
                         addTitle: '物料资料',
                         //放大镜赋值设置
                         dbfinds:[{
-                            from:'id',to:'pd_prodid'                          
+                            from:'id',to:'pd_prodid',ignore:true                          
                         },{
                             from:'pr_code',to:'pd_prodcode'                          
                         },{

+ 3 - 3
frontend/saas-web/app/view/purchase/purchaseIn/FormPanelController.js

@@ -22,7 +22,7 @@ Ext.define('saas.view.purchase.purchaseIn.FormPanelController', {
                         addTitle: '供应商资料',
                         defaultCondition:"ve_statuscode='OPEN'",
                         dbfinds:[{
-                            from:'id',to:'pi_vendid'
+                            from:'id',to:'pi_vendid',ignore:true
                         },{
                             from:'ve_code',to:'pi_vendcode'
                         },{
@@ -105,7 +105,7 @@ Ext.define('saas.view.purchase.purchaseIn.FormPanelController', {
                         addXtype: 'document-product-formpanel',
                         addTitle: '物料资料',
                         dbfinds:[{
-                            from:'id',to:'pd_prodid'                          
+                            from:'id',to:'pd_prodid',ignore:true                          
                         },{
                             from:'pr_code',to:'pd_prodcode'                          
                         },{
@@ -214,7 +214,7 @@ Ext.define('saas.view.purchase.purchaseIn.FormPanelController', {
                         addTitle: '仓库资料',
                         defaultCondition:"wh_statuscode='OPEN'",
                         dbfinds:[{
-                            from:'id',to:'pd_whid'                          
+                            from:'id',to:'pd_whid',ignore:true                          
                         },{
                             from:'wh_code',to:'pd_whcode'                          
                         },{

+ 3 - 3
frontend/saas-web/app/view/purchase/purchaseOut/FormPanelController.js

@@ -21,7 +21,7 @@ Ext.define('saas.view.purchase.purchaseOut.FormPanelController', {
                         addTitle: '供应商资料',
                         defaultCondition:"ve_statuscode='OPEN'",
                         dbfinds:[{
-                            from:'ve_id',to:'pi_vendid'
+                            from:'ve_id',to:'pi_vendid',ignore:true
                         },{
                             from:'ve_code',to:'pi_vendcode'
                         },{
@@ -104,7 +104,7 @@ Ext.define('saas.view.purchase.purchaseOut.FormPanelController', {
                         addXtype: 'document-product-formpanel',
                         addTitle: '物料资料',
                         dbfinds:[{
-                            from:'id',to:'pd_prodid'                          
+                            from:'id',to:'pd_prodid',ignore:true                          
                         },{
                             from:'pr_code',to:'pd_prodcode'                          
                         },{
@@ -214,7 +214,7 @@ Ext.define('saas.view.purchase.purchaseOut.FormPanelController', {
                         addTitle: '仓库资料',
                         defaultCondition:"wh_statuscode='OPEN'",
                         dbfinds:[{
-                            from:'id',to:'pd_whid'                          
+                            from:'id',to:'pd_whid',ignore:true                          
                         },{
                             from:'wh_code',to:'pd_whcode'                          
                         },{

+ 4 - 4
frontend/saas-web/app/view/stock/otherIn/FormPanelController.js

@@ -15,7 +15,7 @@ Ext.define('saas.view.stock.otherIn.FormPanelController', {
                         addTitle: '供应商资料',
                         defaultCondition:"ve_statuscode='OPEN'",
                         dbfinds:[{
-                            from:'id',to:'pi_vendid'
+                            from:'id',to:'pi_vendid',ignore:true
                         },{
                             from:'ve_code',to:'pi_vendcode'
                         },{
@@ -99,7 +99,7 @@ Ext.define('saas.view.stock.otherIn.FormPanelController', {
                         // dataUrl:'http://localhost:9480/customer/list',
                         dbfinds: [{
                             from: 'id',
-                            to: 'pi_custid'
+                            to: 'pi_custid',ignore:true
                         }, {
                             from: 'cu_code',
                             to: 'pi_custcode'
@@ -173,7 +173,7 @@ Ext.define('saas.view.stock.otherIn.FormPanelController', {
                         addTitle: '物料资料',
                         dbfinds: [{
                             from: 'id',
-                            to: 'pd_prodid'
+                            to: 'pd_prodid',ignore:true
                         }, {
                             from: 'pr_code',
                             to: 'pd_prodcode'
@@ -288,7 +288,7 @@ Ext.define('saas.view.stock.otherIn.FormPanelController', {
                         defaultCondition:"wh_statuscode='OPEN'",
                         dbfinds: [{
                             from: 'id',
-                            to: 'pd_whid'
+                            to: 'pd_whid',ignore:true
                         }, {
                             from: 'wh_code',
                             to: 'pd_whcode'

+ 4 - 4
frontend/saas-web/app/view/stock/otherOut/FormPanelController.js

@@ -15,7 +15,7 @@ Ext.define('saas.view.stock.otherOut.FormPanelController', {
                         addTitle: '供应商资料',
                         defaultCondition:"ve_statuscode='OPEN'",
                         dbfinds:[{
-                            from:'id',to:'pi_vendid'
+                            from:'id',to:'pi_vendid',ignore:true
                         },{
                             from:'ve_code',to:'pi_vendcode'
                         },{
@@ -98,7 +98,7 @@ Ext.define('saas.view.stock.otherOut.FormPanelController', {
                         dataUrl:'/api/document/customer/list',
                         // dataUrl:'http://localhost:9480/customer/list',
                         dbfinds:[{
-                            from:'id',to:'pi_custid'
+                            from:'id',to:'pi_custid',ignore:true
                         },{
                             from:'cu_code',to:'pi_custcode'
                         },{
@@ -167,7 +167,7 @@ Ext.define('saas.view.stock.otherOut.FormPanelController', {
                         addXtype: 'document-product-formpanel',
                         addTitle: '物料资料',
                         dbfinds:[{
-                            from:'id',to:'pd_prodid'                          
+                            from:'id',to:'pd_prodid',ignore:true                          
                         },{
                             from:'pr_code',to:'pd_prodcode'                          
                         },{
@@ -276,7 +276,7 @@ Ext.define('saas.view.stock.otherOut.FormPanelController', {
                         addTitle: '仓库资料',
                         defaultCondition:"wh_statuscode='OPEN'",
                         dbfinds:[{
-                            from:'id',to:'pd_whid'                          
+                            from:'id',to:'pd_whid',ignore:true                          
                         },{
                             from:'wh_code',to:'pd_whcode'                          
                         },{