This commit is contained in:
2022-10-13 19:47:23 +08:00
parent 5885a1d1fd
commit 44f605528f
24 changed files with 210 additions and 94 deletions

View File

@@ -114,7 +114,7 @@ public class AuthorizationController {
jsonObject.put("roles", permissionList);
jsonObject.put("user", userDto);
Map<String, Object> authInfo = new HashMap<String, Object>(2) {{
put("token", StpUtil.getTokenValue());
put("token","Bearer "+ StpUtil.getTokenValue());
put("user", jsonObject);
}};

View File

@@ -79,7 +79,7 @@ public class MobileAuthorizationController {
JSONObject jsonObject = new JSONObject();
jsonObject.put("user", userDto);
Map<String, Object> authInfo = new HashMap<String, Object>(2) {{
put("token", StpUtil.getTokenValue());
put("token","Bearer "+ StpUtil.getTokenValue());
put("user", jsonObject);
}};

View File

@@ -19,6 +19,7 @@ import org.springframework.stereotype.Service;
@RequiredArgsConstructor
@Slf4j
public class LmsToMesServiceImpl implements LmsToMesService {
/**
* LMS的PDA操作AGV下卷AGV称重完成后AGV称重信息发送MES
*

View File

@@ -35,7 +35,6 @@ public class CasingController {
@Log("套轴确认")
@ApiOperation("套轴确认")
public ResponseEntity<Object> confirm(@RequestBody JSONObject whereJson) {
casingService.confirm(whereJson);
return new ResponseEntity<>(HttpStatus.OK);
return new ResponseEntity<>(casingService.confirm(whereJson), HttpStatus.OK);
}
}

View File

@@ -35,7 +35,6 @@ public class EmptyTubeController {
@Log("入库确认")
@ApiOperation("入库确认")
public ResponseEntity<Object> confirm(@RequestBody JSONObject whereJson) {
emptyTubeService.confirm(whereJson);
return new ResponseEntity<>(HttpStatus.OK);
return new ResponseEntity<>(emptyTubeService.confirm(whereJson), HttpStatus.OK);
}
}

View File

@@ -35,7 +35,6 @@ public class OutController {
@Log("子卷出站")
@ApiOperation("子卷出站")
public ResponseEntity<Object> confirm(@RequestBody JSONObject whereJson) {
outService.confirm(whereJson);
return new ResponseEntity<>(HttpStatus.OK);
return new ResponseEntity<>(outService.confirm(whereJson), HttpStatus.OK);
}
}

View File

@@ -29,8 +29,7 @@ public class PointStatusController {
@Log("点位解绑绑定")
@ApiOperation("点位解绑绑定")
public ResponseEntity<Object> pointOperate(@RequestBody JSONObject whereJson) {
pointStatusService.pointOperate(whereJson);
return new ResponseEntity<>(HttpStatus.OK);
return new ResponseEntity<>(pointStatusService.pointOperate(whereJson), HttpStatus.OK);
}
@PostMapping("/pointStatusQuery")

View File

@@ -35,15 +35,13 @@ public class ShippingController {
@Log("呼叫载具")
@ApiOperation("呼叫载具")
public ResponseEntity<Object> needVehicle(@RequestBody JSONObject whereJson) {
shippingService.needVehicle(whereJson);
return new ResponseEntity<>(HttpStatus.OK);
return new ResponseEntity<>(shippingService.needVehicle(whereJson), HttpStatus.OK);
}
@PostMapping("/confirm")
@Log("套轴确认")
@ApiOperation("套轴确认")
public ResponseEntity<Object> confirm(@RequestBody JSONObject whereJson) {
shippingService.confirm(whereJson);
return new ResponseEntity<>(HttpStatus.OK);
return new ResponseEntity<>(shippingService.confirm(whereJson), HttpStatus.OK);
}
}

View File

@@ -10,13 +10,13 @@ public interface CasingService {
* @param whereJson /
* @return JSONObject
*/
JSONArray queryMaterialInfo(JSONObject whereJson);
JSONObject queryMaterialInfo(JSONObject whereJson);
/**
* 套轴确认
* @param whereJson /
* @return JSONObject
*/
void confirm(JSONObject whereJson);
JSONObject confirm(JSONObject whereJson);
}

View File

@@ -10,13 +10,13 @@ public interface EmptyTubeService {
* @param whereJson /
* @return JSONObject
*/
JSONArray queryMaterialInfo(JSONObject whereJson);
JSONObject queryMaterialInfo(JSONObject whereJson);
/**
* 入库确认
* @param whereJson /
* @return JSONObject
*/
void confirm(JSONObject whereJson);
JSONObject confirm(JSONObject whereJson);
}

View File

@@ -10,13 +10,13 @@ public interface OutService {
* @param whereJson /
* @return JSONObject
*/
JSONArray queryMaterialInfo(JSONObject whereJson);
JSONObject queryMaterialInfo(JSONObject whereJson);
/**
* 出站确认
* @param whereJson /
* @return JSONObject
*/
void confirm(JSONObject whereJson);
JSONObject confirm(JSONObject whereJson);
}

View File

@@ -10,7 +10,7 @@ public interface PointStatusService {
* @param whereJson /
* @return JSONObject
*/
void pointOperate(JSONObject whereJson);
JSONObject pointOperate(JSONObject whereJson);
/**
* 点位状态查询

View File

@@ -10,20 +10,20 @@ public interface ShippingService {
* @param whereJson /
* @return JSONObject
*/
JSONArray queryMaterialInfo(JSONObject whereJson);
JSONObject queryMaterialInfo(JSONObject whereJson);
/**
* 呼叫载具
* @param whereJson /
* @return JSONObject
*/
void needVehicle(JSONObject whereJson);
JSONObject needVehicle(JSONObject whereJson);
/**
* 配送确认
* @param whereJson /
* @return JSONObject
*/
void confirm(JSONObject whereJson);
JSONObject confirm(JSONObject whereJson);
}

View File

@@ -14,6 +14,7 @@ import org.nl.wms.ext.mes.service.LmsToMesService;
import org.nl.wms.pda.mps.service.BakingService;
import org.nl.wms.pda.mps.service.CasingService;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import java.util.HashMap;
import java.util.jar.JarEntry;
@@ -25,7 +26,7 @@ public class CasingServiceImpl implements CasingService {
private final LmsToMesService lmsToMesService;
@Override
public JSONArray queryMaterialInfo(JSONObject whereJson) {
public JSONObject queryMaterialInfo(JSONObject whereJson) {
String product_area = whereJson.getString("product_area");
HashMap map = new HashMap();
@@ -34,11 +35,15 @@ public class CasingServiceImpl implements CasingService {
map.put("product_area", product_area);
}
JSONArray rows = WQL.getWO("PDA_02").addParamMap(map).process().getResultJSONArray(0);
return rows;
JSONObject jo = new JSONObject();
jo.put("data",rows);
jo.put("message","查询成功!");
return jo;
}
@Transactional(rollbackFor = Exception.class)
@Override
public void confirm(JSONObject whereJson) {
public JSONObject confirm(JSONObject whereJson) {
Long currentUserId = SecurityUtils.getCurrentUserId();
String nickName = SecurityUtils.getCurrentNickName();
String now = DateUtil.now();
@@ -64,8 +69,13 @@ public class CasingServiceImpl implements CasingService {
JSONObject jo = new JSONObject();
jo.put("ContainerName",row.getString("container_name"));
jo.put("isAirSwellAssComplete",1);
lmsToMesService.airSwellWithPaperTubeAssComplete(jo);
//lmsToMesService.airSwellWithPaperTubeAssComplete(jo);
}
JSONObject result = new JSONObject();
result.put("message","操作成功!");
return result;
}

View File

@@ -14,6 +14,7 @@ import org.nl.modules.wql.util.SpringContextHolder;
import org.nl.wms.pda.mps.service.BakingService;
import org.nl.wms.pda.mps.service.EmptyTubeService;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import java.util.HashMap;
import java.util.jar.JarEntry;
@@ -25,7 +26,7 @@ public class EmptyTubeServiceImpl implements EmptyTubeService {
@Override
public JSONArray queryMaterialInfo(JSONObject whereJson) {
public JSONObject queryMaterialInfo(JSONObject whereJson) {
String point_code = whereJson.getString("point_code");
String material_code = whereJson.getString("material_code");
String product_area = whereJson.getString("product_area");
@@ -42,11 +43,15 @@ public class EmptyTubeServiceImpl implements EmptyTubeService {
map.put("product_area", product_area);
}
JSONArray rows = WQL.getWO("PDA_02").addParamMap(map).process().getResultJSONArray(0);
return rows;
JSONObject jo = new JSONObject();
jo.put("data",rows);
jo.put("message","查询成功!");
return jo;
}
@Transactional(rollbackFor = Exception.class)
@Override
public void confirm(JSONObject whereJson) {
public JSONObject confirm(JSONObject whereJson) {
JSONObject raw_jo = whereJson.getJSONObject("raw_jo");
double add_qty = whereJson.getDoubleValue("qty");
@@ -75,6 +80,10 @@ public class EmptyTubeServiceImpl implements EmptyTubeService {
raw_jo.put("material_name",mater.getString("material_name"));
raw_jo.put("qty",add_qty + raw_jo.getIntValue("qty"));
WQLObject.getWQLObject("ST_IVT_EmptyTubeIvt").update(raw_jo);
JSONObject jo = new JSONObject();
jo.put("message","操作成功!");
return jo;
}

View File

@@ -23,7 +23,7 @@ public class OutServiceImpl implements OutService {
@Override
public JSONArray queryMaterialInfo(JSONObject whereJson) {
public JSONObject queryMaterialInfo(JSONObject whereJson) {
String product_area = whereJson.getString("product_area");
HashMap map = new HashMap();
@@ -32,12 +32,15 @@ public class OutServiceImpl implements OutService {
map.put("product_area", product_area);
}
JSONArray rows = WQL.getWO("PDA_02").addParamMap(map).process().getResultJSONArray(0);
return rows;
JSONObject jo = new JSONObject();
jo.put("data",rows);
jo.put("message","查询成功!");
return jo;
}
@Override
public void confirm(JSONObject whereJson) {
public JSONObject confirm(JSONObject whereJson) {
String point_code = whereJson.getString("point_code");
//查询该点位对应的机台编号
@@ -69,8 +72,13 @@ public class OutServiceImpl implements OutService {
jo.put("point_code2",point_code);
jo.put("point_code3",point_code);
jo.put("point_code4",delivery_point.getString("point_code"));
jo.put("vehicle_code",delivery_point.getString("qzzno"));
jo.put("vehicle_code2",qzzno);
jo.put("task_type","010403");
JSONObject result = new JSONObject();
result.put("message","操作成功!");
return result;
}

View File

@@ -19,94 +19,102 @@ public class PointStatusServiceImpl implements PointStatusService {
@Override
public void pointOperate(JSONObject whereJson) {
public JSONObject pointOperate(JSONObject whereJson) {
String point_code = whereJson.getString("point_code");
if (StrUtil.isEmpty(point_code)){
if (StrUtil.isEmpty(point_code)) {
throw new BadRequestException("输入的点位不能为空!");
}
String option = whereJson.getString("point_code");
//1-绑定
if (option.equals("1")){
if (option.equals("1")) {
String container_name = whereJson.getString("container_name");
if (StrUtil.isEmpty(container_name)){
if (StrUtil.isEmpty(container_name)) {
throw new BadRequestException("空轴/母卷不能为空!");
}
//查询该点对应的是什么位置
JSONObject cut_point = WQLObject.getWQLObject("ST_IVT_CutPointIvt").query("full_point_code = '"+point_code+"'").uniqueResult(0);
if (ObjectUtil.isNotEmpty(cut_point)){
JSONObject cut_point = WQLObject.getWQLObject("ST_IVT_CutPointIvt").query("full_point_code = '" + point_code + "'").uniqueResult(0);
if (ObjectUtil.isNotEmpty(cut_point)) {
String now_container_name = cut_point.getString("container_name");
if (StrUtil.isNotEmpty(now_container_name)){
if (StrUtil.isNotEmpty(now_container_name)) {
throw new BadRequestException("该点位上已存在母卷,不能进行绑定!");
}
cut_point.put("container_name",container_name);
cut_point.put("full_point_status","02");
}else {
cut_point = WQLObject.getWQLObject("ST_IVT_CutPointIvt").query("empty_point_code = '"+point_code+"'").uniqueResult(0);
if (ObjectUtil.isNotEmpty(cut_point)){
cut_point.put("container_name", container_name);
cut_point.put("full_point_status", "02");
} else {
cut_point = WQLObject.getWQLObject("ST_IVT_CutPointIvt").query("empty_point_code = '" + point_code + "'").uniqueResult(0);
if (ObjectUtil.isNotEmpty(cut_point)) {
String empty_vehicle_code = cut_point.getString("empty_vehicle_code");
if (StrUtil.isNotEmpty(empty_vehicle_code)){
if (StrUtil.isNotEmpty(empty_vehicle_code)) {
throw new BadRequestException("该点位上已存在空轴,不能进行绑定!");
}
cut_point.put("empty_vehicle_code",container_name);
cut_point.put("empty_point_status","02");
}else {
cut_point.put("empty_vehicle_code", container_name);
cut_point.put("empty_point_status", "02");
} else {
throw new BadRequestException("未查询到对应的分切点!");
}
}
}
//2-解绑
if (option.equals("2")){
if (option.equals("2")) {
//查询该点对应的是什么位置
JSONObject cut_point = WQLObject.getWQLObject("ST_IVT_CutPointIvt").query("full_point_code = '"+point_code+"'").uniqueResult(0);
if (ObjectUtil.isNotEmpty(cut_point)){
JSONObject cut_point = WQLObject.getWQLObject("ST_IVT_CutPointIvt").query("full_point_code = '" + point_code + "'").uniqueResult(0);
if (ObjectUtil.isNotEmpty(cut_point)) {
String now_container_name = cut_point.getString("container_name");
if (StrUtil.isNotEmpty(now_container_name)){
if (StrUtil.isNotEmpty(now_container_name)) {
throw new BadRequestException("该点位上已存在母卷,不能进行绑定!");
}
cut_point.put("container_name","");
cut_point.put("full_point_status","01");
}else {
cut_point = WQLObject.getWQLObject("ST_IVT_CutPointIvt").query("empty_point_code = '"+point_code+"'").uniqueResult(0);
if (ObjectUtil.isNotEmpty(cut_point)){
cut_point.put("container_name", "");
cut_point.put("full_point_status", "01");
} else {
cut_point = WQLObject.getWQLObject("ST_IVT_CutPointIvt").query("empty_point_code = '" + point_code + "'").uniqueResult(0);
if (ObjectUtil.isNotEmpty(cut_point)) {
String empty_vehicle_code = cut_point.getString("empty_vehicle_code");
if (StrUtil.isNotEmpty(empty_vehicle_code)){
if (StrUtil.isNotEmpty(empty_vehicle_code)) {
throw new BadRequestException("该点位上已存在空轴,不能进行绑定!");
}
cut_point.put("empty_vehicle_code","");
cut_point.put("empty_point_status","01");
}else {
cut_point.put("empty_vehicle_code", "");
cut_point.put("empty_point_status", "01");
} else {
throw new BadRequestException("未查询到对应的分切点!");
}
}
}
JSONObject jo = new JSONObject();
jo.put("message", "操作成功!");
return jo;
}
@Override
public JSONObject pointStatusQuery(JSONObject whereJson) {
String point_code = whereJson.getString("point_code");
if (StrUtil.isEmpty(point_code)){
if (StrUtil.isEmpty(point_code)) {
throw new BadRequestException("输入的点位不能为空!");
}
String vehicle_code = "";
String have_goods = "";
JSONObject cut_point = WQLObject.getWQLObject("ST_IVT_CutPointIvt").query("full_point_code = '"+point_code+"'").uniqueResult(0);
if (ObjectUtil.isEmpty(cut_point)){
cut_point = WQLObject.getWQLObject("ST_IVT_CutPointIvt").query("empty_point_code = '"+point_code+"'").uniqueResult(0);
if (ObjectUtil.isEmpty(cut_point)){
JSONObject cut_point = WQLObject.getWQLObject("ST_IVT_CutPointIvt").query("full_point_code = '" + point_code + "'").uniqueResult(0);
if (ObjectUtil.isEmpty(cut_point)) {
cut_point = WQLObject.getWQLObject("ST_IVT_CutPointIvt").query("empty_point_code = '" + point_code + "'").uniqueResult(0);
if (ObjectUtil.isEmpty(cut_point)) {
throw new BadRequestException("未查询到对应的分切机点位!");
}else {
} else {
vehicle_code = cut_point.getString("empty_vehicle_code");
have_goods = cut_point.getString("empty_point_status");
}
}else {
} else {
vehicle_code = cut_point.getString("container_name");
have_goods = cut_point.getString("full_point_status");
}
JSONObject jo = new JSONObject();
jo.put("container_name",vehicle_code);
jo.put("have_goods",have_goods);
return jo;
jo.put("container_name", vehicle_code);
jo.put("have_goods", have_goods);
JSONObject result = new JSONObject();
result.put("data", jo);
result.put("message", "查询成功!");
return result;
}

View File

@@ -24,12 +24,12 @@ public class ShippingServiceImpl implements ShippingService {
private final CutConveyorTask cutConveyorTask;
@Override
public JSONArray queryMaterialInfo(JSONObject whereJson) {
public JSONObject queryMaterialInfo(JSONObject whereJson) {
String product_area = whereJson.getString("product_area");
String qzzno = whereJson.getString("qzzno");
HashMap map = new HashMap();
map.put("flag", "3");
map.put("flag", "6");
if (StrUtil.isNotEmpty(product_area)) {
map.put("product_area", product_area);
}
@@ -37,15 +37,19 @@ public class ShippingServiceImpl implements ShippingService {
map.put("qzzno", qzzno);
}
JSONArray rows = WQL.getWO("PDA_02").addParamMap(map).process().getResultJSONArray(0);
return rows;
JSONObject jo = new JSONObject();
jo.put("data",rows);
jo.put("message","操作成功!");
return jo;
}
@Override
public void needVehicle(JSONObject whereJson) {
public JSONObject needVehicle(JSONObject whereJson) {
JSONObject cut_jo = whereJson.getJSONObject("cut_jo");
//查询离该分切计划包含机台最近的一个空载具
JSONObject empty_vehicle = WQL.getWO("PDA_02")
.addParam("sort_seq", cut_jo.getString("sort_seq"))
.addParam("sql_str", " ORDER BY abs("+cut_jo.getString("sort_seq")+"-sort_seq),point_code")
.addParam("product_area", cut_jo.getString("product_area"))
.addParam("point_location", cut_jo.getString("point_location"))
.addParam("flag", "3").process().uniqueResult(0);
@@ -59,10 +63,14 @@ public class ShippingServiceImpl implements ShippingService {
form.put("point_code2","SS01");
form.put("task_type","010401");
cutConveyorTask.createTask(form);
JSONObject jo = new JSONObject();
jo.put("message","操作成功!");
return jo;
}
@Override
public void confirm(JSONObject whereJson) {
public JSONObject confirm(JSONObject whereJson) {
JSONArray rows = whereJson.getJSONArray("cut_rows");
//通过气涨轴对应的分切计划来判断要送到哪个机台编号附近
@@ -77,17 +85,26 @@ public class ShippingServiceImpl implements ShippingService {
JSONObject plan_jo = WQL.getWO("PDA_02").addParamMap(map).process().uniqueResult(0);
//查询离该分切计划包含机台最近的一个空点位
JSONObject empty_point = WQL.getWO("PDA_02")
.addParam("sort_seq", plan_jo.getString("sort_seq"))
.addParam("sql_str", " ORDER BY abs("+plan_jo.getString("sort_seq")+"-sort_seq),point_code")
.addParam("product_area", plan_jo.getString("product_area"))
.addParam("point_location", plan_jo.getString("point_location"))
.addParam("flag", "4").process().uniqueResult(0);
if (ObjectUtil.isEmpty(empty_point)){
throw new BadRequestException("未查询到可用的空点位!");
}
//下发输送线任务
JSONObject form = new JSONObject();
form.put("point_code1","SS02");
form.put("point_code2",empty_point.getString("point_code"));
form.put("task_type","010401");
form.put("vehicle_code",qzzno);
cutConveyorTask.createTask(form);
JSONObject jo = new JSONObject();
jo.put("message","操作成功!");
return jo;
}

View File

@@ -20,6 +20,7 @@
输入.qzzno TYPEAS s_string
输入.sort_seq TYPEAS s_string
输入.point_location TYPEAS s_string
输入.sql_str TYPEAS f_string
[临时表]
@@ -96,9 +97,11 @@
WHERE
plan.STATUS < 2
AND
is_child_tz_ok = 1
is_child_tz_ok = 0
AND
is_child_ps_ok = 0
AND
is_delete = '0'
OPTION 输入.product_area <> ""
ivt.product_area = 输入.product_area
ENDOPTION
@@ -123,8 +126,8 @@
OPTION 输入.product_area <> ""
ivt.point_location = 输入.point_location
ENDOPTION
ORDER BY
abs(输入.sort_seq-sort_seq),point_code
输入.sql_str
ENDSELECT
ENDQUERY
ENDIF
@@ -143,8 +146,7 @@
OPTION 输入.product_area <> ""
ivt.point_location = 输入.point_location
ENDOPTION
ORDER BY
abs(输入.sort_seq-sort_seq),point_code
输入.sql_str
ENDSELECT
ENDQUERY
ENDIF
@@ -185,3 +187,44 @@
ENDQUERY
ENDIF
IF 输入.flag = "6"
QUERY
SELECT
plan.mfg_order_name,
plan.container_name,
ivt.point_code,
plan.split_group,
plan.manufacture_sort,
plan.manufacture_date,
plan.paper_tube_or_FRP,
plan.paper_tube_material,
plan.paper_tube_description,
plan.paper_tube_model,
plan.FRP_material,
plan.FRP_description,
plan.FRP_model,
plan.workorder_id,
ivt.sort_seq,
ivt.product_area,
ivt.point_location
FROM
PDM_BI_SlittingProductionPlan plan
LEFT JOIN st_ivt_cutpointivt ivt ON ivt.ext_code = plan.resource_name
WHERE
plan.STATUS < 2
AND
is_child_tz_ok = 1
AND
is_child_ps_ok = 0
AND
is_delete = '0'
OPTION 输入.product_area <> ""
ivt.product_area = 输入.product_area
ENDOPTION
OPTION 输入.qzzno <> ""
plan.qzzno = 输入.qzzno
ENDOPTION
ENDSELECT
ENDQUERY
ENDIF

View File

@@ -92,7 +92,7 @@
IF 输入.flag = "3"
QUERY
SELECT
label,
label AS text,
value
FROM
sys_dict_detail

View File

@@ -77,6 +77,7 @@ public class CutConveyorTask extends AbstractAcsTask {
// 更新分切输送库存状态
jsonIvt.put("point_status", "03");
jsonIvt.put("qzzno", jsonTask.getString("vehicle_code"));
ivtTab.update(jsonIvt);
}
}
@@ -106,6 +107,7 @@ public class CutConveyorTask extends AbstractAcsTask {
json.put("task_status", "01");
json.put("point_code1", form.getString("point_code1"));
json.put("point_code2", form.getString("point_code2"));
json.put("vehicle_code", form.getString("vehicle_code"));
json.put("handle_class", THIS_CLASS);
json.put("create_id", currentUserId);
json.put("create_name", currentUsername);

View File

@@ -4,6 +4,7 @@ import cn.hutool.core.date.DateUtil;
import cn.hutool.core.util.IdUtil;
import cn.hutool.core.util.ObjectUtil;
import cn.hutool.core.util.StrUtil;
import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
@@ -53,15 +54,36 @@ public class CutTrussTask extends AbstractAcsTask {
if (jsonTask.getString("task_type").equals("010403")){
// 校验终点是否存在
JSONObject jsonIvt = ivtTab.query("point_code ='" + point_code1 + "'").uniqueResult(0);
if (ObjectUtil.isEmpty(jsonIvt)) {
throw new BadRequestException("未找到可用点位:" + point_code2);
//更新分切机对应位置的气涨轴
JSONObject cut_point = WQLObject.getWQLObject("ST_IVT_CutPointIvt").query("up_point_code = '"+jsonTask.getString("point_code2")+"'").uniqueResult(0);
if (ObjectUtil.isNotEmpty(cut_point)){
cut_point.put("up_qzzno",jsonTask.getString("vehicle_code"));
}else {
cut_point = WQLObject.getWQLObject("ST_IVT_CutPointIvt").query("down_point_code = '"+jsonTask.getString("point_code2")+"'").uniqueResult(0);
if (ObjectUtil.isNotEmpty(cut_point)){
cut_point.put("down_qzzno",jsonTask.getString("vehicle_code"));
}else {
throw new BadRequestException("未查询到对应的分切机!");
}
}
WQLObject.getWQLObject("ST_IVT_CutPointIvt").update(cut_point);
//更新输送线的气涨轴编码
JSONObject delivery_point = WQLObject.getWQLObject("ST_IVT_DeliveryPointIvt").query("qzzno = '"+jsonTask.getString("point_code1")+"'").uniqueResult(0);
if (ObjectUtil.isEmpty(delivery_point)){
throw new BadRequestException("未查询到对应的输送线点位!");
}
delivery_point.put("qzzno",jsonTask.getString("vehicle_code2"));
WQLObject.getWQLObject("ST_IVT_DeliveryPointIvt").update(delivery_point);
//更新分切计划状态
JSONArray plan_jo = WQLObject.getWQLObject("PDM_BI_SlittingProductionPlan").query("qzzno = '"+jsonTask.getString("vehicle_code2")+"' AND is_child_tz_ok = '1' AND is_child_ps_ok = '1' AND is_delete = '0' AND status = '1'").getResultJSONArray(0);
if (ObjectUtil.isEmpty(plan_jo)){
throw new BadRequestException("未查询到气涨轴:"+jsonTask.getString("vehicle_code2")+"对应的分切计划!");
}
for (int i = 0; i < plan_jo.size(); i++) {
JSONObject plan_row = plan_jo.getJSONObject(i);
plan_row.put("status","2");
WQLObject.getWQLObject("PDM_BI_SlittingProductionPlan").update(plan_row);
}
// 更新分切输送库存状态
jsonIvt.put("point_status", "01");
ivtTab.update(jsonIvt);
}
}
}
@@ -87,6 +109,8 @@ public class CutTrussTask extends AbstractAcsTask {
json.put("task_id", IdUtil.getSnowflake(1,1).nextId());
json.put("task_code", CodeUtil.getNewCode("TASK_CODE"));
json.put("task_type", form.getString("task_type"));
json.put("vehicle_code", form.getString("vehicle_code"));
json.put("vehicle_code2", form.getString("vehicle_code2"));
json.put("task_status", "01");
json.put("point_code1", form.getString("point_code1"));
json.put("point_code2", form.getString("point_code2"));