Merge branch 'master' of http://121.40.234.130:8899/root/lanzhouhailiang_one
This commit is contained in:
@@ -37,4 +37,13 @@ public class BakingController {
|
|||||||
public ResponseEntity<Object> inCoolIvt(@RequestBody JSONObject whereJson) {
|
public ResponseEntity<Object> inCoolIvt(@RequestBody JSONObject whereJson) {
|
||||||
return new ResponseEntity<>(bakingService.inCoolIvt(whereJson),HttpStatus.OK);
|
return new ResponseEntity<>(bakingService.inCoolIvt(whereJson),HttpStatus.OK);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@PostMapping("/release")
|
||||||
|
@Log("解警")
|
||||||
|
@ApiOperation("解警")
|
||||||
|
public ResponseEntity<Object> release(@RequestBody JSONObject whereJson) {
|
||||||
|
return new ResponseEntity<>(bakingService.release(whereJson),HttpStatus.OK);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -6,6 +6,7 @@ import io.swagger.annotations.ApiOperation;
|
|||||||
import lombok.RequiredArgsConstructor;
|
import lombok.RequiredArgsConstructor;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import org.nl.modules.logging.annotation.Log;
|
import org.nl.modules.logging.annotation.Log;
|
||||||
|
import org.nl.modules.wql.core.content.HttpContext;
|
||||||
import org.nl.wms.pda.mps.service.CasingService;
|
import org.nl.wms.pda.mps.service.CasingService;
|
||||||
import org.nl.wms.pda.mps.service.FeedingService;
|
import org.nl.wms.pda.mps.service.FeedingService;
|
||||||
import org.springframework.http.HttpStatus;
|
import org.springframework.http.HttpStatus;
|
||||||
@@ -28,7 +29,10 @@ public class FeedingController {
|
|||||||
@Log("分切计划初始化查询")
|
@Log("分切计划初始化查询")
|
||||||
@ApiOperation("分切计划初始化查询")
|
@ApiOperation("分切计划初始化查询")
|
||||||
public ResponseEntity<Object> queryMaterialInfo(@RequestBody JSONObject whereJson) {
|
public ResponseEntity<Object> queryMaterialInfo(@RequestBody JSONObject whereJson) {
|
||||||
return new ResponseEntity<>(feedingService.queryMaterialInfo(whereJson), HttpStatus.OK);
|
HttpContext ctx = new HttpContext("11");
|
||||||
|
ctx.setPage((String) (whereJson.get("page")));
|
||||||
|
ctx.setRows((String) (whereJson.get("size")));
|
||||||
|
return new ResponseEntity<>(feedingService.queryMaterialInfo(whereJson, ctx), HttpStatus.OK);
|
||||||
}
|
}
|
||||||
|
|
||||||
@PostMapping("/confirm")
|
@PostMapping("/confirm")
|
||||||
|
|||||||
@@ -18,5 +18,7 @@ public interface BakingService {
|
|||||||
*/
|
*/
|
||||||
JSONObject inCoolIvt(JSONObject whereJson);
|
JSONObject inCoolIvt(JSONObject whereJson);
|
||||||
|
|
||||||
|
JSONObject release(JSONObject whereJson);
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,18 +1,21 @@
|
|||||||
package org.nl.wms.pda.mps.service;
|
package org.nl.wms.pda.mps.service;
|
||||||
|
|
||||||
import com.alibaba.fastjson.JSONObject;
|
import com.alibaba.fastjson.JSONObject;
|
||||||
|
import org.nl.modules.wql.core.content.HttpContext;
|
||||||
|
|
||||||
public interface FeedingService {
|
public interface FeedingService {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 分切计划初始化查询
|
* 分切计划初始化查询
|
||||||
|
*
|
||||||
* @param whereJson /
|
* @param whereJson /
|
||||||
* @return JSONObject
|
* @return JSONObject
|
||||||
*/
|
*/
|
||||||
JSONObject queryMaterialInfo(JSONObject whereJson);
|
JSONObject queryMaterialInfo(JSONObject whereJson,HttpContext ctx);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 套轴确认
|
* 套轴确认
|
||||||
|
*
|
||||||
* @param whereJson /
|
* @param whereJson /
|
||||||
* @return JSONObject
|
* @return JSONObject
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -443,28 +443,9 @@ public class BakingServiceImpl implements BakingService {
|
|||||||
return jsonHotMst.getString("iostorinv_id");
|
return jsonHotMst.getString("iostorinv_id");
|
||||||
}
|
}
|
||||||
|
|
||||||
@Transactional
|
@Override
|
||||||
public void createHotDtl(JSONObject param) {
|
@Transactional(rollbackFor = Exception.class)
|
||||||
/*
|
public JSONObject release(JSONObject whereJson) {
|
||||||
* 创建烘箱区出入明细表
|
return null;
|
||||||
*/
|
|
||||||
WQLObject hotDtlTab = WQLObject.getWQLObject("ST_IVT_HotRegionIODtl"); // 烘箱区出入明细表
|
|
||||||
|
|
||||||
JSONObject jsonHotDtl = new JSONObject();
|
|
||||||
jsonHotDtl.put("iostorinv_id", IdUtil.getSnowflake(1, 1).nextId());
|
|
||||||
jsonHotDtl.put("bill_code", "");
|
|
||||||
jsonHotDtl.put("start_point_code", param.getString("start_point_code"));
|
|
||||||
jsonHotDtl.put("next_point_code", param.getString("next_point_code"));
|
|
||||||
jsonHotDtl.put("temperature", param.getString("temperature"));
|
|
||||||
jsonHotDtl.put("oven_time", param.getString("oven_time"));
|
|
||||||
jsonHotDtl.put("task_type", "1");
|
|
||||||
jsonHotDtl.put("task_id", param.getString("task_id"));
|
|
||||||
jsonHotDtl.put("create_id", 2);
|
|
||||||
jsonHotDtl.put("create_name", "mes用户");
|
|
||||||
jsonHotDtl.put("create_time", DateUtil.now());
|
|
||||||
jsonHotDtl.put("dtl_status", "10");
|
|
||||||
hotDtlTab.insert(jsonHotDtl);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -31,7 +31,7 @@ public class EmptyVehicleServiceImpl implements EmptyVehicleService {
|
|||||||
}
|
}
|
||||||
JSONObject point_jo = WQLObject.getWQLObject("st_ivt_coolpointivt").query("empty_point_code = '"+point_code+"'").uniqueResult(0);
|
JSONObject point_jo = WQLObject.getWQLObject("st_ivt_coolpointivt").query("empty_point_code = '"+point_code+"'").uniqueResult(0);
|
||||||
if (ObjectUtil.isEmpty(point_jo)){
|
if (ObjectUtil.isEmpty(point_jo)){
|
||||||
throw new BadRequestException("未查询到对应的点位设备!");
|
throw new BadRequestException("未查询到对应点位,请扫描正确的空轴点位!");
|
||||||
}
|
}
|
||||||
String empty_vehicle_code = point_jo.getString("empty_vehicle_code");
|
String empty_vehicle_code = point_jo.getString("empty_vehicle_code");
|
||||||
JSONObject vehicle_jo = new JSONObject();
|
JSONObject vehicle_jo = new JSONObject();
|
||||||
|
|||||||
@@ -13,6 +13,7 @@ import org.nl.modules.common.utils.SecurityUtils;
|
|||||||
import org.nl.modules.system.util.CodeUtil;
|
import org.nl.modules.system.util.CodeUtil;
|
||||||
import org.nl.modules.wql.WQL;
|
import org.nl.modules.wql.WQL;
|
||||||
import org.nl.modules.wql.core.bean.WQLObject;
|
import org.nl.modules.wql.core.bean.WQLObject;
|
||||||
|
import org.nl.modules.wql.core.content.HttpContext;
|
||||||
import org.nl.wms.ext.mes.service.LmsToMesService;
|
import org.nl.wms.ext.mes.service.LmsToMesService;
|
||||||
import org.nl.wms.pda.mps.service.CasingService;
|
import org.nl.wms.pda.mps.service.CasingService;
|
||||||
import org.nl.wms.pda.mps.service.FeedingService;
|
import org.nl.wms.pda.mps.service.FeedingService;
|
||||||
@@ -33,7 +34,7 @@ public class FeedingServiceImpl implements FeedingService {
|
|||||||
private final CheckOutBillService checkOutBillService;
|
private final CheckOutBillService checkOutBillService;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public JSONObject queryMaterialInfo(JSONObject whereJson) {
|
public JSONObject queryMaterialInfo(JSONObject whereJson, HttpContext ctx) {
|
||||||
String product_area = whereJson.getString("product_area");
|
String product_area = whereJson.getString("product_area");
|
||||||
String point_code = whereJson.getString("point_code");
|
String point_code = whereJson.getString("point_code");
|
||||||
String device_code = whereJson.getString("device_code");
|
String device_code = whereJson.getString("device_code");
|
||||||
@@ -53,9 +54,10 @@ public class FeedingServiceImpl implements FeedingService {
|
|||||||
if (StrUtil.isNotEmpty(container_name)) {
|
if (StrUtil.isNotEmpty(container_name)) {
|
||||||
map.put("container_name", container_name);
|
map.put("container_name", container_name);
|
||||||
}
|
}
|
||||||
JSONArray rows = WQL.getWO("PDA_02").addParamMap(map).process().getResultJSONArray(0);
|
JSONObject rows = WQL.getWO("PDA_02").addParamMap(map).pageQuery(ctx,"container_name");
|
||||||
JSONObject jo = new JSONObject();
|
JSONObject jo = new JSONObject();
|
||||||
jo.put("data", rows);
|
jo.put("data", rows.getJSONArray("content"));
|
||||||
|
jo.put("size", rows.getString("totalElements"));
|
||||||
jo.put("message", "查询成功!");
|
jo.put("message", "查询成功!");
|
||||||
return jo;
|
return jo;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -62,7 +62,7 @@ public class RawFoilServiceImpl implements RawFoilService {
|
|||||||
map.put("product_area", "A1");
|
map.put("product_area", "A1");
|
||||||
}*/
|
}*/
|
||||||
|
|
||||||
JSONObject arr = WQL.getWO("PDA_RAWFOIL_01").addParamMap(map).pageQuery(ctx,"container_name");
|
JSONObject arr = WQL.getWO("PDA_RAWFOIL_01").addParamMap(map).pageQuery(ctx, "container_name");
|
||||||
JSONArray rows = arr.getJSONArray("content");
|
JSONArray rows = arr.getJSONArray("content");
|
||||||
for (int i = 0; i < rows.size(); i++) {
|
for (int i = 0; i < rows.size(); i++) {
|
||||||
JSONObject json = new JSONObject();
|
JSONObject json = new JSONObject();
|
||||||
@@ -82,21 +82,26 @@ public class RawFoilServiceImpl implements RawFoilService {
|
|||||||
Date now_time = DateUtil.parse(DateUtil.now());
|
Date now_time = DateUtil.parse(DateUtil.now());
|
||||||
Date end_time2 = DateUtil.parse(end_time);
|
Date end_time2 = DateUtil.parse(end_time);
|
||||||
|
|
||||||
long betweenDay = DateUtil.between(end_time2, now_time, DateUnit.MINUTE, false);
|
long betweenDay = DateUtil.between(now_time, end_time2, DateUnit.MINUTE, false);
|
||||||
|
|
||||||
if (betweenDay > 0) {
|
if (betweenDay <= 0) {
|
||||||
json.put("color_type", "1");
|
json.put("color_type", "1");
|
||||||
} else if (betweenDay <= 0 && betweenDay >= -30) {
|
} else if (betweenDay > 0 && betweenDay <= 30) {
|
||||||
json.put("color_type", "2");
|
json.put("color_type", "2");
|
||||||
} else {
|
} else {
|
||||||
json.put("color_type", "0");
|
json.put("color_type", "0");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (betweenDay < 0) {
|
||||||
|
betweenDay = 0;
|
||||||
|
}
|
||||||
json.put("container_name", jsonObject.getString("container_name"));
|
json.put("container_name", jsonObject.getString("container_name"));
|
||||||
json.put("up_coiler_date", jsonObject.getString("up_coiler_date"));
|
json.put("up_coiler_date", jsonObject.getString("up_coiler_date"));
|
||||||
json.put("end_date", end_time);
|
json.put("end_date", end_time);
|
||||||
json.put("point_code", jsonObject.getString("resource_name"));
|
json.put("point_code", jsonObject.getString("ed_point_code"));
|
||||||
|
json.put("resource_name", jsonObject.getString("resource_name"));
|
||||||
json.put("pcsn", jsonObject.getString("product_name"));
|
json.put("pcsn", jsonObject.getString("product_name"));
|
||||||
|
json.put("remaining_time", betweenDay);
|
||||||
json.put("product_name", jsonObject.getString("theory_height"));
|
json.put("product_name", jsonObject.getString("theory_height"));
|
||||||
json.put("mfg_order_name", jsonObject.getString("mfg_order_name"));
|
json.put("mfg_order_name", jsonObject.getString("mfg_order_name"));
|
||||||
|
|
||||||
@@ -104,7 +109,7 @@ public class RawFoilServiceImpl implements RawFoilService {
|
|||||||
}
|
}
|
||||||
JSONObject jo = new JSONObject();
|
JSONObject jo = new JSONObject();
|
||||||
jo.put("data", resultArr);
|
jo.put("data", resultArr);
|
||||||
jo.put("size",arr.getString("totalElements"));
|
jo.put("size", arr.getString("totalElements"));
|
||||||
jo.put("message", "查询成功!");
|
jo.put("message", "查询成功!");
|
||||||
return jo;
|
return jo;
|
||||||
|
|
||||||
@@ -116,10 +121,10 @@ public class RawFoilServiceImpl implements RawFoilService {
|
|||||||
map.put("flag", "5");
|
map.put("flag", "5");
|
||||||
map.put("point_code", whereJson.getString("point_code"));
|
map.put("point_code", whereJson.getString("point_code"));
|
||||||
map.put("container_name", whereJson.getString("container_name"));
|
map.put("container_name", whereJson.getString("container_name"));
|
||||||
JSONObject resultJSONArray = WQL.getWO("PDA_RAWFOIL_01").addParamMap(map).pageQuery(ctx,"container_name");
|
JSONObject resultJSONArray = WQL.getWO("PDA_RAWFOIL_01").addParamMap(map).pageQuery(ctx, "container_name");
|
||||||
JSONObject jo = new JSONObject();
|
JSONObject jo = new JSONObject();
|
||||||
jo.put("data", resultJSONArray.getJSONArray("content"));
|
jo.put("data", resultJSONArray.getJSONArray("content"));
|
||||||
jo.put("size",resultJSONArray.getString("totalElements"));
|
jo.put("size", resultJSONArray.getString("totalElements"));
|
||||||
jo.put("message", "查询成功!");
|
jo.put("message", "查询成功!");
|
||||||
return jo;
|
return jo;
|
||||||
}
|
}
|
||||||
@@ -153,7 +158,7 @@ public class RawFoilServiceImpl implements RawFoilService {
|
|||||||
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_RAWFOIL_01").addParamMap(map).process().uniqueResult(0);*/
|
JSONObject jsonIvt_tow = WQL.getWO("PDA_RAWFOIL_01").addParamMap(map).process().uniqueResult(0);*/
|
||||||
throw new BadRequestException("未查询到可用点位");
|
throw new BadRequestException("未查询到有空轴且母卷位置为空的点位!");
|
||||||
} else {
|
} else {
|
||||||
start_pint_code = jsonIvt.getString("empty_point_code");
|
start_pint_code = jsonIvt.getString("empty_point_code");
|
||||||
point_code4 = jsonIvt.getString("full_point_code");
|
point_code4 = jsonIvt.getString("full_point_code");
|
||||||
@@ -247,6 +252,14 @@ public class RawFoilServiceImpl implements RawFoilService {
|
|||||||
|
|
||||||
JSONObject jsonCool = coolTab.query("workorder_id = '" + raw_jo.getString("workorder_id") + "'").uniqueResult(0);
|
JSONObject jsonCool = coolTab.query("workorder_id = '" + raw_jo.getString("workorder_id") + "'").uniqueResult(0);
|
||||||
|
|
||||||
|
//查询该生箔工单是否存在未完成的任务
|
||||||
|
String container_name = raw_jo.getString("container_name");
|
||||||
|
|
||||||
|
JSONObject task_jo = WQLObject.getWQLObject("").query("material_code = '"+container_name+"' AND task_status < '07' AND is_delete = '0'").uniqueResult(0);
|
||||||
|
if (ObjectUtil.isNotEmpty(task_jo)){
|
||||||
|
throw new BadRequestException("该生箔工单存在未完成的任务,请先完成任务!");
|
||||||
|
}
|
||||||
|
|
||||||
jsonCool.put("status", "09");
|
jsonCool.put("status", "09");
|
||||||
jsonCool.put("realend_time", DateUtil.now());
|
jsonCool.put("realend_time", DateUtil.now());
|
||||||
jsonCool.put("finish_type", "02");
|
jsonCool.put("finish_type", "02");
|
||||||
|
|||||||
@@ -74,7 +74,7 @@
|
|||||||
ENDIF
|
ENDIF
|
||||||
|
|
||||||
IF 输入.flag = "2"
|
IF 输入.flag = "2"
|
||||||
QUERY
|
PAGEQUERY
|
||||||
SELECT
|
SELECT
|
||||||
plan.*,
|
plan.*,
|
||||||
ivt.point_code,
|
ivt.point_code,
|
||||||
@@ -102,7 +102,7 @@
|
|||||||
ivt.point_code = 输入.device_code
|
ivt.point_code = 输入.device_code
|
||||||
ENDOPTION
|
ENDOPTION
|
||||||
ENDSELECT
|
ENDSELECT
|
||||||
ENDQUERY
|
ENDPAGEQUERY
|
||||||
ENDIF
|
ENDIF
|
||||||
|
|
||||||
IF 输入.flag = "3"
|
IF 输入.flag = "3"
|
||||||
|
|||||||
@@ -130,15 +130,17 @@
|
|||||||
IF 输入.flag = "4"
|
IF 输入.flag = "4"
|
||||||
PAGEQUERY
|
PAGEQUERY
|
||||||
SELECT
|
SELECT
|
||||||
der.*
|
der.*,
|
||||||
|
sb.point_code AS ed_point_code
|
||||||
FROM
|
FROM
|
||||||
PDM_BI_RawFoilWorkOrder der
|
PDM_BI_RawFoilWorkOrder der
|
||||||
|
LEFT JOIN st_ivt_sbpointivt sb ON sb.ext_code = der.resource_name
|
||||||
WHERE
|
WHERE
|
||||||
der.status = '01'
|
der.status = '01'
|
||||||
AND der.is_delete = '0'
|
AND der.is_delete = '0'
|
||||||
|
|
||||||
OPTION 输入.point_code <> ""
|
OPTION 输入.point_code <> ""
|
||||||
der.resource_name = 输入.point_code
|
sb.point_code = 输入.point_code
|
||||||
ENDOPTION
|
ENDOPTION
|
||||||
|
|
||||||
OPTION 输入.container_name <> ""
|
OPTION 输入.container_name <> ""
|
||||||
@@ -169,7 +171,7 @@
|
|||||||
der.mfg_order_name AS mfg_order_name,
|
der.mfg_order_name AS mfg_order_name,
|
||||||
der.container_name AS container_name,
|
der.container_name AS container_name,
|
||||||
ivt.point_code,
|
ivt.point_code,
|
||||||
der.product_name AS pcsn,
|
der.product_name,
|
||||||
der.theory_height AS theory_height,
|
der.theory_height AS theory_height,
|
||||||
der.realstart_time AS realstart_time,
|
der.realstart_time AS realstart_time,
|
||||||
der.realend_time AS realend_time,
|
der.realend_time AS realend_time,
|
||||||
|
|||||||
@@ -22,6 +22,7 @@ import org.springframework.stereotype.Service;
|
|||||||
import org.springframework.transaction.annotation.Transactional;
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
|
import java.util.HashMap;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
@Service
|
@Service
|
||||||
@@ -61,11 +62,13 @@ public class BookTwoConfirmTask extends AbstractAcsTask {
|
|||||||
@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 ivtTab = WQLObject.getWQLObject("ST_IVT_CoolPointIvt"); // 冷却区库存表
|
WQLObject ivtTab = WQLObject.getWQLObject("ST_IVT_CoolPointIvt"); // 冷却区库存表
|
||||||
WQLObject coolTab = WQLObject.getWQLObject("ST_IVT_CoolRegionIO"); // 冷却区出入表
|
WQLObject coolTab = WQLObject.getWQLObject("ST_IVT_CoolRegionIO"); // 冷却区出入表
|
||||||
WQLObject rawTab = WQLObject.getWQLObject("PDM_BI_RawFoilWorkOrder"); // 生箔工序工单表
|
WQLObject rawTab = WQLObject.getWQLObject("PDM_BI_RawFoilWorkOrder"); // 生箔工序工单表
|
||||||
|
|
||||||
|
Long currentUserId = SecurityUtils.getCurrentUserId();
|
||||||
|
String currentUsername = SecurityUtils.getCurrentUsername();
|
||||||
|
|
||||||
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);
|
||||||
|
|
||||||
@@ -75,9 +78,6 @@ 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());
|
||||||
@@ -128,6 +128,23 @@ public class BookTwoConfirmTask extends AbstractAcsTask {
|
|||||||
jsonCool.put("confirm_optname", SecurityUtils.getCurrentUsername());
|
jsonCool.put("confirm_optname", SecurityUtils.getCurrentUsername());
|
||||||
jsonCool.put("confirm_time", DateUtil.now());
|
jsonCool.put("confirm_time", DateUtil.now());
|
||||||
coolTab.update(jsonCool);
|
coolTab.update(jsonCool);
|
||||||
|
|
||||||
|
//更新母卷工单状态
|
||||||
|
HashMap<String,String> map = new HashMap<>();
|
||||||
|
map.put("statuPDM_BI_RawFoilWorkOrders", "09");
|
||||||
|
map.put("realend_time", DateUtil.now());
|
||||||
|
map.put("update_optid",currentUserId+"");
|
||||||
|
map.put("update_optname",currentUsername);
|
||||||
|
jsonCool.put("finish_type", "01");
|
||||||
|
map.put("update_time",DateUtil.now());
|
||||||
|
WQLObject.getWQLObject("").update(map,"container_name = '"+jsonTask.getString("material_code")+"'");
|
||||||
|
jsonCool.put("status", "09");
|
||||||
|
jsonCool.put("realend_time", DateUtil.now());
|
||||||
|
jsonCool.put("finish_type", "01");
|
||||||
|
jsonCool.put("update_optid",currentUserId+"");
|
||||||
|
jsonCool.put("update_optname",currentUsername);
|
||||||
|
jsonCool.put("update_time",DateUtil.now());
|
||||||
|
rawTab.update(jsonCool);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -202,7 +219,8 @@ public class BookTwoConfirmTask extends AbstractAcsTask {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void cancel(String task_id) {
|
public void cancel(String task_id) {
|
||||||
|
JSONObject taskObj = WQLObject.getWQLObject("SCH_BASE_Task").query("task_id = '" + task_id + "'").uniqueResult(0);
|
||||||
|
this.updateTaskStatus(taskObj, "0");
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -23,6 +23,7 @@ import org.springframework.stereotype.Service;
|
|||||||
import org.springframework.transaction.annotation.Transactional;
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
|
import java.util.HashMap;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
@Service
|
@Service
|
||||||
@@ -61,7 +62,6 @@ public class CallEmpReelTask extends AbstractAcsTask {
|
|||||||
@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 ivtTab = WQLObject.getWQLObject("ST_IVT_CoolPointIvt"); // 冷却区库存表
|
WQLObject ivtTab = WQLObject.getWQLObject("ST_IVT_CoolPointIvt"); // 冷却区库存表
|
||||||
WQLObject coolTab = WQLObject.getWQLObject("ST_IVT_CoolRegionIO"); // 冷却区出入表
|
WQLObject coolTab = WQLObject.getWQLObject("ST_IVT_CoolRegionIO"); // 冷却区出入表
|
||||||
WQLObject rawTab = WQLObject.getWQLObject("PDM_BI_RawFoilWorkOrder"); // 生箔工序工单表
|
WQLObject rawTab = WQLObject.getWQLObject("PDM_BI_RawFoilWorkOrder"); // 生箔工序工单表
|
||||||
@@ -70,6 +70,9 @@ public class CallEmpReelTask extends AbstractAcsTask {
|
|||||||
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);
|
||||||
|
|
||||||
|
Long currentUserId = SecurityUtils.getCurrentUserId();
|
||||||
|
String currentUsername = SecurityUtils.getCurrentUsername();
|
||||||
|
|
||||||
if (StrUtil.equals(status, "0")) {
|
if (StrUtil.equals(status, "0")) {
|
||||||
// 取消删除任务
|
// 取消删除任务
|
||||||
taskTab.delete("task_id = '" + task_id + "'");
|
taskTab.delete("task_id = '" + task_id + "'");
|
||||||
@@ -134,10 +137,21 @@ public class CallEmpReelTask extends AbstractAcsTask {
|
|||||||
jsonCoolIvt.put("workorder_id", jsonRaw.getString("workorder_id"));
|
jsonCoolIvt.put("workorder_id", jsonRaw.getString("workorder_id"));
|
||||||
jsonCoolIvt.put("ivt_qty", jsonRaw.getString("productin_qty"));
|
jsonCoolIvt.put("ivt_qty", jsonRaw.getString("productin_qty"));
|
||||||
ivtTab.update(jsonCoolIvt);
|
ivtTab.update(jsonCoolIvt);
|
||||||
|
|
||||||
|
//更新母卷工单状态
|
||||||
|
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("finish_type", "01");
|
||||||
|
map.put("update_time",DateUtil.now());
|
||||||
|
WQLObject.getWQLObject("PDM_BI_RawFoilWorkOrder").update(map,"container_name = '"+jsonTask.getString("material_code")+"'");
|
||||||
} else {
|
} else {
|
||||||
// 取空
|
// 取空
|
||||||
JSONObject jsonCoolIvt = ivtTab.query("full_point_code = '" + point_code1 + "'").uniqueResult(0);
|
JSONObject jsonCoolIvt = ivtTab.query("full_point_code = '" + point_code1 + "'").uniqueResult(0);
|
||||||
jsonCoolIvt.put("empty_point_status", "01");
|
jsonCoolIvt.put("empty_point_status", "01");
|
||||||
|
jsonCoolIvt.put("empty_vehicle_code", "");
|
||||||
ivtTab.update(jsonCoolIvt);
|
ivtTab.update(jsonCoolIvt);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
@@ -152,6 +166,7 @@ public class CallEmpReelTask extends AbstractAcsTask {
|
|||||||
|
|
||||||
// 更新冷却库存状态
|
// 更新冷却库存状态
|
||||||
jsonIvt.put("empty_point_status", "01");
|
jsonIvt.put("empty_point_status", "01");
|
||||||
|
jsonIvt.put("empty_vehicle_code", "");
|
||||||
ivtTab.update(jsonIvt);
|
ivtTab.update(jsonIvt);
|
||||||
|
|
||||||
// 校验终点是否存在
|
// 校验终点是否存在
|
||||||
@@ -159,8 +174,15 @@ public class CallEmpReelTask extends AbstractAcsTask {
|
|||||||
if (ObjectUtil.isEmpty(jsonIvt)) throw new BadRequestException("终点未找到可用点位:" + point_code2);
|
if (ObjectUtil.isEmpty(jsonIvt)) throw new BadRequestException("终点未找到可用点位:" + point_code2);
|
||||||
|
|
||||||
// 更新工单状态为完成
|
// 更新工单状态为完成
|
||||||
jsonRaw.put("status", "09");
|
//更新母卷工单状态
|
||||||
rawTab.update(jsonRaw);
|
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("finish_type", "01");
|
||||||
|
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");
|
jsonIvt2.put("full_point_status", "02");
|
||||||
@@ -169,12 +191,11 @@ public class CallEmpReelTask extends AbstractAcsTask {
|
|||||||
jsonIvt2.put("workorder_id", jsonRaw.getString("workorder_id"));
|
jsonIvt2.put("workorder_id", jsonRaw.getString("workorder_id"));
|
||||||
jsonIvt2.put("ivt_qty", jsonRaw.getString("productin_qty"));
|
jsonIvt2.put("ivt_qty", jsonRaw.getString("productin_qty"));
|
||||||
ivtTab.update(jsonIvt2);
|
ivtTab.update(jsonIvt2);
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// 插入入库单
|
// 插入入库单
|
||||||
Long currentUserId = SecurityUtils.getCurrentUserId();
|
|
||||||
String currentUsername = SecurityUtils.getCurrentUsername();
|
|
||||||
|
|
||||||
JSONObject jsonMater = WQLObject.getWQLObject("md_me_materialbase").query("material_code = '" + jsonRaw.getString("product_name") + "'").uniqueResult(0);
|
JSONObject jsonMater = WQLObject.getWQLObject("md_me_materialbase").query("material_code = '" + jsonRaw.getString("product_name") + "'").uniqueResult(0);
|
||||||
if (ObjectUtil.isEmpty(jsonMater)) throw new BadRequestException("产品不存在");
|
if (ObjectUtil.isEmpty(jsonMater)) throw new BadRequestException("产品不存在");
|
||||||
|
|
||||||
@@ -275,6 +296,7 @@ public class CallEmpReelTask extends AbstractAcsTask {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void cancel(String task_id) {
|
public void cancel(String task_id) {
|
||||||
|
JSONObject taskObj = WQLObject.getWQLObject("SCH_BASE_Task").query("task_id = '" + task_id + "'").uniqueResult(0);
|
||||||
|
this.updateTaskStatus(taskObj, "0");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -315,7 +315,8 @@ public class CoolCutTask extends AbstractAcsTask {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void cancel(String task_id) {
|
public void cancel(String task_id) {
|
||||||
|
JSONObject taskObj = WQLObject.getWQLObject("SCH_BASE_Task").query("task_id = '" + task_id + "'").uniqueResult(0);
|
||||||
|
this.updateTaskStatus(taskObj, "0");
|
||||||
}
|
}
|
||||||
|
|
||||||
//判断该点位是否存在未完成的任务
|
//判断该点位是否存在未完成的任务
|
||||||
|
|||||||
@@ -196,7 +196,8 @@ public class CutConveyorTask extends AbstractAcsTask {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void cancel(String task_id) {
|
public void cancel(String task_id) {
|
||||||
|
JSONObject taskObj = WQLObject.getWQLObject("SCH_BASE_Task").query("task_id = '" + task_id + "'").uniqueResult(0);
|
||||||
|
this.updateTaskStatus(taskObj, "0");
|
||||||
}
|
}
|
||||||
|
|
||||||
//判断该点位是否存在未完成的任务
|
//判断该点位是否存在未完成的任务
|
||||||
|
|||||||
@@ -314,7 +314,8 @@ public class CutTrussTask extends AbstractAcsTask {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void cancel(String task_id) {
|
public void cancel(String task_id) {
|
||||||
|
JSONObject taskObj = WQLObject.getWQLObject("SCH_BASE_Task").query("task_id = '" + task_id + "'").uniqueResult(0);
|
||||||
|
this.updateTaskStatus(taskObj, "0");
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -201,7 +201,8 @@ public class InCoolIvtTask extends AbstractAcsTask {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void cancel(String task_id) {
|
public void cancel(String task_id) {
|
||||||
|
JSONObject taskObj = WQLObject.getWQLObject("SCH_BASE_Task").query("task_id = '" + task_id + "'").uniqueResult(0);
|
||||||
|
this.updateTaskStatus(taskObj, "0");
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -288,7 +288,8 @@ public class InHotTask extends AbstractAcsTask {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void cancel(String task_id) {
|
public void cancel(String task_id) {
|
||||||
|
JSONObject taskObj = WQLObject.getWQLObject("SCH_BASE_Task").query("task_id = '" + task_id + "'").uniqueResult(0);
|
||||||
|
this.updateTaskStatus(taskObj, "0");
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -169,7 +169,8 @@ public class InTask extends AbstractAcsTask {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void cancel(String taskdtl_id) {
|
public void cancel(String task_id) {
|
||||||
|
JSONObject taskObj = WQLObject.getWQLObject("SCH_BASE_Task").query("task_id = '" + task_id + "'").uniqueResult(0);
|
||||||
|
this.updateTaskStatus(taskObj, "0");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -190,7 +190,8 @@ public class OutHotTask extends AbstractAcsTask {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void cancel(String task_id) {
|
public void cancel(String task_id) {
|
||||||
|
JSONObject taskObj = WQLObject.getWQLObject("SCH_BASE_Task").query("task_id = '" + task_id + "'").uniqueResult(0);
|
||||||
|
this.updateTaskStatus(taskObj, "0");
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -157,7 +157,8 @@ public class OutTask extends AbstractAcsTask {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void cancel(String taskdtl_id) {
|
public void cancel(String task_id) {
|
||||||
|
JSONObject taskObj = WQLObject.getWQLObject("SCH_BASE_Task").query("task_id = '" + task_id + "'").uniqueResult(0);
|
||||||
|
this.updateTaskStatus(taskObj, "0");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user