rev:1.子卷包装关系字段维护2.入库查询报表字段维护3.处理成品报表部分字段没有值4.空托盘出库任务只生成一个,任务结束后在生成下一个

This commit is contained in:
2023-08-21 15:09:49 +08:00
parent b1a54910c1
commit 7c9209b5aa
4 changed files with 192 additions and 161 deletions

View File

@@ -340,6 +340,18 @@ public class AcsToWmsServiceImpl implements AcsToWmsService {
b、没有则优先找空的巷道按空位置顺序分配 b、没有则优先找空的巷道按空位置顺序分配
3、任务下发判断巷道的任务类型只能为空盘入库或者无任务类型 3、任务下发判断巷道的任务类型只能为空盘入库或者无任务类型
* */ * */
// 查询此点位是否有正在进行的任务,如果有则不生成任务
JSONObject jsonTask = WQLObject.getWQLObject("sch_base_task")
.query("point_code2 = '" + device_code + "' and is_delete = '0' and task_status <> '07'").uniqueResult(0);
if (ObjectUtil.isNotEmpty(jsonTask)) {
result.put("status", HttpStatus.OK.value());
result.put("message", "此点位已生成任务,请等待任务结束!");
log.info("apply返回参数---------------------------------------------" + result.toString());
return result;
}
JSONArray empArr = WQL.getWO("QST_IVT_RAWASSISTISTOR").addParam("flag", "22").process().getResultJSONArray(0); JSONArray empArr = WQL.getWO("QST_IVT_RAWASSISTISTOR").addParam("flag", "22").process().getResultJSONArray(0);
JSONObject struct_jo = new JSONObject(); JSONObject struct_jo = new JSONObject();

View File

@@ -10,6 +10,7 @@ import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONArray; import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject; import com.alibaba.fastjson.JSONObject;
import lombok.RequiredArgsConstructor; import lombok.RequiredArgsConstructor;
import lombok.SneakyThrows;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.nl.modules.common.exception.BadRequestException; import org.nl.modules.common.exception.BadRequestException;
import org.nl.common.utils.SecurityUtils; import org.nl.common.utils.SecurityUtils;
@@ -29,11 +30,14 @@ import org.nl.wms.sch.tasks.InTask;
import org.nl.wms.st.inbill.service.RawAssistIStorService; import org.nl.wms.st.inbill.service.RawAssistIStorService;
import org.nl.wms.st.inbill.service.StorPublicService; import org.nl.wms.st.inbill.service.StorPublicService;
import org.nl.wms.st.inbill.service.impl.InbillServiceImpl; import org.nl.wms.st.inbill.service.impl.InbillServiceImpl;
import org.redisson.api.RLock;
import org.redisson.api.RedissonClient;
import org.springframework.stereotype.Service; 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.HashMap;
import java.util.concurrent.TimeUnit;
/** /**
* @author zhouz * @author zhouz
@@ -53,6 +57,8 @@ public class ProductInstorServiceImpl implements ProductInstorService {
private final CutConveyorTask cutConveyorTask; private final CutConveyorTask cutConveyorTask;
private final RedissonClient redissonClient;
@Override @Override
public JSONObject boxQuery(JSONObject whereJson) { public JSONObject boxQuery(JSONObject whereJson) {
String box_no = whereJson.getString("box_no"); String box_no = whereJson.getString("box_no");
@@ -91,6 +97,7 @@ public class ProductInstorServiceImpl implements ProductInstorService {
@Override @Override
@Transactional(rollbackFor = Exception.class) @Transactional(rollbackFor = Exception.class)
@SneakyThrows
public JSONObject confirm(JSONObject whereJson) { public JSONObject confirm(JSONObject whereJson) {
String box_no = whereJson.getString("box_no"); String box_no = whereJson.getString("box_no");
//1-报废入库2-生产入库3-退货入库4-拆分入库 //1-报废入库2-生产入库3-退货入库4-拆分入库
@@ -117,6 +124,11 @@ public class ProductInstorServiceImpl implements ProductInstorService {
JSONObject mst_jo = new JSONObject(); JSONObject mst_jo = new JSONObject();
mst_jo.put("tableData", box_rows); mst_jo.put("tableData", box_rows);
mst_jo.put("biz_date", DateUtil.now()); mst_jo.put("biz_date", DateUtil.now());
RLock lock = redissonClient.getLock("pda_ioIn:" + option);
boolean tryLock = lock.tryLock(5, TimeUnit.SECONDS);
try {
if (tryLock) {
if (option.equals("1")) { if (option.equals("1")) {
mst_jo.put("bill_type", "0003"); mst_jo.put("bill_type", "0003");
} }
@@ -282,6 +294,13 @@ public class ProductInstorServiceImpl implements ProductInstorService {
inbillService.confirmDis(dis_form); inbillService.confirmDis(dis_form);
} }
}
} finally {
if (tryLock) {
lock.unlock();
}
}
JSONObject jo = new JSONObject(); JSONObject jo = new JSONObject();
jo.put("message", "确认成功!"); jo.put("message", "确认成功!");
return jo; return jo;

View File

@@ -243,7 +243,7 @@ public class InBillQueryServiceImpl implements InBillQueryService {
mp.put("班次", json.getString("classes")); mp.put("班次", json.getString("classes"));
mp.put("库区", json.getString("sect_name")); mp.put("库区", json.getString("sect_name"));
mp.put("客户编码", json.getString("customer_name")); mp.put("客户编码", json.getString("customer_name"));
mp.put("客户订单", json.getString("sale_order_name")); mp.put("销售订单及行", json.getString("sale_order_name"));
mp.put("生产日期", json.getString("date_of_production").replace("-","/")); mp.put("生产日期", json.getString("date_of_production").replace("-","/"));
mp.put("箱号", json.getString("box_no")); mp.put("箱号", json.getString("box_no"));
mp.put("生产批号", (json.getString("confirm_time").substring(0,10)).replace("-","").trim()); mp.put("生产批号", (json.getString("confirm_time").substring(0,10)).replace("-","").trim());

View File

@@ -87,7 +87,7 @@
@change="hand" @change="hand"
/> />
</el-form-item> </el-form-item>
<el-form-item label="入库日期"> <el-form-item label="业务日期">
<el-date-picker <el-date-picker
v-model="query.date_of_FG_inbound" v-model="query.date_of_FG_inbound"
type="date" type="date"
@@ -235,7 +235,7 @@
</el-row> </el-row>
<el-row> <el-row>
<el-col :span="12"> <el-col :span="12">
<el-form-item label="入库日期"> <el-form-item label="业务日期">
<el-input v-model="form.date_of_fg_inbound" :disabled="crud.status.edit > 0 && form.status !== '0'" style="width: 300px;" /> <el-input v-model="form.date_of_fg_inbound" :disabled="crud.status.edit > 0 && form.status !== '0'" style="width: 300px;" />
</el-form-item> </el-form-item>
</el-col> </el-col>
@@ -473,8 +473,8 @@
/> />
<el-table-column <el-table-column
prop="date_of_fg_inbound" prop="date_of_fg_inbound"
label="入库日期" label="业务日期"
:min-width="flexWidth('date_of_fg_inbound',crud.data,'入库日期')" :min-width="flexWidth('date_of_fg_inbound',crud.data,'业务日期')"
/> />
<el-table-column prop="status" label="状态" :min-width="flexWidth('status',crud.data,'状态')"> <el-table-column prop="status" label="状态" :min-width="flexWidth('status',crud.data,'状态')">
<template slot-scope="scope"> <template slot-scope="scope">