分切修改

This commit is contained in:
2023-02-28 10:08:47 +08:00
parent 0b0b7e62bf
commit ff26cddbba
10 changed files with 342 additions and 134 deletions

View File

@@ -468,26 +468,25 @@ public class MesToLmsServiceImpl implements MesToLmsService {
try {
String is_mesTolms = SpringContextHolder.getBean(SysParamServiceImpl.class).findByCode("is_mesTolms").getValue();
String container_name = param.getString("ContainerName");
if (StrUtil.isEmpty(container_name)) {
throw new BadRequestException("子卷号不能为空!");
}
JSONObject plan_jo = WQLObject.getWQLObject("PDM_BI_SlittingProductionPlan").query("container_name = '" + container_name + "' AND is_delete = '0'").uniqueResult(0);
if (ObjectUtil.isEmpty(plan_jo)) {
throw new BadRequestException("未查询到该子卷号对应的分切计划!");
}
String Attribute1 = param.getString("Attribute1");
String Attribute2 = param.getString("Attribute2");
if (StrUtil.equals("1", Attribute2)) {
//更新该子卷号对应的分切计划为已呼叫
plan_jo.put("is_call", "1");
WQLObject.getWQLObject("PDM_BI_SlittingProductionPlan").update(plan_jo);
}
if (StrUtil.equals(is_mesTolms, "1")) {
String container_name = param.getString("ContainerName");
if (StrUtil.isEmpty(container_name)) {
throw new BadRequestException("子卷号不能为空!");
}
JSONObject plan_jo = WQLObject.getWQLObject("PDM_BI_SlittingProductionPlan").query("container_name = '" + container_name + "' AND is_delete = '0'").uniqueResult(0);
if (ObjectUtil.isEmpty(plan_jo)) {
throw new BadRequestException("未查询到该子卷号对应的分切计划!");
}
String Attribute1 = param.getString("Attribute1");
String Attribute2 = param.getString("Attribute2");
if (StrUtil.equals("1", Attribute2)) {
//更新该子卷号对应的分切计划为已呼叫
plan_jo.put("is_call", "1");
WQLObject.getWQLObject("PDM_BI_SlittingProductionPlan").update(plan_jo);
}
if (Attribute1.equals("0")) {
result.put("RTYPE", "S");
result.put("RTMSG", "操作成功!");
@@ -743,6 +742,8 @@ public class MesToLmsServiceImpl implements MesToLmsService {
JSONArray up_rows = new JSONArray();
JSONArray down_rows = new JSONArray();
String up_qzz = "";
String down_qzz = "";
for (int i = 0; i < param.size(); i++) {
JSONObject row = param.getJSONObject(i);
//查询对应的分切计划
@@ -750,6 +751,7 @@ public class MesToLmsServiceImpl implements MesToLmsService {
if (ObjectUtil.isEmpty(plan_jo)) {
throw new BadRequestException("未查询到分切计划:" + row.getString("ContainerGroup"));
}
String qzzno = plan_jo.getString("qzzno");
String need_down = row.getString("Attribute1");
if (StrUtil.isEmpty(need_down)) {
throw new BadRequestException("子卷:" + row.getString("ContainerGroup") + "对应的是否需要下轴字段不能为空!");
@@ -759,10 +761,38 @@ public class MesToLmsServiceImpl implements MesToLmsService {
WQLObject.getWQLObject("pdm_bi_slittingproductionplan").update(plan_jo);
} else {
if (row.getString("ContainerPosition").equals("1")) {
up_rows.add(plan_jo);
if (StrUtil.isEmpty(up_qzz)) {
up_qzz = qzzno;
up_rows.add(plan_jo);
} else {
if (!StrUtil.equals(qzzno, up_qzz)) {
down_qzz = qzzno;
down_rows.add(plan_jo);
} else {
up_rows.add(plan_jo);
}
}
}
if (row.getString("ContainerPosition").equals("2")) {
down_rows.add(plan_jo);
if (StrUtil.isEmpty(down_qzz)) {
if (StrUtil.isEmpty(up_qzz)) {
down_qzz = qzzno;
down_rows.add(plan_jo);
} else {
if (StrUtil.equals(up_qzz, qzzno)) {
up_rows.add(plan_jo);
} else {
down_qzz = qzzno;
down_rows.add(plan_jo);
}
}
} else {
if (StrUtil.equals(down_qzz, qzzno)) {
down_rows.add(plan_jo);
} else {
up_rows.add(plan_jo);
}
}
}
}
}

View File

@@ -41,4 +41,18 @@ public class FeedingController {
public ResponseEntity<Object> confirm(@RequestBody JSONObject whereJson) {
return new ResponseEntity<>(feedingService.confirm(whereJson), HttpStatus.OK);
}
@PostMapping("/queryPoint")
@Log("扫码起点获取母卷")
@ApiOperation("扫码起点获取母卷")
public ResponseEntity<Object> queryPoint(@RequestBody JSONObject whereJson) {
return new ResponseEntity<>(feedingService.queryPoint(whereJson), HttpStatus.OK);
}
@PostMapping("/handleConfirm")
@Log("人工呼叫母卷确认")
@ApiOperation("人工呼叫母卷确认")
public ResponseEntity<Object> handleConfirm(@RequestBody JSONObject whereJson) {
return new ResponseEntity<>(feedingService.handleConfirm(whereJson), HttpStatus.OK);
}
}

View File

@@ -21,4 +21,20 @@ public interface FeedingService {
*/
JSONObject confirm(JSONObject whereJson);
/**
* 套轴确认
*
* @param whereJson /
* @return JSONObject
*/
JSONObject queryPoint(JSONObject whereJson);
/**
* 套轴确认
*
* @param whereJson /
* @return JSONObject
*/
JSONObject handleConfirm(JSONObject whereJson);
}

View File

@@ -174,8 +174,8 @@ public class BakingServiceImpl implements BakingService {
JSONObject jsonMap = new JSONObject();
jsonMap.put("flag", "1");
jsonMap.put("product_area", product_area);
jsonMap.put("min_temperature", NumberUtil.sub(temperature, temperature_lose));
jsonMap.put("max_temperature", NumberUtil.add(temperature, temperature_lose));
jsonMap.put("min_temperature", NumberUtil.sub(temperature, temperature_lose)+"");
jsonMap.put("max_temperature", NumberUtil.add(temperature, temperature_lose)+"");
jsonMap.put("point_location", map.getString("point_location"));
JSONObject jsonHotIvt = WQL.getWO("PDA_BAKING_01").addParamMap(jsonMap).process().uniqueResult(0);
if (ObjectUtil.isEmpty(jsonHotIvt)) throw new BadRequestException("烘烤区没有合适温度的空位!");

View File

@@ -211,9 +211,126 @@ public class FeedingServiceImpl implements FeedingService {
}
JSONObject jo = new JSONObject();
jo.put("message", "查询成功!");
jo.put("message", "操作成功!");
return jo;
}
@Override
public JSONObject queryPoint(JSONObject form) {
String point_code = form.getString("point_code");
if (StrUtil.isEmpty(point_code)) {
throw new BadRequestException("输入的点位不能为空!");
}
JSONObject cool_jo = WQLObject.getWQLObject("st_ivt_coolpointivt").query("full_point_code = '" + point_code + "'").uniqueResult(0);
if (ObjectUtil.isEmpty(cool_jo)) {
throw new BadRequestException("请输入或者扫描冷却区满轴位的点位!");
}
if (!StrUtil.equals(cool_jo.getString("full_point_status"), "02")) {
throw new BadRequestException("该点位上不存在母卷!");
}
JSONObject result = new JSONObject();
result.put("content", cool_jo);
result.put("message", "查询成功!");
return result;
}
@Transactional(rollbackFor = Exception.class)
@Override
public JSONObject handleConfirm(JSONObject form) {
String point_code = form.getString("point_code");
String next_point_code = form.getString("next_point_code");
if (StrUtil.isEmpty(point_code)) {
throw new BadRequestException("输入的起点不能为空!");
}
JSONObject cool_jo = WQLObject.getWQLObject("st_ivt_coolpointivt").query("full_point_code = '" + point_code + "'").uniqueResult(0);
if (ObjectUtil.isEmpty(cool_jo)) {
throw new BadRequestException("请输入或者扫描冷却区满轴位的点位做为起点!");
}
if (!StrUtil.equals(cool_jo.getString("full_point_status"), "02")) {
throw new BadRequestException("该点位上不存在母卷!");
}
//查询该分切机对应的点位
JSONObject cut_jo = WQLObject.getWQLObject("st_ivt_cutpointivt").query("full_point_code = '" + next_point_code + "'").uniqueResult(0);
if (ObjectUtil.isEmpty(cut_jo)) {
throw new BadRequestException("请扫描或者输入分切区域的满轴点位做为终点!");
}
if (StrUtil.isNotEmpty(cut_jo.getString("container_name")) || cut_jo.getString("full_point_status").equals("02")) {
throw new BadRequestException("该分切机对应的上料位存在母卷,不能下发搬运任务!");
}
JSONObject jo = new JSONObject();
if (StrUtil.equals("01", cut_jo.getString("empty_point_code"))) {
jo.put("point_code1", point_code);
jo.put("point_code2", next_point_code);
jo.put("vehicle_code", cool_jo.getString("container_name"));
jo.put("product_area", cut_jo.getString("product_area"));
jo.put("task_type", "010302");
} else {
jo.put("point_code1", point_code);
jo.put("point_code2", next_point_code);
jo.put("point_code3", cut_jo.getString("empty_point_code"));
jo.put("point_code4", cool_jo.getString("empty_point_code"));
jo.put("vehicle_code", cool_jo.getString("container_name"));
jo.put("vehicle_code2", cut_jo.getString("empty_vehicle_code"));
jo.put("product_area", cut_jo.getString("product_area"));
jo.put("task_type", "010301");
}
//查询该母卷号对应的生箔信息
JSONObject raw_jo = WQLObject.getWQLObject("pdm_bi_rawfoilworkorder").query("container_name = '" + cool_jo.getString("container_name") + "'").uniqueResult(0);
if (ObjectUtil.isEmpty(raw_jo)) {
throw new BadRequestException("未查询到母卷:" + cool_jo.getString("container_name") + ",对应的生箔信息!");
}
JSONObject mater_jo = WQLObject.getWQLObject("md_me_materialbase").query("material_code = '" + raw_jo.getString("product_name") + "'").uniqueResult(0);
if (ObjectUtil.isEmpty(mater_jo)) {
throw new BadRequestException("未查询到物料:" + raw_jo.getString("product_name") + "基础信息!");
}
AbstractAcsTask task = new CoolCutTask();
String task_id = task.createTask(jo);
//生成半成品出库单据
String currentUserId = SecurityUtils.getCurrentUserId();
String currentUsername = SecurityUtils.getCurrentUsername();
JSONObject jsonCool = new JSONObject();
jsonCool.put("iostorinv_id", IdUtil.getSnowflake(1, 1).nextId());
jsonCool.put("bill_code", CodeUtil.getNewCode("COOLREGION_BILL_CODE"));
jsonCool.put("io_type", "1");
jsonCool.put("material_id", mater_jo.getString("material_id"));
jsonCool.put("pcsn", cool_jo.getString("container_name"));
jsonCool.put("bill_status", "50");
jsonCool.put("task_id", task_id);
jsonCool.put("qty_unit_id", "1");
jsonCool.put("start_point_code", cool_jo.getString("full_point_code"));
jsonCool.put("end_point_code", cut_jo.getString("full_point_code"));
jsonCool.put("create_mode", "03");
jsonCool.put("create_id", currentUserId);
jsonCool.put("create_name", currentUsername);
jsonCool.put("create_time", DateUtil.now());
jsonCool.put("update_optid", currentUserId);
jsonCool.put("update_optname", currentUsername);
jsonCool.put("update_time", DateUtil.now());
jsonCool.put("confirm_optid", currentUserId);
jsonCool.put("confirm_optname", currentUsername);
jsonCool.put("confirm_time", DateUtil.now());
WQLObject.getWQLObject("ST_IVT_CoolRegionIO").insert(jsonCool);
JSONObject result = new JSONObject();
result.put("message", "操作成功!");
return jo;
}
}

View File

@@ -287,7 +287,7 @@ public class RawFoilServiceImpl implements RawFoilService {
JSONObject task_jo = WQLObject.getWQLObject("SCH_BASE_Task").query("material_code = '" + container_name + "' and task_status <> '07' AND is_delete = '0'").uniqueResult(0);
// 查询生箔点位库存表
JSONObject jsonSb = rawTab.query("ext_code = '" + jsonRaw.getString("resource_name") + "'and is_used = '1'").uniqueResult(0);
JSONObject jsonSb = WQLObject.getWQLObject("st_ivt_sbpointivt").query("ext_code = '" + jsonRaw.getString("resource_name") + "'and is_used = '1'").uniqueResult(0);
if (ObjectUtil.isEmpty(jsonSb)) throw new BadRequestException("点位不存在");
//下发ACS执行取满放空的AGV动作

View File

@@ -46,10 +46,10 @@ public class CallEmpReelTask extends AbstractAcsTask {
String product_area = json.getString("product_area");
String agv_system_type = "";
if (product_area.equals("A1") || product_area.equals("A2")){
if (product_area.equals("A1") || product_area.equals("A2")) {
agv_system_type = "2";
}
if (product_area.equals("A3") || product_area.equals("A4")){
if (product_area.equals("A3") || product_area.equals("A4")) {
agv_system_type = "3";
}
AcsTaskDto dto = AcsTaskDto.builder()
@@ -87,7 +87,7 @@ public class CallEmpReelTask extends AbstractAcsTask {
//更新车号和重量
String car_no = taskObj.getString("car_no");
if (StrUtil.isNotEmpty(car_no)){
if (StrUtil.isNotEmpty(car_no)) {
JSONObject jsonRaw = rawTab.query("container_name ='" + jsonTask.getString("material_code") + "' AND status <> '09' AND is_delete = '0'").uniqueResult(0);
jsonRaw.put("agvno", car_no);
rawTab.update(jsonRaw);
@@ -96,12 +96,12 @@ public class CallEmpReelTask extends AbstractAcsTask {
String weight = taskObj.getString("weight");
if (ObjectUtil.isNotEmpty(weight)) {
JSONObject jsonRaw = rawTab.query("container_name ='" + jsonTask.getString("material_code") + "' AND status <> '09' AND is_delete = '0'").uniqueResult(0);
jsonRaw.put("productin_qty", taskObj.getDoubleValue(weight));
jsonRaw.put("productin_qty", weight);
rawTab.update(jsonRaw);
}
if (StrUtil.equals(status, "0")) {
// 更新删除字段
jsonTask.put("is_delete","1");
jsonTask.put("is_delete", "1");
jsonTask.put("update_time", DateUtil.now());
taskTab.update(jsonTask);
@@ -145,7 +145,7 @@ public class CallEmpReelTask extends AbstractAcsTask {
// 判断是两个点位的任务还是四个点位的任务
if (ObjectUtil.isEmpty(point_code3)) {
// 判断是取满 or 取空 :取满起点是生箔区域、取空起点是冷却区域
JSONObject jsonSbIvt = sbTab.query("point_code = '" + point_code1 + "'").uniqueResult(0);
JSONObject jsonSbIvt = sbTab.query("point_code = '" + point_code1.substring(0, point_code1.length() - 2) + "'").uniqueResult(0);
if (ObjectUtil.isNotEmpty(jsonSbIvt)) {
// 取满
JSONObject jsonCoolIvt = ivtTab.query("full_point_code = '" + point_code2 + "'").uniqueResult(0);
@@ -158,17 +158,17 @@ public class CallEmpReelTask extends AbstractAcsTask {
ivtTab.update(jsonCoolIvt);
//更新母卷工单状态
HashMap<String,String> map = new HashMap<>();
HashMap<String, String> map = new HashMap<>();
map.put("status", "09");
map.put("realend_time", DateUtil.now());
map.put("update_optid",currentUserId+"");
map.put("update_optname",currentUsername);
map.put("update_optid", currentUserId + "");
map.put("update_optname", currentUsername);
map.put("finish_type", "01");
map.put("update_time",DateUtil.now());
WQLObject.getWQLObject("PDM_BI_RawFoilWorkOrder").update(map,"container_name = '"+jsonTask.getString("material_code")+"'");
map.put("update_time", DateUtil.now());
WQLObject.getWQLObject("PDM_BI_RawFoilWorkOrder").update(map, "container_name = '" + jsonTask.getString("material_code") + "'");
} else {
// 取空
JSONObject jsonCoolIvt = ivtTab.query("full_point_code = '" + point_code1 + "'").uniqueResult(0);
JSONObject jsonCoolIvt = ivtTab.query("empty_point_code = '" + point_code1 + "'").uniqueResult(0);
jsonCoolIvt.put("empty_point_status", "01");
jsonCoolIvt.put("empty_vehicle_code", "");
ivtTab.update(jsonCoolIvt);
@@ -179,9 +179,9 @@ public class CallEmpReelTask extends AbstractAcsTask {
JSONObject jsonIvt = ivtTab.query("empty_point_code ='" + point_code1 + "'").uniqueResult(0);
if (ObjectUtil.isEmpty(jsonIvt)) throw new BadRequestException("未找到可用点位:" + point_code1);
// 校验终点是否存在
JSONObject nextDto = sbTab.query("point_code ='" + point_code2 + "'").uniqueResult(0);
/*JSONObject nextDto = sbTab.query("point_code ='" + point_code2.substring(point_code2.length()-2) + "'").uniqueResult(0);
if (ObjectUtil.isEmpty(nextDto))
throw new BadRequestException("未找到可用点位:" + jsonTask.getString("point_code2"));
throw new BadRequestException("未找到可用点位:" + jsonTask.getString("point_code2"));*/
// 更新冷却库存状态
jsonIvt.put("empty_point_status", "01");
@@ -194,14 +194,14 @@ public class CallEmpReelTask extends AbstractAcsTask {
// 更新工单状态为完成
//更新母卷工单状态
HashMap<String,String> map = new HashMap<>();
HashMap<String, String> map = new HashMap<>();
map.put("status", "09");
map.put("realend_time", DateUtil.now());
map.put("update_optid",currentUserId+"");
map.put("update_optname",currentUsername);
map.put("update_optid", currentUserId + "");
map.put("update_optname", currentUsername);
map.put("finish_type", "01");
map.put("update_time",DateUtil.now());
WQLObject.getWQLObject("PDM_BI_RawFoilWorkOrder").update(map,"container_name = '"+jsonTask.getString("material_code")+"'");
map.put("update_time", DateUtil.now());
WQLObject.getWQLObject("PDM_BI_RawFoilWorkOrder").update(map, "container_name = '" + jsonTask.getString("material_code") + "'");
// 更新冷却库存状态
jsonIvt2.put("full_point_status", "02");
@@ -211,38 +211,36 @@ public class CallEmpReelTask extends AbstractAcsTask {
jsonIvt2.put("ivt_qty", jsonRaw.getString("productin_qty"));
ivtTab.update(jsonIvt2);
// 插入入库单
JSONObject jsonMater = WQLObject.getWQLObject("md_me_materialbase").query("material_code = '" + jsonRaw.getString("product_name") + "'").uniqueResult(0);
if (ObjectUtil.isEmpty(jsonMater)) throw new BadRequestException("产品不存在");
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", "0");
jsonRegion.put("material_id", jsonMater.getString("material_id"));
jsonRegion.put("pcsn", jsonRaw.getString("container_name"));
jsonRegion.put("vehicle_code", "");
jsonRegion.put("qty", jsonRaw.getString("productin_qty"));
jsonRegion.put("qty_unit_id", jsonMater.get("base_unit_id"));
jsonRegion.put("bill_status", "50");
jsonRegion.put("start_point_code", point_code2);
jsonRegion.put("end_point_code", point_code4);
jsonRegion.put("cust_id", "");
jsonRegion.put("create_mode", "03");
jsonRegion.put("task_id", task_id);
jsonRegion.put("create_id", currentUserId);
jsonRegion.put("create_name", currentUsername);
jsonRegion.put("create_time", DateUtil.now());
jsonRegion.put("update_optid", currentUserId);
jsonRegion.put("update_optname", currentUsername);
jsonRegion.put("update_time", DateUtil.now());
jsonRegion.put("confirm_optid", currentUserId);
jsonRegion.put("confirm_optname", currentUsername);
jsonRegion.put("confirm_time", DateUtil.now());
coolTab.insert(jsonRegion);
}
// 插入入库单
JSONObject jsonMater = WQLObject.getWQLObject("md_me_materialbase").query("material_code = '" + jsonRaw.getString("product_name") + "'").uniqueResult(0);
if (ObjectUtil.isEmpty(jsonMater)) throw new BadRequestException("产品不存在");
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", "0");
jsonRegion.put("material_id", jsonMater.getString("material_id"));
jsonRegion.put("pcsn", jsonRaw.getString("container_name"));
jsonRegion.put("vehicle_code", "");
jsonRegion.put("qty", jsonRaw.getString("productin_qty"));
jsonRegion.put("qty_unit_id", jsonMater.get("base_unit_id"));
jsonRegion.put("bill_status", "50");
jsonRegion.put("start_point_code", point_code2);
jsonRegion.put("end_point_code", point_code4);
jsonRegion.put("cust_id", "");
jsonRegion.put("create_mode", "03");
jsonRegion.put("task_id", task_id);
jsonRegion.put("create_id", currentUserId);
jsonRegion.put("create_name", currentUsername);
jsonRegion.put("create_time", DateUtil.now());
jsonRegion.put("update_optid", currentUserId);
jsonRegion.put("update_optname", currentUsername);
jsonRegion.put("update_time", DateUtil.now());
jsonRegion.put("confirm_optid", currentUserId);
jsonRegion.put("confirm_optname", currentUsername);
jsonRegion.put("confirm_time", DateUtil.now());
coolTab.insert(jsonRegion);
}
}
@@ -284,7 +282,7 @@ public class CallEmpReelTask extends AbstractAcsTask {
JSONObject json = new JSONObject();
json.put("task_id", IdUtil.getSnowflake(1, 1).nextId());
json.put("task_code", IdUtil.getSnowflake(1,1).nextId());
json.put("task_code", IdUtil.getSnowflake(1, 1).nextId());
json.put("task_status", TaskStatusEnum.START_AND_POINT.getCode());
json.put("material_code", form.getString("material_code"));
json.put("point_code1", form.getString("point_code1"));
@@ -299,14 +297,16 @@ public class CallEmpReelTask extends AbstractAcsTask {
json.put("create_name", currentUsername);
json.put("create_time", DateUtil.now());
//根据类型获取对应的任务优先级
JSONObject priority_jo = WQL.getWO("PDA_COOLIN").addParam("flag","3").addParam("task_type",json.getString("task_type")).process().uniqueResult(0);
if (ObjectUtil.isEmpty(priority_jo)){
JSONObject priority_jo = WQL.getWO("PDA_COOLIN").addParam("flag", "3").addParam("task_type", json.getString("task_type")).process().uniqueResult(0);
if (ObjectUtil.isEmpty(priority_jo)) {
json.put("priority", "1");
}else {
} else {
json.put("priority", priority_jo.getString("value"));
}
if (form.getString("task_type").equals("010101")) {
json.put("acs_task_type", "1");
} else {
json.put("acs_task_type", "3");
}
tab.insert(json);

View File

@@ -104,18 +104,21 @@ public class CutConveyorTask extends AbstractAcsTask {
jsonTask.put("update_time", DateUtil.now());
taskTab.update(jsonTask);
//调用MES接口通知MES运输中
LmsToMesService lmsToMesService = SpringContextHolder.getBean(LmsToMesService.class);
JSONArray rows = WQLObject.getWQLObject("PDM_BI_SlittingProductionPlan").query("qzzno = '" + jsonTask.getString("vehicle_code") + "' AND is_child_tz_ok = '1' AND is_delete ='0' AND status < '09'").getResultJSONArray(0);
for (int i = 0; i < rows.size(); i++) {
JSONObject row = rows.getJSONObject(i);
JSONObject jo = new JSONObject();
jo.put("container_name", row.getString("container_name"));
jo.put("is_send", "1");
//判断该接口是否需要回传
JSONObject back_jo = WQLObject.getWQLObject("MD_PB_InterfaceBack").query("interface_name = 'airSwellWithPaperTubeAssComplete'").uniqueResult(0);
if (ObjectUtil.isNotEmpty(back_jo) && back_jo.getString("is_back").equals("1")) {
lmsToMesService.airSwellWithPaperTubeAssComplete(jo);
//只有输送入的时候才调用MES
if (jsonTask.getString("task_type").equals("010402")) {
//调用MES接口通知MES运输中
LmsToMesService lmsToMesService = SpringContextHolder.getBean(LmsToMesService.class);
JSONArray rows = WQLObject.getWQLObject("PDM_BI_SlittingProductionPlan").query("qzzno = '" + jsonTask.getString("vehicle_code") + "' AND is_child_tz_ok = '1' AND is_delete ='0' AND status < '09'").getResultJSONArray(0);
for (int i = 0; i < rows.size(); i++) {
JSONObject row = rows.getJSONObject(i);
JSONObject jo = new JSONObject();
jo.put("container_name", row.getString("container_name"));
jo.put("is_send", "1");
//判断该接口是否需要回传
JSONObject back_jo = WQLObject.getWQLObject("MD_PB_InterfaceBack").query("interface_name = 'airSwellWithPaperTubeAssComplete'").uniqueResult(0);
if (ObjectUtil.isNotEmpty(back_jo) && back_jo.getString("is_back").equals("1")) {
lmsToMesService.airSwellWithPaperTubeAssComplete(jo);
}
}
}
}

View File

@@ -45,10 +45,10 @@ public class InHotTask extends AbstractAcsTask {
String product_area = json.getString("product_area");
String agv_system_type = "";
if (product_area.equals("A1") || product_area.equals("A2")){
if (product_area.equals("A1") || product_area.equals("A2")) {
agv_system_type = "2";
}
if (product_area.equals("A3") || product_area.equals("A4")){
if (product_area.equals("A3") || product_area.equals("A4")) {
agv_system_type = "3";
}
@@ -63,10 +63,10 @@ public class InHotTask extends AbstractAcsTask {
.priority(json.getString("priority"))
.remark(json.getString("remark"))
.build();
if (StrUtil.isNotEmpty(json.getString("point_code3"))){
if (StrUtil.isNotEmpty(json.getString("point_code3"))) {
dto.setNext_device_code(json.getString("point_code3"));
dto.setPut_device_code(json.getString("point_code2"));
}else {
} else {
dto.setNext_device_code(json.getString("point_code2"));
}
@@ -91,7 +91,7 @@ public class InHotTask extends AbstractAcsTask {
if (StrUtil.equals(status, "0")) {
// 更新删除字段
jsonTask.put("is_delete","1");
jsonTask.put("is_delete", "1");
jsonTask.put("update_time", DateUtil.now());
taskTab.update(jsonTask);
@@ -202,7 +202,7 @@ public class InHotTask extends AbstractAcsTask {
//判断该接口是否需要回传
JSONObject back_jo = WQLObject.getWQLObject("MD_PB_InterfaceBack").query("interface_name = 'momRollBakeInBound'").uniqueResult(0);
if (ObjectUtil.isNotEmpty(back_jo) && back_jo.getString("is_back").equals("1")){
if (ObjectUtil.isNotEmpty(back_jo) && back_jo.getString("is_back").equals("1")) {
new LmsToMesServiceImpl().momRollBakeInBound(param);
}
}
@@ -244,7 +244,7 @@ public class InHotTask extends AbstractAcsTask {
}
JSONObject json = new JSONObject();
json.put("task_id", IdUtil.getSnowflake(1, 1).nextId());
json.put("task_code", IdUtil.getSnowflake(1,1).nextId());
json.put("task_code", IdUtil.getSnowflake(1, 1).nextId());
json.put("task_type", "010201");
json.put("task_status", TaskStatusEnum.START_AND_POINT.getCode());
json.put("point_code1", form.getString("point_code1"));
@@ -255,17 +255,21 @@ public class InHotTask extends AbstractAcsTask {
json.put("sort_seq", "1");
json.put("handle_class", THIS_CLASS);
json.put("create_id", currentUserId);
json.put("material_code",form.getString("material_code"));
json.put("material_code", form.getString("material_code"));
json.put("create_name", currentUsername);
json.put("create_time", DateUtil.now());
//根据类型获取对应的任务优先级
JSONObject priority_jo = WQL.getWO("PDA_COOLIN").addParam("flag","3").addParam("task_type",json.getString("task_type")).process().uniqueResult(0);
if (ObjectUtil.isEmpty(priority_jo)){
JSONObject priority_jo = WQL.getWO("PDA_COOLIN").addParam("flag", "3").addParam("task_type", json.getString("task_type")).process().uniqueResult(0);
if (ObjectUtil.isEmpty(priority_jo)) {
json.put("priority", "1");
}else {
} else {
json.put("priority", priority_jo.getString("value"));
}
json.put("acs_task_type", "8");
if (StrUtil.isNotEmpty(form.getString("point_code3"))) {
json.put("acs_task_type", "8");
} else {
json.put("acs_task_type", "6");
}
tab.insert(json);
task_id = json.getString("task_id");
@@ -292,7 +296,7 @@ public class InHotTask extends AbstractAcsTask {
JSONObject json = new JSONObject();
json.put("task_id", IdUtil.getSnowflake(1, 1).nextId());
json.put("task_code", IdUtil.getSnowflake(1,1).nextId());
json.put("task_code", IdUtil.getSnowflake(1, 1).nextId());
json.put("task_type", "010203");
json.put("task_status", TaskStatusEnum.START_AND_POINT.getCode());
json.put("point_code1", form.getString("point_code1"));
@@ -305,10 +309,10 @@ public class InHotTask extends AbstractAcsTask {
json.put("create_name", currentUsername);
json.put("create_time", DateUtil.now());
//根据类型获取对应的任务优先级
JSONObject priority_jo = WQL.getWO("PDA_COOLIN").addParam("flag","3").addParam("task_type",json.getString("task_type")).process().uniqueResult(0);
if (ObjectUtil.isEmpty(priority_jo)){
JSONObject priority_jo = WQL.getWO("PDA_COOLIN").addParam("flag", "3").addParam("task_type", json.getString("task_type")).process().uniqueResult(0);
if (ObjectUtil.isEmpty(priority_jo)) {
json.put("priority", "1");
}else {
} else {
json.put("priority", priority_jo.getString("value"));
}
json.put("acs_task_type", "8");

View File

@@ -113,33 +113,6 @@
</el-row>
<el-row>
</el-row>
<el-row>
<el-col :span="8">
<el-form-item label="气涨轴">
<label slot="label">&nbsp;&nbsp;&nbsp;&nbsp;:</label>
<el-input
v-model="query.qzzno"
clearable
size="mini"
placeholder="气涨轴编号"
style="width: 250px"
@keyup.enter.native="crud.toQuery"
/>
</el-form-item>
</el-col>
<el-form-item label="日期">
<label slot="label">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;:</label>
<el-date-picker
v-model="query.createTime"
type="daterange"
value-format="yyyy-MM-dd"
start-placeholder="开始日期"
end-placeholder="结束日期"
:default-time="['00:00:00', '23:59:59']"
@change="crud.toQuery"
/>
</el-form-item>
</el-row>
<el-row>
<el-col :span="6">
@@ -196,11 +169,57 @@
</el-select>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="是否呼叫">
<el-select
v-model="query.is_call"
clearable
placeholder="是否呼叫"
class="filter-item"
@change="crud.toQuery"
>
<el-option
v-for="item in dict.IS_OR_NOT"
:key="item.value"
:label="item.label"
:value="item.value"
/>
</el-select>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="8">
<el-form-item label="气涨轴">
<label slot="label">&nbsp;&nbsp;&nbsp;&nbsp;:</label>
<el-input
v-model="query.qzzno"
clearable
size="mini"
placeholder="气涨轴编号"
style="width: 250px"
@keyup.enter.native="crud.toQuery"
/>
</el-form-item>
</el-col>
<el-col :span="10">
<el-form-item label="日期">
<label slot="label">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;:</label>
<el-date-picker
v-model="query.createTime"
type="daterange"
value-format="yyyy-MM-dd"
start-placeholder="开始日期"
end-placeholder="结束日期"
:default-time="['00:00:00', '23:59:59']"
@change="crud.toQuery"
/>
</el-form-item>
</el-col>
<el-col :span="6">
<rrOperation/>
</el-col>
</el-row>
</el-form>
</div>
<!--如果想在工具栏加入更多按钮可以使用插槽方式 slot = 'left' or 'right'-->
@@ -438,6 +457,8 @@
<el-table-column prop="is_parent_ok" label="母卷上料完成" width="100px" :formatter="formatParentName"/>
<el-table-column prop="is_child_tz_ok" label="子卷套轴完成" width="100px" :formatter="formatChildName"/>
<el-table-column prop="is_child_ps_ok" label="子卷配送完成" width="100px" :formatter="formatChildPsName"/>
<el-table-column prop="is_child_ps_ok" label="子卷配送完成" width="100px" :formatter="formatChildPsName"/>
<el-table-column prop="is_call" label="是否呼叫" width="100px" :formatter="formatChildCallName"/>
<el-table-column prop="qzzno" label="气涨轴编码" width="100px"/>
<el-table-column prop="start_time" label="开始时间" width="150px"/>
<el-table-column prop="end_time" label="结束时间" width="150px"/>
@@ -628,6 +649,9 @@ export default {
},
formatChildPsName(row) {
return this.dict.label.IS_OR_NOT[row.is_child_ps_ok]
},
formatChildCallName(row) {
return this.dict.label.IS_OR_NOT[row.is_call]
}
}
}