|
@@ -218,7 +218,7 @@ public class TmstruckWeightResultServiceImpl implements ITmstruckWeightResultSer
|
|
|
}
|
|
|
|
|
|
if(DataChange.dataToBigDecimal(map.get("WLReUpdateFlag")).intValue() == 1){
|
|
|
- return linkUpdateAPO(map, orderType);
|
|
|
+ linkUpdateAPO(map, orderType);
|
|
|
}
|
|
|
|
|
|
Map<String, Object> stringObjectMap = tmstruckWeightResultMapper.selectWeightIdByOrderId(map);
|
|
@@ -684,7 +684,15 @@ public class TmstruckWeightResultServiceImpl implements ITmstruckWeightResultSer
|
|
|
if(resultId != null){
|
|
|
int orderIds = DataChange.dataToBigDecimal(oneMap.get("orderIds")).intValue();
|
|
|
try {
|
|
|
- omsFeign.closeInwardOrder(orderIds, sqe, (String) resultNetWeight);
|
|
|
+ new Thread( new Runnable() {
|
|
|
+ public void run(){
|
|
|
+ try {
|
|
|
+ omsFeign.closeInwardOrder(orderIds, sqe, (String) resultNetWeight);
|
|
|
+ } catch (IOException e) {
|
|
|
+ e.printStackTrace();
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }).start();
|
|
|
} catch (Exception e) {
|
|
|
e.printStackTrace();
|
|
|
}
|
|
@@ -990,94 +998,69 @@ public class TmstruckWeightResultServiceImpl implements ITmstruckWeightResultSer
|
|
|
|
|
|
@Override
|
|
|
public Boolean checkOrder(Map<String, Object> map) {
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
+ try {
|
|
|
+ if (map != null) {
|
|
|
+ JSONObject jsonObject = new JSONObject(map);
|
|
|
+ FastDateFormat format = FastDateFormat.getInstance("yyyy-MM-dd HH:mm:ss");
|
|
|
+ try{
|
|
|
+ new Thread( new Runnable() {
|
|
|
+ public void run(){
|
|
|
+ try {
|
|
|
+ newFileTool.newFile(jsonObject.toString(),"计量物流金蝶核对");
|
|
|
+ } catch (IOException e) {
|
|
|
+ e.printStackTrace();
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }).start();
|
|
|
+ }catch (Exception e) {
|
|
|
+ e.printStackTrace();
|
|
|
+ }
|
|
|
+
|
|
|
+ int i = tmstruckWeightResultMapper.checkOrderIsSteel(map);
|
|
|
+ if (i == 0) {
|
|
|
+ return true;
|
|
|
+ }
|
|
|
+
|
|
|
+ int j = tmstruckWeightResultMapper.checkOrder(map);
|
|
|
+ if (j == 0) {
|
|
|
+
|
|
|
+ BigDecimal jlSaleOrderMaterialId = tmstruckWeightResultMapper.getJlSaleOrderMaterialId(map);
|
|
|
+ BigDecimal wlSaleOrderMaterialId = tmstruckWeightResultMapper.getWlSaleOrderMaterialId(map);
|
|
|
+ BigDecimal wlOrderId = tmstruckWeightResultMapper.getJlOrderId(wlSaleOrderMaterialId);
|
|
|
+ if(jlSaleOrderMaterialId != null) {
|
|
|
+
|
|
|
+ BigDecimal jlSpell = tmstruckWeightResultMapper.getJlSpell(jlSaleOrderMaterialId);
|
|
|
+ BigDecimal wlSpell = tmstruckWeightResultMapper.getWlSpell(map);
|
|
|
+
|
|
|
+ if (jlSpell.compareTo(wlSpell) == 0) {
|
|
|
+
|
|
|
+ BigDecimal jlOrderId = tmstruckWeightResultMapper.getJlOrderId(jlSaleOrderMaterialId);
|
|
|
+ if(jlOrderId != null) {
|
|
|
+
|
|
|
+ tmstruckWeightResultMapper.updateOrderPlanId(jlOrderId,wlSaleOrderMaterialId);
|
|
|
+ tmstruckWeightResultMapper.updateOrderPlanId(wlOrderId,jlSaleOrderMaterialId);
|
|
|
+
|
|
|
+ tmstruckWeightResultMapper.updateOrderMaterialId(jlOrderId);
|
|
|
+ tmstruckWeightResultMapper.updateOrderMaterialId(wlOrderId);
|
|
|
+ }else{
|
|
|
+ tmstruckWeightResultMapper.updateOrderPlanId(wlOrderId,jlSaleOrderMaterialId);
|
|
|
+ tmstruckWeightResultMapper.updateOrderMaterialId(wlOrderId);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }else {
|
|
|
+
|
|
|
+ tmstruckWeightResultMapper.updateOmsRedQrCode(map);
|
|
|
+ }
|
|
|
+
|
|
|
+ utilsService.pushMesToWebsocket((String) map.get("carNo"), "计量");
|
|
|
+ return false;
|
|
|
+ }else{
|
|
|
+ return true;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ } catch (Exception e) {
|
|
|
+ return true;
|
|
|
+ }
|
|
|
return true;
|
|
|
}
|
|
|
|