rev 出缓存线数量
This commit is contained in:
@@ -5,5 +5,5 @@ package org.nl.acs.device_driver.basedriver.hailiang_one;
|
||||
* @createDate: 2023/5/24
|
||||
*/
|
||||
public class ApplyTaskTime {
|
||||
public final static long APPLY_TIME = 30l;
|
||||
public final static long APPLY_TIME = 60l;
|
||||
}
|
||||
|
||||
@@ -398,6 +398,12 @@ public class HailiangAutoCacheLineDeviceDriver extends AbstractOpcDeviceDriver i
|
||||
TaskDto taskDto = taskserver.findByCodeFromCache(inst.getTask_code());
|
||||
if (taskDto != null) {
|
||||
taskDto.setVehicle_code(String.valueOf(prepare_barcode));
|
||||
String qtyArr = taskDto.getQtyArr();
|
||||
if (StrUtil.isNotEmpty(qtyArr)) {
|
||||
JSONObject qtyJson = JSONObject.parseObject(qtyArr);
|
||||
String qty = qtyJson.getString(String.valueOf(prepare_barcode));
|
||||
taskDto.setQtyArr(qty);
|
||||
}
|
||||
taskserver.update(taskDto);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -15,6 +15,7 @@ import org.nl.acs.device.service.DeviceService;
|
||||
import org.nl.acs.ext.wms.service.AcsToWmsService;
|
||||
import org.nl.modules.system.service.ParamService;
|
||||
import org.slf4j.MDC;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.http.HttpStatus;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
@@ -24,10 +25,12 @@ import java.util.Map;
|
||||
@RequiredArgsConstructor
|
||||
@Slf4j
|
||||
public class AcsToWmsServiceImpl implements AcsToWmsService {
|
||||
int a;
|
||||
private final ParamService paramService;
|
||||
private final DeviceService deviceService;
|
||||
private final AddressService addressService;
|
||||
@Autowired
|
||||
private ParamService paramService;
|
||||
@Autowired
|
||||
private DeviceService deviceService;
|
||||
@Autowired
|
||||
private AddressService addressService;
|
||||
|
||||
public String token;
|
||||
|
||||
|
||||
@@ -38,6 +38,7 @@ import org.nl.acs.task.service.dto.TaskDto;
|
||||
import org.nl.modules.common.exception.BadRequestException;
|
||||
import org.nl.modules.system.service.ParamService;
|
||||
import org.nl.modules.wql.core.bean.WQLObject;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.context.ApplicationContext;
|
||||
import org.springframework.http.HttpStatus;
|
||||
import org.springframework.stereotype.Service;
|
||||
@@ -51,13 +52,18 @@ import java.util.Map;
|
||||
@Slf4j
|
||||
public class WmsToAcsServiceImpl implements WmsToAcsService {
|
||||
|
||||
private final ApplicationContext applicationContext;
|
||||
private final TaskService taskService;
|
||||
private final DeviceService deviceService;
|
||||
private final DeviceAppService deviceAppService;
|
||||
private final ProduceshiftorderService produceshiftorderService;
|
||||
private final ParamService paramService;
|
||||
private final InstructionService instructionService;
|
||||
@Autowired
|
||||
private TaskService taskService;
|
||||
@Autowired
|
||||
private DeviceService deviceService;
|
||||
@Autowired
|
||||
private DeviceAppService deviceAppService;
|
||||
@Autowired
|
||||
private ProduceshiftorderService produceshiftorderService;
|
||||
@Autowired
|
||||
private ParamService paramService;
|
||||
@Autowired
|
||||
private InstructionService instructionService;
|
||||
|
||||
@Override
|
||||
public Map<String, Object> createFromWms(List<JSONObject> tasks) {
|
||||
@@ -82,6 +88,7 @@ public class WmsToAcsServiceImpl implements WmsToAcsService {
|
||||
String priority_floor = task.getString("priority_floor");
|
||||
String material_code = task.getString("material_code");
|
||||
String quantity = task.getString("quantity");
|
||||
String qtyArr = task.getString("qtyArr");
|
||||
|
||||
if (StrUtil.isEmpty(task_id)) {
|
||||
JSONObject json = new JSONObject();
|
||||
@@ -192,6 +199,7 @@ public class WmsToAcsServiceImpl implements WmsToAcsService {
|
||||
jo.put("priority_floor", priority_floor);
|
||||
jo.put("material_code", material_code);
|
||||
jo.put("quantity", quantity);
|
||||
jo.put("qtyArr", qtyArr);
|
||||
jo.put("task_type", StrUtil.isEmpty(task_type) ? 1 : Integer.parseInt(task_type));
|
||||
TaskDto task_dto = jo.toJavaObject(TaskDto.class);
|
||||
try {
|
||||
@@ -247,6 +255,9 @@ public class WmsToAcsServiceImpl implements WmsToAcsService {
|
||||
String ealing_device_code = param.getString("ealing_device_code");
|
||||
String unboxing_device_code = param.getString("unboxing_device_code");
|
||||
|
||||
String lane_tray_template = param.getString("lane_tray_template");
|
||||
String tray_num = param.getString("tray_num");
|
||||
|
||||
Map<String, Object> extra_map = param.getJSONObject("extra_map");
|
||||
String one_box_package_qty = "";
|
||||
String package_qty = "";
|
||||
@@ -259,21 +270,24 @@ public class WmsToAcsServiceImpl implements WmsToAcsService {
|
||||
if (ObjectUtil.isNotEmpty(extra_map)) {
|
||||
//老车间包装工单信息
|
||||
//每箱袋数
|
||||
one_box_package_qty = extra_map.get("one_box_package_qty").toString();
|
||||
one_box_package_qty = ObjectUtil.isEmpty(extra_map.get("one_box_package_qty")) ? null : extra_map.get("one_box_package_qty").toString();
|
||||
//袋数
|
||||
package_qty = extra_map.get("package_qty").toString();
|
||||
package_qty = ObjectUtil.isEmpty(extra_map.get("package_qty")) ? null : extra_map.get("package_qty").toString();
|
||||
//每袋数量
|
||||
one_package_qty = extra_map.get("one_package_qty").toString();
|
||||
one_package_qty = ObjectUtil.isEmpty(extra_map.get("one_package_qty")) ? null : extra_map.get("one_package_qty").toString();
|
||||
//箱数
|
||||
box_num = extra_map.get("box_num").toString();
|
||||
box_num = ObjectUtil.isEmpty(extra_map.get("box_num")) ? null : extra_map.get("box_num").toString();
|
||||
//箱型
|
||||
box_type = extra_map.get("box_type").toString();
|
||||
box_type = ObjectUtil.isEmpty(extra_map.get("box_type")) ? null : extra_map.get("box_type").toString();
|
||||
//目标巷道
|
||||
target_roadway = extra_map.get("target_roadway").toString();
|
||||
target_roadway = ObjectUtil.isEmpty(extra_map.get("target_roadway")) ? null : extra_map.get("target_roadway").toString();
|
||||
//是否翻转
|
||||
is_flip = extra_map.get("is_flip").toString();
|
||||
is_flip = ObjectUtil.isEmpty(extra_map.get("is_flip")) ? null : extra_map.get("is_flip").toString();
|
||||
//托盘满托数量
|
||||
tray_full_num = extra_map.get("tray_full_num").toString();
|
||||
tray_full_num = ObjectUtil.isEmpty(extra_map.get("tray_full_num")) ? null : extra_map.get("tray_full_num").toString();
|
||||
//
|
||||
lane_tray_template = ObjectUtil.isEmpty(extra_map.get("lane_tray_template")) ? null : extra_map.get("lane_tray_template").toString();
|
||||
tray_num = ObjectUtil.isEmpty(extra_map.get("tray_num")) ? null : extra_map.get("tray_num").toString();
|
||||
}
|
||||
|
||||
Map<String, Object> params = param.getJSONObject("params");
|
||||
@@ -357,6 +371,8 @@ public class WmsToAcsServiceImpl implements WmsToAcsService {
|
||||
dto.setTray_full_num(tray_full_num);
|
||||
dto.setEalingOrderDto(ealingOrderDto);
|
||||
dto.setCreate_by("mes");
|
||||
dto.setTray_num(tray_num);
|
||||
dto.setLane_tray_template(lane_tray_template);
|
||||
try {
|
||||
produceshiftorderService.create(dto);
|
||||
} catch (Exception e) {
|
||||
|
||||
@@ -313,4 +313,6 @@ public class TaskDto implements Serializable {
|
||||
|
||||
private Map<String, String> ext_param = new HashMap<>();
|
||||
|
||||
private String qtyArr;
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user