瀏覽代碼

Merge remote-tracking branch 'origin/master' into master

yejian 3 年之前
父節點
當前提交
eda2ed9ef8

+ 10 - 4
imcs-admin-boot/imcs-tenant-biz/src/main/java/com/github/zuihou/tenant/service/impl/ProductionresourceServiceImpl.java

@@ -899,15 +899,21 @@ public class ProductionresourceServiceImpl extends SuperCacheServiceImpl<Product
         String tenantCode = "0000";
         String tableName = BizConstant.BASE_DATABASE+"_"+tenantCode+"."+"imcs_tenant_productionresource";
         String sql = "UPDATE "+tableName+" " +
-                "SET capital_no="+productionresource.getCapitalNo()+", capital_name="+productionresource.getCapitalName()+"," +
-                " capital_type="+productionresource.getCapitalType()+", capital_price="+productionresource.getCapitalPrice()+"," +
-                "  mode_specification="+productionresource.getModeSpecification()+", production_no="+productionresource.getProductionNo()+"," +
-                "  production_date="+productionresource.getProductionDate()+", manufacturer="+productionresource.getManufacturer()+
+                "SET capital_no="+dealStr(productionresource.getCapitalNo())+", capital_name="+dealStr(productionresource.getCapitalName())+"," +
+                " capital_type="+dealStr(productionresource.getCapitalType())+", capital_price="+dealStr(productionresource.getCapitalPrice())+"," +
+                "  mode_specification="+dealStr(productionresource.getModeSpecification())+", production_no="+dealStr(productionresource.getProductionNo())+"," +
+                "  production_date="+dealStr(productionresource.getProductionDate())+", manufacturer="+dealStr(productionresource.getManufacturer())+
                 " WHERE id= "+productionresource.getId();
         baseMapper.createDynTable(sql);
         return productionresource;
     }
 
+    private String dealStr(String s){
+        if(StringUtil.isEmpty(s))
+            return null;
+        return s;
+    }
+
     @Override
     @InjectionResult
     public List<Productionresource> getProductionresourceList(Productionresource bean){