zhs 2 سال پیش
والد
کامیت
0fd632a555

+ 2 - 2
src/main/java/com/tld/config/MyRedissonConfig.java

@@ -16,8 +16,8 @@ public class MyRedissonConfig {
     public RedissonClient redissonClient(){
         // 创建配置 指定redis地址及节点信息
         Config config = new Config();
-//        config.useSingleServer().setAddress("redis://8.142.144.205:6379").setPassword("#09SilverB");
-        config.useSingleServer().setAddress("redis://10.2.111.91:6379").setPassword("#09SilverB");
+        config.useSingleServer().setAddress("redis://8.142.144.205:6379").setPassword("#09SilverB");
+//        config.useSingleServer().setAddress("redis://10.2.111.91:6379").setPassword("#09SilverB");
         //redis集群使用
 //        config.useClusterServers().addNodeAddress("redis://8.142.144.205:6379");
         // 根据config创建出RedissonClient实例

+ 2 - 2
src/main/java/com/tld/config/SaticScheduleTask.java

@@ -43,7 +43,7 @@ public class SaticScheduleTask {
 //    /**
 //     * 批量回调 生产领料
 //     */
-//    @Scheduled(cron = "0 */60 * * * ?")
+//    @Scheduled(cron = "0 */10 * * * ?")
 //    public void callback() {
 //        askGoodsService.getCallback();
 //    }
@@ -71,7 +71,7 @@ public class SaticScheduleTask {
 //    public void callDelivery(){
 //        askGoodsService.callDelivery();
 //    }
-//
+
     /**
      * 每天凌晨零点执行任务
      */

+ 58 - 72
src/main/java/com/tld/service/impl/AskGoodsServiceImpl.java

@@ -417,72 +417,64 @@ public class AskGoodsServiceImpl implements AskGoodsService {
                         askGoodsMapper.addAccess(names,returnGsRemoval,accessType);
                         System.out.println("封装好的:"+returnData);
 //                        回传地址
-                        String url = "https://erp4.teld.cn:8443/cwbase/sg/V1/ERP/TELD/TELD_WMS/TELD_API_WMS_StockManage/CreateProductiveOutStock";
-//                        String url = "http://42.159.85.29:52480/cwbase/sg/V1/ERP/TELD/DEVTEST/API_WMS_PurInStock/CreateProductiveOutStock";
-                        HttpClientUtil httpClientUtil1 = new HttpClientUtil();
-                        Map<String, Object> result = httpClientUtil1.doPost(url, returnData);
-                        System.out.println("返回信息" + result);
-                        //如果失败存入错误信息
-                        Error error = new Error();
-                        if(Integer.parseInt(result.get("msg").toString()) != 200){
-                            //如果失败存入报错信息跟数据
-                            error.setErrorInfo(result.get("data").toString());
-                            error.setUrl(url);
-                            error.setDataVal(returnData.toJSONString()).setType("出库回传");
-                            //修改流水传输状态
-                            for(Map<String, Object> maps : askGoodsMapper.plugOutRemoval(removalCode)){
-                                askGoodsMapper.updateRemoval(maps.get("removalCode").toString(), null);
-                            }
-//                            errorMapper.addError(error);
-                            errorMapper.addGsError(error);
-                        }else {
-                            JSONObject jsonObject = (JSONObject) JSONObject.parse(result.get("data").toString());
-                            JSONObject jsonObject1 = (JSONObject) JSONObject.parse(jsonObject.get("result").toString());
-                            if ( jsonObject1.get("State").toString().equals("0") ) {
-                                //如果失败存入报错信息跟数据
-                                error.setErrorInfo(jsonObject1.get("Msg").toString());
-                                error.setUrl(url);
-                                error.setDataVal(returnData.toJSONString()).setType("出库回传");
-//                                errorMapper.addError(error);
-                                errorMapper.addGsError(error);
-                                //修改流水传输状态
-                                for (Map<String, Object> maps : askGoodsMapper.plugOutRemoval(removalCode)) {
-                                    askGoodsMapper.updateRemoval(maps.get("removalCode").toString(), null);
-                                }
-                            }
-//                            }else {
-//                                List<JSONObject> data1 = (List<JSONObject>) JSONObject.parse(jsonObject1.get("data").toString());
-//                                for (JSONObject map1 : data1) {
-//                                    if (map1.get("State").toString().equals("0")){
-//                                        for(JSONObject jsonObject2 : retunList){
-//                                            if(jsonObject2.get("WMSCode").toString().equals(map1.get("WMSCode")) && jsonObject2.get("WareHouse").toString().equals(map1.get("WareHouse"))){
-//
-//                                                //如果失败存入报错信息跟数据
-//                                                List<JSONObject> retunList2 = new LinkedList<>();
-//                                                retunList2.add(jsonObject2);
-//
-//                                                JSONObject ReqOutStocks1 = new JSONObject();
-//                                                ReqOutStocks1.put("ReqOutStocks", retunList2);
-//
-//                                                JSONObject ReqOutStocks2 = new JSONObject();
-//                                                ReqOutStocks2.put("strJson",ReqOutStocks1.toJSONString());
-//
-//                                                //如果失败存入报错信息跟数据
-//                                                error.setErrorInfo(map1.get("FailReason").toString());
-//                                                error.setUrl(url);
-//                                                error.setDataVal(ReqOutStocks2.toJSONString()).setType("出库回传");
-//                                                errorMapper.addError(error);
-//                                                List<JSONObject> list1 = (List<JSONObject>) jsonObject2.get("BillItems");
-//                                                for(JSONObject jsonObject3 : list1){
-//                                                    MaterialClass material = warehousingMapper.getMaterial(new Notice().setMaterialId(jsonObject3.get("Material").toString()));
-//                                                    askGoodsMapper.updateRemoval(jsonObject2.get("WMSCode").toString(), material.getWllbCode());
-//                                                }
-//                                            }
-//                                        }
-//                                    }
-//                                }
+//                        String url = "https://erp4.teld.cn:8443/cwbase/sg/V1/ERP/TELD/TELD_WMS/TELD_API_WMS_StockManage/CreateProductiveOutStock";
+////                        String url = "http://42.159.85.29:52480/cwbase/sg/V1/ERP/TELD/DEVTEST/API_WMS_PurInStock/CreateProductiveOutStock";
+//                        HttpClientUtil httpClientUtil1 = new HttpClientUtil();
+//                        Map<String, Object> result = httpClientUtil1.doPost(url, returnData);
+//                        System.out.println("返回信息" + result);
+//                        //如果失败存入错误信息
+//                        Error error = new Error();
+//                        if(Integer.parseInt(result.get("msg").toString()) != 200){
+//                            //如果失败存入报错信息跟数据
+//                            error.setErrorInfo(result.get("data").toString());
+//                            error.setUrl(url);
+//                            error.setDataVal(returnData.toJSONString()).setType("出库回传");
+////                            errorMapper.addError(error);
+//                            errorMapper.addGsError(error);
+//                        }else {
+//                            JSONObject jsonObject = (JSONObject) JSONObject.parse(result.get("data").toString());
+//                            JSONObject jsonObject1 = (JSONObject) JSONObject.parse(jsonObject.get("result").toString());
+//                            if ( jsonObject1.get("State").toString().equals("0") ) {
+//                                //如果失败存入报错信息跟数据
+//                                error.setErrorInfo(jsonObject1.get("Msg").toString());
+//                                error.setUrl(url);
+//                                error.setDataVal(returnData.toJSONString()).setType("出库回传");
+////                                errorMapper.addError(error);
+//                                errorMapper.addGsError(error);
 //                            }
-                        }
+////                            }else {
+////                                List<JSONObject> data1 = (List<JSONObject>) JSONObject.parse(jsonObject1.get("data").toString());
+////                                for (JSONObject map1 : data1) {
+////                                    if (map1.get("State").toString().equals("0")){
+////                                        for(JSONObject jsonObject2 : retunList){
+////                                            if(jsonObject2.get("WMSCode").toString().equals(map1.get("WMSCode")) && jsonObject2.get("WareHouse").toString().equals(map1.get("WareHouse"))){
+////
+////                                                //如果失败存入报错信息跟数据
+////                                                List<JSONObject> retunList2 = new LinkedList<>();
+////                                                retunList2.add(jsonObject2);
+////
+////                                                JSONObject ReqOutStocks1 = new JSONObject();
+////                                                ReqOutStocks1.put("ReqOutStocks", retunList2);
+////
+////                                                JSONObject ReqOutStocks2 = new JSONObject();
+////                                                ReqOutStocks2.put("strJson",ReqOutStocks1.toJSONString());
+////
+////                                                //如果失败存入报错信息跟数据
+////                                                error.setErrorInfo(map1.get("FailReason").toString());
+////                                                error.setUrl(url);
+////                                                error.setDataVal(ReqOutStocks2.toJSONString()).setType("出库回传");
+////                                                errorMapper.addError(error);
+////                                                List<JSONObject> list1 = (List<JSONObject>) jsonObject2.get("BillItems");
+////                                                for(JSONObject jsonObject3 : list1){
+////                                                    MaterialClass material = warehousingMapper.getMaterial(new Notice().setMaterialId(jsonObject3.get("Material").toString()));
+////                                                    askGoodsMapper.updateRemoval(jsonObject2.get("WMSCode").toString(), material.getWllbCode());
+////                                                }
+////                                            }
+////                                        }
+////                                    }
+////                                }
+////                            }
+//                        }
                     }
                 }
             }
@@ -902,7 +894,6 @@ public class AskGoodsServiceImpl implements AskGoodsService {
                         error.setDataVal(returnData.toJSONString()).setType("销售出库");
 //                        errorMapper.addError(error);
                         errorMapper.addGsError(error);
-                        queryListMapper.updateType(removalCode, 1, null);
                     } else {
                         JSONObject jsonObject = (JSONObject) JSONObject.parse(result.get("data").toString());
                         JSONObject jsonObject1 = (JSONObject) JSONObject.parse(jsonObject.get("result").toString());
@@ -913,7 +904,6 @@ public class AskGoodsServiceImpl implements AskGoodsService {
                             error.setDataVal(returnData.toJSONString()).setType("销售出库");
 //                            errorMapper.addError(error);
                             errorMapper.addGsError(error);
-                            queryListMapper.updateType(removalCode, 1, null);
                         }
 //                        }else {
 //                            List<JSONObject>  data1 = (List<JSONObject>) JSONObject.parse(jsonObject1.get("data").toString());
@@ -1133,7 +1123,7 @@ public class AskGoodsServiceImpl implements AskGoodsService {
             }
             //删除父子表信息
             //根据code
-            askGoodsMapper.delReturnWarehouseTransfer(removalCode);
+            askGoodsMapper.delReturnWarehouseTransfer(warehouseTransferTd);
             //根据id
             askGoodsMapper.delReturnWarehouseTransferZ(warehouseTransferTd);
         } catch (Exception e) {
@@ -1228,10 +1218,6 @@ public class AskGoodsServiceImpl implements AskGoodsService {
                             error.setDataVal(returnData.toJSONString()).setType("生产收货");
 //                            errorMapper.addError(error);
                             errorMapper.addGsError(error);
-                            //修改流水传输状态
-                            for(Map<String, Object> map1 : askGoodsMapper.plugOutRemoval(removalCode)){
-                                askGoodsMapper.updateRemoval(map1.get("removalCode").toString(), null);
-                            }
                         } else {
                             JSONObject jsonObject = (JSONObject) JSONObject.parse(result.get("data").toString());
                             JSONObject jsonObject1 = (JSONObject) JSONObject.parse(jsonObject.get("result").toString());

+ 0 - 2
src/main/java/com/tld/service/impl/WarehousingServiceImpl.java

@@ -353,8 +353,6 @@ public class WarehousingServiceImpl implements WarehousingService {
                         type = 1;
                     }
                 }
-                //增加流水传输状态
-                warehousingMapper.updateWarehousingType(returnWarehousing.getStorageCode(), type);
                 //删除父子表信息
                 askGoodsMapper.delPlugOutWarehousing(returnWarehousing.getId());
             }

+ 16 - 16
src/main/resources/application.yml

@@ -13,24 +13,24 @@ spring:
       strict: true
       datasource:
         # 主库数据源
-#        master:
-#          username: root
-#          password: "#09SilverB"
-#          url: jdbc:mysql://8.142.144.205:3306/tld?useUnicode=true&characterEncoding=utf-8&useSSL=true&rewriteBatchedStatements=true&allowMultiQueries=true
-#          driver-class-name: com.mysql.cj.jdbc.Driver
         master:
           username: root
           password: "#09SilverB"
-          url: jdbc:mysql://10.2.111.91:3306/tld?useUnicode=true&characterEncoding=utf-8&useSSL=true&rewriteBatchedStatements=true&allowMultiQueries=true
-          driver-class-name: com.mysql.cj.jdbc.Driver
-        #从数据源
-        slave:
-          # 从数据源开关/默认关闭
-          enabled: true
-          url: jdbc:mysql://10.2.111.92:3306/tld?useUnicode=true&characterEncoding=utf-8&useSSL=true&rewriteBatchedStatements=true&allowMultiQueries=true
-          username: root
-          password: "#09SilverB"
+          url: jdbc:mysql://8.142.144.205:3306/tld?useUnicode=true&characterEncoding=utf-8&useSSL=true&rewriteBatchedStatements=true&allowMultiQueries=true
           driver-class-name: com.mysql.cj.jdbc.Driver
+#        master:
+#          username: root
+#          password: "#09SilverB"
+#          url: jdbc:mysql://10.2.111.91:3306/tld?useUnicode=true&characterEncoding=utf-8&useSSL=true&rewriteBatchedStatements=true&allowMultiQueries=true
+#          driver-class-name: com.mysql.cj.jdbc.Driver
+#        #从数据源
+#        slave:
+#          # 从数据源开关/默认关闭
+#          enabled: true
+#          url: jdbc:mysql://10.2.111.92:3306/tld?useUnicode=true&characterEncoding=utf-8&useSSL=true&rewriteBatchedStatements=true&allowMultiQueries=true
+#          username: root
+#          password: "#09SilverB"
+#          driver-class-name: com.mysql.cj.jdbc.Driver
         # sqlserver
 #        ds2:
 #          username: sa
@@ -46,8 +46,8 @@ spring:
     async:
       request-timeout: 20000
   redis:
-#    host: 8.142.144.205
-    host: 10.2.111.91
+    host: 8.142.144.205
+#    host: 10.2.111.91
     port: 6379
     password: '#09SilverB'
     jedis:

+ 1 - 1
src/main/resources/mapper/AskGoodsMapper.xml

@@ -1238,7 +1238,7 @@
     <delete id="delReturnWarehouseTransfer">
         delete
         from tld_return_warehouse_transfer
-        where warehouse_transfer_code = #{removalCode}
+        where ask_goods_warehouse_id = #{removalCode}
     </delete>
     <!--删除移库子表-->
     <delete id="delReturnWarehouseTransferZ">