rev:修改工单状态为枚举判断;
This commit is contained in:
@@ -53,11 +53,11 @@ public enum StatusEnum {
|
|||||||
START_CACHELINE("2","启动",""),
|
START_CACHELINE("2","启动",""),
|
||||||
|
|
||||||
//设备状态枚举1-关机、2-开机、3-生产中、4-待机、5-故障
|
//设备状态枚举1-关机、2-开机、3-生产中、4-待机、5-故障
|
||||||
DEVICE_STATUS_OFF("1","启动",""),
|
DEVICE_STATUS_OFF("1","关机",""),
|
||||||
DEVICE_STATUS_ON("2","启动",""),
|
DEVICE_STATUS_ON("2","开机",""),
|
||||||
DEVICE_STATUS_RUNING("3","启动",""),
|
DEVICE_STATUS_RUNING("3","生产中",""),
|
||||||
DEVICE_STATUS_WAITING("4","启动",""),
|
DEVICE_STATUS_WAITING("4","待机",""),
|
||||||
DEVICE_STATUS_ERROR("5","启动",""),
|
DEVICE_STATUS_ERROR("5","故障",""),
|
||||||
|
|
||||||
// 点位表点位状态
|
// 点位表点位状态
|
||||||
POINT_STATUS_EMPTY("1", "空位", ""),
|
POINT_STATUS_EMPTY("1", "空位", ""),
|
||||||
|
|||||||
@@ -14,6 +14,7 @@ import com.alibaba.fastjson.JSONObject;
|
|||||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||||
import lombok.RequiredArgsConstructor;
|
import lombok.RequiredArgsConstructor;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
import org.nl.common.enums.StatusEnum;
|
||||||
import org.nl.common.enums.WorkerOrderEnum;
|
import org.nl.common.enums.WorkerOrderEnum;
|
||||||
import org.nl.common.utils.MapOf;
|
import org.nl.common.utils.MapOf;
|
||||||
import org.nl.common.utils.api.CommonResult;
|
import org.nl.common.utils.api.CommonResult;
|
||||||
@@ -219,21 +220,24 @@ public class ProduceshiftorderServiceImpl implements ProduceshiftorderService{
|
|||||||
List<DeviceDto> list = WQL.getWO("ONEPART_QUERY").addParam("flag", "1").addParam("condition", param).process().getResultJSONArray(0).toJavaList(DeviceDto.class);
|
List<DeviceDto> list = WQL.getWO("ONEPART_QUERY").addParam("flag", "1").addParam("condition", param).process().getResultJSONArray(0).toJavaList(DeviceDto.class);
|
||||||
list.forEach(r -> {
|
list.forEach(r -> {
|
||||||
//状态为为关机
|
//状态为为关机
|
||||||
if(StrUtil.isEmpty(r.getDevice_status())) {
|
if(StrUtil.isNotEmpty(r.getDevice_status())) {
|
||||||
r.setDevice_status("1");
|
|
||||||
r.setDevice_status_name("关机");
|
|
||||||
}
|
|
||||||
else{
|
|
||||||
//不是关机与故障状态则为运行
|
//不是关机与故障状态则为运行
|
||||||
if(!Objects.equals(r.getDevice_status(), "1") && !Objects.equals(r.getDevice_status(), "5")) {
|
if(!Objects.equals(r.getDevice_status(), StatusEnum.DEVICE_STATUS_OFF.getCode()) && !Objects.equals(r.getDevice_status(), StatusEnum.DEVICE_STATUS_ERROR.getCode())) {
|
||||||
r.setIs_run("1");
|
r.setIs_run("1");
|
||||||
|
//todo 当前工单数
|
||||||
|
r.setJob_count("1");
|
||||||
}
|
}
|
||||||
else{
|
else{
|
||||||
r.setIs_run("0");
|
r.setIs_run("0");
|
||||||
|
r.setJob_count("0");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
//todo 当前工单数
|
else{
|
||||||
r.setJob_count("1");
|
r.setDevice_status(StatusEnum.DEVICE_STATUS_OFF.getCode());
|
||||||
|
r.setDevice_status_name("关机");
|
||||||
|
r.setIs_run("0");
|
||||||
|
r.setJob_count("0");
|
||||||
|
}
|
||||||
});
|
});
|
||||||
return list;
|
return list;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -82,6 +82,7 @@
|
|||||||
dict1.label shift_type_scode_name,
|
dict1.label shift_type_scode_name,
|
||||||
dict2.label order_status_name,
|
dict2.label order_status_name,
|
||||||
mater.material_name,
|
mater.material_name,
|
||||||
|
mater.material_code,
|
||||||
workorder.shift_type_scode,
|
workorder.shift_type_scode,
|
||||||
workprocedure.workprocedure_name,
|
workprocedure.workprocedure_name,
|
||||||
workorder.workorder_status order_status,
|
workorder.workorder_status order_status,
|
||||||
|
|||||||
@@ -260,18 +260,18 @@ public class CacheLineHandController{
|
|||||||
}
|
}
|
||||||
|
|
||||||
@PostMapping("/agvOutBoxExceptionQuery")
|
@PostMapping("/agvOutBoxExceptionQuery")
|
||||||
@Log("AGV出箱异常-查询")
|
@Log("AGV异常-查询")
|
||||||
@ApiOperation("AGV出箱异常-查询")
|
@ApiOperation("AGV异常-查询")
|
||||||
public ResponseEntity<JSONArray> agvOutBoxExceptionQuery(@RequestBody JSONObject param) {
|
public ResponseEntity<JSONArray> agvOutBoxExceptionQuery(@RequestBody JSONObject param) {
|
||||||
log.info("海亮缓存线手持服务 [AGV出箱异常-查询] 接口被请求, 请求参数-{}", param);
|
log.info("海亮缓存线手持服务 [AGV异常-查询] 接口被请求, 请求参数-{}", param);
|
||||||
return new ResponseEntity<>(cacheLineHandService.agvOutBoxExceptionQuery(param), HttpStatus.OK);
|
return new ResponseEntity<>(cacheLineHandService.agvOutBoxExceptionQuery(param), HttpStatus.OK);
|
||||||
}
|
}
|
||||||
|
|
||||||
@PostMapping("/agvOutBoxExceptionConfirm")
|
@PostMapping("/agvOutBoxExceptionConfirm")
|
||||||
@Log("AGV出箱异常-确认")
|
@Log("AGV异常-确认")
|
||||||
@ApiOperation("AGV出箱异常-确认")
|
@ApiOperation("AGV异常-确认")
|
||||||
public ResponseEntity<Object> agvOutBoxExceptionConfirm(@RequestBody JSONObject param) {
|
public ResponseEntity<Object> agvOutBoxExceptionConfirm(@RequestBody JSONObject param) {
|
||||||
log.info("海亮缓存线手持服务 [AGV出箱异常-确认] 接口被请求, 请求参数-{}", param);
|
log.info("海亮缓存线手持服务 [AGV异常-确认] 接口被请求, 请求参数-{}", param);
|
||||||
cacheLineHandService.agvOutBoxExceptionConfirm(param);
|
cacheLineHandService.agvOutBoxExceptionConfirm(param);
|
||||||
return new ResponseEntity<>(HttpStatus.OK);
|
return new ResponseEntity<>(HttpStatus.OK);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -574,7 +574,11 @@ public class CacheLineHandServiceImpl implements CacheLineHandService{
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 缓存线异常确认
|
||||||
|
*/
|
||||||
@Override
|
@Override
|
||||||
|
@Transactional(rollbackFor = Exception.class)
|
||||||
public CommonResult<JSONObject> cacheLineExcepOpt(JSONObject param) {
|
public CommonResult<JSONObject> cacheLineExcepOpt(JSONObject param) {
|
||||||
// 缓存线编码
|
// 缓存线编码
|
||||||
String wcsdevice_code = param.getString("wcsdevice_code");
|
String wcsdevice_code = param.getString("wcsdevice_code");
|
||||||
|
|||||||
Reference in New Issue
Block a user