|
@@ -11,7 +11,9 @@ import com.steerinfo.dil.mapper.*;
|
|
import com.steerinfo.dil.model.*;
|
|
import com.steerinfo.dil.model.*;
|
|
import com.steerinfo.dil.service.IAmsSaleOrderService;
|
|
import com.steerinfo.dil.service.IAmsSaleOrderService;
|
|
import com.steerinfo.dil.util.*;
|
|
import com.steerinfo.dil.util.*;
|
|
|
|
+import io.swagger.annotations.ApiOperation;
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
|
+import org.springframework.scheduling.annotation.Scheduled;
|
|
import org.springframework.stereotype.Service;
|
|
import org.springframework.stereotype.Service;
|
|
import org.springframework.transaction.annotation.Transactional;
|
|
import org.springframework.transaction.annotation.Transactional;
|
|
|
|
|
|
@@ -547,15 +549,6 @@ public class AmsSaleOrderServiceImpl implements IAmsSaleOrderService {
|
|
@Transactional(rollbackFor = Exception.class)
|
|
@Transactional(rollbackFor = Exception.class)
|
|
public int addSteelSaleOrder(Map<String, Object> mapValue) throws Exception {
|
|
public int addSteelSaleOrder(Map<String, Object> mapValue) throws Exception {
|
|
List<Map<String,Object>> mapList = (List<Map<String, Object>>) mapValue.get("mapList");
|
|
List<Map<String,Object>> mapList = (List<Map<String, Object>>) mapValue.get("mapList");
|
|
- //如果前端传输过来的销售订单id不是空,则改变为已上传
|
|
|
|
- if (mapValue.get("saleOrderId") != null) {
|
|
|
|
- //先判断该销售订单有没有被上传,如果传了则不允许重复上传
|
|
|
|
- int count = amsSaleOrderMaterialMapper.selectSaleOrderIdIsUpload(DataChange.dataToBigDecimal(mapValue.get("saleOrderId")));
|
|
|
|
- if(count != 0) {
|
|
|
|
- return 0;
|
|
|
|
- }
|
|
|
|
- amsSaleOrderMapper.updateOldSaleOrderUpload(DataChange.dataToBigDecimal(mapValue.get("saleOrderId")));
|
|
|
|
- }
|
|
|
|
// 得到发货单位
|
|
// 得到发货单位
|
|
BigDecimal shipperId = DataChange.dataToBigDecimal(mapValue.get("shipperId"));
|
|
BigDecimal shipperId = DataChange.dataToBigDecimal(mapValue.get("shipperId"));
|
|
// 收货单位
|
|
// 收货单位
|
|
@@ -2487,6 +2480,8 @@ public class AmsSaleOrderServiceImpl implements IAmsSaleOrderService {
|
|
JSONObject jsonObject = new JSONObject(totalMap);
|
|
JSONObject jsonObject = new JSONObject(totalMap);
|
|
System.out.println(jsonObject);
|
|
System.out.println(jsonObject);
|
|
Map<String,Object> resultMap = joinFeign.deleteSaleOrderToEas(totalMap);
|
|
Map<String,Object> resultMap = joinFeign.deleteSaleOrderToEas(totalMap);
|
|
|
|
+ System.out.println("返回");
|
|
|
|
+ System.out.println(resultMap);
|
|
String outPut = (String) resultMap.get("output");
|
|
String outPut = (String) resultMap.get("output");
|
|
JSONObject outputjson = JSONObject.parseObject(outPut);
|
|
JSONObject outputjson = JSONObject.parseObject(outPut);
|
|
Map<String,Object> outputMap = (Map<String,Object>) outputjson;
|
|
Map<String,Object> outputMap = (Map<String,Object>) outputjson;
|
|
@@ -2719,6 +2714,28 @@ public class AmsSaleOrderServiceImpl implements IAmsSaleOrderService {
|
|
return saleOrderId.intValue();
|
|
return saleOrderId.intValue();
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ @Override
|
|
|
|
+ public BigDecimal selectTransPortOrder(BigDecimal closeWlEntryId) {
|
|
|
|
+ return amsSaleMaterialMapper.selectTransPortOrderId(closeWlEntryId);
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ @Override
|
|
|
|
+ public int updateTransportOrderStatus(BigDecimal orderId) {
|
|
|
|
+ //查询该运单下有没有净重,没有净重就变为7,有净重就变为2
|
|
|
|
+ int netWeight = omstruckOrderMapper.selectNetWeightCount(orderId);
|
|
|
|
+ int orderStatus = 7;
|
|
|
|
+ if(netWeight > 0) {
|
|
|
|
+ orderStatus = 2;
|
|
|
|
+ }
|
|
|
|
+ return amsSaleOrderMaterialMapper.updateTransportOrderStatus(orderId,orderStatus);
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ @ApiOperation("定时获取制单日期")
|
|
|
|
+ @Scheduled(fixedRate = 180 * 60 * 1000)
|
|
|
|
+ public void getMakeDateTime() {
|
|
|
|
+ Map<String, Object> Map = new HashMap<>();
|
|
|
|
+ getEasPrimaryIds(Map);
|
|
|
|
+ }
|
|
|
|
|
|
|
|
|
|
}
|
|
}
|