代码更新
This commit is contained in:
@@ -48,27 +48,31 @@ public class RawFoilController {
|
|||||||
@Log("呼叫空轴")
|
@Log("呼叫空轴")
|
||||||
@ApiOperation("呼叫空轴")
|
@ApiOperation("呼叫空轴")
|
||||||
public ResponseEntity<Object> needEmptyAxis(@RequestBody JSONObject whereJson) {
|
public ResponseEntity<Object> needEmptyAxis(@RequestBody JSONObject whereJson) {
|
||||||
return new ResponseEntity<>(rawFoilService.needEmptyAxis(whereJson), HttpStatus.OK);
|
rawFoilService.needEmptyAxis(whereJson);
|
||||||
|
return new ResponseEntity<>( HttpStatus.OK);
|
||||||
}
|
}
|
||||||
|
|
||||||
@PostMapping("/confirmBlanking")
|
@PostMapping("/confirmBlanking")
|
||||||
@Log("确认下卷")
|
@Log("确认下卷")
|
||||||
@ApiOperation("确认下卷")
|
@ApiOperation("确认下卷")
|
||||||
public ResponseEntity<Object> confirmBlanking(@RequestBody JSONObject whereJson) {
|
public ResponseEntity<Object> confirmBlanking(@RequestBody JSONObject whereJson) {
|
||||||
return new ResponseEntity<>(rawFoilService.confirmBlanking(whereJson), HttpStatus.OK);
|
rawFoilService.confirmBlanking(whereJson);
|
||||||
|
return new ResponseEntity<>( HttpStatus.OK);
|
||||||
}
|
}
|
||||||
|
|
||||||
@PostMapping("/finishBlanking")
|
@PostMapping("/finishBlanking")
|
||||||
@Log("下卷完成")
|
@Log("下卷完成")
|
||||||
@ApiOperation("下卷完成")
|
@ApiOperation("下卷完成")
|
||||||
public ResponseEntity<Object> finishBlanking(@RequestBody JSONObject whereJson) {
|
public ResponseEntity<Object> finishBlanking(@RequestBody JSONObject whereJson) {
|
||||||
return new ResponseEntity<>(rawFoilService.finishBlanking(whereJson), HttpStatus.OK);
|
rawFoilService.finishBlanking(whereJson);
|
||||||
|
return new ResponseEntity<>(HttpStatus.OK);
|
||||||
}
|
}
|
||||||
|
|
||||||
@PostMapping("/finish")
|
@PostMapping("/finish")
|
||||||
@Log("完成")
|
@Log("完成")
|
||||||
@ApiOperation("完成")
|
@ApiOperation("完成")
|
||||||
public ResponseEntity<Object> finish(@RequestBody JSONObject whereJson) {
|
public ResponseEntity<Object> finish(@RequestBody JSONObject whereJson) {
|
||||||
return new ResponseEntity<>(rawFoilService.finish(whereJson), HttpStatus.OK);
|
rawFoilService.finish(whereJson);
|
||||||
|
return new ResponseEntity<>(HttpStatus.OK);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
package org.nl.wms.pda.mps.service;
|
package org.nl.wms.pda.mps.service;
|
||||||
|
|
||||||
|
import com.alibaba.fastjson.JSONArray;
|
||||||
import com.alibaba.fastjson.JSONObject;
|
import com.alibaba.fastjson.JSONObject;
|
||||||
|
|
||||||
public interface RawFoilService {
|
public interface RawFoilService {
|
||||||
@@ -8,47 +9,47 @@ public interface RawFoilService {
|
|||||||
* 查询生产区域
|
* 查询生产区域
|
||||||
* @return json
|
* @return json
|
||||||
*/
|
*/
|
||||||
JSONObject queryProductArea();
|
JSONArray queryProductArea();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 查询生箔生产进度
|
* 查询生箔生产进度
|
||||||
* @param whereJson /
|
* @param whereJson /
|
||||||
* @return JSONObject
|
* @return JSONObject
|
||||||
*/
|
*/
|
||||||
JSONObject queryRawFoil(JSONObject whereJson);
|
JSONArray queryRawFoil(JSONObject whereJson);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 查询生箔工单
|
* 查询生箔工单
|
||||||
* @param whereJson /
|
* @param whereJson /
|
||||||
* @return JSONObject
|
* @return JSONObject
|
||||||
*/
|
*/
|
||||||
JSONObject queryRawFoilList(JSONObject whereJson);
|
JSONArray queryRawFoilList(JSONObject whereJson);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 确认下卷
|
* 确认下卷
|
||||||
* @param whereJson /
|
* @param whereJson /
|
||||||
* @return JSONObject
|
* @return JSONObject
|
||||||
*/
|
*/
|
||||||
JSONObject needEmptyAxis(JSONObject whereJson);
|
void needEmptyAxis(JSONObject whereJson);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 查询生箔工单
|
* 查询生箔工单
|
||||||
* @param whereJson /
|
* @param whereJson /
|
||||||
* @return JSONObject
|
* @return JSONObject
|
||||||
*/
|
*/
|
||||||
JSONObject confirmBlanking(JSONObject whereJson);
|
void confirmBlanking(JSONObject whereJson);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 下卷完成
|
* 下卷完成
|
||||||
* @param whereJson /
|
* @param whereJson /
|
||||||
* @return JSONObject
|
* @return JSONObject
|
||||||
*/
|
*/
|
||||||
JSONObject finishBlanking(JSONObject whereJson);
|
void finishBlanking(JSONObject whereJson);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 完成
|
* 完成
|
||||||
* @param whereJson /
|
* @param whereJson /
|
||||||
* @return JSONObject
|
* @return JSONObject
|
||||||
*/
|
*/
|
||||||
JSONObject finish(JSONObject whereJson);
|
void finish(JSONObject whereJson);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,7 +1,9 @@
|
|||||||
package org.nl.wms.pda.mps.service.impl;
|
package org.nl.wms.pda.mps.service.impl;
|
||||||
|
|
||||||
|
import cn.hutool.core.date.DateUnit;
|
||||||
import cn.hutool.core.date.DateUtil;
|
import cn.hutool.core.date.DateUtil;
|
||||||
import cn.hutool.core.util.IdUtil;
|
import cn.hutool.core.util.IdUtil;
|
||||||
|
import cn.hutool.core.util.NumberUtil;
|
||||||
import cn.hutool.core.util.ObjectUtil;
|
import cn.hutool.core.util.ObjectUtil;
|
||||||
import cn.hutool.core.util.StrUtil;
|
import cn.hutool.core.util.StrUtil;
|
||||||
import com.alibaba.fastjson.JSONArray;
|
import com.alibaba.fastjson.JSONArray;
|
||||||
@@ -17,10 +19,13 @@ import org.nl.wms.ext.acs.service.AcsToWmsService;
|
|||||||
import org.nl.wms.pda.mps.service.RawFoilService;
|
import org.nl.wms.pda.mps.service.RawFoilService;
|
||||||
import org.nl.wms.sch.service.PointService;
|
import org.nl.wms.sch.service.PointService;
|
||||||
import org.nl.wms.sch.service.dto.PointDto;
|
import org.nl.wms.sch.service.dto.PointDto;
|
||||||
|
import org.nl.wms.sch.tasks.BookTwoConfirmTask;
|
||||||
import org.nl.wms.sch.tasks.CallEmpReelTask;
|
import org.nl.wms.sch.tasks.CallEmpReelTask;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
import org.springframework.transaction.annotation.Transactional;
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
|
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
@Service
|
@Service
|
||||||
@RequiredArgsConstructor
|
@RequiredArgsConstructor
|
||||||
@Slf4j
|
@Slf4j
|
||||||
@@ -29,218 +34,228 @@ public class RawFoilServiceImpl implements RawFoilService {
|
|||||||
private final PointService pointService;
|
private final PointService pointService;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public JSONObject queryProductArea() {
|
public JSONArray queryProductArea() {
|
||||||
JSONObject result = new JSONObject();
|
JSONObject map = new JSONObject();
|
||||||
|
map.put("flag", "3");
|
||||||
JSONArray rows = new JSONArray();
|
JSONArray jsonArr = WQL.getWO("PDA_RAWFOIL_01").addParam("flag", "3").process().getResultJSONArray(0);
|
||||||
result.put("rows", rows);
|
return jsonArr;
|
||||||
result.put("code", "1");
|
|
||||||
result.put("desc", "查询成功");
|
|
||||||
return result;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public JSONObject queryRawFoil(JSONObject whereJson) {
|
public JSONArray queryRawFoil(JSONObject whereJson) {
|
||||||
JSONObject result = new JSONObject();
|
String point_code = whereJson.getString("point_code");
|
||||||
// 1、准备参数:point_code、type = 4
|
String container_name = whereJson.getString("container_name");
|
||||||
JSONObject param = new JSONObject();
|
String product_area = whereJson.getString("product_area");
|
||||||
param.put("type", "4");
|
|
||||||
param.put("point_code", whereJson.getString("point_code"));
|
JSONArray resultArr = new JSONArray();
|
||||||
// 2、调用接口
|
JSONObject map = new JSONObject();
|
||||||
JSONObject json = acsToWmsService.apply(param);
|
map.put("flag", "4");
|
||||||
if (StrUtil.equals(json.getString("status"), "200")) {
|
map.put("point_code", point_code);
|
||||||
result.put("result", "");
|
map.put("container_name", container_name);
|
||||||
result.put("code", "1");
|
map.put("product_area", product_area);
|
||||||
result.put("desc", "操作成功");
|
|
||||||
} else {
|
// 如果都为空则默认区域为 A
|
||||||
result.put("result", "");
|
if (ObjectUtil.isEmpty(point_code) && ObjectUtil.isEmpty(container_name) && ObjectUtil.isEmpty(product_area)) {
|
||||||
result.put("code", "0");
|
map.put("product_area", "A");
|
||||||
result.put("desc", "操作失败:" + json.getString("message"));
|
|
||||||
}
|
}
|
||||||
return result;
|
|
||||||
|
JSONArray arr = WQL.getWO("PDA_RAWFOIL_01").addParamMap(map).process().getResultJSONArray(0);
|
||||||
|
for (int i = 0; i < arr.size(); i++) {
|
||||||
|
JSONObject json = new JSONObject();
|
||||||
|
JSONObject jsonObject = arr.getJSONObject(i);
|
||||||
|
String theory_height = jsonObject.getString("theory_height");
|
||||||
|
String eqp_velocity = jsonObject.getString("eqp_velocity");
|
||||||
|
|
||||||
|
// 计算生产所需时间: 理论长度 / 速度
|
||||||
|
int need_time = NumberUtil.div(NumberUtil.div(theory_height, eqp_velocity).toString(), "60").intValue();// 分钟
|
||||||
|
|
||||||
|
// 计算预计结束时间: 开始时间 + 生产所需时间
|
||||||
|
String realstart_time = jsonObject.getString("realstart_time");
|
||||||
|
Date date = DateUtil.parse(realstart_time);
|
||||||
|
String end_time = DateUtil.offsetMinute(date, need_time).toString();
|
||||||
|
|
||||||
|
// 当前时间 - 预计结束时间 : 超过为红色、还有半小时为黄色
|
||||||
|
Date now_time = DateUtil.parse(DateUtil.now());
|
||||||
|
Date end_time2 = DateUtil.parse(end_time);
|
||||||
|
|
||||||
|
long betweenDay = DateUtil.between(end_time2, now_time, DateUnit.MINUTE, false);
|
||||||
|
|
||||||
|
if (betweenDay > 0) json.put("color_type", "1");
|
||||||
|
if (betweenDay <= 0 && betweenDay >= -30) json.put("color_type", "2");
|
||||||
|
|
||||||
|
json.put("container_name", jsonObject.getString("container_name"));
|
||||||
|
json.put("realstart_time", jsonObject.getString("realstart_time"));
|
||||||
|
json.put("end_date", end_time);
|
||||||
|
json.put("point_code", jsonObject.getString("resource_name"));
|
||||||
|
json.put("pcsn", jsonObject.getString("product_name"));
|
||||||
|
json.put("product_name", jsonObject.getString("theory_height"));
|
||||||
|
json.put("mfg_order_name", jsonObject.getString("mfg_order_name"));
|
||||||
|
|
||||||
|
resultArr.add(json);
|
||||||
|
}
|
||||||
|
return resultArr;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public JSONObject queryRawFoilList(JSONObject whereJson) {
|
public JSONArray queryRawFoilList(JSONObject whereJson) {
|
||||||
JSONObject result = new JSONObject();
|
JSONObject map = new JSONObject();
|
||||||
// 1、准备参数:point_code、type = 4
|
map.put("flag", "5");
|
||||||
JSONObject param = new JSONObject();
|
map.put("point_code", whereJson.getString("point_code"));
|
||||||
param.put("type", "4");
|
map.put("container_name", whereJson.getString("container_name"));
|
||||||
param.put("point_code", whereJson.getString("point_code"));
|
JSONArray resultJSONArray = WQL.getWO("PDA_RAWFOIL_01").addParamMap(map).process().getResultJSONArray(0);
|
||||||
// 2、调用接口
|
return resultJSONArray;
|
||||||
JSONObject json = acsToWmsService.apply(param);
|
|
||||||
if (StrUtil.equals(json.getString("status"), "200")) {
|
|
||||||
result.put("result", "");
|
|
||||||
result.put("code", "1");
|
|
||||||
result.put("desc", "操作成功");
|
|
||||||
} else {
|
|
||||||
result.put("result", "");
|
|
||||||
result.put("code", "0");
|
|
||||||
result.put("desc", "操作失败:" + json.getString("message"));
|
|
||||||
}
|
|
||||||
return result;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@Transactional(rollbackFor = Exception.class)
|
@Transactional(rollbackFor = Exception.class)
|
||||||
public JSONObject needEmptyAxis(JSONObject whereJson) {
|
public void needEmptyAxis(JSONObject whereJson) {
|
||||||
JSONObject result = new JSONObject();
|
|
||||||
JSONArray rows = new JSONArray();
|
|
||||||
|
|
||||||
WQLObject taskTab = WQLObject.getWQLObject("SCH_BASE_Task");
|
WQLObject taskTab = WQLObject.getWQLObject("SCH_BASE_Task");
|
||||||
|
|
||||||
String end_pint_code = whereJson.getString("end_pint_code");
|
String end_pint_code = whereJson.getString("point_code");
|
||||||
|
|
||||||
try {
|
if (ObjectUtil.isEmpty(end_pint_code)) throw new BadRequestException("终点点位不能为空");
|
||||||
if (ObjectUtil.isEmpty(end_pint_code)) throw new BadRequestException("终点点位不能为空");
|
String start_pint_code = "";
|
||||||
String start_pint_code = "";
|
|
||||||
|
|
||||||
// 1.查询此点位是否存在
|
// 1.查询此点位是否存在
|
||||||
PointDto jsonPoint = pointService.findByCode(end_pint_code);
|
PointDto jsonPoint = pointService.findByCode(end_pint_code);
|
||||||
if (ObjectUtil.isEmpty(jsonPoint)) throw new BadRequestException("此点位不存在");
|
if (ObjectUtil.isEmpty(jsonPoint)) throw new BadRequestException("此点位不存在");
|
||||||
// 2.根据就近原则查对应空卷抽
|
// 2.根据就近原则查对应空卷抽
|
||||||
JSONObject map = new JSONObject();
|
JSONObject map = new JSONObject();
|
||||||
map.put("flag", "1");
|
map.put("flag", "1");
|
||||||
map.put("product_area",jsonPoint.getProduct_area());
|
map.put("product_area", jsonPoint.getProduct_area());
|
||||||
map.put("point_location",jsonPoint.getPoint_location());
|
map.put("point_location", jsonPoint.getPoint_location());
|
||||||
JSONObject jsonIvt = WQL.getWO("PDA_01").addParamMap(map).process().uniqueResult(0);
|
JSONObject jsonIvt = WQL.getWO("PDA_RAWFOIL_01").addParamMap(map).process().uniqueResult(0);
|
||||||
// 3.如果没找到则继续找下一节点
|
// 3.如果没找到则继续找下一节点
|
||||||
if (ObjectUtil.isEmpty(jsonIvt)) {
|
if (ObjectUtil.isEmpty(jsonIvt)) {
|
||||||
String point_location = jsonPoint.getPoint_location();
|
String point_location = jsonPoint.getPoint_location();
|
||||||
if (StrUtil.equals(point_location, "0")) map.put("point_location","1");
|
if (StrUtil.equals(point_location, "0")) map.put("point_location", "1");
|
||||||
if (StrUtil.equals(point_location, "1")) map.put("point_location","0");
|
if (StrUtil.equals(point_location, "1")) map.put("point_location", "0");
|
||||||
JSONObject jsonIvt_tow = WQL.getWO("PDA_01").addParamMap(map).process().uniqueResult(0);
|
JSONObject jsonIvt_tow = WQL.getWO("PDA_RAWFOIL_01").addParamMap(map).process().uniqueResult(0);
|
||||||
|
|
||||||
if (ObjectUtil.isEmpty(jsonIvt_tow)) throw new BadRequestException("库存不足");
|
if (ObjectUtil.isEmpty(jsonIvt_tow)) throw new BadRequestException("库存不足");
|
||||||
start_pint_code = jsonIvt_tow.getString("point_code");
|
start_pint_code = jsonIvt_tow.getString("empty_point_code");
|
||||||
} else {
|
} else {
|
||||||
start_pint_code = jsonIvt.getString("point_code");
|
start_pint_code = jsonIvt.getString("empty_point_code");
|
||||||
}
|
}
|
||||||
// 起点和终点确定 生成任务
|
// 起点和终点确定 生成任务
|
||||||
JSONObject param = new JSONObject();
|
JSONObject param = new JSONObject();
|
||||||
param.put("start_pint_code",start_pint_code);
|
param.put("start_pint_code", start_pint_code);
|
||||||
param.put("end_pint_code",end_pint_code);
|
param.put("end_pint_code", end_pint_code);
|
||||||
|
|
||||||
CallEmpReelTask callEmpReelTask = new CallEmpReelTask();
|
CallEmpReelTask callEmpReelTask = new CallEmpReelTask();
|
||||||
String taskdtl_id = callEmpReelTask.createTask(param);
|
String taskdtl_id = callEmpReelTask.createTask(param);
|
||||||
|
|
||||||
// 下发任务
|
// 下发任务
|
||||||
JSONObject jsonObject = callEmpReelTask.renotifyAcs(taskdtl_id);
|
JSONObject jsonObject = callEmpReelTask.renotifyAcs(taskdtl_id);
|
||||||
if (StrUtil.equals(jsonObject.getString("status"), "200")) {
|
if (StrUtil.equals(jsonObject.getString("status"), "200")) {
|
||||||
// 成功返回 更新任务状态
|
// 成功返回 更新任务状态
|
||||||
JSONObject jsonTask = taskTab.query("taskdtl_id ='" + taskdtl_id + "'").uniqueResult(0);
|
JSONObject jsonTask = taskTab.query("taskdtl_id ='" + taskdtl_id + "'").uniqueResult(0);
|
||||||
jsonTask.put("task_status", "05");
|
jsonTask.put("task_status", "05");
|
||||||
taskTab.update(jsonTask);
|
taskTab.update(jsonTask);
|
||||||
}
|
|
||||||
|
|
||||||
result.put("rows", rows);
|
|
||||||
result.put("code", "1");
|
|
||||||
result.put("desc", "操作成功");
|
|
||||||
|
|
||||||
} catch (Exception e) {
|
|
||||||
result.put("rows", rows);
|
|
||||||
result.put("code", "0");
|
|
||||||
result.put("desc", "操作失败:"+e.getMessage());
|
|
||||||
}
|
}
|
||||||
return result;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public JSONObject confirmBlanking(JSONObject whereJson) {
|
public void confirmBlanking(JSONObject whereJson) {
|
||||||
String start_pint_code = whereJson.getString("start_pint_code");
|
|
||||||
|
|
||||||
JSONObject result = new JSONObject();
|
}
|
||||||
JSONArray rows = new JSONArray();
|
|
||||||
|
|
||||||
try {
|
@Override
|
||||||
if (ObjectUtil.isEmpty(start_pint_code)) throw new BadRequestException("起点不能为空");
|
public void finishBlanking(JSONObject whereJson) {
|
||||||
String end_pint_code ="";
|
String start_pint_code = whereJson.getString("point_code");
|
||||||
|
|
||||||
// 1.查询此点位是否存在
|
WQLObject regionTab = WQLObject.getWQLObject("ST_IVT_CoolRegionIO"); // 冷却区出入表
|
||||||
PointDto jsonPoint = pointService.findByCode(start_pint_code);
|
WQLObject materTab = WQLObject.getWQLObject("md_me_materialbase"); // 物料表
|
||||||
if (ObjectUtil.isEmpty(jsonPoint)) throw new BadRequestException("起点点位不存在");
|
WQLObject coolTab = WQLObject.getWQLObject("PDM_BI_RawFoilWorkOrder"); // 生箔工单表
|
||||||
|
WQLObject taskTab = WQLObject.getWQLObject("SCH_BASE_Task"); // 任务表
|
||||||
|
|
||||||
// 2.根据就近原则查对应空卷抽
|
JSONObject jsonCool = coolTab.query("mfg_order_name = '" + whereJson.getString("mfg_order_name") + "'").uniqueResult(0);
|
||||||
JSONObject map = new JSONObject();
|
|
||||||
map.put("flag", "2");
|
|
||||||
map.put("product_area",jsonPoint.getProduct_area());
|
|
||||||
map.put("point_location",jsonPoint.getPoint_location());
|
|
||||||
JSONObject jsonIvt = WQL.getWO("PDA_01").addParamMap(map).process().uniqueResult(0);
|
|
||||||
// 3.如果没找到则继续找下一节点
|
|
||||||
if (ObjectUtil.isEmpty(jsonIvt)) {
|
|
||||||
String point_location = jsonPoint.getPoint_location();
|
|
||||||
if (StrUtil.equals(point_location, "0")) map.put("point_location","1");
|
|
||||||
if (StrUtil.equals(point_location, "1")) map.put("point_location","0");
|
|
||||||
JSONObject jsonIvt_tow = WQL.getWO("PDA_01").addParamMap(map).process().uniqueResult(0);
|
|
||||||
|
|
||||||
if (ObjectUtil.isEmpty(jsonIvt_tow)) throw new BadRequestException("没有空位");
|
if (ObjectUtil.isEmpty(start_pint_code)) throw new BadRequestException("起点不能为空");
|
||||||
end_pint_code = jsonIvt_tow.getString("point_code");
|
String end_point_code = "";
|
||||||
} else {
|
|
||||||
end_pint_code = jsonIvt.getString("point_code");
|
|
||||||
}
|
|
||||||
// 4.起点和终点确定 生成任务
|
|
||||||
|
|
||||||
// 5.插入入库单
|
// 1.查询此点位是否存在
|
||||||
|
PointDto jsonPoint = pointService.findByCode(start_pint_code);
|
||||||
|
if (ObjectUtil.isEmpty(jsonPoint)) throw new BadRequestException("起点点位不存在");
|
||||||
|
|
||||||
// 6.下发任务
|
// 2.根据就近原则查对应空卷抽
|
||||||
|
JSONObject map = new JSONObject();
|
||||||
} catch (Exception e) {
|
map.put("flag", "2");
|
||||||
|
map.put("product_area", jsonPoint.getProduct_area());
|
||||||
|
map.put("point_location", jsonPoint.getPoint_location());
|
||||||
|
JSONObject jsonIvt = WQL.getWO("PDA_RAWFOIL_01").addParamMap(map).process().uniqueResult(0);
|
||||||
|
// 3.如果没找到则继续找下一节点
|
||||||
|
if (ObjectUtil.isEmpty(jsonIvt)) {
|
||||||
|
String point_location = jsonPoint.getPoint_location();
|
||||||
|
if (StrUtil.equals(point_location, "0")) map.put("point_location", "1");
|
||||||
|
if (StrUtil.equals(point_location, "1")) map.put("point_location", "0");
|
||||||
|
JSONObject jsonIvt_tow = WQL.getWO("PDA_RAWFOIL_01").addParamMap(map).process().uniqueResult(0);
|
||||||
|
|
||||||
|
if (ObjectUtil.isEmpty(jsonIvt_tow)) throw new BadRequestException("没有空位");
|
||||||
|
end_point_code = jsonIvt_tow.getString("full_point_code");
|
||||||
|
} else {
|
||||||
|
end_point_code = jsonIvt.getString("full_point_code");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 4.起点和终点确定 生成任务
|
||||||
|
JSONObject param = new JSONObject();
|
||||||
|
param.put("start_pint_code",start_pint_code);
|
||||||
|
param.put("end_pint_code",end_point_code);
|
||||||
|
|
||||||
|
BookTwoConfirmTask bookTwoConfirmTask = new BookTwoConfirmTask();
|
||||||
|
String taskdtl_id = bookTwoConfirmTask.createTask(param);
|
||||||
|
|
||||||
result.put("rows", rows);
|
// 5.插入入库单
|
||||||
result.put("code", "1");
|
|
||||||
result.put("desc", "查询成功");
|
|
||||||
return result;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public JSONObject finishBlanking(JSONObject whereJson) {
|
|
||||||
JSONObject result = new JSONObject();
|
|
||||||
|
|
||||||
JSONArray rows = new JSONArray();
|
|
||||||
result.put("rows", rows);
|
|
||||||
result.put("code", "1");
|
|
||||||
result.put("desc", "查询成功");
|
|
||||||
return result;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public JSONObject finish(JSONObject whereJson) {
|
|
||||||
JSONObject result = new JSONObject();
|
|
||||||
|
|
||||||
JSONArray rows = new JSONArray();
|
|
||||||
result.put("rows", rows);
|
|
||||||
result.put("code", "1");
|
|
||||||
result.put("desc", "查询成功");
|
|
||||||
return result;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Transactional(rollbackFor = Exception.class)
|
|
||||||
public String createTask(JSONObject param) {
|
|
||||||
WQLObject tab = WQLObject.getWQLObject("SCH_BASE_Task");
|
|
||||||
Long currentUserId = SecurityUtils.getCurrentUserId();
|
Long currentUserId = SecurityUtils.getCurrentUserId();
|
||||||
String currentUsername = SecurityUtils.getCurrentUsername();
|
String currentUsername = SecurityUtils.getCurrentUsername();
|
||||||
|
|
||||||
JSONObject json = new JSONObject();
|
JSONObject jsonMater = materTab.query("material_code = '" + jsonCool.getString("product_name") + "'").uniqueResult(0);
|
||||||
json.put("taskdtl_id", IdUtil.getSnowflake(1,1).nextId());
|
|
||||||
json.put("task_id",json.getString("taskdtl_id"));
|
|
||||||
json.put("task_code", CodeUtil.getNewCode("TASK_CODE"));
|
|
||||||
json.put("task_type", "05");
|
|
||||||
json.put("task_status", "01");
|
|
||||||
json.put("start_point_code", param.getString("start_pint_code"));
|
|
||||||
json.put("next_point_code", param.getString("end_pint_code"));
|
|
||||||
json.put("handle_class", "0");
|
|
||||||
json.put("create_id", currentUserId);
|
|
||||||
json.put("create_name", currentUsername);
|
|
||||||
json.put("create_time", DateUtil.now());
|
|
||||||
json.put("priority","1" );
|
|
||||||
json.put("acs_task_type","1" );
|
|
||||||
tab.insert(json);
|
|
||||||
|
|
||||||
return json.getString("taskdtl_id");
|
JSONObject jsonRegion = new JSONObject();
|
||||||
|
jsonRegion.put("iostorinv_id", IdUtil.getSnowflake(1,1).nextId());
|
||||||
|
jsonRegion.put("bill_code", CodeUtil.getNewCode("COOLREGION_BILL_CODE"));
|
||||||
|
jsonRegion.put("io_type", "1");
|
||||||
|
jsonRegion.put("material_id", jsonMater.getString("material_id"));
|
||||||
|
jsonRegion.put("pcsn","");
|
||||||
|
jsonRegion.put("vehicle_code","");
|
||||||
|
jsonRegion.put("qty",jsonCool.getString("productin_qty"));
|
||||||
|
jsonRegion.put("qty_unit_id","");
|
||||||
|
jsonRegion.put("bill_status","10");
|
||||||
|
jsonRegion.put("start_point_code",start_pint_code);
|
||||||
|
jsonRegion.put("end_point_code",end_point_code);
|
||||||
|
jsonRegion.put("cust_id","");
|
||||||
|
jsonRegion.put("create_mode","03");
|
||||||
|
jsonRegion.put("task_id",taskdtl_id);
|
||||||
|
jsonRegion.put("create_id",currentUserId);
|
||||||
|
jsonRegion.put("create_name",currentUsername);
|
||||||
|
jsonRegion.put("create_time",DateUtil.now());
|
||||||
|
regionTab.insert(jsonRegion);
|
||||||
|
|
||||||
|
// 6.下发任务
|
||||||
|
JSONObject jsonObject = bookTwoConfirmTask.renotifyAcs(taskdtl_id);
|
||||||
|
if (StrUtil.equals(jsonObject.getString("status"), "200")) {
|
||||||
|
// 成功返回 更新任务状态
|
||||||
|
JSONObject jsonTask = taskTab.query("taskdtl_id ='" + taskdtl_id + "'").uniqueResult(0);
|
||||||
|
jsonTask.put("task_status", "05");
|
||||||
|
taskTab.update(jsonTask);
|
||||||
|
// 更新出入表状态
|
||||||
|
jsonRegion.put("bill_status", "30");
|
||||||
|
jsonRegion.put("update_optid",currentUserId);
|
||||||
|
jsonRegion.put("update_optname",currentUsername);
|
||||||
|
jsonRegion.put("update_time",DateUtil.now());
|
||||||
|
regionTab.update(jsonRegion);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void finish(JSONObject whereJson) {
|
||||||
|
WQLObject coolTab = WQLObject.getWQLObject("PDM_BI_RawFoilWorkOrder"); // 生箔工单表
|
||||||
|
|
||||||
|
JSONObject jsonCool = coolTab.query("mfg_order_name = '" + whereJson.getString("mfg_order_name") + "'").uniqueResult(0);
|
||||||
|
jsonCool.put("status","2");
|
||||||
|
jsonCool.put("realend_time",DateUtil.now());
|
||||||
|
jsonCool.put("finish_type","02");
|
||||||
|
coolTab.update(jsonCool);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,87 +0,0 @@
|
|||||||
[交易说明]
|
|
||||||
交易名: 手持接口
|
|
||||||
所属模块:
|
|
||||||
功能简述:
|
|
||||||
版权所有:
|
|
||||||
表引用:
|
|
||||||
版本经历:
|
|
||||||
|
|
||||||
[数据库]
|
|
||||||
--指定数据库,为空采用默认值,默认为db.properties中列出的第一个库
|
|
||||||
|
|
||||||
[IO定义]
|
|
||||||
#################################################
|
|
||||||
## 表字段对应输入参数
|
|
||||||
#################################################
|
|
||||||
输入.flag TYPEAS s_string
|
|
||||||
输入.product_area TYPEAS s_string
|
|
||||||
输入.point_location TYPEAS s_string
|
|
||||||
|
|
||||||
|
|
||||||
[临时表]
|
|
||||||
--这边列出来的临时表就会在运行期动态创建
|
|
||||||
|
|
||||||
[临时变量]
|
|
||||||
--所有中间过程变量均可在此处定义
|
|
||||||
|
|
||||||
[业务过程]
|
|
||||||
|
|
||||||
##########################################
|
|
||||||
# 1、输入输出检查 #
|
|
||||||
##########################################
|
|
||||||
|
|
||||||
|
|
||||||
##########################################
|
|
||||||
# 2、主过程前处理 #
|
|
||||||
##########################################
|
|
||||||
|
|
||||||
|
|
||||||
##########################################
|
|
||||||
# 3、业务主过程 #
|
|
||||||
##########################################
|
|
||||||
|
|
||||||
IF 输入.flag = "1"
|
|
||||||
QUERY
|
|
||||||
SELECT
|
|
||||||
ivt.*
|
|
||||||
FROM
|
|
||||||
ST_IVT_CoolPointIvt ivt
|
|
||||||
WHERE
|
|
||||||
ivt.empty_point_status = '02'
|
|
||||||
|
|
||||||
OPTION 输入.product_area <> ""
|
|
||||||
ivt.product_area = 输入.product_area
|
|
||||||
ENDOPTION
|
|
||||||
|
|
||||||
OPTION 输入.point_location <> ""
|
|
||||||
ivt.point_location = 输入.point_location
|
|
||||||
ENDOPTION
|
|
||||||
|
|
||||||
order by ivt.point_code ASC
|
|
||||||
|
|
||||||
ENDSELECT
|
|
||||||
ENDQUERY
|
|
||||||
ENDIF
|
|
||||||
|
|
||||||
IF 输入.flag = "2"
|
|
||||||
QUERY
|
|
||||||
SELECT
|
|
||||||
ivt.*
|
|
||||||
FROM
|
|
||||||
ST_IVT_CoolPointIvt ivt
|
|
||||||
WHERE
|
|
||||||
ivt.full_point_status = '01'
|
|
||||||
|
|
||||||
OPTION 输入.product_area <> ""
|
|
||||||
ivt.product_area = 输入.product_area
|
|
||||||
ENDOPTION
|
|
||||||
|
|
||||||
OPTION 输入.point_location <> ""
|
|
||||||
ivt.point_location = 输入.point_location
|
|
||||||
ENDOPTION
|
|
||||||
|
|
||||||
order by ivt.point_code ASC
|
|
||||||
|
|
||||||
ENDSELECT
|
|
||||||
ENDQUERY
|
|
||||||
ENDIF
|
|
||||||
@@ -0,0 +1,169 @@
|
|||||||
|
[交易说明]
|
||||||
|
交易名: 手持接口
|
||||||
|
所属模块:
|
||||||
|
功能简述:
|
||||||
|
版权所有:
|
||||||
|
表引用:
|
||||||
|
版本经历:
|
||||||
|
|
||||||
|
[数据库]
|
||||||
|
--指定数据库,为空采用默认值,默认为db.properties中列出的第一个库
|
||||||
|
|
||||||
|
[IO定义]
|
||||||
|
#################################################
|
||||||
|
## 表字段对应输入参数
|
||||||
|
#################################################
|
||||||
|
输入.flag TYPEAS s_string
|
||||||
|
输入.product_area TYPEAS s_string
|
||||||
|
输入.point_location TYPEAS s_string
|
||||||
|
输入.point_code TYPEAS s_string
|
||||||
|
输入.container_name TYPEAS s_string
|
||||||
|
输入.product_area TYPEAS s_string
|
||||||
|
|
||||||
|
|
||||||
|
[临时表]
|
||||||
|
--这边列出来的临时表就会在运行期动态创建
|
||||||
|
|
||||||
|
[临时变量]
|
||||||
|
--所有中间过程变量均可在此处定义
|
||||||
|
|
||||||
|
[业务过程]
|
||||||
|
|
||||||
|
##########################################
|
||||||
|
# 1、输入输出检查 #
|
||||||
|
##########################################
|
||||||
|
|
||||||
|
|
||||||
|
##########################################
|
||||||
|
# 2、主过程前处理 #
|
||||||
|
##########################################
|
||||||
|
|
||||||
|
|
||||||
|
##########################################
|
||||||
|
# 3、业务主过程 #
|
||||||
|
##########################################
|
||||||
|
|
||||||
|
IF 输入.flag = "1"
|
||||||
|
QUERY
|
||||||
|
SELECT
|
||||||
|
ivt.*
|
||||||
|
FROM
|
||||||
|
ST_IVT_CoolPointIvt ivt
|
||||||
|
WHERE
|
||||||
|
ivt.empty_point_status = '02'
|
||||||
|
|
||||||
|
OPTION 输入.product_area <> ""
|
||||||
|
ivt.product_area = 输入.product_area
|
||||||
|
ENDOPTION
|
||||||
|
|
||||||
|
OPTION 输入.point_location <> ""
|
||||||
|
ivt.point_location = 输入.point_location
|
||||||
|
ENDOPTION
|
||||||
|
|
||||||
|
order by ivt.point_code ASC
|
||||||
|
|
||||||
|
ENDSELECT
|
||||||
|
ENDQUERY
|
||||||
|
ENDIF
|
||||||
|
|
||||||
|
IF 输入.flag = "2"
|
||||||
|
QUERY
|
||||||
|
SELECT
|
||||||
|
ivt.*
|
||||||
|
FROM
|
||||||
|
ST_IVT_CoolPointIvt ivt
|
||||||
|
WHERE
|
||||||
|
ivt.full_point_status = '01'
|
||||||
|
|
||||||
|
OPTION 输入.product_area <> ""
|
||||||
|
ivt.product_area = 输入.product_area
|
||||||
|
ENDOPTION
|
||||||
|
|
||||||
|
OPTION 输入.point_location <> ""
|
||||||
|
ivt.point_location = 输入.point_location
|
||||||
|
ENDOPTION
|
||||||
|
|
||||||
|
order by ivt.point_code ASC
|
||||||
|
|
||||||
|
ENDSELECT
|
||||||
|
ENDQUERY
|
||||||
|
ENDIF
|
||||||
|
|
||||||
|
IF 输入.flag = "3"
|
||||||
|
QUERY
|
||||||
|
SELECT
|
||||||
|
label,
|
||||||
|
value
|
||||||
|
FROM
|
||||||
|
sys_dict_detail
|
||||||
|
WHERE
|
||||||
|
name = 'product_area'
|
||||||
|
|
||||||
|
ENDSELECT
|
||||||
|
ENDQUERY
|
||||||
|
ENDIF
|
||||||
|
|
||||||
|
IF 输入.flag = "4"
|
||||||
|
QUERY
|
||||||
|
SELECT
|
||||||
|
der.*
|
||||||
|
FROM
|
||||||
|
PDM_BI_RawFoilWorkOrder der
|
||||||
|
WHERE
|
||||||
|
der.status = '1'
|
||||||
|
AND der.is_delete = '0'
|
||||||
|
|
||||||
|
OPTION 输入.point_code <> ""
|
||||||
|
der.resource_name = 输入.point_code
|
||||||
|
ENDOPTION
|
||||||
|
|
||||||
|
OPTION 输入.container_name <> ""
|
||||||
|
der.container_name = 输入.container_name
|
||||||
|
ENDOPTION
|
||||||
|
|
||||||
|
OPTION 输入.product_area <> ""
|
||||||
|
der.product_area = 输入.product_area
|
||||||
|
ENDOPTION
|
||||||
|
|
||||||
|
ENDSELECT
|
||||||
|
ENDQUERY
|
||||||
|
ENDIF
|
||||||
|
|
||||||
|
IF 输入.flag = "5"
|
||||||
|
QUERY
|
||||||
|
SELECT
|
||||||
|
(
|
||||||
|
CASE
|
||||||
|
der.status
|
||||||
|
WHEN '1' THEN '开始'
|
||||||
|
WHEN '2' THEN '结束'
|
||||||
|
END
|
||||||
|
) AS status_name,
|
||||||
|
der.mfg_order_name AS mfg_order_name,
|
||||||
|
der.container_name AS container_name,
|
||||||
|
der.resource_name AS point_code,
|
||||||
|
der.product_name AS pcsn,
|
||||||
|
der.theory_height AS theory_height,
|
||||||
|
der.realstart_time AS realstart_time,
|
||||||
|
der.realend_time AS realend_time,
|
||||||
|
der.productin_qty AS productin_qty,
|
||||||
|
der.agvno AS agvno,
|
||||||
|
der.product_area AS product_area,
|
||||||
|
der.update_time AS update_time
|
||||||
|
FROM
|
||||||
|
PDM_BI_RawFoilWorkOrder der
|
||||||
|
WHERE
|
||||||
|
der.status = '1'
|
||||||
|
AND der.is_delete = '0'
|
||||||
|
|
||||||
|
OPTION 输入.point_code <> ""
|
||||||
|
der.resource_name = 输入.point_code
|
||||||
|
ENDOPTION
|
||||||
|
|
||||||
|
OPTION 输入.container_name <> ""
|
||||||
|
der.container_name = 输入.container_name
|
||||||
|
ENDOPTION
|
||||||
|
|
||||||
|
ENDSELECT
|
||||||
|
ENDQUERY
|
||||||
|
ENDIF
|
||||||
@@ -28,9 +28,11 @@ public class BookTwoConfirmTask extends AbstractAcsTask {
|
|||||||
@Override
|
@Override
|
||||||
@Transactional
|
@Transactional
|
||||||
public void updateTaskStatus(JSONObject taskObj, String status) {
|
public void updateTaskStatus(JSONObject taskObj, String status) {
|
||||||
WQLObject taskTab = WQLObject.getWQLObject("SCH_BASE_Task");
|
WQLObject taskTab = WQLObject.getWQLObject("SCH_BASE_Task"); // 任务表
|
||||||
WQLObject pointTab = WQLObject.getWQLObject("sch_base_point");
|
WQLObject pointTab = WQLObject.getWQLObject("sch_base_point"); // 点位表
|
||||||
WQLObject ivtTab = WQLObject.getWQLObject("ST_IVT_CoolPointIvt");
|
WQLObject ivtTab = WQLObject.getWQLObject("ST_IVT_CoolPointIvt"); // 冷却区库存表
|
||||||
|
WQLObject coolTab = WQLObject.getWQLObject("ST_IVT_CoolRegionIO"); // 冷却区出入表
|
||||||
|
WQLObject rawTab = WQLObject.getWQLObject("PDM_BI_RawFoilWorkOrder"); // 生箔工序工单表
|
||||||
|
|
||||||
String task_id = taskObj.getString("task_id");
|
String task_id = taskObj.getString("task_id");
|
||||||
JSONObject jsonTask = taskTab.query("task_id = '" + task_id + "'").uniqueResult(0);
|
JSONObject jsonTask = taskTab.query("task_id = '" + task_id + "'").uniqueResult(0);
|
||||||
@@ -41,10 +43,20 @@ public class BookTwoConfirmTask extends AbstractAcsTask {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (TaskStatusEnum.EXECUTING.getCode().equals(status)) {
|
if (TaskStatusEnum.EXECUTING.getCode().equals(status)) {
|
||||||
|
Long currentUserId = SecurityUtils.getCurrentUserId();
|
||||||
|
String currentUsername = SecurityUtils.getCurrentUsername();
|
||||||
|
|
||||||
// 更新任务状态为执行中
|
// 更新任务状态为执行中
|
||||||
jsonTask.put("task_status", TaskStatusEnum.EXECUTING.getCode());
|
jsonTask.put("task_status", TaskStatusEnum.EXECUTING.getCode());
|
||||||
jsonTask.put("update_time", DateUtil.now());
|
jsonTask.put("update_time", DateUtil.now());
|
||||||
taskTab.update(jsonTask);
|
taskTab.update(jsonTask);
|
||||||
|
// 更新单据状态为执行中
|
||||||
|
JSONObject jsonCool = coolTab.query("task_id = '" + task_id + "'").uniqueResult(0);
|
||||||
|
jsonCool.put("bill_status", "40");
|
||||||
|
jsonCool.put("update_optid",currentUserId);
|
||||||
|
jsonCool.put("update_optname",currentUsername);
|
||||||
|
jsonCool.put("update_time",DateUtil.now());
|
||||||
|
coolTab.update(jsonCool);
|
||||||
}
|
}
|
||||||
|
|
||||||
if(StrUtil.equals(status, TaskStatusEnum.FINISHED.getCode())) {
|
if(StrUtil.equals(status, TaskStatusEnum.FINISHED.getCode())) {
|
||||||
@@ -55,20 +67,35 @@ public class BookTwoConfirmTask extends AbstractAcsTask {
|
|||||||
jsonTask.put("update_time", DateUtil.now());
|
jsonTask.put("update_time", DateUtil.now());
|
||||||
taskTab.update(jsonTask);
|
taskTab.update(jsonTask);
|
||||||
|
|
||||||
|
String next_point_code = jsonTask.getString("next_point_code");
|
||||||
String start_point_code = jsonTask.getString("start_point_code");
|
String start_point_code = jsonTask.getString("start_point_code");
|
||||||
|
|
||||||
PointService point = SpringContextHolder.getBean(PointService.class);
|
PointService point = SpringContextHolder.getBean(PointService.class);
|
||||||
// 校验起点是否存在
|
// 校验起点是否存在
|
||||||
PointDto startDto = point.findByCode(start_point_code);
|
PointDto startDto = point.findByCode(start_point_code);
|
||||||
if (ObjectUtil.isEmpty(startDto)) throw new BadRequestException("未找到可用点位:" + startDto);
|
if (ObjectUtil.isEmpty(startDto)) throw new BadRequestException("起点未找到可用点位:" + start_point_code);
|
||||||
|
|
||||||
// 校验终点是否存在
|
// 校验终点是否存在
|
||||||
PointDto nextDto = point.findByCode(jsonTask.getString("next_point_code"));
|
JSONObject jsonIvt = ivtTab.query("point_code ='" + next_point_code + "'").uniqueResult(0);
|
||||||
if (ObjectUtil.isEmpty(nextDto)) throw new BadRequestException("未找到可用点位:" + nextDto);
|
if (ObjectUtil.isEmpty(jsonIvt)) throw new BadRequestException("终点未找到可用点位:" + next_point_code);
|
||||||
|
|
||||||
// 更新冷却库存状态
|
// 更新冷却库存状态
|
||||||
JSONObject jsonIvt = ivtTab.query("point_code ='" + start_point_code + "'").uniqueResult(0);
|
JSONObject jsonRaw = rawTab.query("resource_name ='" + start_point_code + "'").uniqueResult(0);
|
||||||
jsonIvt.put("empty_point_status", "01");
|
|
||||||
|
jsonIvt.put("full_point_status", "02");
|
||||||
|
jsonIvt.put("instorage_time", DateUtil.now());
|
||||||
|
jsonIvt.put("container_name", jsonRaw.getString("container_name"));
|
||||||
|
jsonIvt.put("workorder_id", jsonRaw.getString("workorder_id"));
|
||||||
|
jsonIvt.put("ivt_qty", jsonRaw.getString("productin_qty"));
|
||||||
ivtTab.update(jsonIvt);
|
ivtTab.update(jsonIvt);
|
||||||
|
|
||||||
|
// 更新冷却区出入表
|
||||||
|
JSONObject jsonCool = coolTab.query("task_id = '" + task_id + "'").uniqueResult(0);
|
||||||
|
jsonCool.put("bill_status","50");
|
||||||
|
jsonCool.put("confirm_optid", SecurityUtils.getCurrentUserId());
|
||||||
|
jsonCool.put("confirm_optname", SecurityUtils.getCurrentUsername());
|
||||||
|
jsonCool.put("confirm_time", DateUtil.now());
|
||||||
|
coolTab.update(jsonCool);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -69,14 +69,13 @@ public class CallEmpReelTask extends AbstractAcsTask {
|
|||||||
|
|
||||||
PointService point = SpringContextHolder.getBean(PointService.class);
|
PointService point = SpringContextHolder.getBean(PointService.class);
|
||||||
// 校验起点是否存在
|
// 校验起点是否存在
|
||||||
PointDto startDto = point.findByCode(start_point_code);
|
JSONObject jsonIvt = ivtTab.query("point_code ='" + start_point_code + "'").uniqueResult(0);
|
||||||
if (ObjectUtil.isEmpty(startDto)) throw new BadRequestException("未找到可用点位:" + startDto);
|
if (ObjectUtil.isEmpty(jsonIvt)) throw new BadRequestException("未找到可用点位:" + start_point_code);
|
||||||
// 校验终点是否存在
|
// 校验终点是否存在
|
||||||
PointDto nextDto = point.findByCode(jsonTask.getString("next_point_code"));
|
PointDto nextDto = point.findByCode(jsonTask.getString("next_point_code"));
|
||||||
if (ObjectUtil.isEmpty(nextDto)) throw new BadRequestException("未找到可用点位:" + nextDto);
|
if (ObjectUtil.isEmpty(nextDto)) throw new BadRequestException("未找到可用点位:" + jsonTask.getString("next_point_code"));
|
||||||
|
|
||||||
// 更新冷却库存状态
|
// 更新冷却库存状态
|
||||||
JSONObject jsonIvt = ivtTab.query("point_code ='" + start_point_code + "'").uniqueResult(0);
|
|
||||||
jsonIvt.put("empty_point_status", "01");
|
jsonIvt.put("empty_point_status", "01");
|
||||||
ivtTab.update(jsonIvt);
|
ivtTab.update(jsonIvt);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user