Browse Source

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

hy 7 years ago
parent
commit
07c5b520d6

+ 12 - 1
applications/commons/commons-server/src/main/java/com/usoftchina/saas/commons/service/impl/ExcelServiceImpl.java

@@ -196,6 +196,10 @@ public class ExcelServiceImpl implements ExcelService{
                                    break;
                                }
                            }
+                           //如果为数字类型且为空默认赋值0
+                           if ("number".equals(set.getType()) && StringUtils.isEmpty(value)) {
+                                value = "0";
+                           }
                            //插入主表数据
                            if (null != mainData) {
                                mainData.put(set.getField(), value);
@@ -230,6 +234,10 @@ public class ExcelServiceImpl implements ExcelService{
                                    break;
                                }
                            }
+                           //如果为数字类型且为空默认赋值0
+                           if ("number".equals(set.getType()) && StringUtils.isEmpty(value)) {
+                               value = "0";
+                           }
                            //拼从表数据
                            detailData.put(set.getField(), value);
                        }
@@ -239,7 +247,10 @@ public class ExcelServiceImpl implements ExcelService{
                        }
                    }
                 }
-                dataImportDetailMapper.insertSelective(dd);
+                //排除编号未填写但是其他字段填写的情况
+                if (StringUtils.hasText(codeValue)) {
+                    dataImportDetailMapper.insertSelective(dd);
+                }
             }
             //重复编号检测
             List<String> samecode = getDuplicateElements(validateCode);

+ 9 - 2
applications/document/document-server/src/main/java/com/usoftchina/saas/document/service/impl/ProductServiceImpl.java

@@ -323,8 +323,15 @@ public class ProductServiceImpl extends CommonBaseServiceImpl<ProductMapper, Pro
     public DocBaseDTO close(Long id) {
         DocBaseDTO docBaseDTO = null;
         if(id != null && id > 0){
+            Product product = getMapper().selectByPrimaryKey(id);
+            if (product == null) {
+                throw new BizException(BizExceptionCode.NO_DATA);
+            }
+            if (!Status.ENABLE.getDisplay().equals(product.getPr_status())){
+                throw new BizException(BizExceptionCode.BIZ_BANNED);
+            }
             String code = getMapper().getCodeById(id);
-            Product product = new Product();
+            product = new Product();
             product.setId(id);
             product.setPr_status(Status.BANNED.getDisplay());
             product.setPr_statuscode(Status.BANNED.name());
@@ -349,7 +356,7 @@ public class ProductServiceImpl extends CommonBaseServiceImpl<ProductMapper, Pro
             if (product == null) {
                 throw new BizException(BizExceptionCode.NO_DATA);
             }
-            if (!Status.ENABLE.getDisplay().equals(product.getPr_status())){
+            if (!Status.BANNED.getDisplay().equals(product.getPr_status())){
                 throw new BizException(BizExceptionCode.BIZ_ENABLE);
             }else{
                 product.setId(id);

+ 1 - 1
frontend/saas-web/app/view/core/form/field/ConMonthField.js

@@ -63,7 +63,7 @@ Ext.define('saas.view.core.form.field.ConMonthField', {
         fromField = container.from,
         fromValue = fromField.value;
 
-        if(Number(value) <= Number(fromValue)) {
+        if(Number(value) < Number(fromValue)) {
             return false;
         }else {
             return true;

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

@@ -18,7 +18,7 @@ Ext.define('saas.view.money.report.PayDetail', {
         fieldLabel: '供应商名称',
         columnWidth: 0.25
     }, {
-        xtype: 'condatefield',
+        xtype: 'conmonthfield',
         name: 'pb_date',
         fieldLabel: '单据日期',
         columnWidth: 0.5

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

@@ -19,7 +19,7 @@ Ext.define('saas.view.money.report.RecDetail', {
         fieldLabel: '客户名称',
         columnWidth: 0.25
     }, {
-        xtype: 'condatefield',
+        xtype: 'conmonthfield',
         name: 'rb_date',
         fieldLabel: '单据日期',
         columnWidth: 0.5