add:新增出库异常口放行功能
This commit is contained in:
@@ -90,4 +90,12 @@ public class ProductOutTwoController {
|
||||
return new ResponseEntity<>(productOutTwoService.boxOut(whereJson),HttpStatus.OK);
|
||||
}
|
||||
|
||||
@PostMapping("/outExcepionPointPass")
|
||||
@Log("出库异常口取货点放行")
|
||||
@SaIgnore
|
||||
public ResponseEntity<Object> outExcepionPointPass(@RequestBody JSONObject whereJson) {
|
||||
return new ResponseEntity<>(productOutTwoService.outExcepionPointPass(whereJson), HttpStatus.OK);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -90,4 +90,6 @@ public interface ProductOutTwoService {
|
||||
* @return 、
|
||||
*/
|
||||
JSONObject boxOut(JSONObject whereJson);
|
||||
|
||||
JSONObject outExcepionPointPass(JSONObject whereJson);
|
||||
}
|
||||
|
||||
@@ -17,6 +17,7 @@ import org.nl.b_lms.storage_manage.ios.service.iostorInv.util.service.OutBoxMana
|
||||
import org.nl.modules.common.exception.BadRequestException;
|
||||
import org.nl.modules.wql.core.bean.WQLObject;
|
||||
import org.nl.modules.wql.util.SpringContextHolder;
|
||||
import org.nl.system.service.param.impl.SysParamServiceImpl;
|
||||
import org.nl.wms.ext.acs.service.WmsToAcsService;
|
||||
import org.nl.wms.pda.st.service.impl.ProductionOutServiceImpl;
|
||||
import org.nl.wms.sch.manage.TaskStatusEnum;
|
||||
@@ -215,4 +216,23 @@ public class ProductOutTwoServiceImpl implements ProductOutTwoService {
|
||||
result.put("message", "下发出库成功!");
|
||||
return result;
|
||||
}
|
||||
|
||||
@Override
|
||||
public JSONObject outExcepionPointPass(JSONObject whereJson) {
|
||||
WmsToAcsService wmsToAcsService = SpringContextHolder.getBean(WmsToAcsService.class);
|
||||
JSONArray action_rows = new JSONArray();
|
||||
JSONObject action_jo = new JSONObject();
|
||||
|
||||
String to_command = SpringContextHolder.getBean(SysParamServiceImpl.class).findByCode("to_command").getValue();
|
||||
action_jo.put("device_code", whereJson.getString("point_code"));
|
||||
action_jo.put("code", "to_command");
|
||||
action_jo.put("product_area", "BLK");
|
||||
action_jo.put("value", to_command);
|
||||
action_rows.add(action_jo);
|
||||
wmsToAcsService.action(action_rows);
|
||||
|
||||
JSONObject result = new JSONObject();
|
||||
result.put("message", "成功放行!");
|
||||
return result;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -80,8 +80,8 @@ public class BakingServiceImpl implements BakingService {
|
||||
String point_code1 = whereJson.getString("point_code"); // 点位
|
||||
//查询该点位是否存在未完成的任务
|
||||
JSONObject hasTask = WQLObject.getWQLObject("SCH_BASE_Task").query("point_code1 = '" + point_code1 + "' AND task_status < '07' AND is_delete = '0'").uniqueResult(0);
|
||||
if (hasTask!=null) {
|
||||
throw new BadRequestException("当前点位"+point_code1+"存在正在执行的任务"+hasTask.getString("task_code"));
|
||||
if (hasTask != null) {
|
||||
throw new BadRequestException("当前点位" + point_code1 + "存在正在执行的任务" + hasTask.getString("task_code"));
|
||||
}
|
||||
//校验该设备是否启用,且母卷MES是否请求烘烤
|
||||
//查询该母卷号、设备号对应的生箔工单
|
||||
@@ -146,19 +146,19 @@ public class BakingServiceImpl implements BakingService {
|
||||
jsonMap.put("point_location", jsonPointZc.getString("point_location"));
|
||||
JSONArray hot_rows = WQL.getWO("PDA_BAKING_01").addParamMap(jsonMap).process().getResultJSONArray(0);
|
||||
JSONObject jsonHotIvt = new JSONObject();
|
||||
log.debug("获取温度幅度hot_rows:"+hot_rows);
|
||||
log.debug("获取温度幅度hot_rows:" + hot_rows);
|
||||
for (int i = 0; i < hot_rows.size(); i++) {
|
||||
JSONObject hot_row = hot_rows.getJSONObject(i);
|
||||
String point_code = hot_row.getString("point_code");
|
||||
boolean exists = redisUtils.hHasKey(point_code, "temperature");
|
||||
String point_temperature = "";
|
||||
if(exists){
|
||||
if (exists) {
|
||||
point_temperature = (String) redisUtils.hget(point_code, "temperature");
|
||||
}
|
||||
if (ObjectUtil.isNotEmpty(point_temperature)) {
|
||||
if (point_temperature.equals(temperature)) {
|
||||
jsonHotIvt = hot_row;
|
||||
log.debug("获取满足温度幅度jsonHotIvt:"+jsonHotIvt);
|
||||
log.debug("获取满足温度幅度jsonHotIvt:" + jsonHotIvt);
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -174,7 +174,7 @@ public class BakingServiceImpl implements BakingService {
|
||||
String point_code = hot_row.getString("point_code");
|
||||
boolean exists = redisUtils.hHasKey(point_code, "temperature");
|
||||
String point_temperature = "";
|
||||
if(exists){
|
||||
if (exists) {
|
||||
point_temperature = (String) redisUtils.hget(point_code, "temperature");
|
||||
}
|
||||
if (ObjectUtil.isNotEmpty(point_temperature)) {
|
||||
@@ -449,10 +449,10 @@ public class BakingServiceImpl implements BakingService {
|
||||
hotParam.put("end_point_code", cache_jo.getString("point_code"));
|
||||
boolean exists = redisUtils.hHasKey(point_code1, "temperature");
|
||||
String point_temperature = "";
|
||||
if(exists){
|
||||
if (exists) {
|
||||
point_temperature = (String) redisUtils.hget(point_code1, "temperature");
|
||||
}else{
|
||||
throw new BadRequestException("当前操作点位设备:"+point_code1+",无法获取温度,请稍后再试!");
|
||||
} else {
|
||||
throw new BadRequestException("当前操作点位设备:" + point_code1 + ",无法获取温度,请稍后再试!");
|
||||
}
|
||||
hotParam.put("temperature", point_temperature);
|
||||
|
||||
@@ -554,10 +554,10 @@ public class BakingServiceImpl implements BakingService {
|
||||
hotParam.put("end_point_code", point_code2);
|
||||
boolean exists = redisUtils.hHasKey(point_code1, "temperature");
|
||||
String point_temperature = "";
|
||||
if(exists){
|
||||
if (exists) {
|
||||
point_temperature = (String) redisUtils.hget(point_code1, "temperature");
|
||||
}else{
|
||||
throw new BadRequestException("当前操作点位设备:"+point_code1+",无法获取温度,请稍后再试!");
|
||||
} else {
|
||||
throw new BadRequestException("当前操作点位设备:" + point_code1 + ",无法获取温度,请稍后再试!");
|
||||
}
|
||||
hotParam.put("temperature", point_temperature);
|
||||
if (ObjectUtil.isEmpty(last_hot_mst)) {
|
||||
@@ -572,7 +572,6 @@ public class BakingServiceImpl implements BakingService {
|
||||
result.put("message", "操作成功!");
|
||||
return result;
|
||||
}
|
||||
|
||||
public JSONObject getJsonObject(String product_area, JSONObject point_code2_jo, String temperature) {
|
||||
if (ObjectUtil.isEmpty(point_code2_jo)) {
|
||||
throw new BadRequestException("烘箱对接没有可用位置!");
|
||||
@@ -588,7 +587,7 @@ public class BakingServiceImpl implements BakingService {
|
||||
String point_code = hot_row.getString("point_code");
|
||||
boolean exists = redisUtils.hHasKey(point_code, "temperature");
|
||||
String point_temperature = "";
|
||||
if(exists){
|
||||
if (exists) {
|
||||
point_temperature = (String) redisUtils.hget(point_code, "temperature");
|
||||
}
|
||||
if (ObjectUtil.isNotEmpty(point_temperature)) {
|
||||
|
||||
Reference in New Issue
Block a user