分拣机械手工单修改
This commit is contained in:
@@ -36,7 +36,7 @@ public class WmsToAcsServiceImpl implements WmsToAcsService {
|
||||
|
||||
@Override
|
||||
public Map action(JSONArray arr) {
|
||||
String api = "api/wms/updateDeviceGoods";
|
||||
String api = "api/wms/action";
|
||||
return AcsUtil.notifyAcs(api, arr);
|
||||
}
|
||||
|
||||
|
||||
@@ -15,10 +15,13 @@ import org.nl.utils.SpringContextHolder;
|
||||
import org.nl.wms.ext.acs.service.AcsToWmsService;
|
||||
import org.nl.wms.ext.acs.service.WmsToAcsService;
|
||||
import org.nl.wms.ext.acs.service.impl.WmsToJnServiceImpl;
|
||||
import org.nl.wms.pdm.service.DeviceService;
|
||||
import org.nl.wms.pdm.service.ProducetaskService;
|
||||
import org.nl.wms.pdm.service.dto.DeviceDto;
|
||||
import org.nl.wms.pdm.service.dto.ProducetaskDto;
|
||||
import org.nl.wms.sch.AcsUtil;
|
||||
import org.nl.wql.WQL;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
@@ -55,6 +58,9 @@ import javax.servlet.http.HttpServletRequest;
|
||||
@Slf4j
|
||||
public class ProducetaskServiceImpl implements ProducetaskService {
|
||||
|
||||
@Autowired
|
||||
DeviceService deviceService;
|
||||
|
||||
@Override
|
||||
public Map<String, Object> queryAll(Map whereJson, Pageable page) {
|
||||
String search = MapUtil.getStr(whereJson, "search");
|
||||
@@ -283,13 +289,15 @@ public class ProducetaskServiceImpl implements ProducetaskService {
|
||||
if (ObjectUtil.isNotEmpty(jo)) {
|
||||
throw new BadRequestException("该设备存在未完成的工单,不能下发!");
|
||||
}
|
||||
|
||||
DeviceDto dto = deviceService.findById(Long.valueOf(device_id));
|
||||
JSONObject taskObj = new JSONObject();
|
||||
//假如是包装的三台机械手,是将设备当作工单设备
|
||||
//假如是压机下料的机械手,则是将对接为当作工单设备
|
||||
if (StrUtil.equals(device_id, "1518136519804719104") || StrUtil.equals("1518136611341209600", device_id) || StrUtil.equals("1544608176471674880", device_id)) {
|
||||
taskObj = WQL.getWO("PDM_ProduceTask_01").addParam("flag", "4").addParam("producetask_id", producetask_id).process().uniqueResult(0);
|
||||
} else {
|
||||
if (StrUtil.equals(dto.getDevice_code(), "FJJXS1") || StrUtil.equals("FJJXS2", dto.getDevice_code()) || StrUtil.equals("FJJXS3", dto.getDevice_code())) {
|
||||
taskObj = WQL.getWO("PDM_ProduceTask_01").addParam("flag", "3").addParam("producetask_id", producetask_id).process().uniqueResult(0);
|
||||
} else {
|
||||
taskObj = WQL.getWO("PDM_ProduceTask_01").addParam("flag", "4").addParam("producetask_id", producetask_id).process().uniqueResult(0);
|
||||
}
|
||||
|
||||
taskObj.put("product_code", "wms");
|
||||
|
||||
Reference in New Issue
Block a user