需求变更
This commit is contained in:
@@ -81,4 +81,22 @@ public class DeviceRunpointDto implements Serializable {
|
||||
* 锁定
|
||||
*/
|
||||
private String islock;
|
||||
|
||||
// 手持设备信息
|
||||
private String model;
|
||||
|
||||
// 工序
|
||||
private String process;
|
||||
|
||||
// 重量
|
||||
private String weight;
|
||||
|
||||
// 质量状态
|
||||
private String qc_status;
|
||||
|
||||
// 日期
|
||||
private String date;
|
||||
|
||||
// 操作员
|
||||
private String operation_by;
|
||||
}
|
||||
|
||||
@@ -24,6 +24,7 @@ import org.nl.acs.device_driver.ssj_cache_site.SsjCacheSiteDeviceDriver;
|
||||
import org.nl.acs.device_driver.standard_conveyor_control_with_scanner.StandardCoveyorControlWithScannerDeviceDriver;
|
||||
import org.nl.acs.device_driver.standard_emptypallet_site.StandardEmptyPalletSiteDeviceDriver;
|
||||
import org.nl.acs.device_driver.standard_inspect_site.StandardInspectSiteDeviceDriver;
|
||||
import org.nl.acs.device_driver.standard_inspect_site_smart200.StandardInspectSiteSmartDeviceDriver;
|
||||
import org.nl.acs.device_driver.standard_manipulator_inspect_site.StandardManipulatorInspectSiteDeviceDriver;
|
||||
import org.nl.acs.device_driver.standard_manipulator_stacking_site.StandardManipulatorStackingSiteDeviceDriver;
|
||||
import org.nl.acs.device_driver.standard_ordinary_site.StandardOrdinarySiteDeviceDriver;
|
||||
@@ -822,6 +823,12 @@ public class DeviceServiceImpl implements DeviceService, ApplicationAutoInitial
|
||||
String remark = form.optString("remark");
|
||||
String vehicle_code = form.optString("vehicle_code");
|
||||
String islock = form.optString("islock");
|
||||
String model = form.optString("model");
|
||||
String process = form.optString("process");
|
||||
String weight = form.optString("weight");
|
||||
String qc_status = form.optString("qc_status");
|
||||
String date = form.optString("date");
|
||||
String operation_by = form.optString("operation_by");
|
||||
//是否需要人工确认
|
||||
String is_unlock = form.optString("is_unlock");
|
||||
|
||||
@@ -851,6 +858,8 @@ public class DeviceServiceImpl implements DeviceService, ApplicationAutoInitial
|
||||
StandardManipulatorInspectSiteDeviceDriver standardManipulatorInspectSiteDeviceDriver;
|
||||
//扬州晶澳
|
||||
YzjaSpecialDeviceDriver yzjaSpecialDeviceDriver;
|
||||
// 检测站点_smaet200
|
||||
StandardInspectSiteSmartDeviceDriver standardInspectSiteSmartDeviceDriver;
|
||||
|
||||
if (device.getDeviceDriver() instanceof StandardOrdinarySiteDeviceDriver) {
|
||||
standardOrdinarySiteDeviceDriver = (StandardOrdinarySiteDeviceDriver) device.getDeviceDriver();
|
||||
@@ -890,6 +899,48 @@ public class DeviceServiceImpl implements DeviceService, ApplicationAutoInitial
|
||||
standardOrdinarySiteDeviceDriver.setIslock(Boolean.valueOf(islock));
|
||||
device.setIslock(islock);
|
||||
}
|
||||
if (StrUtil.isNotEmpty(model)) {
|
||||
standardOrdinarySiteDeviceDriver.setModel(model);
|
||||
device.setModel(model);
|
||||
} else {
|
||||
standardOrdinarySiteDeviceDriver.setModel("");
|
||||
device.setModel("");
|
||||
}
|
||||
if (StrUtil.isNotEmpty(process)) {
|
||||
standardOrdinarySiteDeviceDriver.setProcess(process);
|
||||
device.setProcess(process);
|
||||
} else {
|
||||
standardOrdinarySiteDeviceDriver.setProcess("");
|
||||
device.setProcess("");
|
||||
}
|
||||
if (StrUtil.isNotEmpty(weight)) {
|
||||
standardOrdinarySiteDeviceDriver.setWeight(weight);
|
||||
device.setWeight(weight);
|
||||
} else {
|
||||
standardOrdinarySiteDeviceDriver.setWeight("");
|
||||
device.setWeight("");
|
||||
}
|
||||
if (StrUtil.isNotEmpty(qc_status)) {
|
||||
standardOrdinarySiteDeviceDriver.setQc_status(qc_status);
|
||||
device.setQc_status(qc_status);
|
||||
} else {
|
||||
standardOrdinarySiteDeviceDriver.setQc_status("");
|
||||
device.setQc_status("");
|
||||
}
|
||||
if (StrUtil.isNotEmpty(date)) {
|
||||
standardOrdinarySiteDeviceDriver.setDate(date);
|
||||
device.setDate(date);
|
||||
} else {
|
||||
standardOrdinarySiteDeviceDriver.setDate("");
|
||||
device.setDate("");
|
||||
}
|
||||
if (StrUtil.isNotEmpty(operation_by)) {
|
||||
standardOrdinarySiteDeviceDriver.setOperation_by(operation_by);
|
||||
device.setOperation_by(operation_by);
|
||||
} else {
|
||||
standardOrdinarySiteDeviceDriver.setOperation_by("");
|
||||
device.setOperation_by("");
|
||||
}
|
||||
WQLObject runpointwo = WQLObject.getWQLObject("acs_device_runpoint");
|
||||
JSONObject json = runpointwo.query("device_code ='" + device_code + "'").uniqueResult(0);
|
||||
if (!ObjectUtil.isEmpty(json)) {
|
||||
@@ -897,12 +948,24 @@ public class DeviceServiceImpl implements DeviceService, ApplicationAutoInitial
|
||||
obj.setHasgoods(hasGoodStatus);
|
||||
obj.setMaterial_type(material_type);
|
||||
obj.setBatch(batch);
|
||||
obj.setModel(model);
|
||||
obj.setProcess(process);
|
||||
obj.setWeight(weight);
|
||||
obj.setQc_status(qc_status);
|
||||
obj.setDate(date);
|
||||
obj.setOperation_by(operation_by);
|
||||
device.setHas_goods(Integer.parseInt(hasGoodStatus));
|
||||
device.setMaterial_type(material_type);
|
||||
device.setRemark(remark);
|
||||
device.setQuantity(quantity);
|
||||
device.setBatch(batch);
|
||||
device.setIslock(islock);
|
||||
device.setModel(model);
|
||||
device.setProcess(process);
|
||||
device.setWeight(weight);
|
||||
device.setQc_status(qc_status);
|
||||
device.setDate(date);
|
||||
device.setOperation_by(operation_by);
|
||||
JSONObject updatejson = JSONObject.fromObject(obj);
|
||||
runpointwo.update(updatejson, "device_code = '" + device_code + "'");
|
||||
}
|
||||
@@ -1007,6 +1070,48 @@ public class DeviceServiceImpl implements DeviceService, ApplicationAutoInitial
|
||||
ssjCacheSiteDeviceDriver.setIslock(Boolean.valueOf(islock));
|
||||
device.setIslock(islock);
|
||||
}
|
||||
if (StrUtil.isNotEmpty(model)) {
|
||||
ssjCacheSiteDeviceDriver.setModel(model);
|
||||
device.setModel(model);
|
||||
} else {
|
||||
ssjCacheSiteDeviceDriver.setModel("");
|
||||
device.setModel("");
|
||||
}
|
||||
if (StrUtil.isNotEmpty(process)) {
|
||||
ssjCacheSiteDeviceDriver.setProcess(process);
|
||||
device.setProcess(process);
|
||||
} else {
|
||||
ssjCacheSiteDeviceDriver.setProcess("");
|
||||
device.setProcess("");
|
||||
}
|
||||
if (StrUtil.isNotEmpty(weight)) {
|
||||
ssjCacheSiteDeviceDriver.setWeight(weight);
|
||||
device.setWeight(weight);
|
||||
} else {
|
||||
ssjCacheSiteDeviceDriver.setWeight("");
|
||||
device.setWeight("");
|
||||
}
|
||||
if (StrUtil.isNotEmpty(qc_status)) {
|
||||
ssjCacheSiteDeviceDriver.setQc_status(qc_status);
|
||||
device.setQc_status(qc_status);
|
||||
} else {
|
||||
ssjCacheSiteDeviceDriver.setQc_status("");
|
||||
device.setQc_status("");
|
||||
}
|
||||
if (StrUtil.isNotEmpty(date)) {
|
||||
ssjCacheSiteDeviceDriver.setDate(date);
|
||||
device.setDate(date);
|
||||
} else {
|
||||
ssjCacheSiteDeviceDriver.setDate("");
|
||||
device.setDate("");
|
||||
}
|
||||
if (StrUtil.isNotEmpty(operation_by)) {
|
||||
ssjCacheSiteDeviceDriver.setOperation_by(operation_by);
|
||||
device.setOperation_by(operation_by);
|
||||
} else {
|
||||
ssjCacheSiteDeviceDriver.setOperation_by("");
|
||||
device.setOperation_by("");
|
||||
}
|
||||
WQLObject runpointwo = WQLObject.getWQLObject("acs_device_runpoint");
|
||||
JSONObject json = runpointwo.query("device_code ='" + device_code + "'").uniqueResult(0);
|
||||
if (!ObjectUtil.isEmpty(json)) {
|
||||
@@ -1014,12 +1119,24 @@ public class DeviceServiceImpl implements DeviceService, ApplicationAutoInitial
|
||||
obj.setHasgoods(hasGoodStatus);
|
||||
obj.setMaterial_type(material_type);
|
||||
obj.setBatch(batch);
|
||||
obj.setModel(model);
|
||||
obj.setProcess(process);
|
||||
obj.setWeight(weight);
|
||||
obj.setQc_status(qc_status);
|
||||
obj.setDate(date);
|
||||
obj.setOperation_by(operation_by);
|
||||
device.setHas_goods(Integer.parseInt(hasGoodStatus));
|
||||
device.setMaterial_type(material_type);
|
||||
device.setRemark(remark);
|
||||
device.setQuantity(quantity);
|
||||
device.setBatch(batch);
|
||||
device.setIslock(islock);
|
||||
device.setModel(model);
|
||||
device.setProcess(process);
|
||||
device.setWeight(weight);
|
||||
device.setQc_status(qc_status);
|
||||
device.setDate(date);
|
||||
device.setOperation_by(operation_by);
|
||||
JSONObject updatejson = JSONObject.fromObject(obj);
|
||||
runpointwo.update(updatejson, "device_code = '" + device_code + "'");
|
||||
}
|
||||
@@ -1061,6 +1178,109 @@ public class DeviceServiceImpl implements DeviceService, ApplicationAutoInitial
|
||||
device.setBatch(batch);
|
||||
device.setIslock(islock);
|
||||
}
|
||||
// 检测站点_smaet200
|
||||
else if (device.getDeviceDriver() instanceof StandardInspectSiteSmartDeviceDriver) {
|
||||
standardInspectSiteSmartDeviceDriver = (StandardInspectSiteSmartDeviceDriver) device.getDeviceDriver();
|
||||
if (!StrUtil.isEmpty(hasGoodStatus)) {
|
||||
standardInspectSiteSmartDeviceDriver.setHasGoods(Integer.parseInt(hasGoodStatus));
|
||||
device.setHas_goods(Integer.parseInt(hasGoodStatus));
|
||||
}
|
||||
if (StrUtil.isNotEmpty(material_type)) {
|
||||
standardInspectSiteSmartDeviceDriver.setMaterial(material_type);
|
||||
device.setMaterial_type(material_type);
|
||||
} else {
|
||||
standardInspectSiteSmartDeviceDriver.setMaterial("");
|
||||
device.setMaterial_type("");
|
||||
}
|
||||
if (StrUtil.isNotEmpty(batch)) {
|
||||
standardInspectSiteSmartDeviceDriver.setBatch(batch);
|
||||
device.setBatch(batch);
|
||||
} else {
|
||||
standardInspectSiteSmartDeviceDriver.setBatch("");
|
||||
device.setBatch("");
|
||||
}
|
||||
if (!StrUtil.isEmpty(put_goods_time)) {
|
||||
standardInspectSiteSmartDeviceDriver.setPut_goods_time(put_goods_time);
|
||||
device.setPut_goods_time(put_goods_time);
|
||||
} else {
|
||||
standardInspectSiteSmartDeviceDriver.setPut_goods_time("");
|
||||
device.setPut_goods_time("");
|
||||
}
|
||||
if (StrUtil.isNotEmpty(islock)) {
|
||||
standardInspectSiteSmartDeviceDriver.setIslock(Boolean.valueOf(islock));
|
||||
device.setIslock(islock);
|
||||
}
|
||||
if (StrUtil.isNotEmpty(model)) {
|
||||
standardInspectSiteSmartDeviceDriver.setModel(model);
|
||||
device.setModel(model);
|
||||
} else {
|
||||
standardInspectSiteSmartDeviceDriver.setModel("");
|
||||
device.setModel("");
|
||||
}
|
||||
if (StrUtil.isNotEmpty(process)) {
|
||||
standardInspectSiteSmartDeviceDriver.setProcess(process);
|
||||
device.setProcess(process);
|
||||
} else {
|
||||
standardInspectSiteSmartDeviceDriver.setProcess("");
|
||||
device.setProcess("");
|
||||
}
|
||||
if (StrUtil.isNotEmpty(weight)) {
|
||||
standardInspectSiteSmartDeviceDriver.setWeight(weight);
|
||||
device.setWeight(weight);
|
||||
} else {
|
||||
standardInspectSiteSmartDeviceDriver.setWeight("");
|
||||
device.setWeight("");
|
||||
}
|
||||
if (StrUtil.isNotEmpty(qc_status)) {
|
||||
standardInspectSiteSmartDeviceDriver.setQc_status(qc_status);
|
||||
device.setQc_status(qc_status);
|
||||
} else {
|
||||
standardInspectSiteSmartDeviceDriver.setQc_status("");
|
||||
device.setQc_status("");
|
||||
}
|
||||
if (StrUtil.isNotEmpty(date)) {
|
||||
standardInspectSiteSmartDeviceDriver.setDate(date);
|
||||
device.setDate(date);
|
||||
} else {
|
||||
standardInspectSiteSmartDeviceDriver.setDate("");
|
||||
device.setDate("");
|
||||
}
|
||||
if (StrUtil.isNotEmpty(operation_by)) {
|
||||
standardInspectSiteSmartDeviceDriver.setOperation_by(operation_by);
|
||||
device.setOperation_by(operation_by);
|
||||
} else {
|
||||
standardInspectSiteSmartDeviceDriver.setOperation_by("");
|
||||
device.setOperation_by("");
|
||||
}
|
||||
WQLObject runpointwo = WQLObject.getWQLObject("acs_device_runpoint");
|
||||
JSONObject json = runpointwo.query("device_code ='" + device_code + "'").uniqueResult(0);
|
||||
if (!ObjectUtil.isEmpty(json)) {
|
||||
DeviceRunpointDto obj = (DeviceRunpointDto) JSONObject.toBean(json, DeviceRunpointDto.class);
|
||||
obj.setHasgoods(hasGoodStatus);
|
||||
obj.setMaterial_type(material_type);
|
||||
obj.setBatch(batch);
|
||||
obj.setModel(model);
|
||||
obj.setProcess(process);
|
||||
obj.setWeight(weight);
|
||||
obj.setQc_status(qc_status);
|
||||
obj.setDate(date);
|
||||
obj.setOperation_by(operation_by);
|
||||
device.setHas_goods(Integer.parseInt(hasGoodStatus));
|
||||
device.setMaterial_type(material_type);
|
||||
device.setRemark(remark);
|
||||
device.setQuantity(quantity);
|
||||
device.setBatch(batch);
|
||||
device.setIslock(islock);
|
||||
device.setModel(model);
|
||||
device.setProcess(process);
|
||||
device.setWeight(weight);
|
||||
device.setQc_status(qc_status);
|
||||
device.setDate(date);
|
||||
device.setOperation_by(operation_by);
|
||||
JSONObject updatejson = JSONObject.fromObject(obj);
|
||||
runpointwo.update(updatejson, "device_code = '" + device_code + "'");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
Binary file not shown.
@@ -4,7 +4,9 @@ import cn.hutool.core.date.DateUtil;
|
||||
import cn.hutool.core.util.IdUtil;
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import lombok.Data;
|
||||
import lombok.Getter;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import lombok.Setter;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import net.sf.json.JSONArray;
|
||||
import net.sf.json.JSONObject;
|
||||
@@ -101,6 +103,24 @@ public class SsjCacheSiteDeviceDriver extends AbstractDeviceDriver implements De
|
||||
|
||||
int move;
|
||||
|
||||
// 手持设备信息
|
||||
private String model;
|
||||
|
||||
// 工序
|
||||
private String process;
|
||||
|
||||
// 重量
|
||||
private String weight;
|
||||
|
||||
// 质量状态
|
||||
private String qc_status;
|
||||
|
||||
// 日期
|
||||
private String date;
|
||||
|
||||
// 操作员
|
||||
private String operation_by;
|
||||
|
||||
@Override
|
||||
public void execute() {
|
||||
hasGoods = this.getDevice().getHas_goods();
|
||||
|
||||
@@ -53,6 +53,8 @@ public class StandardInspectSiteSmartDeviceDriver extends AbstractOpcDeviceDrive
|
||||
TaskService taskserver = SpringContextHolder.getBean("taskServiceImpl");
|
||||
@Autowired
|
||||
DeviceAppService deviceAppservice = SpringContextHolder.getBean(DeviceAppService.class);
|
||||
@Autowired
|
||||
DeviceService deviceService;
|
||||
String container;
|
||||
String container_type_desc;
|
||||
String last_container_type_desc;
|
||||
@@ -124,6 +126,28 @@ public class StandardInspectSiteSmartDeviceDriver extends AbstractOpcDeviceDrive
|
||||
|
||||
String devicecode;
|
||||
|
||||
// 手持设备信息
|
||||
private String model;
|
||||
|
||||
// 工序
|
||||
private String process;
|
||||
|
||||
// 重量
|
||||
private String weight;
|
||||
|
||||
// 质量状态
|
||||
private String qc_status;
|
||||
|
||||
// 日期
|
||||
private String date;
|
||||
|
||||
// 操作员
|
||||
private String operation_by;
|
||||
|
||||
String put_goods_time = "";
|
||||
|
||||
Boolean islock = false;
|
||||
|
||||
@Override
|
||||
public Device getDevice() {
|
||||
return this.device;
|
||||
@@ -152,6 +176,25 @@ public class StandardInspectSiteSmartDeviceDriver extends AbstractOpcDeviceDrive
|
||||
this.execute_log.log("设备:" + device_code + ",last_mode -> mode:" + last_mode + "->" + mode);
|
||||
}
|
||||
if (move != last_move) {
|
||||
if (move == 0) {
|
||||
this.setHasGoods(0);
|
||||
device.setHas_goods(0);
|
||||
JSONObject jo = new JSONObject();
|
||||
jo.put("device_code", device_code);
|
||||
jo.put("hasGoodStatus", "0");
|
||||
jo.put("batch", "");
|
||||
jo.put("material_type", "");
|
||||
jo.put("put_goods_time", "");
|
||||
jo.put("model", "");
|
||||
jo.put("process", "");
|
||||
jo.put("weight", "");
|
||||
jo.put("qc_status", "");
|
||||
jo.put("date", "");
|
||||
jo.put("operation_by", "");
|
||||
deviceService.changeDeviceStatus(jo);
|
||||
this.setMaterial("");
|
||||
this.setBatch("");
|
||||
}
|
||||
this.execute_log.setResource(this.devicecode, this.device.getDevice_name());
|
||||
this.execute_log.log("设备:" + device_code + ",last_move -> move:" + last_mode + "->" + move);
|
||||
}
|
||||
@@ -428,9 +471,11 @@ public class StandardInspectSiteSmartDeviceDriver extends AbstractOpcDeviceDrive
|
||||
public boolean instruction_require(String container_code) {
|
||||
return instruction_require(container_code, WcsConfig.task_container_type_default_desc);
|
||||
}
|
||||
|
||||
public synchronized boolean apply_empty_require(String container_code) {
|
||||
return apply_empty_require(container_code, WcsConfig.task_container_type_default_desc);
|
||||
}
|
||||
|
||||
public synchronized boolean apply_in_require(String container_code) {
|
||||
return apply_in_require(container_code, WcsConfig.task_container_type_default_desc);
|
||||
}
|
||||
|
||||
@@ -102,6 +102,24 @@ public class StandardOrdinarySiteDeviceDriver extends AbstractDeviceDriver imple
|
||||
|
||||
int move;
|
||||
|
||||
// 手持设备信息
|
||||
private String model;
|
||||
|
||||
// 工序
|
||||
private String process;
|
||||
|
||||
// 重量
|
||||
private String weight;
|
||||
|
||||
// 质量状态
|
||||
private String qc_status;
|
||||
|
||||
// 日期
|
||||
private String date;
|
||||
|
||||
// 操作员
|
||||
private String operation_by;
|
||||
|
||||
@Override
|
||||
public void execute() {
|
||||
hasGoods = this.getDevice().getHas_goods();
|
||||
|
||||
@@ -59,6 +59,24 @@ public class DeviceManageDto {
|
||||
//人工确认信号 默认0 agv到达后请求置1 等人工确认后变为2 反馈agv后继续为0
|
||||
private int manua_confirm = 0;
|
||||
|
||||
// 手持设备信息
|
||||
private String model;
|
||||
|
||||
// 工序
|
||||
private String process;
|
||||
|
||||
// 重量
|
||||
private String weight;
|
||||
|
||||
// 质量状态
|
||||
private String qc_status;
|
||||
|
||||
// 日期
|
||||
private String date;
|
||||
|
||||
// 操作员
|
||||
private String operation_by;
|
||||
|
||||
private List<DeviceExtraManageDto> extra = new LinkedList();
|
||||
private String perfix;
|
||||
private Map<String, Object> extra_map = new LinkedHashMap();
|
||||
|
||||
@@ -55,10 +55,22 @@ public class DeviceManageServiceImpl implements DeviceManageService {
|
||||
String material_type = runpointTab.query("is_delete= '0' AND is_active= '1' AND device_id = '" + extra.getDevice_id() + "'").uniqueResult(0).optString("material_type");
|
||||
String batch = runpointTab.query("is_delete= '0' AND is_active= '1' AND device_id = '" + extra.getDevice_id() + "'").uniqueResult(0).optString("batch");
|
||||
String islock = runpointTab.query("is_delete= '0' AND is_active= '1' AND device_id = '" + extra.getDevice_id() + "'").uniqueResult(0).optString("islock");
|
||||
String model = runpointTab.query("is_delete= '0' AND is_active= '1' AND device_id = '" + extra.getDevice_id() + "'").uniqueResult(0).optString("model");
|
||||
String process = runpointTab.query("is_delete= '0' AND is_active= '1' AND device_id = '" + extra.getDevice_id() + "'").uniqueResult(0).optString("process");
|
||||
String weight = runpointTab.query("is_delete= '0' AND is_active= '1' AND device_id = '" + extra.getDevice_id() + "'").uniqueResult(0).optString("weight");
|
||||
String qc_status = runpointTab.query("is_delete= '0' AND is_active= '1' AND device_id = '" + extra.getDevice_id() + "'").uniqueResult(0).optString("qc_status");
|
||||
String date = runpointTab.query("is_delete= '0' AND is_active= '1' AND device_id = '" + extra.getDevice_id() + "'").uniqueResult(0).optString("date");
|
||||
String operation_by = runpointTab.query("is_delete= '0' AND is_active= '1' AND device_id = '" + extra.getDevice_id() + "'").uniqueResult(0).optString("operation_by");
|
||||
device.setMaterial_type(material_type);
|
||||
device.setHas_goods(Integer.parseInt(has_goods));
|
||||
device.setBatch(batch);
|
||||
device.setIslock(islock);
|
||||
device.setModel(model);
|
||||
device.setProcess(process);
|
||||
device.setWeight(weight);
|
||||
device.setQc_status(qc_status);
|
||||
device.setDate(date);
|
||||
device.setOperation_by(operation_by);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -48,8 +48,8 @@ public class SSJHandController {
|
||||
//@PreAuthorize("@el.check('sect:list')")
|
||||
//@RequestBody JSONObject json
|
||||
public ResponseEntity<Object> queryPoint(@RequestBody Map<String, String> whereJson) {
|
||||
String region = (String) whereJson.get("region");
|
||||
return new ResponseEntity<>(HandService.queryPointByArea(region), HttpStatus.OK);
|
||||
// String region = (String) whereJson.get("region");
|
||||
return new ResponseEntity<>(HandService.queryPointByArea(whereJson), HttpStatus.OK);
|
||||
}
|
||||
|
||||
@PostMapping("/point/storage")
|
||||
|
||||
@@ -24,7 +24,7 @@ public interface SSJHandService {
|
||||
*
|
||||
* @return Map<String, Object>
|
||||
*/
|
||||
Map<String, Object> queryPointByArea(String dict_id);
|
||||
Map<String, Object> queryPointByArea(Map<String, String> whereJson);
|
||||
|
||||
/**
|
||||
* 查询设备扩展性
|
||||
|
||||
@@ -18,7 +18,9 @@ import org.nl.acs.device.service.dto.DeviceDto;
|
||||
import org.nl.acs.device.service.impl.DeviceServiceImpl;
|
||||
import org.nl.acs.device_driver.ssj_cache_site.SsjCacheSiteDeviceDriver;
|
||||
import org.nl.acs.device_driver.standard_inspect_site.StandardInspectSiteDeviceDriver;
|
||||
import org.nl.acs.device_driver.standard_inspect_site_smart200.StandardInspectSiteSmartDeviceDriver;
|
||||
import org.nl.acs.device_driver.standard_manipulator_inspect_site.StandardManipulatorInspectSiteDeviceDriver;
|
||||
import org.nl.acs.device_driver.standard_ordinary_site.StandardOrdinarySiteDeviceDriver;
|
||||
import org.nl.acs.instruction.service.InstructionService;
|
||||
import org.nl.acs.instruction.service.dto.Instruction;
|
||||
import org.nl.acs.instruction.service.dto.InstructionDto;
|
||||
@@ -79,11 +81,12 @@ public class SSJHandServiceImpl implements SSJHandService {
|
||||
}
|
||||
|
||||
@Override
|
||||
public Map<String, Object> queryPointByArea(String dict_id) {
|
||||
public Map<String, Object> queryPointByArea(Map<String, String> whereJson) {
|
||||
JSONArray resultArr = new JSONArray();
|
||||
JSONObject resultJson = new JSONObject();
|
||||
JSONObject jo = new JSONObject();
|
||||
|
||||
String dict_id = whereJson.get("region");
|
||||
if (StrUtil.isEmpty(dict_id)) {
|
||||
throw new BadRequestException("区域id不能为空!");
|
||||
}
|
||||
@@ -95,6 +98,18 @@ public class SSJHandServiceImpl implements SSJHandService {
|
||||
String material = "";
|
||||
String batch = "";
|
||||
|
||||
// 判断有没有物料类型和批次条件
|
||||
String material_type = whereJson.get("material_type");
|
||||
String where_batch = whereJson.get("batch");
|
||||
boolean have_material_type = false;
|
||||
if (StrUtil.isNotEmpty(material_type)) {
|
||||
have_material_type = true;
|
||||
}
|
||||
boolean have_where_batch = false;
|
||||
if (StrUtil.isNotEmpty(where_batch)) {
|
||||
have_where_batch = true;
|
||||
}
|
||||
|
||||
//再字典中查询出value
|
||||
//JSONObject valuejo = WQLObject.getWQLObject("sys_dict_detail").query("detail_id='" + dict_id + "'").uniqueResult(0);
|
||||
JSONObject valuejo = WQL.getWO("QSSJ_QUERY001").addParam("flag", "3").addParam("detail_id", dict_id).process().uniqueResult(0);
|
||||
@@ -114,9 +129,23 @@ public class SSJHandServiceImpl implements SSJHandService {
|
||||
StandardInspectSiteDeviceDriver standardInspectSiteDeviceDriver;
|
||||
//区域管制设备交互站点
|
||||
StandardManipulatorInspectSiteDeviceDriver standardManipulatorInspectSiteDeviceDriver;
|
||||
// 检测站点_smaet200
|
||||
StandardInspectSiteSmartDeviceDriver standardInspectSiteSmartDeviceDriver;
|
||||
// 普通站点
|
||||
StandardOrdinarySiteDeviceDriver standardOrdinarySiteDeviceDriver;
|
||||
|
||||
if (device.getDeviceDriver() instanceof SsjCacheSiteDeviceDriver) {
|
||||
ssjCacheSiteDeviceDriver = (SsjCacheSiteDeviceDriver) device.getDeviceDriver();
|
||||
|
||||
// 如果有物料类型条件且物料类型对不上,进入下一轮循环
|
||||
if (have_material_type && !StrUtil.equals(device.getMaterial_type(), material_type)) {
|
||||
continue;
|
||||
}
|
||||
// 如果有批次条件且批次对不上,进入下一轮循环
|
||||
if (have_where_batch && !StrUtil.equals(device.getBatch(), where_batch)) {
|
||||
continue;
|
||||
}
|
||||
|
||||
if (StrUtil.equals(device.getIslock(), "true")) {
|
||||
status = "3";
|
||||
move = "有任务";
|
||||
@@ -161,6 +190,12 @@ public class SSJHandServiceImpl implements SSJHandService {
|
||||
jo.put("device_name", devicejo.optString("device_name"));
|
||||
jo.put("allow_update", "1");
|
||||
jo.put("input_material", input_material);
|
||||
jo.put("model", device.getModel());
|
||||
jo.put("process", device.getProcess());
|
||||
jo.put("weight", device.getWeight());
|
||||
jo.put("qc_status", device.getQc_status());
|
||||
jo.put("date", device.getDate());
|
||||
jo.put("operation_by", device.getOperation_by());
|
||||
// 特殊驱动
|
||||
}
|
||||
//检测站点
|
||||
@@ -222,6 +257,133 @@ public class SSJHandServiceImpl implements SSJHandService {
|
||||
jo.put("batch", standardManipulatorInspectSiteDeviceDriver.getBatch());
|
||||
jo.put("input_material", input_material);
|
||||
}
|
||||
// 检测站点_smaet200
|
||||
else if (device.getDeviceDriver() instanceof StandardInspectSiteSmartDeviceDriver) {
|
||||
standardInspectSiteSmartDeviceDriver = (StandardInspectSiteSmartDeviceDriver) device.getDeviceDriver();
|
||||
|
||||
// 如果有物料类型条件且物料类型对不上,进入下一轮循环
|
||||
if (have_material_type && !StrUtil.equals(device.getMaterial_type(), material_type)) {
|
||||
continue;
|
||||
}
|
||||
// 如果有批次条件且批次对不上,进入下一轮循环
|
||||
if (have_where_batch && !StrUtil.equals(device.getBatch(), where_batch)) {
|
||||
continue;
|
||||
}
|
||||
|
||||
if (StrUtil.equals(device.getIslock(), "true")) {
|
||||
status = "3";
|
||||
move = "有任务";
|
||||
} else {
|
||||
if (standardInspectSiteSmartDeviceDriver.getHasGoods() == 0) {
|
||||
status = "0";
|
||||
move = "无货";
|
||||
} else if (standardInspectSiteSmartDeviceDriver.getHasGoods() == 1) {
|
||||
status = "1";
|
||||
move = "有托盘";
|
||||
} else if (standardInspectSiteSmartDeviceDriver.getHasGoods() == 2) {
|
||||
status = "2";
|
||||
move = "有托盘有货";
|
||||
}
|
||||
}
|
||||
|
||||
material = device.getMaterial_type();
|
||||
if (StrUtil.isNullOrUndefined(material)) {
|
||||
material = "";
|
||||
}
|
||||
batch = device.getBatch();
|
||||
if (StrUtil.isNullOrUndefined(batch)) {
|
||||
batch = "";
|
||||
}
|
||||
String input_materialflag = (String) device.getExtraValue().get("input_material");
|
||||
if (!StrUtil.isEmpty(input_materialflag) && input_materialflag.equals("false")) {
|
||||
input_material = "0";
|
||||
}
|
||||
if (!StrUtil.isEmpty(input_materialflag) && input_materialflag.equals("true")) {
|
||||
input_material = "1";
|
||||
}
|
||||
jo.put("material_type", material);
|
||||
jo.put("batch", batch);
|
||||
jo.put("put_goods_time", device.getPut_goods_time());
|
||||
jo.put("islock", device.getIslock());
|
||||
jo.put("status_name", move);
|
||||
jo.put("status", status);
|
||||
jo.put("device_id", devicejo.optString("device_id"));
|
||||
jo.put("device_code", devicejo.optString("device_code"));
|
||||
jo.put("device_name", devicejo.optString("device_name"));
|
||||
jo.put("allow_update", "1");
|
||||
jo.put("input_material", input_material);
|
||||
jo.put("model", device.getModel());
|
||||
jo.put("process", device.getProcess());
|
||||
jo.put("weight", device.getWeight());
|
||||
jo.put("qc_status", device.getQc_status());
|
||||
jo.put("date", device.getDate());
|
||||
jo.put("operation_by", device.getOperation_by());
|
||||
}
|
||||
// 普通站点
|
||||
else if (device.getDeviceDriver() instanceof StandardOrdinarySiteDeviceDriver) {
|
||||
standardOrdinarySiteDeviceDriver = (StandardOrdinarySiteDeviceDriver) device.getDeviceDriver();
|
||||
|
||||
// 如果有物料类型条件且物料类型对不上,进入下一轮循环
|
||||
if (have_material_type && !StrUtil.equals(device.getMaterial_type(), material_type)) {
|
||||
continue;
|
||||
}
|
||||
// 如果有批次条件且批次对不上,进入下一轮循环
|
||||
if (have_where_batch && !StrUtil.equals(device.getBatch(), where_batch)) {
|
||||
continue;
|
||||
}
|
||||
|
||||
if (StrUtil.equals(device.getIslock(), "true")) {
|
||||
status = "3";
|
||||
move = "有任务";
|
||||
} else {
|
||||
if (standardOrdinarySiteDeviceDriver.getHasGoods() == 0) {
|
||||
status = "0";
|
||||
move = "无货";
|
||||
} else if (standardOrdinarySiteDeviceDriver.getHasGoods() == 1) {
|
||||
status = "1";
|
||||
move = "有托盘";
|
||||
} else if (standardOrdinarySiteDeviceDriver.getHasGoods() == 2) {
|
||||
status = "2";
|
||||
move = "有托盘有货";
|
||||
}
|
||||
}
|
||||
|
||||
material = device.getMaterial_type();
|
||||
//material = standardOrdinarySiteDeviceDriver.getMaterial();
|
||||
if (StrUtil.isNullOrUndefined(material)) {
|
||||
material = "";
|
||||
}
|
||||
batch = device.getBatch();
|
||||
//batch = standardOrdinarySiteDeviceDriver.getBatch();
|
||||
if (StrUtil.isNullOrUndefined(batch)) {
|
||||
batch = "";
|
||||
}
|
||||
String input_materialflag = (String) device.getExtraValue().get("input_material");
|
||||
if (!StrUtil.isEmpty(input_materialflag) && input_materialflag.equals("false")) {
|
||||
input_material = "0";
|
||||
}
|
||||
if (!StrUtil.isEmpty(input_materialflag) && input_materialflag.equals("true")) {
|
||||
input_material = "1";
|
||||
}
|
||||
jo.put("material_type", material);
|
||||
jo.put("batch", batch);
|
||||
jo.put("put_goods_time", device.getPut_goods_time());
|
||||
jo.put("islock", device.getIslock());
|
||||
jo.put("status_name", move);
|
||||
jo.put("status", status);
|
||||
jo.put("device_id", devicejo.optString("device_id"));
|
||||
jo.put("device_code", devicejo.optString("device_code"));
|
||||
jo.put("device_name", devicejo.optString("device_name"));
|
||||
jo.put("allow_update", "1");
|
||||
jo.put("input_material", input_material);
|
||||
jo.put("model", device.getModel());
|
||||
jo.put("process", device.getProcess());
|
||||
jo.put("weight", device.getWeight());
|
||||
jo.put("qc_status", device.getQc_status());
|
||||
jo.put("date", device.getDate());
|
||||
jo.put("operation_by", device.getOperation_by());
|
||||
// 特殊驱动
|
||||
}
|
||||
resultArr.add(jo);
|
||||
}
|
||||
resultJson.put("code", "1");
|
||||
@@ -463,6 +625,12 @@ public class SSJHandServiceImpl implements SSJHandService {
|
||||
String status = jsonObject.get("status");
|
||||
String material_type = jsonObject.get("material_type");
|
||||
String batch = jsonObject.get("batch");
|
||||
String model = jsonObject.get("model");
|
||||
String process = jsonObject.get("process");
|
||||
String weight = jsonObject.get("weight");
|
||||
String qc_status = jsonObject.get("qc_status");
|
||||
String date = jsonObject.get("date");
|
||||
String operation_by = jsonObject.get("operation_by");
|
||||
JSONObject resultJson = new JSONObject();
|
||||
DeviceService deviceService = SpringContextHolder.getBean(DeviceServiceImpl.class);
|
||||
|
||||
@@ -474,6 +642,10 @@ public class SSJHandServiceImpl implements SSJHandService {
|
||||
StandardInspectSiteDeviceDriver standardInspectSiteDeviceDriver;
|
||||
//区域管制设备站点
|
||||
StandardManipulatorInspectSiteDeviceDriver standardManipulatorInspectSiteDeviceDriver;
|
||||
// 检测站点_smaet200
|
||||
StandardInspectSiteSmartDeviceDriver standardInspectSiteSmartDeviceDriver;
|
||||
// 普通站点
|
||||
StandardOrdinarySiteDeviceDriver standardOrdinarySiteDeviceDriver;
|
||||
|
||||
DeviceDto dto = deviceService.findByCode(device_code);
|
||||
|
||||
@@ -504,6 +676,12 @@ public class SSJHandServiceImpl implements SSJHandService {
|
||||
jo.put("hasGoodStatus", status);
|
||||
jo.put("batch", batch);
|
||||
jo.put("material_type", material_type);
|
||||
jo.put("model", model);
|
||||
jo.put("process", process);
|
||||
jo.put("weight", weight);
|
||||
jo.put("qc_status", qc_status);
|
||||
jo.put("date", date);
|
||||
jo.put("operation_by", operation_by);
|
||||
deviceService.changeDeviceStatus(jo);
|
||||
if (!StrUtil.isEmpty(material_type)) {
|
||||
ssjCacheSiteDeviceDriver.setMaterial(material_type);
|
||||
@@ -512,6 +690,39 @@ public class SSJHandServiceImpl implements SSJHandService {
|
||||
ssjCacheSiteDeviceDriver.setBatch(batch);
|
||||
}
|
||||
}
|
||||
if (device.getDeviceDriver() instanceof StandardInspectSiteSmartDeviceDriver) {
|
||||
standardInspectSiteSmartDeviceDriver = (StandardInspectSiteSmartDeviceDriver) device.getDeviceDriver();
|
||||
|
||||
if (StrUtil.equals("0", material_type)) {
|
||||
status = "0";
|
||||
}
|
||||
if (StrUtil.equals("1", material_type)) {
|
||||
status = "1";
|
||||
}
|
||||
if ("2,3,4,5".contains(material_type)) {
|
||||
status = "2";
|
||||
}
|
||||
standardInspectSiteSmartDeviceDriver.setHasGoods(Integer.parseInt(status));
|
||||
device.setHas_goods(Integer.parseInt(status));
|
||||
JSONObject jo = new JSONObject();
|
||||
jo.put("device_code", device_code);
|
||||
jo.put("hasGoodStatus", status);
|
||||
jo.put("batch", batch);
|
||||
jo.put("material_type", material_type);
|
||||
jo.put("model", model);
|
||||
jo.put("process", process);
|
||||
jo.put("weight", weight);
|
||||
jo.put("qc_status", qc_status);
|
||||
jo.put("date", date);
|
||||
jo.put("operation_by", operation_by);
|
||||
deviceService.changeDeviceStatus(jo);
|
||||
if (!StrUtil.isEmpty(material_type)) {
|
||||
standardInspectSiteSmartDeviceDriver.setMaterial(material_type);
|
||||
}
|
||||
if (!StrUtil.isEmpty(batch)) {
|
||||
standardInspectSiteSmartDeviceDriver.setBatch(batch);
|
||||
}
|
||||
}
|
||||
if (device.getDeviceDriver() instanceof StandardInspectSiteDeviceDriver) {
|
||||
standardInspectSiteDeviceDriver = (StandardInspectSiteDeviceDriver) device.getDeviceDriver();
|
||||
standardInspectSiteDeviceDriver.setMaterial(material_type);
|
||||
@@ -526,6 +737,39 @@ public class SSJHandServiceImpl implements SSJHandService {
|
||||
standardManipulatorInspectSiteDeviceDriver.setBatch(batch);
|
||||
device.setBatch(batch);
|
||||
}
|
||||
if (device.getDeviceDriver() instanceof StandardOrdinarySiteDeviceDriver) {
|
||||
standardOrdinarySiteDeviceDriver = (StandardOrdinarySiteDeviceDriver) device.getDeviceDriver();
|
||||
|
||||
if (StrUtil.equals("0", material_type)) {
|
||||
status = "0";
|
||||
}
|
||||
if (StrUtil.equals("1", material_type)) {
|
||||
status = "1";
|
||||
}
|
||||
if ("2,3,4,5".contains(material_type)) {
|
||||
status = "2";
|
||||
}
|
||||
standardOrdinarySiteDeviceDriver.setHasGoods(Integer.parseInt(status));
|
||||
device.setHas_goods(Integer.parseInt(status));
|
||||
JSONObject jo = new JSONObject();
|
||||
jo.put("device_code", device_code);
|
||||
jo.put("hasGoodStatus", status);
|
||||
jo.put("batch", batch);
|
||||
jo.put("material_type", material_type);
|
||||
jo.put("model", model);
|
||||
jo.put("process", process);
|
||||
jo.put("weight", weight);
|
||||
jo.put("qc_status", qc_status);
|
||||
jo.put("date", date);
|
||||
jo.put("operation_by", operation_by);
|
||||
deviceService.changeDeviceStatus(jo);
|
||||
if (!StrUtil.isEmpty(material_type)) {
|
||||
standardOrdinarySiteDeviceDriver.setMaterial(material_type);
|
||||
}
|
||||
if (!StrUtil.isEmpty(batch)) {
|
||||
standardOrdinarySiteDeviceDriver.setBatch(batch);
|
||||
}
|
||||
}
|
||||
}
|
||||
//清空
|
||||
if (type.equals("2")) {
|
||||
@@ -539,10 +783,36 @@ public class SSJHandServiceImpl implements SSJHandService {
|
||||
jo.put("batch", "");
|
||||
jo.put("material_type", "");
|
||||
jo.put("put_goods_time", "");
|
||||
jo.put("model", "");
|
||||
jo.put("process", "");
|
||||
jo.put("weight", "");
|
||||
jo.put("qc_status", "");
|
||||
jo.put("date", "");
|
||||
jo.put("operation_by", "");
|
||||
deviceService.changeDeviceStatus(jo);
|
||||
ssjCacheSiteDeviceDriver.setMaterial("");
|
||||
ssjCacheSiteDeviceDriver.setBatch("");
|
||||
}
|
||||
if (device.getDeviceDriver() instanceof StandardInspectSiteSmartDeviceDriver) {
|
||||
standardInspectSiteSmartDeviceDriver = (StandardInspectSiteSmartDeviceDriver) device.getDeviceDriver();
|
||||
standardInspectSiteSmartDeviceDriver.setHasGoods(0);
|
||||
device.setHas_goods(0);
|
||||
JSONObject jo = new JSONObject();
|
||||
jo.put("device_code", device_code);
|
||||
jo.put("hasGoodStatus", "0");
|
||||
jo.put("batch", "");
|
||||
jo.put("material_type", "");
|
||||
jo.put("put_goods_time", "");
|
||||
jo.put("model", "");
|
||||
jo.put("process", "");
|
||||
jo.put("weight", "");
|
||||
jo.put("qc_status", "");
|
||||
jo.put("date", "");
|
||||
jo.put("operation_by", "");
|
||||
deviceService.changeDeviceStatus(jo);
|
||||
standardInspectSiteSmartDeviceDriver.setMaterial("");
|
||||
standardInspectSiteSmartDeviceDriver.setBatch("");
|
||||
}
|
||||
if (device.getDeviceDriver() instanceof StandardInspectSiteDeviceDriver) {
|
||||
standardInspectSiteDeviceDriver = (StandardInspectSiteDeviceDriver) device.getDeviceDriver();
|
||||
standardInspectSiteDeviceDriver.setMaterial("");
|
||||
@@ -557,6 +827,26 @@ public class SSJHandServiceImpl implements SSJHandService {
|
||||
standardManipulatorInspectSiteDeviceDriver.setBatch("");
|
||||
device.setBatch("");
|
||||
}
|
||||
if (device.getDeviceDriver() instanceof StandardOrdinarySiteDeviceDriver) {
|
||||
standardOrdinarySiteDeviceDriver = (StandardOrdinarySiteDeviceDriver) device.getDeviceDriver();
|
||||
standardOrdinarySiteDeviceDriver.setHasGoods(0);
|
||||
device.setHas_goods(0);
|
||||
JSONObject jo = new JSONObject();
|
||||
jo.put("device_code", device_code);
|
||||
jo.put("hasGoodStatus", "0");
|
||||
jo.put("batch", "");
|
||||
jo.put("material_type", "");
|
||||
jo.put("put_goods_time", "");
|
||||
jo.put("model", "");
|
||||
jo.put("process", "");
|
||||
jo.put("weight", "");
|
||||
jo.put("qc_status", "");
|
||||
jo.put("date", "");
|
||||
jo.put("operation_by", "");
|
||||
deviceService.changeDeviceStatus(jo);
|
||||
standardOrdinarySiteDeviceDriver.setMaterial("");
|
||||
standardOrdinarySiteDeviceDriver.setBatch("");
|
||||
}
|
||||
}
|
||||
resultJson.put("code", "1");
|
||||
resultJson.put("desc", "更新成功");
|
||||
|
||||
@@ -92,6 +92,11 @@
|
||||
<el-switch v-model="form.manual_create_task" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="是否输入物料" label-width="150px">
|
||||
<el-switch v-model="form.input_material" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<el-row>
|
||||
@@ -129,11 +134,11 @@
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="是否输入物料" label-width="150px">
|
||||
<el-switch v-model="form.input_material" />
|
||||
<el-tooltip class="item" effect="dark" content="创建设备点位记录有无货信号" placement="bottom-end">
|
||||
<el-form-item label="站点管理" label-width="150px">
|
||||
<el-switch v-model="form.station_manager" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-tooltip>
|
||||
</el-row>
|
||||
</el-form>
|
||||
</el-card>
|
||||
|
||||
Reference in New Issue
Block a user