This commit is contained in:
2023-02-21 19:05:31 +08:00
4 changed files with 59 additions and 1 deletions

View File

@@ -764,7 +764,14 @@ public class MesToLmsServiceImpl implements MesToLmsService {
JSONObject jo = new JSONObject(); JSONObject jo = new JSONObject();
jo.put("point_code", down_point_code); jo.put("point_code", down_point_code);
jo.put("cut_rows", down_rows); jo.put("cut_rows", down_rows);
if (del_rows.size() > 1) { if (del_rows.size() > 0) {
if (up_rows.size() > 0){
if (del_rows.size() == 1){
jo.put("is_last", "0");
}else {
jo.put("is_last", "1");
}
}
jo.put("is_last", "0"); jo.put("is_last", "0");
} else { } else {
jo.put("is_last", "1"); jo.put("is_last", "1");

View File

@@ -37,6 +37,13 @@ public class OutController {
return new ResponseEntity<>(outService.confirm(whereJson), HttpStatus.OK); return new ResponseEntity<>(outService.confirm(whereJson), HttpStatus.OK);
} }
@PostMapping("/disuseConfirm")
@Log("废箔下卷")
@ApiOperation("废箔下卷")
public ResponseEntity<Object> disuseConfirm(@RequestBody JSONObject whereJson) {
return new ResponseEntity<>(outService.disuseConfirm(whereJson), HttpStatus.OK);
}
@PostMapping("/conveyPointQuery") @PostMapping("/conveyPointQuery")
@Log("缓存点位查询") @Log("缓存点位查询")
@ApiOperation("缓存点位查询") @ApiOperation("缓存点位查询")

View File

@@ -19,6 +19,13 @@ public interface OutService {
*/ */
JSONObject confirm(JSONObject whereJson); JSONObject confirm(JSONObject whereJson);
/**
* 废箔下卷确认
* @param whereJson /
* @return JSONObject
*/
JSONObject disuseConfirm(JSONObject whereJson);
/** /**
* 缓存点位查询 * 缓存点位查询
* @param whereJson / * @param whereJson /

View File

@@ -169,6 +169,43 @@ public class OutServiceImpl implements OutService {
return result; return result;
} }
@Override
@Transactional(rollbackFor = Exception.class)
public JSONObject disuseConfirm(JSONObject whereJson) {
String point_code = whereJson.getString("point_code");
//查询该点位对应的机台编号
JSONObject cut_ivt = WQLObject.getWQLObject("ST_IVT_CutPointIvt").query("up_point_code ='" + point_code + "' OR down_point_code ='" + point_code + "'").uniqueResult(0);
if (ObjectUtil.isEmpty(cut_ivt)) {
throw new BadRequestException("未查询到对应的分切机!");
}
//查询该分切机邻近位置的空载具的输送线点位
JSONObject empty_vehicle = WQL.getWO("PDA_02")
.addParam("sort_seq", cut_ivt.getString("sort_seq"))
.addParam("sql_str", " ORDER BY abs(" + cut_ivt.getString("sort_seq") + "-sort_seq),point_code")
.addParam("product_area", cut_ivt.getString("product_area"))
.addParam("point_location", cut_ivt.getString("point_location"))
.addParam("flag", "3").process().uniqueResult(0);
if (ObjectUtil.isEmpty(empty_vehicle)) {
throw new BadRequestException("未查询到可用的空载具!");
}
JSONObject jo = new JSONObject();
jo.put("point_code1", point_code);
jo.put("point_code2", empty_vehicle.getString("point_code"));
jo.put("vehicle_code", "waste foil");
jo.put("product_area", cut_ivt.getString("product_area"));
//分切>输送线 子卷出站
jo.put("task_type", "010404");
cutTrussTask.createTask(jo);
JSONObject result = new JSONObject();
result.put("message", "操作成功!");
return result;
}
@Override @Override
public JSONObject conveyPointQuery(JSONObject whereJson) { public JSONObject conveyPointQuery(JSONObject whereJson) {
String product_area = whereJson.getString("product_area"); String product_area = whereJson.getString("product_area");