修改
This commit is contained in:
@@ -239,7 +239,7 @@ public class BakingServiceImpl implements BakingService {
|
|||||||
result.put("message","操作成功!");
|
result.put("message","操作成功!");
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Transactional
|
@Transactional
|
||||||
public String createHotIoMst(JSONObject param) {
|
public String createHotIoMst(JSONObject param) {
|
||||||
/*
|
/*
|
||||||
|
|||||||
@@ -53,6 +53,50 @@ public class CasingServiceImpl implements CasingService {
|
|||||||
throw new BadRequestException("气涨轴编码不能为空!");
|
throw new BadRequestException("气涨轴编码不能为空!");
|
||||||
}
|
}
|
||||||
JSONArray rows = whereJson.getJSONArray("cut_rows");
|
JSONArray rows = whereJson.getJSONArray("cut_rows");
|
||||||
|
|
||||||
|
if (rows.size()>2){
|
||||||
|
throw new BadRequestException("最多选择两个子卷进行操作!");
|
||||||
|
}
|
||||||
|
|
||||||
|
String split_group = "";
|
||||||
|
String resource_name = "";
|
||||||
|
String order_type = "";
|
||||||
|
String parent_container_name = "";
|
||||||
|
String restruct_container_name = "";
|
||||||
|
String package_box_sn = "";
|
||||||
|
|
||||||
|
//对子卷任务进行校验
|
||||||
|
for (int i = 0; i < rows.size(); i++) {
|
||||||
|
JSONObject row = rows.getJSONObject(i);
|
||||||
|
if (StrUtil.isEmpty(split_group)){
|
||||||
|
split_group = row.getString("split_group");
|
||||||
|
resource_name = row.getString("resource_name");
|
||||||
|
order_type = row.getString("order_type");
|
||||||
|
if (order_type.equals("1")){
|
||||||
|
parent_container_name = row.getString("parent_container_name");
|
||||||
|
}else {
|
||||||
|
restruct_container_name = row.getString("restruct_container_name");
|
||||||
|
package_box_sn = row.getString("package_box_sn");
|
||||||
|
}
|
||||||
|
}else {
|
||||||
|
if (!split_group.equals(row.getString("split_group"))){
|
||||||
|
throw new BadRequestException("两个子卷的分切组必须相同!");
|
||||||
|
}
|
||||||
|
if (!resource_name.equals(row.getString("resource_name"))){
|
||||||
|
throw new BadRequestException("两个子卷的机台编号必须相同!");
|
||||||
|
}
|
||||||
|
if (order_type.equals("1")){
|
||||||
|
if (!parent_container_name.equals(row.getString("parent_container_name"))){
|
||||||
|
throw new BadRequestException("两个子卷的母卷号必须相同!");
|
||||||
|
}
|
||||||
|
}else {
|
||||||
|
if (!restruct_container_name.equals(row.getString("restruct_container_name")) || !package_box_sn.equals(row.getString("package_box_sn"))){
|
||||||
|
throw new BadRequestException("两个子卷的改制子卷必须相同!");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
for (int i = 0; i < rows.size(); i++) {
|
for (int i = 0; i < rows.size(); i++) {
|
||||||
JSONObject row = rows.getJSONObject(i);
|
JSONObject row = rows.getJSONObject(i);
|
||||||
String workorder_id = row.getString("workorder_id");
|
String workorder_id = row.getString("workorder_id");
|
||||||
|
|||||||
@@ -45,10 +45,54 @@ public class OutServiceImpl implements OutService {
|
|||||||
@Override
|
@Override
|
||||||
@Transactional(rollbackFor = Exception.class)
|
@Transactional(rollbackFor = Exception.class)
|
||||||
public JSONObject confirm(JSONObject whereJson) {
|
public JSONObject confirm(JSONObject whereJson) {
|
||||||
|
|
||||||
String point_code = whereJson.getString("point_code");
|
String point_code = whereJson.getString("point_code");
|
||||||
|
|
||||||
JSONArray rows = whereJson.getJSONArray("cut_rows");
|
JSONArray rows = whereJson.getJSONArray("cut_rows");
|
||||||
|
|
||||||
|
if (rows.size()>2){
|
||||||
|
throw new BadRequestException("最多选择两个子卷进行操作!");
|
||||||
|
}
|
||||||
|
|
||||||
|
String split_group = "";
|
||||||
|
String resource_name = "";
|
||||||
|
String order_type = "";
|
||||||
|
String parent_container_name = "";
|
||||||
|
String restruct_container_name = "";
|
||||||
|
String package_box_sn = "";
|
||||||
|
|
||||||
|
//对子卷任务进行校验
|
||||||
|
for (int i = 0; i < rows.size(); i++) {
|
||||||
|
JSONObject row = rows.getJSONObject(i);
|
||||||
|
if (StrUtil.isEmpty(split_group)){
|
||||||
|
split_group = row.getString("split_group");
|
||||||
|
resource_name = row.getString("resource_name");
|
||||||
|
order_type = row.getString("order_type");
|
||||||
|
if (order_type.equals("1")){
|
||||||
|
parent_container_name = row.getString("parent_container_name");
|
||||||
|
}else {
|
||||||
|
restruct_container_name = row.getString("restruct_container_name");
|
||||||
|
package_box_sn = row.getString("package_box_sn");
|
||||||
|
}
|
||||||
|
}else {
|
||||||
|
if (!split_group.equals(row.getString("split_group"))){
|
||||||
|
throw new BadRequestException("两个子卷的分切组必须相同!");
|
||||||
|
}
|
||||||
|
if (!resource_name.equals(row.getString("resource_name"))){
|
||||||
|
throw new BadRequestException("两个子卷的机台编号必须相同!");
|
||||||
|
}
|
||||||
|
if (order_type.equals("1")){
|
||||||
|
if (!parent_container_name.equals(row.getString("parent_container_name"))){
|
||||||
|
throw new BadRequestException("两个子卷的母卷号必须相同!");
|
||||||
|
}
|
||||||
|
}else {
|
||||||
|
if (!restruct_container_name.equals(row.getString("restruct_container_name")) || !package_box_sn.equals(row.getString("package_box_sn"))){
|
||||||
|
throw new BadRequestException("两个子卷的改制子卷必须相同!");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
String cut_qzzno = rows.getJSONObject(0).getString("qzzno");
|
String cut_qzzno = rows.getJSONObject(0).getString("qzzno");
|
||||||
//查询该点位对应的机台编号
|
//查询该点位对应的机台编号
|
||||||
JSONObject cut_ivt = WQLObject.getWQLObject("ST_IVT_CutPointIvt").query("up_point_code ='"+point_code+"' OR down_point_code ='"+point_code+"'").uniqueResult(0);
|
JSONObject cut_ivt = WQLObject.getWQLObject("ST_IVT_CutPointIvt").query("up_point_code ='"+point_code+"' OR down_point_code ='"+point_code+"'").uniqueResult(0);
|
||||||
|
|||||||
@@ -73,9 +73,47 @@ public class ShippingServiceImpl implements ShippingService {
|
|||||||
public JSONObject confirm(JSONObject whereJson) {
|
public JSONObject confirm(JSONObject whereJson) {
|
||||||
JSONArray rows = whereJson.getJSONArray("cut_rows");
|
JSONArray rows = whereJson.getJSONArray("cut_rows");
|
||||||
|
|
||||||
|
if (rows.size()>2){
|
||||||
|
throw new BadRequestException("最多选择两个子卷进行操作!");
|
||||||
|
}
|
||||||
|
|
||||||
|
String split_group = "";
|
||||||
|
String resource_name = "";
|
||||||
|
String order_type = "";
|
||||||
|
String parent_container_name = "";
|
||||||
|
String restruct_container_name = "";
|
||||||
|
String package_box_sn = "";
|
||||||
|
|
||||||
//对子卷任务进行校验
|
//对子卷任务进行校验
|
||||||
for (int i = 0; i < rows.size(); i++) {
|
for (int i = 0; i < rows.size(); i++) {
|
||||||
JSONObject row = rows.getJSONObject(i);
|
JSONObject row = rows.getJSONObject(i);
|
||||||
|
if (StrUtil.isEmpty(split_group)){
|
||||||
|
split_group = row.getString("split_group");
|
||||||
|
resource_name = row.getString("resource_name");
|
||||||
|
order_type = row.getString("order_type");
|
||||||
|
if (order_type.equals("1")){
|
||||||
|
parent_container_name = row.getString("parent_container_name");
|
||||||
|
}else {
|
||||||
|
restruct_container_name = row.getString("restruct_container_name");
|
||||||
|
package_box_sn = row.getString("package_box_sn");
|
||||||
|
}
|
||||||
|
}else {
|
||||||
|
if (!split_group.equals(row.getString("split_group"))){
|
||||||
|
throw new BadRequestException("两个子卷的分切组必须相同!");
|
||||||
|
}
|
||||||
|
if (!resource_name.equals(row.getString("resource_name"))){
|
||||||
|
throw new BadRequestException("两个子卷的机台编号必须相同!");
|
||||||
|
}
|
||||||
|
if (order_type.equals("1")){
|
||||||
|
if (!parent_container_name.equals(row.getString("parent_container_name"))){
|
||||||
|
throw new BadRequestException("两个子卷的母卷号必须相同!");
|
||||||
|
}
|
||||||
|
}else {
|
||||||
|
if (!restruct_container_name.equals(row.getString("restruct_container_name")) || !package_box_sn.equals(row.getString("package_box_sn"))){
|
||||||
|
throw new BadRequestException("两个子卷的改制子卷必须相同!");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//通过气涨轴对应的分切计划来判断要送到哪个机台编号附近
|
//通过气涨轴对应的分切计划来判断要送到哪个机台编号附近
|
||||||
|
|||||||
@@ -24,6 +24,7 @@ import org.springframework.transaction.annotation.Transactional;
|
|||||||
@Slf4j
|
@Slf4j
|
||||||
public class BookTwoConfirmTask extends AbstractAcsTask {
|
public class BookTwoConfirmTask extends AbstractAcsTask {
|
||||||
private final String THIS_CLASS = BookTwoConfirmTask.class.getName();
|
private final String THIS_CLASS = BookTwoConfirmTask.class.getName();
|
||||||
|
private final CutConveyorTask conveyorTask;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@Transactional
|
@Transactional
|
||||||
@@ -116,6 +117,15 @@ public class BookTwoConfirmTask extends AbstractAcsTask {
|
|||||||
Long currentUserId = SecurityUtils.getCurrentUserId();
|
Long currentUserId = SecurityUtils.getCurrentUserId();
|
||||||
String currentUsername = SecurityUtils.getCurrentUsername();
|
String currentUsername = SecurityUtils.getCurrentUsername();
|
||||||
|
|
||||||
|
String point_code1 = form.getString("point_code1");
|
||||||
|
String point_code2 = form.getString("point_code2");
|
||||||
|
if (conveyorTask.isSingleTask(point_code1)){
|
||||||
|
throw new BadRequestException("点位:"+point_code1+"存在未完成的任务!");
|
||||||
|
}
|
||||||
|
if (conveyorTask.isSingleTask(point_code2)){
|
||||||
|
throw new BadRequestException("点位:"+point_code2+"存在未完成的任务!");
|
||||||
|
}
|
||||||
|
|
||||||
JSONObject json = new JSONObject();
|
JSONObject json = new JSONObject();
|
||||||
json.put("task_id",IdUtil.getSnowflake(1,1).nextId());
|
json.put("task_id",IdUtil.getSnowflake(1,1).nextId());
|
||||||
json.put("task_code", CodeUtil.getNewCode("TASK_CODE"));
|
json.put("task_code", CodeUtil.getNewCode("TASK_CODE"));
|
||||||
|
|||||||
@@ -34,6 +34,7 @@ import java.util.HashMap;
|
|||||||
@Slf4j
|
@Slf4j
|
||||||
public class CallEmpReelTask extends AbstractAcsTask {
|
public class CallEmpReelTask extends AbstractAcsTask {
|
||||||
private final String THIS_CLASS = CallEmpReelTask.class.getName();
|
private final String THIS_CLASS = CallEmpReelTask.class.getName();
|
||||||
|
private final CutConveyorTask conveyorTask;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@Transactional
|
@Transactional
|
||||||
@@ -126,6 +127,23 @@ public class CallEmpReelTask extends AbstractAcsTask {
|
|||||||
Long currentUserId = SecurityUtils.getCurrentUserId();
|
Long currentUserId = SecurityUtils.getCurrentUserId();
|
||||||
String currentUsername = SecurityUtils.getCurrentUsername();
|
String currentUsername = SecurityUtils.getCurrentUsername();
|
||||||
|
|
||||||
|
String point_code1 = form.getString("point_code1");
|
||||||
|
String point_code2 = form.getString("point_code2");
|
||||||
|
String point_code3 = form.getString("point_code3");
|
||||||
|
String point_code4 = form.getString("point_code4");
|
||||||
|
if (conveyorTask.isSingleTask(point_code1)){
|
||||||
|
throw new BadRequestException("点位:"+point_code1+"存在未完成的任务!");
|
||||||
|
}
|
||||||
|
if (conveyorTask.isSingleTask(point_code2)){
|
||||||
|
throw new BadRequestException("点位:"+point_code2+"存在未完成的任务!");
|
||||||
|
}
|
||||||
|
if (conveyorTask.isSingleTask(point_code3)){
|
||||||
|
throw new BadRequestException("点位:"+point_code3+"存在未完成的任务!");
|
||||||
|
}
|
||||||
|
if (conveyorTask.isSingleTask(point_code4)){
|
||||||
|
throw new BadRequestException("点位:"+point_code4+"存在未完成的任务!");
|
||||||
|
}
|
||||||
|
|
||||||
JSONObject json = new JSONObject();
|
JSONObject json = new JSONObject();
|
||||||
json.put("task_id",IdUtil.getSnowflake(1,1).nextId());
|
json.put("task_id",IdUtil.getSnowflake(1,1).nextId());
|
||||||
json.put("task_code", CodeUtil.getNewCode("TASK_CODE"));
|
json.put("task_code", CodeUtil.getNewCode("TASK_CODE"));
|
||||||
|
|||||||
@@ -108,13 +108,21 @@ public class CutConveyorTask extends AbstractAcsTask {
|
|||||||
Long currentUserId = SecurityUtils.getCurrentUserId();
|
Long currentUserId = SecurityUtils.getCurrentUserId();
|
||||||
String currentUsername = SecurityUtils.getCurrentUsername();
|
String currentUsername = SecurityUtils.getCurrentUsername();
|
||||||
|
|
||||||
|
String point_code1 = form.getString("point_code1");
|
||||||
|
String point_code2 = form.getString("point_code2");
|
||||||
|
if (isSingleTask(point_code1)){
|
||||||
|
throw new BadRequestException("点位:"+point_code1+"存在未完成的任务!");
|
||||||
|
}
|
||||||
|
if (isSingleTask(point_code2)){
|
||||||
|
throw new BadRequestException("点位:"+point_code2+"存在未完成的任务!");
|
||||||
|
}
|
||||||
JSONObject json = new JSONObject();
|
JSONObject json = new JSONObject();
|
||||||
json.put("task_id", IdUtil.getSnowflake(1,1).nextId());
|
json.put("task_id", IdUtil.getSnowflake(1,1).nextId());
|
||||||
json.put("task_code", CodeUtil.getNewCode("TASK_CODE"));
|
json.put("task_code", CodeUtil.getNewCode("TASK_CODE"));
|
||||||
json.put("task_type", form.getString("task_type"));
|
json.put("task_type", form.getString("task_type"));
|
||||||
json.put("task_status", "01");
|
json.put("task_status", "01");
|
||||||
json.put("point_code1", form.getString("point_code1"));
|
json.put("point_code1", point_code1);
|
||||||
json.put("point_code2", form.getString("point_code2"));
|
json.put("point_code2", point_code2);
|
||||||
json.put("vehicle_code", form.getString("vehicle_code"));
|
json.put("vehicle_code", form.getString("vehicle_code"));
|
||||||
json.put("handle_class", THIS_CLASS);
|
json.put("handle_class", THIS_CLASS);
|
||||||
json.put("create_id", currentUserId);
|
json.put("create_id", currentUserId);
|
||||||
@@ -144,4 +152,18 @@ public class CutConveyorTask extends AbstractAcsTask {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//判断该点位是否存在未完成的任务
|
||||||
|
public boolean isSingleTask(String point_code){
|
||||||
|
JSONObject task1 = WQLObject.getWQLObject("SCH_BASE_Point").query("point_code1 = '"+point_code+"' AND task_status < '99' AND is_delete = '0'").uniqueResult(0);
|
||||||
|
JSONObject task2 = WQLObject.getWQLObject("SCH_BASE_Point").query("point_code2 = '"+point_code+"' AND task_status < '99' AND is_delete = '0'").uniqueResult(0);
|
||||||
|
JSONObject task3 = WQLObject.getWQLObject("SCH_BASE_Point").query("point_code3 = '"+point_code+"' AND task_status < '99' AND is_delete = '0'").uniqueResult(0);
|
||||||
|
JSONObject task4 = WQLObject.getWQLObject("SCH_BASE_Point").query("point_code4 = '"+point_code+"' AND task_status < '99' AND is_delete = '0'").uniqueResult(0);
|
||||||
|
|
||||||
|
if (ObjectUtil.isNotEmpty(task1) || ObjectUtil.isNotEmpty(task2) || ObjectUtil.isNotEmpty(task3) || ObjectUtil.isNotEmpty(task4)){
|
||||||
|
return true;
|
||||||
|
}else {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -22,6 +22,7 @@ import org.springframework.transaction.annotation.Transactional;
|
|||||||
@Slf4j
|
@Slf4j
|
||||||
public class CutTrussTask extends AbstractAcsTask {
|
public class CutTrussTask extends AbstractAcsTask {
|
||||||
private final String THIS_CLASS = CutTrussTask.class.getName();
|
private final String THIS_CLASS = CutTrussTask.class.getName();
|
||||||
|
private final CutConveyorTask conveyorTask;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@Transactional
|
@Transactional
|
||||||
@@ -118,6 +119,22 @@ public class CutTrussTask extends AbstractAcsTask {
|
|||||||
Long currentUserId = SecurityUtils.getCurrentUserId();
|
Long currentUserId = SecurityUtils.getCurrentUserId();
|
||||||
String currentUsername = SecurityUtils.getCurrentUsername();
|
String currentUsername = SecurityUtils.getCurrentUsername();
|
||||||
|
|
||||||
|
String point_code1 = form.getString("point_code1");
|
||||||
|
String point_code2 = form.getString("point_code2");
|
||||||
|
String point_code3 = form.getString("point_code3");
|
||||||
|
String point_code4 = form.getString("point_code4");
|
||||||
|
if (conveyorTask.isSingleTask(point_code1)){
|
||||||
|
throw new BadRequestException("点位:"+point_code1+"存在未完成的任务!");
|
||||||
|
}
|
||||||
|
if (conveyorTask.isSingleTask(point_code2)){
|
||||||
|
throw new BadRequestException("点位:"+point_code2+"存在未完成的任务!");
|
||||||
|
}
|
||||||
|
if (conveyorTask.isSingleTask(point_code3)){
|
||||||
|
throw new BadRequestException("点位:"+point_code3+"存在未完成的任务!");
|
||||||
|
}
|
||||||
|
if (conveyorTask.isSingleTask(point_code4)){
|
||||||
|
throw new BadRequestException("点位:"+point_code4+"存在未完成的任务!");
|
||||||
|
}
|
||||||
JSONObject json = new JSONObject();
|
JSONObject json = new JSONObject();
|
||||||
json.put("task_id", IdUtil.getSnowflake(1,1).nextId());
|
json.put("task_id", IdUtil.getSnowflake(1,1).nextId());
|
||||||
json.put("task_code", CodeUtil.getNewCode("TASK_CODE"));
|
json.put("task_code", CodeUtil.getNewCode("TASK_CODE"));
|
||||||
|
|||||||
@@ -24,6 +24,7 @@ import org.springframework.transaction.annotation.Transactional;
|
|||||||
@Slf4j
|
@Slf4j
|
||||||
public class InHotTask extends AbstractAcsTask {
|
public class InHotTask extends AbstractAcsTask {
|
||||||
private final String THIS_CLASS = InHotTask.class.getName();
|
private final String THIS_CLASS = InHotTask.class.getName();
|
||||||
|
private final CutConveyorTask conveyorTask;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@Transactional
|
@Transactional
|
||||||
@@ -129,6 +130,18 @@ public class InHotTask extends AbstractAcsTask {
|
|||||||
Long currentUserId = SecurityUtils.getCurrentUserId();
|
Long currentUserId = SecurityUtils.getCurrentUserId();
|
||||||
String currentUsername = SecurityUtils.getCurrentUsername();
|
String currentUsername = SecurityUtils.getCurrentUsername();
|
||||||
|
|
||||||
|
String point_code1 = form.getString("point_code1");
|
||||||
|
String point_code2 = form.getString("point_code2");
|
||||||
|
String point_code3 = form.getString("point_code3");
|
||||||
|
if (conveyorTask.isSingleTask(point_code1)){
|
||||||
|
throw new BadRequestException("点位:"+point_code1+"存在未完成的任务!");
|
||||||
|
}
|
||||||
|
if (conveyorTask.isSingleTask(point_code2)){
|
||||||
|
throw new BadRequestException("点位:"+point_code2+"存在未完成的任务!");
|
||||||
|
}
|
||||||
|
if (conveyorTask.isSingleTask(point_code3)){
|
||||||
|
throw new BadRequestException("点位:"+point_code3+"存在未完成的任务!");
|
||||||
|
}
|
||||||
JSONObject json = new JSONObject();
|
JSONObject json = new JSONObject();
|
||||||
json.put("task_id",IdUtil.getSnowflake(1,1).nextId());
|
json.put("task_id",IdUtil.getSnowflake(1,1).nextId());
|
||||||
json.put("task_code", CodeUtil.getNewCode("TASK_CODE"));
|
json.put("task_code", CodeUtil.getNewCode("TASK_CODE"));
|
||||||
|
|||||||
@@ -6,6 +6,7 @@ import cn.hutool.core.util.StrUtil;
|
|||||||
import com.alibaba.fastjson.JSONObject;
|
import com.alibaba.fastjson.JSONObject;
|
||||||
import lombok.RequiredArgsConstructor;
|
import lombok.RequiredArgsConstructor;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
import org.nl.modules.common.exception.BadRequestException;
|
||||||
import org.nl.modules.common.utils.SecurityUtils;
|
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.core.bean.WQLObject;
|
import org.nl.modules.wql.core.bean.WQLObject;
|
||||||
@@ -19,6 +20,7 @@ import org.springframework.transaction.annotation.Transactional;
|
|||||||
@Slf4j
|
@Slf4j
|
||||||
public class OutHotTask extends AbstractAcsTask {
|
public class OutHotTask extends AbstractAcsTask {
|
||||||
private final String THIS_CLASS = OutHotTask.class.getName();
|
private final String THIS_CLASS = OutHotTask.class.getName();
|
||||||
|
private final CutConveyorTask conveyorTask;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@Transactional
|
@Transactional
|
||||||
@@ -112,6 +114,15 @@ public class OutHotTask extends AbstractAcsTask {
|
|||||||
Long currentUserId = SecurityUtils.getCurrentUserId();
|
Long currentUserId = SecurityUtils.getCurrentUserId();
|
||||||
String currentUsername = SecurityUtils.getCurrentUsername();
|
String currentUsername = SecurityUtils.getCurrentUsername();
|
||||||
|
|
||||||
|
String point_code1 = form.getString("point_code1");
|
||||||
|
String point_code2 = form.getString("point_code2");
|
||||||
|
if (conveyorTask.isSingleTask(point_code1)){
|
||||||
|
throw new BadRequestException("点位:"+point_code1+"存在未完成的任务!");
|
||||||
|
}
|
||||||
|
if (conveyorTask.isSingleTask(point_code2)){
|
||||||
|
throw new BadRequestException("点位:"+point_code2+"存在未完成的任务!");
|
||||||
|
}
|
||||||
|
|
||||||
JSONObject json = new JSONObject();
|
JSONObject json = new JSONObject();
|
||||||
json.put("task_id",IdUtil.getSnowflake(1,1).nextId());
|
json.put("task_id",IdUtil.getSnowflake(1,1).nextId());
|
||||||
json.put("task_code", CodeUtil.getNewCode("TASK_CODE"));
|
json.put("task_code", CodeUtil.getNewCode("TASK_CODE"));
|
||||||
|
|||||||
Reference in New Issue
Block a user