diff --git a/ABAP_AS_WITH_POOL.jcoDestination b/ABAP_AS_WITH_POOL.jcoDestination deleted file mode 100644 index 40ff1c7b..00000000 --- a/ABAP_AS_WITH_POOL.jcoDestination +++ /dev/null @@ -1,11 +0,0 @@ -#for test only! -#Fri Aug 18 13:40:14 CST 2023 -jco.destination.pool_capacity=true -jco.client.lang=zh -jco.client.ashost=192.168.0.53 -jco.client.saprouter= -jco.client.user=MES -jco.client.sysnr=00 -jco.destination.peak_limit=20 -jco.client.passwd=toHkAx_@$mlAJVaiawLWK@)+b2GdTu6V{jYXBRlK{N:X_o:- -jco.client.client=800 diff --git a/op-api/op-api-system/src/main/java/com/op/system/api/RemoteSapService.java b/op-api/op-api-system/src/main/java/com/op/system/api/RemoteSapService.java index 5c12562d..79f89925 100644 --- a/op-api/op-api-system/src/main/java/com/op/system/api/RemoteSapService.java +++ b/op-api/op-api-system/src/main/java/com/op/system/api/RemoteSapService.java @@ -5,6 +5,7 @@ import com.op.common.core.domain.R; import com.op.system.api.domain.sap.SapCreateOrder; import com.op.system.api.domain.sap.SapMaterialPreparation; import com.op.system.api.domain.sap.SapRFW; +import com.op.system.api.domain.sap.SapWorkCenter; import com.op.system.api.factory.RemoteSapFallbackFactory; import com.op.system.api.model.SapProOrder; import org.springframework.cloud.openfeign.FeignClient; @@ -44,4 +45,12 @@ public interface RemoteSapService { /**报工**/ @PostMapping("/sap/sapRFWOrder") public R sapRFWOrder(@RequestBody SapRFW sapRFW); + + /**工作中心**/ + @PostMapping("/sap/sapWorkCenterSync") + public R sapWorkCenterSync(@RequestBody SapWorkCenter sapWorkCenter); + + /**供应商**/ + @PostMapping("/sap/sapSupplierSync") + public R sapSupplierSync(@RequestBody SapWorkCenter sapWorkCenter); } diff --git a/op-api/op-api-system/src/main/java/com/op/system/api/factory/RemoteSapFallbackFactory.java b/op-api/op-api-system/src/main/java/com/op/system/api/factory/RemoteSapFallbackFactory.java index e79083b8..96e1f77c 100644 --- a/op-api/op-api-system/src/main/java/com/op/system/api/factory/RemoteSapFallbackFactory.java +++ b/op-api/op-api-system/src/main/java/com/op/system/api/factory/RemoteSapFallbackFactory.java @@ -5,6 +5,7 @@ import com.op.system.api.RemoteSapService; import com.op.system.api.domain.sap.SapCreateOrder; import com.op.system.api.domain.sap.SapMaterialPreparation; import com.op.system.api.domain.sap.SapRFW; +import com.op.system.api.domain.sap.SapWorkCenter; import com.op.system.api.model.SapProOrder; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -53,6 +54,16 @@ public class RemoteSapFallbackFactory implements FallbackFactory diff --git a/op-modules/op-plan/src/main/java/com/op/plan/service/impl/ProWhiteOrderServiceImpl.java b/op-modules/op-plan/src/main/java/com/op/plan/service/impl/ProWhiteOrderServiceImpl.java index 5b38d2a9..6ede6e4e 100644 --- a/op-modules/op-plan/src/main/java/com/op/plan/service/impl/ProWhiteOrderServiceImpl.java +++ b/op-modules/op-plan/src/main/java/com/op/plan/service/impl/ProWhiteOrderServiceImpl.java @@ -170,6 +170,7 @@ public class ProWhiteOrderServiceImpl implements IProWhiteOrderService { * @return 结果 */ @Override + @DS("#header.poolName") public int updateProOrder(ProOrder proOrder) { proOrder.setUpdateTime(DateUtils.getNowDate()); return proWhiteOrderMapper.updateProOrder(proOrder); @@ -182,6 +183,7 @@ public class ProWhiteOrderServiceImpl implements IProWhiteOrderService { * @return 结果 */ @Override + @DS("#header.poolName") public int deleteProOrderByIds(String[] ids) { return proWhiteOrderMapper.deleteProOrderByIds(ids); } @@ -193,6 +195,7 @@ public class ProWhiteOrderServiceImpl implements IProWhiteOrderService { * @return 结果 */ @Override + @DS("#header.poolName") public int deleteProOrderById(String id) { return proWhiteOrderMapper.deleteProOrderById(id); } diff --git a/op-modules/op-plan/src/main/resources/mapper/plan/ProWhiteOrderMapper.xml b/op-modules/op-plan/src/main/resources/mapper/plan/ProWhiteOrderMapper.xml index f53c7b1d..a44bb3ed 100644 --- a/op-modules/op-plan/src/main/resources/mapper/plan/ProWhiteOrderMapper.xml +++ b/op-modules/op-plan/src/main/resources/mapper/plan/ProWhiteOrderMapper.xml @@ -176,5 +176,11 @@ #{id} + or parent_order in ( + select order_code from pro_order where id in + + #{id} + + ) - \ No newline at end of file + diff --git a/op-modules/op-quality/src/main/java/com/op/quality/Controller/QuaController.java b/op-modules/op-quality/src/main/java/com/op/quality/Controller/QuaController.java deleted file mode 100644 index b61e4c38..00000000 --- a/op-modules/op-quality/src/main/java/com/op/quality/Controller/QuaController.java +++ /dev/null @@ -1,78 +0,0 @@ -package com.op.quality.Controller; - -import com.baomidou.dynamic.datasource.annotation.DS; -import com.op.common.core.domain.R; -import com.op.common.core.utils.uuid.UUID; -import com.op.quality.domain.BaseFile; -import com.op.quality.domain.QcProCheck; -import com.op.quality.service.QcProCheckService; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.web.bind.annotation.*; - -import java.util.Map; - -/** - * @ClassName : quaController - * @Description : - * @Author : - * @Date: 2023-08-17 10:28 - */ -@RestController -public class QuaController { - @Autowired - private QcProCheckService qcProCheckService; - - - @PostMapping("/saveQcProCheck") - public R saveQcProCheck(@RequestBody Map map) { -// System.out.println(qcProCheck); -// System.out.println(baseFile); - QcProCheck qcProCheck = map.keySet().iterator().next(); - BaseFile baseFile = map.values().iterator().next(); - - if (!qcProCheck.getFactoryId().isEmpty()){ - if (baseFile==null){ - baseFile = new BaseFile(); - qcProCheckService.saveQcProCheck(qcProCheck,baseFile); - } - - if (qcProCheck.getIsqua()=="1"){ - System.out.println("调用下一个接口"); - return R.ok(); - } - else{ - return R.ok(); - } - } - return R.fail(); - } - @PostMapping("/test") - public R test() { -// System.out.println(qcProCheck); -// System.out.println(baseFile); -// QcProCheck qcProCheck = map.keySet().iterator().next(); -// BaseFile baseFile = map.values().iterator().next(); - QcProCheck qcProCheck = new QcProCheck(); - BaseFile baseFile = new BaseFile(); - qcProCheck.setId("1232132132121321"); - qcProCheck.setFactoryId("qewqewqewq"); - qcProCheck.setIsqua("1"); - baseFile.setFileAddress("qwewqewqewqewqewqq"); - if (!qcProCheck.getFactoryId().isEmpty()){ - if (baseFile==null){ - baseFile = new BaseFile(); - qcProCheckService.saveQcProCheck(qcProCheck,baseFile); - } - - if (qcProCheck.getIsqua()=="1"){ - System.out.println("调用下一个接口"); - return R.ok(); - } - else{ - return R.ok(); - } - } - return R.fail(); - } - -} diff --git a/op-modules/op-quality/src/main/java/com/op/quality/service/serviceImpl/QcProCheckServiceImpl.java b/op-modules/op-quality/src/main/java/com/op/quality/service/serviceImpl/QcProCheckServiceImpl.java index c0e4f36f..6e74b355 100644 --- a/op-modules/op-quality/src/main/java/com/op/quality/service/serviceImpl/QcProCheckServiceImpl.java +++ b/op-modules/op-quality/src/main/java/com/op/quality/service/serviceImpl/QcProCheckServiceImpl.java @@ -31,7 +31,7 @@ public class QcProCheckServiceImpl implements QcProCheckService { @Override public R saveQcProCheck(QcProCheck qcProCheck) { - DynamicDataSourceContextHolder.push("ds_1000"); + DynamicDataSourceContextHolder.push("ds_"+qcProCheck.getFactoryCode()); qcProCheck.setId(UUID.randomUUID().toString().replace("-", "")); //上传附件 @@ -62,14 +62,14 @@ public class QcProCheckServiceImpl implements QcProCheckService { @Override // @DS("#header.poolName") public int updateQcProCheck(String id) { - DynamicDataSourceContextHolder.push("ds_1000"); + //DynamicDataSourceContextHolder.push("ds_1000"); return qcProCheckMapper.updateQcProCheckById(id); } @Override // @DS("#header.poolName") public int deleteQcProCheck(String id) { - DynamicDataSourceContextHolder.push("ds_1000"); + //DynamicDataSourceContextHolder.push("ds_1000"); return qcProCheckMapper.deleteQcProCheckById(id); } diff --git a/op-modules/op-sap/src/main/resources/bootstrap.yml b/op-modules/op-sap/src/main/resources/bootstrap.yml index 6981aeea..14dae316 100644 --- a/op-modules/op-sap/src/main/resources/bootstrap.yml +++ b/op-modules/op-sap/src/main/resources/bootstrap.yml @@ -14,12 +14,12 @@ spring: nacos: discovery: namespace: lanju-op - group: ywl + group: zxl # 服务注册地址 server-addr: 140.249.53.142:8848 config: namespace: lanju-op - group: ywl + group: zxl #命名空间 #group: local # 配置中心地址