rev:空木行出库增加 任务校验
This commit is contained in:
@@ -19,6 +19,7 @@ import org.nl.modules.wql.core.bean.WQLObject;
|
||||
import org.nl.modules.wql.util.SpringContextHolder;
|
||||
import org.nl.wms.ext.acs.service.WmsToAcsService;
|
||||
import org.nl.wms.pda.st.service.impl.ProductionOutServiceImpl;
|
||||
import org.nl.wms.sch.manage.TaskStatusEnum;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
@@ -198,6 +199,15 @@ public class ProductOutTwoServiceImpl implements ProductOutTwoService {
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public JSONObject boxOut(JSONObject whereJson) {
|
||||
// 判断当前是否有正在出库的空托盘任务
|
||||
JSONArray resultJSONArray = WQLObject.getWQLObject("sch_base_task")
|
||||
.query("task_type = '010706' and task_status < '" + TaskStatusEnum.FINISHED.getCode() + "' and is_delete = '0'")
|
||||
.getResultJSONArray(0);
|
||||
|
||||
if (ObjectUtil.isNotEmpty(resultJSONArray)) {
|
||||
throw new BadRequestException("当前正在执行空托盘出库任务,请稍后再出库!");
|
||||
}
|
||||
|
||||
List<JSONObject> data = whereJson.getJSONArray("data").toJavaList(JSONObject.class);
|
||||
outBoxManageService.publicBoxOut(data);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user