Forráskód Böngészése

发运明细接口,订单接口更新

zengtx 2 éve
szülő
commit
80d960b11f
13 módosított fájl, 326 hozzáadás és 65 törlés
  1. 4 0
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/documents/orderData/entity/SyOrderDataItem.java
  2. 68 37
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/documents/shippingDetails/controller/SyShippingDetailsController.java
  3. 8 0
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/documents/shippingDetails/entity/SyShippingDetails.java
  4. 21 0
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/documents/shippingDetails/entity/VO/OrderDataVo.java
  5. 86 0
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/documents/shippingDetails/entity/VO/PushShippingDeialVo.java
  6. 40 0
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/documents/shippingDetails/entity/VO/PushShippingVO.java
  7. 9 1
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/documents/shippingDetails/mapper/SyShippingDetailsMapper.java
  8. 30 2
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/documents/shippingDetails/mapper/xml/SyShippingDetailsMapper.xml
  9. 12 4
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/documents/shippingDetails/service/ISyShippingDetailsService.java
  10. 30 3
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/documents/shippingDetails/service/impl/SyShippingDetailsServiceImpl.java
  11. 6 6
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/openApi/controller/MOMainController.java
  12. 6 6
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/openApi/controller/POPomainController.java
  13. 6 6
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/system/util/JsonChangeUtils.java

+ 4 - 0
jeecg-boot-module-system/src/main/java/org/jeecg/modules/documents/orderData/entity/SyOrderDataItem.java

@@ -160,4 +160,8 @@ public class SyOrderDataItem {
 	@Excel(name = "排序", width = 15)
     @ApiModelProperty(value = "排序")
 	private java.lang.Integer sort;
+
+	@Excel(name = "订单剩余数量", width = 15)
+	@ApiModelProperty(value = "订单剩余数量")
+	private String surplusNum;
 }

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

@@ -1,9 +1,7 @@
 package org.jeecg.modules.documents.shippingDetails.controller;
 
 import java.text.SimpleDateFormat;
-import java.util.Arrays;
-import java.util.List;
-import java.util.Map;
+import java.util.*;
 import java.io.IOException;
 import java.io.UnsupportedEncodingException;
 import java.net.URLDecoder;
@@ -11,6 +9,8 @@ import javax.servlet.http.HttpServletRequest;
 import javax.servlet.http.HttpServletResponse;
 
 import com.alibaba.fastjson.JSONObject;
+import com.google.gson.Gson;
+import com.google.gson.GsonBuilder;
 import org.jeecg.common.api.vo.Result;
 import org.jeecg.common.exception.JeecgBootException;
 import org.jeecg.common.system.query.QueryGenerator;
@@ -23,10 +23,12 @@ import org.jeecg.modules.documents.seclarationElements.service.ISyDeclarationEle
 import org.jeecg.modules.documents.shippingDetails.entity.SyShippingDetails;
 import org.jeecg.modules.documents.shippingDetails.entity.SyShippingDetailsItem;
 import org.jeecg.modules.documents.shippingDetails.entity.VO.OrderDataVo;
+import org.jeecg.modules.documents.shippingDetails.entity.VO.PushShippingDeialVo;
+import org.jeecg.modules.documents.shippingDetails.entity.VO.PushShippingVO;
 import org.jeecg.modules.documents.shippingDetails.entity.VO.SyShippingDetailsVo;
 import org.jeecg.modules.documents.shippingDetails.service.ISyShippingDetailsItemService;
 import org.jeecg.modules.documents.shippingDetails.service.ISyShippingDetailsService;
-import java.util.Date;
+
 import java.util.logging.SimpleFormatter;
 
 import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
@@ -102,9 +104,6 @@ public class SyShippingDetailsController extends JeecgController<SyShippingDetai
 		    queryWrapper.ge("t.documentDate",startTime);
 			queryWrapper.le("t.documentDate",endTime);
 		}
-		if(oConvertUtils.isNotEmpty(syShippingDetails.getPreCompletionDate())){
-			queryWrapper.ge("t.preCompletionDate",syShippingDetails.getPreCompletionDate());
-		}
 		if(oConvertUtils.isNotEmpty(syShippingDetails.getPreDeliveryDate())){
 			queryWrapper.eq("t.preDeliveryDate",syShippingDetails.getPreDeliveryDate());
 		}
@@ -330,8 +329,8 @@ public class SyShippingDetailsController extends JeecgController<SyShippingDetai
 	  * @param syShippingDetails
 	  * @return
 	  */
-  @AutoLog(value = "发运明细提交")
-  @ApiOperation(value = "发运明细提交", notes="发运明细提交")
+  @AutoLog(value = "发运明细提交,(提交:type=1,取消提交:type = 2)")
+  @ApiOperation(value = "发运明细提交,(提交:type=1,取消提交:type = 2)", notes="发运明细提交,(提交:type=1,取消提交:type = 2)")
   @PostMapping(value = "/syShippingDetailsSubmit")
   public Result<SyShippingDetails> syShippingDetailsSubmit(@RequestBody SyShippingDetails syShippingDetails) {
 
@@ -352,12 +351,12 @@ public class SyShippingDetailsController extends JeecgController<SyShippingDetai
 			  return  result;
 		  }
 		  //判断是否已提交
-		  if(shippingDetails.getState().equals("1")){
-			  result.setMessage("该单据已提交,不允许再次提交!");
-			  result.setSuccess(false);
-			  return  result;
-		  }
-		  int i = syShippingDetailsService.syShippingDetailsSubmit(syShippingDetails.getId());
+//		  if(shippingDetails.getState().equals("1") && syShippingDetails.getType().equals("1")){
+//			  result.setMessage("该单据已提交,不允许再次提交!");
+//			  result.setSuccess(false);
+//			  return  result;
+//		  }
+		  int i = syShippingDetailsService.syShippingDetailsSubmit(syShippingDetails.getId(),syShippingDetails.getType());
 		  if(i>0){
 			  result.setMessage("提交成功!");
 			  result.setSuccess(true);
@@ -377,7 +376,7 @@ public class SyShippingDetailsController extends JeecgController<SyShippingDetai
 	 /**
 	  * 发运明细查询订单接口
 	  * @param orderNumber
-	  * @param pkOrg
+	  * @param account
 	  * @param pageNo
 	  * @param pageSize
 	  * @param request
@@ -387,7 +386,7 @@ public class SyShippingDetailsController extends JeecgController<SyShippingDetai
   @AutoLog(value = "发运明细查询订单")
   @ApiOperation(value="发运明细查询订单", notes="发运明细查询订单")
   @GetMapping(value = "/queryOrderData")
-  public Result<IPage<OrderDataVo>> queryOrderData(String orderNumber,String pkOrg,
+  public Result<IPage<OrderDataVo>> queryOrderData(String orderNumber,String account,
 												   @RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
 												   @RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
 												   HttpServletRequest request, HttpServletResponse response) {
@@ -400,8 +399,8 @@ public class SyShippingDetailsController extends JeecgController<SyShippingDetai
 	  if (oConvertUtils.isNotEmpty(orderNumber)) {
 		  queryWrapper.eq("a.order_number", orderNumber);
 	  }
-	  if (oConvertUtils.isNotEmpty(pkOrg)) {
-		  queryWrapper.eq("a.pk_org", pkOrg);
+	  if (oConvertUtils.isNotEmpty(account)) {
+		  queryWrapper.eq("a.account", account);
 	  }
 	  queryWrapper.eq("a.del_flag", 0);
 	  queryWrapper.orderByDesc("a.order_number");
@@ -420,44 +419,76 @@ public class SyShippingDetailsController extends JeecgController<SyShippingDetai
 	  * @param id
 	  * @return
 	  */
+	 @AutoLog(value = "发运明细推送接口")
+	 @ApiOperation(value="发运明细推送接口", notes="发运明细推送接口")
+	 @GetMapping(value = "/pushSyShipping")
   public JSONObject pushSyShipping(String id){
 
 	  JSONObject result = new JSONObject();
+	  List<PushShippingVO> list = new ArrayList<PushShippingVO>();
 
 	  try {
-
-	  //查询主表
-	  SyShippingDetails shippingDetails = syShippingDetailsService.getById(id);
-	  //查询子表
-	  QueryWrapper<SyShippingDetailsItem> syShippingDetailsItemQueryWrapper = new QueryWrapper<SyShippingDetailsItem>();
-	  syShippingDetailsItemQueryWrapper.eq("shipping_details_id",shippingDetails.getId()).eq("del_flag",0);
-	  List<SyShippingDetailsItem> syShippingDetailsItemList = syShippingDetailsItemService.list(syShippingDetailsItemQueryWrapper);
-	  if(syShippingDetailsItemList.size()!=0){
-		  shippingDetails.setSyShippingDetailsItemList(syShippingDetailsItemList);
-	  }
-	      //转JSON
-		  result.put("payload", JSONObject.toJSON(shippingDetails));
-		  log.info("JSON数据:" + result);
-
+	      if(oConvertUtils.isEmpty(id)){
+			  System.out.println("ID为空!");
+		  }
 		  //查询IP及账套信息、时间戳
 		  QueryWrapper<DxpDataPlan> queryWrapper = new QueryWrapper<>();
 		  queryWrapper.eq("code", "senYu_syShipping");
 		  Page<DxpDataPlan> page = new Page<DxpDataPlan>(1, 100);
 		  IPage<DxpDataPlan> pageList = iDxpDataPlanService.page(page, queryWrapper);
 		  List<DxpDataPlan> resultList = pageList.getRecords();
+
+		  //获取路径
+		  QueryWrapper<DxpDataPlan> queryWrappertoken = new QueryWrapper<>();
+		  queryWrappertoken.eq("code", "senYu_SH_token");
+		  Page<DxpDataPlan> pagetoken = new Page<DxpDataPlan>(1, 100);
+		  IPage<DxpDataPlan> tokenpage = iDxpDataPlanService.page(pagetoken, queryWrappertoken);
+		  List<DxpDataPlan> tokenList = tokenpage.getRecords();
+		  String tokenUrl = tokenList.get(0).getItemIp()+tokenList.get(0).getItemUrl();
+
+		  //查询主表
+		  PushShippingVO pushShippingVO =  syShippingDetailsService.pushSyShipping(id);
+		  //查询子表
+		  List<PushShippingDeialVo> pushShippingDeialVoList =  syShippingDetailsService.pushSyShippingDeial(id);
+		  pushShippingVO.setLines(pushShippingDeialVoList);
+
+		  list.add(pushShippingVO);
+	      //转JSON
+		  Gson userGson = new GsonBuilder().create();
+		  result.put("payload", userGson.toJson(JSONObject.toJSON(list)));
+		  log.info("JSON数据:" + result);
+
 		  //拼接url
 		  String url = resultList.get(0).getItemIp() + resultList.get(0).getItemUrl();
 		  //调用doPost
 		  InterfaceConnUtils interfaceConnUtils = new InterfaceConnUtils();
 		  //处理返回信息
-		  JSONObject  informationJson = interfaceConnUtils.doPostToBearer(result, url,null, "发运明细接口-");
+		  JSONObject  informationJson = interfaceConnUtils.doPostToBearer(result, url,tokenUrl, "发运明细接口-");
 		  //获取返回信息
 		  JSONObject jsonArray = informationJson.getJSONObject("payload");
 
+		  //回写是否同步成功
+
+		  //获取是否成功
+		  String code = jsonArray.getString("code");
+		  //获取返回消息
+		  String message = jsonArray.getString("message");
+
+		  SyShippingDetails shippingDetails =   syShippingDetailsService.getById(id);
+		  if(code.equals("S")){
+			shippingDetails.setPushState("1");
+			shippingDetails.setPushMessage(message);
+
+		  }else{
+			  shippingDetails.setPushState("2");
+			  shippingDetails.setPushMessage(message);
+		  }
+		  syShippingDetailsService.updateById(shippingDetails);
+
 	  }catch (Exception ex){
 
 		  ex.printStackTrace();
-		  log.error("提交失败:" + ex.getMessage());
+		  log.error("推送失败:" + ex.getMessage());
 	  }
 	  return  result;
   }
@@ -541,8 +572,8 @@ public class SyShippingDetailsController extends JeecgController<SyShippingDetai
 
 			}catch (Exception ex){
 				ex.printStackTrace();
-				log.error("提交失败:" + ex.getMessage());
-				result.error500("提交失败:" + ex.getMessage());
+				log.error("保存失败:" + ex.getMessage());
+				result.error500("保存失败:" + ex.getMessage());
 			}
 		 return result;
 	 }

+ 8 - 0
jeecg-boot-module-system/src/main/java/org/jeecg/modules/documents/shippingDetails/entity/SyShippingDetails.java

@@ -124,9 +124,17 @@ public class SyShippingDetails {
 	@Excel(name = "推送状态", width = 15)
 	@ApiModelProperty(value = "推送状态")
 	private String pushState;
+	/**推送信息*/
+	@Excel(name = "推送信息", width = 15)
+	@ApiModelProperty(value = "推送信息")
+	private String pushMessage;
 
 	//子表集合
 	@TableField(exist = false)
 	@ApiModelProperty(value = "子表集合")
 	private List<SyShippingDetailsItem> syShippingDetailsItemList;
+
+	@ApiModelProperty(value = "提交(1)/取消提交(2)")
+	@TableField(exist = false)
+	private String type;
 }

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

@@ -145,4 +145,25 @@ public class OrderDataVo {
     @ApiModelProperty(value = "组织")
     private java.lang.String pkOrg;
 
+    /**分销点*/
+    @Excel(name = "分销点", width = 15)
+    @ApiModelProperty(value = "分销点")
+    private String distributionPoint;
+
+    /**packId*/
+    @Excel(name = "packId", width = 15)
+    @ApiModelProperty(value = "packId")
+    private String packId;
+
+    @Excel(name = "供应商", width = 15)
+    @ApiModelProperty(value = "供应商")
+    private String supplier;
+
+    @Excel(name = "账套", width = 15)
+    @ApiModelProperty(value = "账套")
+    private String  account;
+
+    @Excel(name = "订单剩余数量", width = 15)
+    @ApiModelProperty(value = "订单剩余数量")
+    private String surplusNum;
 }

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

@@ -0,0 +1,86 @@
+package org.jeecg.modules.documents.shippingDetails.entity.VO;
+
+import lombok.Data;
+
+@Data
+public class PushShippingDeialVo {
+
+    //租户ID
+    private String tenantId;
+    //装箱单行id,全局唯一
+    private String accessoriesLineId;
+    //装箱单头 ID
+    private String accessoriesHeaderId;
+    //行号(序号)
+    private String packingLineNum;
+    //业务员
+    private String merchandiser;
+    //计划单号
+    private String poNo;
+    //计划单号行ID
+    private String moDetailId;
+    //计划单号ID
+    private String poId;
+    //款号
+    private String styleNo;
+    //缸号
+    private String batchNo;
+    //颜色
+    private String color;
+    //颜色特性
+    private String itemAttrId;
+    //物料编码
+    private String itemCode;
+    //物料ID
+    private String itemId;
+    //项目(辅料品名)
+    private String itemDesc;
+    //报关品名
+    private String declarationName;
+    //成分
+    private String composition;
+    //门幅
+    private String width;
+    //匹数
+    private String rolls;
+    //计划装箱数量
+    private String planPackingQty;
+    //实际装箱数量
+    private String actualPackingQty;
+    //毛重
+    private String grossWeight;
+    //净重
+    private String netWeight;
+    //米数
+    private String length;
+    //拷布重
+    private String clothWeight;
+    //箱数
+    private String cartons;
+    //价格
+    private String unitPrice;
+    //总价合计
+    private String totalPrice;
+    //克重
+    private String gramWeight;
+    //供应商编码
+    private String supplierNumber;
+    //供应商ID
+    private String supplierId;
+    //供应商租户ID
+    private String supplierTenantId;
+    //包装方式
+    private String packingMethod;
+    //处理方式
+    private String treatmentMethod;
+    //是否手册纱
+    private String manualYarnFlag;
+    //手册纱单价
+    private String manualYarnUnitPrice;
+    //手册纱占比
+    private String manualYarnProportion;
+    //备注
+    private String remark;
+    //柜号
+    private String cabinetNum;
+}

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

@@ -0,0 +1,40 @@
+package org.jeecg.modules.documents.shippingDetails.entity.VO;
+
+import lombok.Data;
+
+import java.util.List;
+
+@Data
+public class PushShippingVO {
+
+    //租户ID
+    private String tenantId;
+    //装箱单头ID
+    private String accessoriesHeaderId;
+    //装箱单编号
+    private String packingHeaderNum;
+    //装箱单类型
+    private String packingType;
+    //装箱单状态
+    private String packingStatus;
+    //PO号
+    private String poNo;
+    //集装箱号
+    private String containerNum;
+    //装柜日期
+    private String loadingDate;
+    //供应商编码(收货)
+    private String supplierNumber;
+    //供应商ID
+    private String supplierId;
+    //供应商租户ID
+    private String supplierTenantId;
+    //发票号
+    private String invoiceNum;
+    //制单人
+    private String preparer;
+    //制单时间
+    private String preparationTime;
+
+    private  List<PushShippingDeialVo> lines;
+}

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

@@ -8,6 +8,8 @@ import org.apache.ibatis.annotations.Param;
 import org.jeecg.modules.documents.shippingDetails.entity.SyShippingDetails;
 import com.baomidou.mybatisplus.core.mapper.BaseMapper;
 import org.jeecg.modules.documents.shippingDetails.entity.VO.OrderDataVo;
+import org.jeecg.modules.documents.shippingDetails.entity.VO.PushShippingDeialVo;
+import org.jeecg.modules.documents.shippingDetails.entity.VO.PushShippingVO;
 import org.jeecg.modules.documents.shippingDetails.entity.VO.SyShippingDetailsVo;
 
 /**
@@ -23,6 +25,12 @@ public interface SyShippingDetailsMapper extends BaseMapper<SyShippingDetails> {
 
     //发运明细分页列表查询
     public IPage<SyShippingDetailsVo> queryShippingDetails(IPage<SyShippingDetailsVo> page, @Param("ew") QueryWrapper<SyShippingDetailsVo> queryWrapper);
-
+    //子表删除
     public void syshippingDetailsItemUpdate(@Param("shippingDetailsId") String shippingDetailsId);
+
+    //发运明细推送(查询主表)
+    public PushShippingVO pushSyShipping(@Param("id") String id);
+
+    //发运明细推送(查询子表)
+    public List<PushShippingDeialVo> pushSyShippingDeial(@Param("shippingDetailsId") String shippingDetailsId);
 }

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

@@ -6,8 +6,9 @@
 
         select a.order_number as orderNumber,b.item_number as itemNumber,b.small_po as smallPo,b.pk_org as pkOrg,a.order_date as orderDate,b.inventory_name as inventoryName,
          b.colour as colour,b.size as size,b.coding_rules as codingRules,b.quantity as quantity,a.business_type_text as businessTypeText,a.customer_order_number as customerOrderNumber,
-           a.sales_type_text as salesTypeText,a.customer_abbreviation as customerAbbreviation,a.customer_name as customerName,
-           a.brand_side as brandSide,a.exchange_rate as exchangeRate,b.specification_and_model as specificationAndModel,
+           a.sales_type_text as salesTypeText,a.customer_abbreviation as customerAbbreviation,a.customer_name as customerName,surplus_num as surplusNum,
+           a.brand_side as brandSide,a.exchange_rate as exchangeRate,b.specification_and_model as specificationAndModel,a.account as account,
+           b.distribution_point as distributionPoint,pack_id as packId,a.supplier as supplier,
            a.whole_order_total as wholeOrderTotal,a.sales_department as salesDepartment,a.salesman as salesman,a.currency_text as currencyText,a.third_party as thirdParty,
             a.deposit_ratio as depositRatio,a.deposit as deposit,a.collaborative_route as collaborativeRoute,a.term_of_payment as termOfPayment,a.end_customer as endCustomer,
              a.order_remarks as orderRemarks,a.price_remarks as priceRemarks,a.order_change_description as orderChangeDescription from sy_order_data a
@@ -45,4 +46,31 @@ ${ew.customSqlSegment}
         where shipping_details_id = #{shippingDetailsId}
     </update>
 
+
+    <select id="pushSyShipping" resultType="org.jeecg.modules.documents.shippingDetails.entity.VO.PushShippingVO">
+
+        select '103' as tenantId,id as accessoriesHeaderId,'ACCESSORIES0609-2' as packingHeaderNum,
+        'ACCESSORIES' as packingType,'NEW' as packingStatus,'PO36202206070001' as poNo,'JAZS001' as containerNumm,
+         '2022-06-07' as loadingDate,'01000229' as supplierNumber,
+          '' as invoiceNum,'蒋岗峰' as preparer,'2022-06-02 08:26:24' as preparationTime
+          from sy_shipping_details
+         where del_flag = 0 and id = #{id}
+
+    </select>
+
+    <select id="pushSyShippingDeial" resultType="org.jeecg.modules.documents.shippingDetails.entity.VO.PushShippingDeialVo">
+
+        select '103' as tenantId,
+          id as accessoriesLineId,id as accessoriesHeaderIdD,'1' as packingLineNum,'T0036' as merchandiser,'PO36202206070001' as poNo,
+          '' as moDetailId,'' as poId, 'W21-W20-MSP-SPW0001' as styleNo, 'C156St2' as batchNo,'藏青' as color,'N0201002139' as itemCode,'' as itemId,
+          '全涤绒布' as itemDesc,'针织布' as declarationName,'全涤' as composition,'190' as width,'' as rolls, '43' as planPackingQty,
+          '21' as actualPackingQty,'33' as grossWeight,'21' as netWeight,'32' as length,'' as clothWeight,'12' as cartons,
+          '6.32' as unitPrice,'45.21' as totalPrice,'' as gramWeight,'01000229' as supplierNumber,'' as supplierId,'' as supplierTenantId,
+          '打卷' as packingMethod,'染色' as treatmentMethod,'1' as manualYarnFlag,'0' as manualYarnUnitPrice,'0' as manualYarnProportion,
+          '无' as remark,'111' as cabinetNum
+          from sy_shipping_details_item
+          where del_flag = 0 and shipping_details_id = #{shippingDetailsId}
+    </select>
+
+
 </mapper>

+ 12 - 4
jeecg-boot-module-system/src/main/java/org/jeecg/modules/documents/shippingDetails/service/ISyShippingDetailsService.java

@@ -8,6 +8,8 @@ import org.jeecg.modules.documents.seclarationElements.entity.SyDeclarationEleme
 import org.jeecg.modules.documents.shippingDetails.entity.SyShippingDetails;
 import com.baomidou.mybatisplus.extension.service.IService;
 import org.jeecg.modules.documents.shippingDetails.entity.VO.OrderDataVo;
+import org.jeecg.modules.documents.shippingDetails.entity.VO.PushShippingDeialVo;
+import org.jeecg.modules.documents.shippingDetails.entity.VO.PushShippingVO;
 import org.jeecg.modules.documents.shippingDetails.entity.VO.SyShippingDetailsVo;
 
 import java.util.List;
@@ -33,13 +35,19 @@ public interface ISyShippingDetailsService extends IService<SyShippingDetails> {
     //修改发运明细
     public SyShippingDetails syShippingDetailsEdit(SyShippingDetails syShippingDetails);
 
-    //删除
+    //发运明细删除
     public int syShippingDetailsDelete(String id);
 
-    //提交
-    public int syShippingDetailsSubmit(String id);
+    //发运明细提交、取消提交
+    public int syShippingDetailsSubmit(String id,String type);
 
-    //子表删除
+    //发运明细子表删除
     public void syshippingDetailsItemUpdate(String shippingDetailsId);
 
+    //发运明细推送(查询主表)
+    public PushShippingVO pushSyShipping(String id);
+
+    //发运明细推送(查询子表)
+    public List<PushShippingDeialVo> pushSyShippingDeial(String shippingDetailsId);
+
 }

+ 30 - 3
jeecg-boot-module-system/src/main/java/org/jeecg/modules/documents/shippingDetails/service/impl/SyShippingDetailsServiceImpl.java

@@ -7,6 +7,8 @@ import org.jeecg.common.util.oConvertUtils;
 import org.jeecg.modules.documents.shippingDetails.entity.SyShippingDetails;
 import org.jeecg.modules.documents.shippingDetails.entity.SyShippingDetailsItem;
 import org.jeecg.modules.documents.shippingDetails.entity.VO.OrderDataVo;
+import org.jeecg.modules.documents.shippingDetails.entity.VO.PushShippingDeialVo;
+import org.jeecg.modules.documents.shippingDetails.entity.VO.PushShippingVO;
 import org.jeecg.modules.documents.shippingDetails.entity.VO.SyShippingDetailsVo;
 import org.jeecg.modules.documents.shippingDetails.mapper.SyShippingDetailsMapper;
 import org.jeecg.modules.documents.shippingDetails.service.ISyShippingDetailsService;
@@ -157,18 +159,22 @@ public class SyShippingDetailsServiceImpl extends ServiceImpl<SyShippingDetailsM
 
 
     /**
-     * 发运明细提交
+     * 发运明细提交、取消提交
      * @param id
      * @return
      */
     @Override
-    public int syShippingDetailsSubmit(String id) {
+    public int syShippingDetailsSubmit(String id,String type) {
         int i = 0;
         SyShippingDetails shippingDetails = getById(id);
-        if(oConvertUtils.isNotEmpty(shippingDetails)){
+        if(oConvertUtils.isNotEmpty(shippingDetails) && type.equals("1")){
             shippingDetails.setState("1");
             updateById(shippingDetails);
             i = 1;
+        }else if(oConvertUtils.isNotEmpty(shippingDetails) && type.equals("2")){
+            shippingDetails.setState("0");
+            updateById(shippingDetails);
+            i = 1;
         }
         return i;
     }
@@ -182,4 +188,25 @@ public class SyShippingDetailsServiceImpl extends ServiceImpl<SyShippingDetailsM
     public void syshippingDetailsItemUpdate(String shippingDetailsId) {
         syShippingDetailsMapper.syshippingDetailsItemUpdate(shippingDetailsId);
     }
+
+    /**
+     * 发运明细推送(查询主表)
+     * @param id
+     * @return
+     */
+    @Override
+    public PushShippingVO pushSyShipping(String id) {
+
+        return syShippingDetailsMapper.pushSyShipping(id);
+    }
+
+    /**
+     * 发运明细推送(查询子表)
+     * @param shippingDetailsId
+     * @return
+     */
+    @Override
+    public List<PushShippingDeialVo> pushSyShippingDeial(String shippingDetailsId) {
+        return syShippingDetailsMapper.pushSyShippingDeial(shippingDetailsId);
+    }
 }

+ 6 - 6
jeecg-boot-module-system/src/main/java/org/jeecg/modules/openApi/controller/MOMainController.java

@@ -103,10 +103,10 @@ public class MOMainController implements ApplicationContextAware {
                             "'' as 'sourceDocNum',mo.cMaker as 'customerContacts',mo.dCreateTime  as 'publishDate',0 as 'tenantId'," +
                             "mo.cDefine5 as headerAttributeBigint2,mo.cDefine11 as headerAttributeString1,mo.cDefine12 as headerAttributeString3," +
                             "mo.cDefine13 as headerAttributeString4,mo.cDefine14 as headerAttributeString5,mo.cVenBank as headerAttributeString7," +
-                            "mo.cVenAccount as headerAttributeString8," +
+                            "mo.cVenAccount as headerAttributeString8,hr.cDept_num as 'headerAttributeString11'," +
                             "0 as 'totalAmount','' as 'headerAttributeString1', mo.cCode as 'headerAttributeString2','' as 'headerAttributeString3'," +
                             "'' as 'headerAttributeString4'  from OM_MOMain mo left join Vendor ven on mo.cVenCode = ven.cVenCode " +
-                            " left join (select cPsn_Num, cPsn_Name from hr_hi_person) hr " +
+                            " left join (select cPsn_Num, cPsn_Name,cDept_num from hr_hi_person) hr " +
                             " on mo.cMaker = hr.cPsn_Name " +
                             " left join (select cPsn_Num, cPsn_Name from hr_hi_person) hr1 " +
                             " on mo.cPersonCode = hr1.cPsn_Num " +
@@ -128,10 +128,10 @@ public class MOMainController implements ApplicationContextAware {
                             "'' as 'sourceDocNum',mo.cMaker as 'customerContacts',mo.dCreateTime  as 'publishDate',0 as 'tenantId'," +
                             "mo.cDefine5 as headerAttributeBigint2,mo.cDefine11 as headerAttributeString1,mo.cDefine12 as headerAttributeString3," +
                             "mo.cDefine13 as headerAttributeString4,mo.cDefine14 as headerAttributeString5,mo.cVenBank as headerAttributeString7," +
-                            "mo.cVenAccount as headerAttributeString8," +
+                            "mo.cVenAccount as headerAttributeString8,hr.cDept_num as 'headerAttributeString11'," +
                             "0 as 'totalAmount','' as 'headerAttributeString1', mo.cCode as 'headerAttributeString2','' as 'headerAttributeString3'," +
                             "'' as 'headerAttributeString4'  from OM_MOMain mo left join Vendor ven on mo.cVenCode = ven.cVenCode " +
-                            " left join (select cPsn_Num, cPsn_Name from hr_hi_person) hr " +
+                            " left join (select cPsn_Num, cPsn_Name,cDept_num from hr_hi_person) hr " +
                             " on mo.cMaker = hr.cPsn_Name " +
                             " left join (select cPsn_Num, cPsn_Name from hr_hi_person) hr1 " +
                             " on mo.cPersonCode = hr1.cPsn_Num " +
@@ -153,10 +153,10 @@ public class MOMainController implements ApplicationContextAware {
                             "'' as 'sourceDocNum',mo.cMaker as 'customerContacts',mo.dCreateTime  as 'publishDate',0 as 'tenantId'," +
                             "mo.cDefine5 as headerAttributeBigint2,mo.cDefine11 as headerAttributeString1,mo.cDefine12 as headerAttributeString3," +
                             "mo.cDefine13 as headerAttributeString4,mo.cDefine14 as headerAttributeString5,mo.cVenBank as headerAttributeString7," +
-                            "mo.cVenAccount as headerAttributeString8," +
+                            "mo.cVenAccount as headerAttributeString8,hr.cDept_num as 'headerAttributeString11'," +
                             "0 as 'totalAmount','' as 'headerAttributeString1', mo.cCode as 'headerAttributeString2','' as 'headerAttributeString3'," +
                             "'' as 'headerAttributeString4'  from OM_MOMain mo left join Vendor ven on mo.cVenCode = ven.cVenCode " +
-                            " left join (select cPsn_Num, cPsn_Name from hr_hi_person) hr " +
+                            " left join (select cPsn_Num, cPsn_Name,cDept_num from hr_hi_person) hr " +
                             " on mo.cMaker = hr.cPsn_Name " +
                             " left join (select cPsn_Num, cPsn_Name from hr_hi_person) hr1 " +
                             " on mo.cPersonCode = hr1.cPsn_Num " +

+ 6 - 6
jeecg-boot-module-system/src/main/java/org/jeecg/modules/openApi/controller/POPomainController.java

@@ -90,7 +90,7 @@ public class POPomainController implements ApplicationContextAware {
                     //or cChangAuditTime >'"+lasttimeSf+"'
                     String sql = "select mo.POID as 'moId','"+ac+"' as accId,'"+pkorgValue[0]+"' as pkorg,mo.cState as 'poStatus',mo.cPOID as 'poNum','STANDARD_PO' as 'poType'," +
                             "ven.cVenDefine3 as 'supplierNumber','采购业务实体名称' as 'poBusinessUnitCode',ven.cVenName as 'supplierName',mo.cPersonCode as salerCode,hr.cPsn_Num as 'headerAttributeString9'," +
-                            "ven.cVenPerson as 'supplierContacts',ven.cVenBranchPhone as 'supplierContactsPhone'," +
+                            "ven.cVenPerson as 'supplierContacts',ven.cVenBranchPhone as 'supplierContactsPhone',hr.cDept_num as 'headerAttributeString11'," +
                             "mo.cPOID as headerAttributeString2,'' as 'customerContactsPhone','0.00' as 'totalAmount'," +
                             "'0.00' as 'exTaxAmount', curr.cexch_code as 'currencyCode',mo.iTaxRate as 'headerTaxRate'," +
                             "mo.dPODate as 'customerDemandDate', mo.cMemo as 'remark','' as 'sourceDocNum'," +
@@ -99,7 +99,7 @@ public class POPomainController implements ApplicationContextAware {
                             "mo.cVenAccount as headerAttributeString8," +
                             "mo.cMaker as 'customerContacts',hr1.cPsn_Name as headerAttributeString10,mo.cAuditDate as cAuditDate," +
                             " mo.cmaketime  as 'publishDate'  from PO_Pomain mo left join Vendor ven on mo.cVenCode = ven.cVenCode " +
-                            "left join (select cPsn_Num, cPsn_Name from hr_hi_person) hr " +
+                            "left join (select cPsn_Num, cPsn_Name,cDept_num from hr_hi_person) hr " +
                             "on mo.cMaker = hr.cPsn_Name " +
                             "left join (select cPsn_Num, cPsn_Name from hr_hi_person) hr1 " +
                             "on mo.cPersonCode = hr1.cPsn_Num " +
@@ -115,7 +115,7 @@ public class POPomainController implements ApplicationContextAware {
                 else if(pkorgValue[0].equals("two")){
                     String sql = "select mo.POID as 'moId','"+ac+"' as accId,'"+pkorgValue[0]+"' as pkorg,mo.cState as 'poStatus',mo.cPOID as 'poNum','STANDARD_PO' as 'poType'," +
                             "ven.cVenDefine3 as 'supplierNumber','采购业务实体名称' as 'poBusinessUnitCode',ven.cVenName as 'supplierName',mo.cPersonCode as salerCode,hr.cPsn_Num as 'headerAttributeString9'," +
-                            "ven.cVenPerson as 'supplierContacts',ven.cVenBranchPhone as 'supplierContactsPhone'," +
+                            "ven.cVenPerson as 'supplierContacts',ven.cVenBranchPhone as 'supplierContactsPhone',hr.cDept_num as 'headerAttributeString11'," +
                             "mo.cPOID as headerAttributeString2,'' as 'customerContactsPhone','0.00' as 'totalAmount'," +
                             "'0.00' as 'exTaxAmount', curr.cexch_code as 'currencyCode',mo.iTaxRate as 'headerTaxRate'," +
                             "mo.dPODate as 'customerDemandDate', mo.cMemo as 'remark','' as 'sourceDocNum'," +
@@ -124,7 +124,7 @@ public class POPomainController implements ApplicationContextAware {
                             "mo.cVenAccount as headerAttributeString8," +
                             "mo.cMaker as 'customerContacts',hr1.cPsn_Name as headerAttributeString10,mo.cAuditDate as cAuditDate," +
                             " mo.cmaketime  as 'publishDate'  from PO_Pomain mo left join Vendor ven on mo.cVenCode = ven.cVenCode " +
-                            "left join (select cPsn_Num, cPsn_Name from hr_hi_person) hr " +
+                            "left join (select cPsn_Num, cPsn_Name,cDept_num from hr_hi_person) hr " +
                             "on mo.cMaker = hr.cPsn_Name " +
                             "left join (select cPsn_Num, cPsn_Name from hr_hi_person) hr1 " +
                             "on mo.cPersonCode = hr1.cPsn_Num " +
@@ -139,7 +139,7 @@ public class POPomainController implements ApplicationContextAware {
                 }else if(pkorgValue[0].equals("three")){
                     String sql = "select mo.POID as 'moId','"+ac+"' as accId,'"+pkorgValue[0]+"' as pkorg,mo.cState as 'poStatus',mo.cPOID as 'poNum','STANDARD_PO' as 'poType'," +
                             "ven.cVenDefine3 as 'supplierNumber','采购业务实体名称' as 'poBusinessUnitCode',ven.cVenName as 'supplierName',mo.cPersonCode as salerCode,hr.cPsn_Num as 'headerAttributeString9'," +
-                            "ven.cVenPerson as 'supplierContacts',ven.cVenBranchPhone as 'supplierContactsPhone'," +
+                            "ven.cVenPerson as 'supplierContacts',ven.cVenBranchPhone as 'supplierContactsPhone',hr.cDept_num as 'headerAttributeString11'," +
                             "mo.cPOID as headerAttributeString2,'' as 'customerContactsPhone','0.00' as 'totalAmount'," +
                             "'0.00' as 'exTaxAmount', curr.cexch_code as 'currencyCode',mo.iTaxRate as 'headerTaxRate'," +
                             "mo.dPODate as 'customerDemandDate', mo.cMemo as 'remark','' as 'sourceDocNum'," +
@@ -148,7 +148,7 @@ public class POPomainController implements ApplicationContextAware {
                             "mo.cVenAccount as headerAttributeString8," +
                             "mo.cMaker as 'customerContacts',hr1.cPsn_Name as headerAttributeString10,mo.cAuditDate as cAuditDate," +
                             " mo.cmaketime  as 'publishDate'  from PO_Pomain mo left join Vendor ven on mo.cVenCode = ven.cVenCode " +
-                            "left join (select cPsn_Num, cPsn_Name from hr_hi_person) hr " +
+                            "left join (select cPsn_Num, cPsn_Name,cDept_num from hr_hi_person) hr " +
                             "on mo.cMaker = hr.cPsn_Name " +
                             "left join (select cPsn_Num, cPsn_Name from hr_hi_person) hr1 " +
                             "on mo.cPersonCode = hr1.cPsn_Num " +

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

@@ -97,7 +97,7 @@ public class JsonChangeUtils implements ApplicationContextAware{
                         "'"+map.get("poNum")+"' as poNum,mo.cInvCode as 'customerItemCode',inv.cInvName as 'itemName',mo.dArriveDate as 'customerDemandDate', " +
                         "'' as 'poLineStatus',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,mo.iQuantity as 'customerDemandQty',mo.cUnitID as 'customerUomCode'," +
-                        "case when mo.iMoney is null then '0' else mo.iMoney end as iMoney," +
+                        "case when mo.iMoney is null then '0' else mo.iMoney end as iMoney,mo.cDefine23 as 'lineAttributeString11'," +
                         "mo.iTax as lineAttributeDecimal1,mo.dbCloseDate as lineAttributeDatetime1,mo.cDefine24 as lineAttributeString9," +
                         "mo.iTaxPrice as 'customerPrice',(mo.iPerTaxRate/100) as 'lineTaxRate',case when mo.iSum is null then '0' else mo.iSum end as amount,ex.cbdefine2 as lineAttributeString7,ex.cbdefine3 as lineAttributeString8," +
                         "mo.cDefine28 as 'lineAttributeString1',mo.cDefine32 as 'lineAttributeString2',mo.cDefine29 as 'lineAttributeString3'," +
@@ -125,7 +125,7 @@ public class JsonChangeUtils implements ApplicationContextAware{
                         "'"+map.get("poNum")+"' as poNum,mo.cInvCode as 'customerItemCode',inv.cInvName as 'itemName',mo.dArriveDate as 'customerDemandDate', " +
                         "'' as 'poLineStatus',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,mo.iQuantity as 'customerDemandQty',mo.cUnitID as 'customerUomCode'," +
-                        "case when mo.iMoney is null then '0' else mo.iMoney end as iMoney," +
+                        "case when mo.iMoney is null then '0' else mo.iMoney end as iMoney,mo.cDefine23 as 'lineAttributeString11'," +
                         "mo.iTax as lineAttributeDecimal1,mo.dbCloseDate as lineAttributeDatetime1,mo.cDefine24 as lineAttributeString9," +
                         "mo.iTaxPrice as 'customerPrice',(mo.iPerTaxRate/100) as 'lineTaxRate',case when mo.iSum is null then '0' else mo.iSum end as amount,ex.cbdefine2 as lineAttributeString7,ex.cbdefine3 as lineAttributeString8," +
                         "mo.cDefine28 as 'lineAttributeString1',mo.cDefine32 as 'lineAttributeString2',mo.cDefine29 as 'lineAttributeString3'," +
@@ -154,7 +154,7 @@ public class JsonChangeUtils implements ApplicationContextAware{
                         "'"+map.get("poNum")+"' as poNum,mo.cInvCode as 'customerItemCode',inv.cInvName as 'itemName',mo.dArriveDate as 'customerDemandDate', " +
                         "'' as 'poLineStatus',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,mo.iQuantity as 'customerDemandQty',mo.cUnitID as 'customerUomCode'," +
-                        "case when mo.iMoney is null then '0' else mo.iMoney end as iMoney," +
+                        "case when mo.iMoney is null then '0' else mo.iMoney end as iMoney,mo.cDefine23 as 'lineAttributeString11'," +
                         "mo.iTax as lineAttributeDecimal1,mo.dbCloseDate as lineAttributeDatetime1,mo.cDefine24 as lineAttributeString9," +
                         "mo.iTaxPrice as 'customerPrice',(mo.iPerTaxRate/100) as 'lineTaxRate',case when mo.iSum is null then '0' else mo.iSum end as amount,ex.cbdefine2 as lineAttributeString7,ex.cbdefine3 as lineAttributeString8," +
                         "mo.cDefine28 as 'lineAttributeString1',mo.cDefine32 as 'lineAttributeString2',mo.cDefine29 as 'lineAttributeString3'," +
@@ -226,7 +226,7 @@ public class JsonChangeUtils implements ApplicationContextAware{
 
                 String sql ="select '"+map.get("accId")+"' as 'accId',mo.iVouchRowNo as 'poLineNum',mo.ID as 'moDetailId','"+map.get("poNum")+"' as poNum," +
                         "mo.cInvCode as 'customerItemCode',inv.cInvName as 'itemName','' as 'poLineStatus',mo.dArriveDate as 'customerDemandDate'," +
-                        "'' as receivingInventoryOrgCode,mo.cFree1 as cFree1,mo.cFree2 as cFree2,mo.cFree3 as cFree3,mo.cFree4 as cFree4," +
+                        "'' as receivingInventoryOrgCode,mo.cFree1 as cFree1,mo.cFree2 as cFree2,mo.cFree3 as cFree3,mo.cFree4 as cFree4,mo.cDefine23 as 'lineAttributeString11'," +
                         "mo.cFree5 as cFree5,mo.cFree6 as cFree6,mo.cFree7 as cFree7,mo.cFree8 as cFree8,mo.cFree9 as cFree9,mo.cFree10 as cFree10,mo.iQuantity as 'customerDemandQty',mo.cUnitID as 'customerUomCode'," +
                         "mo.iMoney as 'iMoney',mo.iUnitPrice as supplierExTaxPrice,'"+map.get("cAuditDate")+"' as lineAttributeDatetime2," +
                         "mo.iTax as lineAttributeDecimal1,mo.cbCloseDate as lineAttributeDatetime1,mo.cDefine24 as lineAttributeString9,ex.cbdefine2 as lineAttributeString7,ex.cbdefine3 as lineAttributeString8," +
@@ -252,7 +252,7 @@ public class JsonChangeUtils implements ApplicationContextAware{
                 BigDecimal exTaxAmount = BigDecimal.ZERO;//总无税金额
                 String sql ="select '"+map.get("accId")+"' as 'accId',mo.iVouchRowNo as 'poLineNum',mo.ID as 'moDetailId','"+map.get("poNum")+"' as poNum," +
                         "mo.cInvCode as 'customerItemCode',inv.cInvName as 'itemName','' as 'poLineStatus',mo.dArriveDate as 'customerDemandDate'," +
-                        "'' as receivingInventoryOrgCode,mo.cFree1 as cFree1,mo.cFree2 as cFree2,mo.cFree3 as cFree3,mo.cFree4 as cFree4," +
+                        "'' as receivingInventoryOrgCode,mo.cFree1 as cFree1,mo.cFree2 as cFree2,mo.cFree3 as cFree3,mo.cFree4 as cFree4,mo.cDefine23 as 'lineAttributeString11'," +
                         "mo.cFree5 as cFree5,mo.cFree6 as cFree6,mo.cFree7 as cFree7,mo.cFree8 as cFree8,mo.cFree9 as cFree9,mo.cFree10 as cFree10,mo.iQuantity as 'customerDemandQty',mo.cUnitID as 'customerUomCode'," +
                         "mo.iMoney as 'iMoney',mo.iUnitPrice as supplierExTaxPrice,'"+map.get("cAuditDate")+"' as lineAttributeDatetime2," +
                         "mo.iTax as lineAttributeDecimal1,mo.cbCloseDate as lineAttributeDatetime1,mo.cDefine24 as lineAttributeString9,ex.cbdefine2 as lineAttributeString7,ex.cbdefine3 as lineAttributeString8," +
@@ -277,7 +277,7 @@ public class JsonChangeUtils implements ApplicationContextAware{
                 BigDecimal exTaxAmount = BigDecimal.ZERO;//总无税金额
                 String sql ="select '"+map.get("accId")+"' as 'accId',mo.iVouchRowNo as 'poLineNum',mo.ID as 'moDetailId','"+map.get("poNum")+"' as poNum," +
                         "mo.cInvCode as 'customerItemCode',inv.cInvName as 'itemName','' as 'poLineStatus',mo.dArriveDate as 'customerDemandDate'," +
-                        "'' as receivingInventoryOrgCode,mo.cFree1 as cFree1,mo.cFree2 as cFree2,mo.cFree3 as cFree3,mo.cFree4 as cFree4," +
+                        "'' as receivingInventoryOrgCode,mo.cFree1 as cFree1,mo.cFree2 as cFree2,mo.cFree3 as cFree3,mo.cFree4 as cFree4,mo.cDefine23 as 'lineAttributeString11'," +
                         "mo.cFree5 as cFree5,mo.cFree6 as cFree6,mo.cFree7 as cFree7,mo.cFree8 as cFree8,mo.cFree9 as cFree9,mo.cFree10 as cFree10,mo.iQuantity as 'customerDemandQty',mo.cUnitID as 'customerUomCode'," +
                         "mo.iMoney as 'iMoney',mo.iUnitPrice as supplierExTaxPrice,'"+map.get("cAuditDate")+"' as lineAttributeDatetime2," +
                         "mo.iTax as lineAttributeDecimal1,mo.cbCloseDate as lineAttributeDatetime1,mo.cDefine24 as lineAttributeString9,ex.cbdefine2 as lineAttributeString7,ex.cbdefine3 as lineAttributeString8," +