|
@@ -12,6 +12,7 @@ import com.ruoyi.ams.task.domain.WcsTask;
|
|
|
import com.ruoyi.ams.task.service.IWcsTaskService;
|
|
|
import com.ruoyi.ams.xuankuang.domain.form.*;
|
|
|
import com.ruoyi.ams.xuankuang.domain.vo.LocationCoordinateVo;
|
|
|
+import com.ruoyi.ams.xuankuang.facade.IUnpackingMachineFacade;
|
|
|
import com.ruoyi.base.constant.Constant;
|
|
|
import com.ruoyi.base.domain.BaseLocationInfo;
|
|
|
import com.ruoyi.base.domain.vo.BaseLocationLotattVO;
|
|
@@ -65,8 +66,9 @@ public class WcsToWmsApiService {
|
|
|
private StirringTankClient stirringTankClient;
|
|
|
@Autowired
|
|
|
private UnpackingMachineSubClient unpackingMachineSubClient;
|
|
|
+
|
|
|
@Autowired
|
|
|
- private WmsToWcsApiService wmsToWcsApiService;
|
|
|
+ private IUnpackingMachineFacade unpackingMachineFacade;
|
|
|
@Autowired
|
|
|
private IWcsTaskService wcsTaskService;
|
|
|
@Autowired
|
|
@@ -367,69 +369,10 @@ public class WcsToWmsApiService {
|
|
|
public AjaxResult lineOpenNotification(LineOpenNotificationForm lineOpenNotificationForm) {
|
|
|
String lineId = lineOpenNotificationForm.getLineId();
|
|
|
boolean[] booleans = stirringTankClient.readTank14();
|
|
|
- if (lineId.equals("1")) {
|
|
|
- if (booleans[15] = true) {
|
|
|
- //一号拆包机启动——碳酸钠
|
|
|
- unpackingMachineSubClient.writeV140_5();
|
|
|
- CallbackBbmForm callbackBbmForm = new CallbackBbmForm();
|
|
|
- callbackBbmForm.setBbmId(lineId);
|
|
|
- wmsToWcsApiService.wmsCallbackBbmTask(callbackBbmForm);
|
|
|
- //写仓库收到请求已经开始碳酸钠注药
|
|
|
- stirringTankClient.writeTank03();
|
|
|
- return AjaxResult.success();
|
|
|
- }
|
|
|
- }
|
|
|
- if (lineId.equals("2")) {
|
|
|
- if (booleans[14] = true) {
|
|
|
- //二号拆包机启动——丁黄药
|
|
|
- unpackingMachineSubClient.writeV140_6();
|
|
|
- CallbackBbmForm callbackBbmForm = new CallbackBbmForm();
|
|
|
- callbackBbmForm.setBbmId(lineId);
|
|
|
- wmsToWcsApiService.wmsCallbackBbmTask(callbackBbmForm);
|
|
|
- //写仓库收到请求已经开始丁黄药注药
|
|
|
- stirringTankClient.writeTank03_1();
|
|
|
- return AjaxResult.success();
|
|
|
- }
|
|
|
- }
|
|
|
- if (lineId.equals("3")) {
|
|
|
- if (booleans[12] = true) {
|
|
|
- //三号拆包机启动——六偏磷酸钠
|
|
|
- unpackingMachineSubClient.writeV140_7();
|
|
|
- CallbackBbmForm callbackBbmForm = new CallbackBbmForm();
|
|
|
- callbackBbmForm.setBbmId(lineId);
|
|
|
- wmsToWcsApiService.wmsCallbackBbmTask(callbackBbmForm);
|
|
|
- //写仓库收到请求已经开始六偏磷酸钠注药
|
|
|
- stirringTankClient.writeTank03_2();
|
|
|
- return AjaxResult.success();
|
|
|
- }
|
|
|
- }
|
|
|
- if (lineId.equals("4")) {
|
|
|
- if (booleans[11] = true) {
|
|
|
- //四号拆包机启动——硫酸铵
|
|
|
- unpackingMachineSubClient.writeV141_0();
|
|
|
- CallbackBbmForm callbackBbmForm = new CallbackBbmForm();
|
|
|
- callbackBbmForm.setBbmId(lineId);
|
|
|
- wmsToWcsApiService.wmsCallbackBbmTask(callbackBbmForm);
|
|
|
- //写仓库收到请求已经开始硫酸铵注药
|
|
|
- stirringTankClient.writeTank03_4();
|
|
|
- return AjaxResult.success();
|
|
|
- }
|
|
|
- }
|
|
|
- if (lineId.equals("5")) {
|
|
|
- if (booleans[10] = true) {
|
|
|
- //五号拆包机启动——乙黄药
|
|
|
- unpackingMachineSubClient.writeV141_1();
|
|
|
- CallbackBbmForm callbackBbmForm = new CallbackBbmForm();
|
|
|
- callbackBbmForm.setBbmId(lineId);
|
|
|
- wmsToWcsApiService.wmsCallbackBbmTask(callbackBbmForm);
|
|
|
- //写仓库收到请求已经开始乙黄药注药
|
|
|
- stirringTankClient.writeTank03_5();
|
|
|
- return AjaxResult.success();
|
|
|
- }
|
|
|
- }
|
|
|
- return AjaxResult.success();
|
|
|
+ return unpackingMachineFacade.unpackingMachineOpen(lineId, booleans) ? AjaxResult.success() : AjaxResult.error();
|
|
|
}
|
|
|
|
|
|
+
|
|
|
/**
|
|
|
* 正常关闭1号拆包机
|
|
|
*
|