rev:修改缓存线扫码异常和缓存线异常下发acs接口。

This commit is contained in:
2023-04-11 11:27:06 +08:00
parent 204d771420
commit e0f89df220
4 changed files with 40 additions and 45 deletions

View File

@@ -334,9 +334,8 @@ public class ProduceshiftorderServiceImpl implements ProduceshiftorderService{
JSONObject order = new JSONObject(MapOf.of("workorder_id", workorder_id, "type", WorkerOrderEnum.SEND.getCode())); JSONObject order = new JSONObject(MapOf.of("workorder_id", workorder_id, "type", WorkerOrderEnum.SEND.getCode()));
array.add(order); array.add(order);
//下发acs //下发acs
// Map<String,Object> resp = wmsToAcsService.orderStatusUpdate(array); Map<String,Object> resp = wmsToAcsService.orderStatusUpdate(array);
// return RestBusinessTemplate.execute(() -> resp); return RestBusinessTemplate.execute(() -> resp);
return RestBusinessTemplate.execute(() -> new JSONObject());
} }
/** /**
@@ -388,12 +387,10 @@ public class ProduceshiftorderServiceImpl implements ProduceshiftorderService{
map.put("realproduceend_date", DateUtil.now()); map.put("realproduceend_date", DateUtil.now());
wo.update(map, "workorder_id = '" + workorder_id + "'"); wo.update(map, "workorder_id = '" + workorder_id + "'");
//2.设置实际数量:数量待确认: 是否需要从报工记录表统计 //2.设置实际数量:数量待确认: 是否需要从报工记录表统计
JSONArray arr = new JSONArray(); JSONArray arr = new JSONArray();
arr.add(MapOf.of("workorder_id", workorder_id, "status", WorkerOrderEnum.FORCE_COMPLETE.getCode())); arr.add(MapOf.of("workorder_id", workorder_id, "status", WorkerOrderEnum.FORCE_COMPLETE.getCode()));
//4.工单开工以后需要向acs强制完成,wms向acs发送请求,工单强制完成 //3.工单开工以后需要向acs强制完成,wms向acs发送请求,工单强制完成
Map<String,Object> resp = wmsToAcsService.orderStatusUpdate(arr); Map<String,Object> resp = wmsToAcsService.orderStatusUpdate(arr);
return RestBusinessTemplate.execute(() -> resp); return RestBusinessTemplate.execute(() -> resp);
} }

View File

@@ -122,10 +122,10 @@ public class CacheLineHandController{
} }
@PostMapping("/instPageQuery") @PostMapping("/instPageQuery")
@Log("任务分页查询") @Log("任务操作-查询")
@ApiOperation("任务分页数据") @ApiOperation("任务操作-查询")
public ResponseEntity<Object> instPageQuery(@RequestBody Map<String,String> param, Pageable page) { public ResponseEntity<Object> instPageQuery(@RequestBody Map<String,String> param, Pageable page) {
log.info("海亮缓存线手持服务 [任务分页查询] 接口被请求, 请求参数-{}", param); log.info("海亮缓存线手持服务 [任务操作-查询] 接口被请求, 请求参数-{}", param);
if(null == param) { if(null == param) {
throw new BizCoreException(ResultCode.VALIDATE_FAILED); throw new BizCoreException(ResultCode.VALIDATE_FAILED);
} }
@@ -145,10 +145,10 @@ public class CacheLineHandController{
} }
@PostMapping("/cacheLineOutBoxExceptionQuery") @PostMapping("/cacheLineOutBoxExceptionQuery")
@Log("缓存线出箱异常-查询") @Log("缓存线出箱异常-查询")
@ApiOperation("缓存线出箱异常-查询") @ApiOperation("缓存线出箱异常-查询")
public ResponseEntity<JSONArray> cacheLineOutBoxExceptionQuery(@RequestBody JSONObject param) { public ResponseEntity<JSONArray> cacheLineOutBoxExceptionQuery(@RequestBody JSONObject param) {
log.info("海亮缓存线手持服务 [缓存线出箱异常-查询] 接口被请求, 请求参数-{}", param); log.info("海亮缓存线手持服务 [缓存线出箱异常-查询] 接口被请求, 请求参数-{}", param);
//参数校验 //参数校验
if(StringUtils.isEmpty(param.getString("wcsdevice_code"))) { if(StringUtils.isEmpty(param.getString("wcsdevice_code"))) {
throw new BizCoreException("请选择缓存线并输入缓存线位置编号再查询"); throw new BizCoreException("请选择缓存线并输入缓存线位置编号再查询");
@@ -160,8 +160,8 @@ public class CacheLineHandController{
} }
@PostMapping("/cacheLineOutBoxExceptionConfirm") @PostMapping("/cacheLineOutBoxExceptionConfirm")
@Log("缓存线出箱异常-确认") @Log("缓存线出箱异常-确认")
@ApiOperation("缓存线出箱异常-确认") @ApiOperation("缓存线出箱异常-确认")
public ResponseEntity<Object> cacheLineOutBoxExceptionConfirm(@RequestBody JSONObject param) { public ResponseEntity<Object> cacheLineOutBoxExceptionConfirm(@RequestBody JSONObject param) {
log.info("海亮缓存线手持服务 [缓存线出箱异常-确认] 接口被请求, 请求参数-{}", param); log.info("海亮缓存线手持服务 [缓存线出箱异常-确认] 接口被请求, 请求参数-{}", param);
//参数校验 //参数校验
@@ -195,10 +195,10 @@ public class CacheLineHandController{
} }
@PostMapping("/inOutExceptionInstQuery") @PostMapping("/inOutExceptionInstQuery")
@Log("缓存线出入箱异常指令查询") @Log("缓存线扫码异常-查询")
@ApiOperation("缓存线出入箱异常指令查询") @ApiOperation("缓存线扫码异常-查询")
public ResponseEntity<JSONArray> inOutExceptionInstQuery(@RequestBody JSONObject param) { public ResponseEntity<JSONArray> inOutExceptionInstQuery(@RequestBody JSONObject param) {
log.info("海亮缓存线手持服务 [缓存线出入箱异常指令查询] 接口被·请求, 请求参数-{}", param); log.info("海亮缓存线手持服务 [缓存线扫码异常-查询] 接口被·请求, 请求参数-{}", param);
//参数校验 //参数校验
if(StringUtils.isEmpty(param.getString("wcsdevice_code"))) { if(StringUtils.isEmpty(param.getString("wcsdevice_code"))) {
throw new BizCoreException("请选择缓存线编号!"); throw new BizCoreException("请选择缓存线编号!");
@@ -208,9 +208,9 @@ public class CacheLineHandController{
@PostMapping("/inOutExceptionInstConfirm") @PostMapping("/inOutExceptionInstConfirm")
@Log("扫码异常确认") @Log("扫码异常确认")
@ApiOperation("缓存线出入箱异常指令确认") @ApiOperation("扫码异常确认")
public ResponseEntity<Object> inOutExceptionInstConfirm(@RequestBody JSONObject param) { public ResponseEntity<Object> inOutExceptionInstConfirm(@RequestBody JSONObject param) {
log.info("海亮缓存线手持服务 [缓存线出入箱异常指令确认] 接口被请求, 请求参数-{}", param); log.info("海亮缓存线手持服务 [扫码异常确认] 接口被请求, 请求参数-{}", param);
//参数校验 //参数校验
if(StringUtils.isEmpty(param.getString("type")) || StringUtils.isEmpty(param.getString("wcsdevice_code")) || StringUtils.isEmpty(param.getString("vehicle_code"))) { if(StringUtils.isEmpty(param.getString("type")) || StringUtils.isEmpty(param.getString("wcsdevice_code")) || StringUtils.isEmpty(param.getString("vehicle_code"))) {
throw new BizCoreException("请确认缓存线,位置,料箱码是否都已选择或填入!"); throw new BizCoreException("请确认缓存线,位置,料箱码是否都已选择或填入!");

View File

@@ -99,7 +99,7 @@ public interface CacheLineHandService{
JSONArray instStatusQuery(String param); JSONArray instStatusQuery(String param);
/** /**
* 任务分页查询 * 任务操作-查询
* *
* @return 分页列表 * @return 分页列表
* @Param form 任务参数 * @Param form 任务参数
@@ -127,9 +127,9 @@ public interface CacheLineHandService{
JSONArray cacheLineMaterInfoQuery(JSONObject param); JSONArray cacheLineMaterInfoQuery(JSONObject param);
/** /**
* 缓存线出入箱异常指令查询 * 缓存线扫码异常-查询
* *
* @param param 查询参数 1 扫码异常-入箱扫码 2 扫码异常-出箱扫码 * @param param 查询参数
* @return 返回结果集 * @return 返回结果集
* @author gbx * @author gbx
* @date 2023/3/24 * @date 2023/3/24
@@ -137,9 +137,9 @@ public interface CacheLineHandService{
JSONArray inOutExceptionInstQuery(JSONObject param); JSONArray inOutExceptionInstQuery(JSONObject param);
/** /**
* 缓存线出入箱异常指令确认 * 扫码异常确认
* *
* @param param 查询参数 1 扫码异常-入箱扫码 2 扫码异常-出箱扫码 * @param param 查询参数
* @return * @return
* @author gbx * @author gbx
* @date 2023/3/24 * @date 2023/3/24
@@ -147,7 +147,7 @@ public interface CacheLineHandService{
Object inOutExceptionInstConfirm(JSONObject param); Object inOutExceptionInstConfirm(JSONObject param);
/** /**
* 任务操作 * 任务操作-取消,完成,重发
* *
* @Param: form 任务参数 * @Param: form 任务参数
* @return: 操作结果 * @return: 操作结果
@@ -243,7 +243,7 @@ public interface CacheLineHandService{
void setBlankPos(JSONObject param); void setBlankPos(JSONObject param);
/** /**
* 缓存线出箱异常-查询 * 缓存线出箱异常-查询
* *
* @param param 查询参数 * @param param 查询参数
* @return 返回结果集 * @return 返回结果集

View File

@@ -145,6 +145,9 @@ public class CacheLineHandServiceImpl implements CacheLineHandService{
return WQL.getWO("PDA_QUERY").addParam("flag", "4").addParam("condition", param).process().getResultJSONArray(0); return WQL.getWO("PDA_QUERY").addParam("flag", "4").addParam("condition", param).process().getResultJSONArray(0);
} }
/**
* 任务操作-查询
*/
@Override @Override
public Map<String,Object> instPageQuery(Map<String,String> param, Pageable page) { public Map<String,Object> instPageQuery(Map<String,String> param, Pageable page) {
HashMap<String,String> map = new HashMap<>(); HashMap<String,String> map = new HashMap<>();
@@ -221,6 +224,9 @@ public class CacheLineHandServiceImpl implements CacheLineHandService{
return jsonObject; return jsonObject;
} }
/**
* 任务操作-取消,完成,重发
*/
@Override @Override
public CommonResult<Map<String,Object>> instOperation(JSONObject param) { public CommonResult<Map<String,Object>> instOperation(JSONObject param) {
String optType = param.getString("opt_type"); String optType = param.getString("opt_type");
@@ -529,7 +535,7 @@ public class CacheLineHandServiceImpl implements CacheLineHandService{
} }
/** /**
* 缓存线编码 wcsdevice_code * 缓存线扫码异常-查询
*/ */
@Override @Override
public JSONArray inOutExceptionInstQuery(JSONObject param) { public JSONArray inOutExceptionInstQuery(JSONObject param) {
@@ -565,9 +571,7 @@ public class CacheLineHandServiceImpl implements CacheLineHandService{
jsonObject.put("vehicle_code", vehicle_code); jsonObject.put("vehicle_code", vehicle_code);
jsonArray.add(jsonObject); jsonArray.add(jsonObject);
try { try {
//TOFIX 等确定api后换成下发的url return RestBusinessTemplate.execute(() -> AcsUtil.notifyAcs("/api/wms/issuedBarcode", jsonArray));
//return AcsUtil.notifyAcs("/api/cacheLineHand", jsonArray);
return RestBusinessTemplate.execute(() -> new JSONObject());
} }
catch(NullPointerException e) { catch(NullPointerException e) {
throw new BadRequestException(e.toString()); throw new BadRequestException(e.toString());
@@ -596,9 +600,7 @@ public class CacheLineHandServiceImpl implements CacheLineHandService{
jsonObject.put("wcsdevice_code", wcsdevice_code); jsonObject.put("wcsdevice_code", wcsdevice_code);
jsonArray.add(jsonObject); jsonArray.add(jsonObject);
try { try {
//TOFIX 等确定api后换成下发的url return RestBusinessTemplate.execute(() -> AcsUtil.notifyAcs("/api/wms/puaseCacheLine", jsonArray));
//return AcsUtil.notifyAcs("/api/cacheLineHand", jsonArray);
return RestBusinessTemplate.execute(() -> new JSONObject());
} }
catch(NullPointerException e) { catch(NullPointerException e) {
throw new BadRequestException(e.toString()); throw new BadRequestException(e.toString());
@@ -750,10 +752,9 @@ public class CacheLineHandServiceImpl implements CacheLineHandService{
// 缓存线位置表 // 缓存线位置表
// WQLObject positionTab = WQLObject.getWQLObject("sch_cacheline_position"); // WQLObject positionTab = WQLObject.getWQLObject("sch_cacheline_position");
// 缓存线载具物料表 // 缓存线载具物料表
// WQLObject ivtTab = WQLObject.getWQLObject("sch_cacheline_vehilematerial"); // WQLObject ivtTab = WQLObject.getWQLObject("sch_cacheline_vehilematerial");
JSONObject instObj = instructTab.query("task_id = '" + instruct_uuid + "'").uniqueResult(0); // JSONObject instObj = instructTab.query("task_id = '" + instruct_uuid + "'").uniqueResult(0);
//TOFIX // AgvTwoInst inst = new AgvTwoInst();
//AgvTwoInst inst = new AgvTwoInst();
// instObj.put("inboxtxm", full_vehicle_code); // instObj.put("inboxtxm", full_vehicle_code);
// instObj.put("outboxtxm", empty_vehicle_code); // instObj.put("outboxtxm", empty_vehicle_code);
// inst.updateInstStatus(instObj, "1"); // inst.updateInstStatus(instObj, "1");
@@ -801,12 +802,11 @@ public class CacheLineHandServiceImpl implements CacheLineHandService{
String instruct_uuid = param.getString("instruct_uuid"); String instruct_uuid = param.getString("instruct_uuid");
String vehicle_code = param.getString("vehicle_code"); String vehicle_code = param.getString("vehicle_code");
JSONObject instObj = instructTab.query("task_id = '" + instruct_uuid + "'").uniqueResult(0); JSONObject instObj = instructTab.query("task_id = '" + instruct_uuid + "'").uniqueResult(0);
//TOFIX // AgvTwoInst inst = new AgvTwoInst();
// AgvTwoInst inst = new AgvTwoInst(); // inst.updateInstStatus(instObj, "1");
// inst.updateInstStatus(instObj, "1"); // 出箱的时候入箱码和出箱码相同
//出箱的时候入箱码和出箱码相同 // instObj.put("inboxtxm", vehicle_code);
instObj.put("inboxtxm", vehicle_code); // instObj.put("outboxtxm", vehicle_code);
instObj.put("outboxtxm", vehicle_code);
// inst.updateInstStatus(instObj, "1"); // inst.updateInstStatus(instObj, "1");
// inst.updateInstStatus(instObj, "2"); // inst.updateInstStatus(instObj, "2");
} }
@@ -825,8 +825,6 @@ public class CacheLineHandServiceImpl implements CacheLineHandService{
jsonObject.put("putquantity", putquantity); jsonObject.put("putquantity", putquantity);
jsonArray.add(jsonObject); jsonArray.add(jsonObject);
try { try {
//TOFIX 等确定api后换成下发的url
//return AcsUtil.notifyAcs("/api/cacheLineHand", jsonArray);
return RestBusinessTemplate.execute(() -> new JSONObject()); return RestBusinessTemplate.execute(() -> new JSONObject());
} }
catch(NullPointerException e) { catch(NullPointerException e) {