|
@@ -1,6 +1,8 @@
|
|
|
package com.steerinfo.dil.service.impl;
|
|
|
|
|
|
import com.alibaba.druid.support.json.JSONUtils;
|
|
|
+import com.alibaba.fastjson.JSON;
|
|
|
+import com.alibaba.fastjson.JSONObject;
|
|
|
import com.steerinfo.dil.feign.JoinFeign;
|
|
|
import com.steerinfo.dil.feign.TmsTruckFeign;
|
|
|
import com.steerinfo.dil.mapper.*;
|
|
@@ -11,6 +13,7 @@ import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.stereotype.Service;
|
|
|
import org.springframework.transaction.annotation.Transactional;
|
|
|
|
|
|
+import javax.annotation.Resource;
|
|
|
import java.math.BigDecimal;
|
|
|
import java.text.ParseException;
|
|
|
import java.text.SimpleDateFormat;
|
|
@@ -87,6 +90,9 @@ public class AmsSaleOrderServiceImpl implements IAmsSaleOrderService {
|
|
|
@Autowired
|
|
|
WmspOutboundResultMaterialMapper wmspOutboundResultMaterialMapper;
|
|
|
|
|
|
+ @Resource
|
|
|
+ EasSaleOrderStatusUtil easSaleOrderStatusUtil;
|
|
|
+
|
|
|
|
|
|
@Override
|
|
|
public List<Map<String, Object>> getSaleOrderInfo(Map<String, Object> map) {
|
|
@@ -2063,5 +2069,30 @@ public class AmsSaleOrderServiceImpl implements IAmsSaleOrderService {
|
|
|
return 1;
|
|
|
}
|
|
|
|
|
|
+ @Override
|
|
|
+ public int getSaleOrderStatus(String saleNumber) {
|
|
|
+ int result = 0;
|
|
|
+ Map<String,Object> input = new HashMap<>();
|
|
|
+ // 销售订单号
|
|
|
+ input.put("number",saleNumber);
|
|
|
+ Map<String, Object> totalMap = easSaleOrderStatusUtil.getTotalMap();
|
|
|
+ totalMap.put("input",input);
|
|
|
+ // 调用金蝶关闭接口
|
|
|
+ String json = JSONUtils.toJSONString(totalMap);
|
|
|
+ System.out.println(json);
|
|
|
+ Map<String,Object> resultMap = joinFeign.deleteSaleOrderToEas(totalMap);
|
|
|
+ System.out.println(resultMap);
|
|
|
+ String outPutMap = (String) resultMap.get("output");
|
|
|
+ JSONObject jsonObject = JSON.parseObject(outPutMap);
|
|
|
+ if(jsonObject != null){
|
|
|
+ result = DataChange.dataToBigDecimal(jsonObject.get("NumberStatus")).intValue();
|
|
|
+ }
|
|
|
+ if(result == 7){
|
|
|
+ //如果为7则更新
|
|
|
+ amsSaleOrderMapper.updateSaleOrderStatus(saleNumber);
|
|
|
+ }
|
|
|
+ return result;
|
|
|
+ }
|
|
|
+
|
|
|
|
|
|
}
|