Bladeren bron

发运明细调整

zengtx 3 jaren geleden
bovenliggende
commit
e881838612

+ 8 - 6
jeecg-boot-module-system/src/main/java/org/jeecg/modules/documents/shippingDetails/controller/SyShippingDetailsController.java

@@ -96,11 +96,13 @@ public class SyShippingDetailsController extends JeecgController<SyShippingDetai
 		Result<SyShippingDetails> result = new Result<SyShippingDetails>();
 		try {
 			if (oConvertUtils.isEmpty(syShippingDetails)) {
-				throw new JeecgBootException("请填写信息再保存!");
+				result.setMessage("请填写信息再保存!");
+				return result;
 			}
 			List<SyShippingDetailsItem> syShippingDetailsItemList = syShippingDetails.getSyShippingDetailsItemList();
 			if (syShippingDetailsItemList.size() == 0) {
-				throw new JeecgBootException("表体信息不能为空!");
+				result.setMessage("表体信息不能为空!");
+				return result;
 			}
 			SyShippingDetails syShippingDetailstEntity = syShippingDetailsService.syShippingDetailsAdd(syShippingDetails);
 			result.setSuccess(true);
@@ -132,11 +134,13 @@ public class SyShippingDetailsController extends JeecgController<SyShippingDetai
 		try {
 			String id = syShippingDetails.getId();
 			if (oConvertUtils.isEmpty(id)){
-				throw new JeecgBootException("对象ID不能为空");
+				result.setMessage("对象ID不能为空!");
+				return result;
 			}
 			List<SyShippingDetailsItem> syShippingDetailsItemList = syShippingDetails.getSyShippingDetailsItemList();
 			if(syShippingDetailsItemList.size()==0){
-				throw new JeecgBootException("表体数据不能为空!");
+				result.setMessage("表体信息不能为空!");
+				return result;
 			}
 			SyShippingDetails shippingDetails = syShippingDetailsService.syShippingDetailsEdit(syShippingDetails);
 			result.setMessage("修改成功");
@@ -149,8 +153,6 @@ public class SyShippingDetailsController extends JeecgController<SyShippingDetai
 			result.error500("保存失败:" + ex.getMessage());
 		}
 
-
-
 		return result;
 	}
 	

+ 5 - 0
jeecg-boot-module-system/src/main/java/org/jeecg/modules/documents/shippingDetails/entity/VO/SyShippingDetailsVo.java

@@ -10,6 +10,11 @@ import org.springframework.format.annotation.DateTimeFormat;
 @Data
 public class SyShippingDetailsVo {
 
+    /**id*/
+    @Excel(name = "id", width = 15)
+    @ApiModelProperty(value = "id")
+    private java.lang.String id;
+
     /**单据号*/
     @Excel(name = "单据号", width = 15)
     @ApiModelProperty(value = "单据号")

+ 1 - 1
jeecg-boot-module-system/src/main/java/org/jeecg/modules/documents/shippingDetails/mapper/xml/SyShippingDetailsMapper.xml

@@ -19,7 +19,7 @@
     </select>
 
 <select id="queryShippingDetails" resultType="org.jeecg.modules.documents.shippingDetails.entity.VO.SyShippingDetailsVo">
-    select t.* from(select a.document_no as documentNo,a.document_date as documentDate,b.order_number as orderNumber,
+    select t.* from(select a.id as id,a.document_no as documentNo,a.document_date as documentDate,b.order_number as orderNumber,
     b.customer_abbreviation as customerAbbreviation,b.sales_department as salesDepartment,b.salesman as salesman,
     b.small_po as smallPo,b.pack_id as packId,a.pre_delivery_date as preDeliveryDate,
     b.shipment_quantity as shipmentQuantity,b.customs_declaration_unit_price as customsDeclarationUnitPrice,

+ 3 - 3
jeecg-boot-module-system/src/main/java/org/jeecg/modules/system/util/JsonChangeUtils.java

@@ -485,7 +485,7 @@ public class JsonChangeUtils implements ApplicationContextAware{
             if(map.get("pkorg").equals("one")){
 
                 String sql1 = "select '"+map.get("accId")+"' as accId,'"+map.get("MOID")+"' as poId,'"+map.get("poNum")+"' as poNum," +
-                        "mo.cInvCode as 'customerItemCode','' as 'itemAttrId','' as customerItemId," +
+                        "mo.cInvCode as 'customerItemCode','' as 'itemAttrId','' as customerItemId,mo.iUnitQuantity as 'bomUsage'," +
                         "mo.cFree1 as cFree1,mo.cFree2 as cFree2,mo.cFree3 as cFree3,mo.cFree4 as cFree4," +
                         "mo.cFree5 as cFree5,mo.cFree6 as cFree6,mo.cFree7 as cFree7,mo.cFree8 as cFree8,mo.cFree9 as cFree9,mo.cFree10 as cFree10," +
                         "'' as poOutsourceId,''as poOutsourceNum,'' as 'customerUomId','' as customerUomCode,0 as customerPromiseQty, " +
@@ -498,7 +498,7 @@ public class JsonChangeUtils implements ApplicationContextAware{
             }else if(map.get("pkorg").equals("two")){
 
                 String sql1 = "select '"+map.get("accId")+"' as accId,'"+map.get("MOID")+"' as poId,'"+map.get("poNum")+"' as poNum," +
-                        "mo.cInvCode as 'customerItemCode','' as 'itemAttrId','' as customerItemId," +
+                        "mo.cInvCode as 'customerItemCode','' as 'itemAttrId','' as customerItemId,mo.iUnitQuantity as 'bomUsage'," +
                         "mo.cFree1 as cFree1,mo.cFree2 as cFree2,mo.cFree3 as cFree3,mo.cFree4 as cFree4," +
                         "mo.cFree5 as cFree5,mo.cFree6 as cFree6,mo.cFree7 as cFree7,mo.cFree8 as cFree8,mo.cFree9 as cFree9,mo.cFree10 as cFree10," +
                         "'' as poOutsourceId,''as poOutsourceNum,'' as 'customerUomId','' as customerUomCode,0 as customerPromiseQty, " +
@@ -511,7 +511,7 @@ public class JsonChangeUtils implements ApplicationContextAware{
             }else if(map.get("pkorg").equals("three")){
 
                 String sql1 = "select '"+map.get("accId")+"' as accId,'"+map.get("MOID")+"' as poId,'"+map.get("poNum")+"' as poNum," +
-                        "mo.cInvCode as 'customerItemCode','' as 'itemAttrId','' as customerItemId," +
+                        "mo.cInvCode as 'customerItemCode','' as 'itemAttrId','' as customerItemId,mo.iUnitQuantity as 'bomUsage'," +
                         "mo.cFree1 as cFree1,mo.cFree2 as cFree2,mo.cFree3 as cFree3,mo.cFree4 as cFree4," +
                         "mo.cFree5 as cFree5,mo.cFree6 as cFree6,mo.cFree7 as cFree7,mo.cFree8 as cFree8,mo.cFree9 as cFree9,mo.cFree10 as cFree10," +
                         "'' as poOutsourceId,''as poOutsourceNum,'' as 'customerUomId','' as customerUomCode,0 as customerPromiseQty, " +