rev:一期优化:1.虚拟区也加重量卡控:只要有重量的就卡控并且发送飞书2.库存报表中子卷状态筛选查询数据异常问题;二期优化:1.手持入库的时候,如果是第一次入库则需要【生产入库】
This commit is contained in:
@@ -136,7 +136,7 @@ public class TwoLashTask extends AbstractAcsTask {
|
|||||||
.task_type(json.getString("acs_task_type"))
|
.task_type(json.getString("acs_task_type"))
|
||||||
.start_device_code(json.getString("point_code1"))
|
.start_device_code(json.getString("point_code1"))
|
||||||
.next_device_code(json.getString("point_code2"))
|
.next_device_code(json.getString("point_code2"))
|
||||||
.vehicle_code(json.getString("vehicle_code"))
|
.vehicle_code2(json.getString("vehicle_code"))
|
||||||
.route_plan_code(getRoutePlanCode(json.getString("point_code1")))
|
.route_plan_code(getRoutePlanCode(json.getString("point_code1")))
|
||||||
.priority(json.getString("priority"))
|
.priority(json.getString("priority"))
|
||||||
.class_type(IOSEnum.ACS_TYPE.code("木箱堆叠行架任务"))
|
.class_type(IOSEnum.ACS_TYPE.code("木箱堆叠行架任务"))
|
||||||
|
|||||||
@@ -35,4 +35,11 @@ public interface StIvtIostorinvMapper extends BaseMapper<StIvtIostorinv> {
|
|||||||
* @return 、
|
* @return 、
|
||||||
*/
|
*/
|
||||||
JSONObject queryBoxMst(JSONObject whereJson);
|
JSONObject queryBoxMst(JSONObject whereJson);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 判断是否是第一次入库
|
||||||
|
* @param box_no : 木箱号
|
||||||
|
* @return 分配明细集合
|
||||||
|
*/
|
||||||
|
List<JSONObject> queryFirstInBox(String box_no);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -139,4 +139,23 @@
|
|||||||
|
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
<select id="queryFirstInBox" resultType="com.alibaba.fastjson.JSONObject">
|
||||||
|
SELECT
|
||||||
|
dis.*
|
||||||
|
FROM
|
||||||
|
st_ivt_iostorinvdis dis
|
||||||
|
LEFT JOIN st_ivt_iostorinv mst ON dis.iostorinv_id = mst.iostorinv_id
|
||||||
|
<where>
|
||||||
|
mst.is_delete = '0'
|
||||||
|
AND
|
||||||
|
mst.io_type = '0'
|
||||||
|
|
||||||
|
<if test="box_no != null and box_no != ''">
|
||||||
|
and dis.box_no = #{box_no}
|
||||||
|
</if>
|
||||||
|
|
||||||
|
</where>
|
||||||
|
|
||||||
|
</select>
|
||||||
|
|
||||||
</mapper>
|
</mapper>
|
||||||
|
|||||||
@@ -700,7 +700,7 @@ public class StIvtIostorinvOutServiceImpl extends ServiceImpl<StIvtIostorinvOutM
|
|||||||
.anyMatch(row -> row.getBill_status().equals(IOSEnum.BILL_STATUS.code("生成")));
|
.anyMatch(row -> row.getBill_status().equals(IOSEnum.BILL_STATUS.code("生成")));
|
||||||
|
|
||||||
if (is_createDtl) {
|
if (is_createDtl) {
|
||||||
throw new BadRequestException("请先分配完所有明细在进行确认!");
|
// throw new BadRequestException("请先分配完所有明细在进行确认!");
|
||||||
}
|
}
|
||||||
|
|
||||||
// 更新明细为完成
|
// 更新明细为完成
|
||||||
|
|||||||
@@ -18,6 +18,7 @@ import org.nl.b_lms.storage_manage.database.service.IBstIvtBoxinfoService;
|
|||||||
import org.nl.b_lms.storage_manage.database.service.dao.BstIvtBoxinfo;
|
import org.nl.b_lms.storage_manage.database.service.dao.BstIvtBoxinfo;
|
||||||
import org.nl.b_lms.storage_manage.ios.enums.IOSEnum;
|
import org.nl.b_lms.storage_manage.ios.enums.IOSEnum;
|
||||||
import org.nl.b_lms.storage_manage.ios.service.iostorInv.util.service.InBoxManageService;
|
import org.nl.b_lms.storage_manage.ios.service.iostorInv.util.service.InBoxManageService;
|
||||||
|
import org.nl.b_lms.storage_manage.ios.service.iostorInv.util.service.InBussManageService;
|
||||||
import org.nl.common.utils.IdUtil;
|
import org.nl.common.utils.IdUtil;
|
||||||
import org.nl.modules.common.exception.BadRequestException;
|
import org.nl.modules.common.exception.BadRequestException;
|
||||||
import org.nl.modules.wql.WQL;
|
import org.nl.modules.wql.WQL;
|
||||||
@@ -82,6 +83,8 @@ public class InBoxManageServiceImpl implements InBoxManageService {
|
|||||||
@Autowired
|
@Autowired
|
||||||
private LmsToMesService lmsToMesService;
|
private LmsToMesService lmsToMesService;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private InBussManageService inBussManageService;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@Transactional(rollbackFor = Exception.class)
|
@Transactional(rollbackFor = Exception.class)
|
||||||
@@ -313,8 +316,26 @@ public class InBoxManageServiceImpl implements InBoxManageService {
|
|||||||
@Override
|
@Override
|
||||||
@Transactional(rollbackFor = Exception.class)
|
@Transactional(rollbackFor = Exception.class)
|
||||||
public void returnIn(JSONObject whereJson) {
|
public void returnIn(JSONObject whereJson) {
|
||||||
// 载具表
|
//判断是否是手工入库:如果是手工入库则判断是否是第一次入库
|
||||||
//api/twoPda/vehicle/returnIn
|
if (whereJson.getString("bill_type").equals(IOSEnum.IN_TYPE.code("生产入库")) ||
|
||||||
|
whereJson.getString("bill_type").equals(IOSEnum.IN_TYPE.code("手工入库"))
|
||||||
|
) {
|
||||||
|
// 校验是否第一次入库
|
||||||
|
boolean ifFirst = inBussManageService.firstInBox(whereJson.getString("box_no"));
|
||||||
|
|
||||||
|
// 手工入库
|
||||||
|
if (whereJson.getString("bill_type").equals(IOSEnum.IN_TYPE.code("手工入库"))) {
|
||||||
|
if (!ifFirst) {
|
||||||
|
throw new BadRequestException("此木箱【"+whereJson.getString("box_no")+"】未入过库,请选择【生产入库】!");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (whereJson.getString("bill_type").equals(IOSEnum.IN_TYPE.code("生产入库"))) {
|
||||||
|
if (ifFirst) {
|
||||||
|
throw new BadRequestException("此木箱【"+whereJson.getString("box_no")+"】已入过库,请选择【手工入库】!");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// 根据木箱号查询是否有托盘绑定关系,如果有则解绑
|
// 根据木箱号查询是否有托盘绑定关系,如果有则解绑
|
||||||
JSONObject jsonExt = WQLObject.getWQLObject("md_pb_storagevehicleext")
|
JSONObject jsonExt = WQLObject.getWQLObject("md_pb_storagevehicleext")
|
||||||
|
|||||||
@@ -406,6 +406,15 @@ public class InBussManageServiceImpl implements InBussManageService {
|
|||||||
return JSONObject.parseObject(JSON.toJSONString(disListNow.get(0)));
|
return JSONObject.parseObject(JSON.toJSONString(disListNow.get(0)));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean firstInBox(String box_no) {
|
||||||
|
List<JSONObject> resultList = stIvtIostorinvMapper.queryFirstInBox(box_no);
|
||||||
|
if (ObjectUtil.isNotEmpty(resultList)) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 获取最小巷道
|
* 获取最小巷道
|
||||||
*
|
*
|
||||||
|
|||||||
@@ -63,4 +63,11 @@ public interface InBussManageService {
|
|||||||
*/
|
*/
|
||||||
JSONObject taskExceptional(JSONObject jsonObject);
|
JSONObject taskExceptional(JSONObject jsonObject);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 判断是否是第一次入库
|
||||||
|
* @param box_no: 木箱号
|
||||||
|
* @return /
|
||||||
|
*/
|
||||||
|
boolean firstInBox(String box_no);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -220,7 +220,7 @@ public class ProductInstorServiceImpl implements ProductInstorService {
|
|||||||
//调用ACS让对应蜂鸣器报警
|
//调用ACS让对应蜂鸣器报警
|
||||||
JSONObject param = new JSONObject();
|
JSONObject param = new JSONObject();
|
||||||
param.put("code", "to_command");
|
param.put("code", "to_command");
|
||||||
param.put("product_area", "BLK");
|
param.put("product_area", "LK");
|
||||||
param.put("value", "99");
|
param.put("value", "99");
|
||||||
param.put("device_code", point_code);
|
param.put("device_code", point_code);
|
||||||
JSONArray rows = new JSONArray();
|
JSONArray rows = new JSONArray();
|
||||||
@@ -232,7 +232,7 @@ public class ProductInstorServiceImpl implements ProductInstorService {
|
|||||||
if (ObjectUtil.isEmpty(sub_jo.getString("is_pass")) || sub_jo.getString("is_pass").equals(IOSEnum.IS_NOTANDYES.code("否")) ) {
|
if (ObjectUtil.isEmpty(sub_jo.getString("is_pass")) || sub_jo.getString("is_pass").equals(IOSEnum.IS_NOTANDYES.code("否")) ) {
|
||||||
// 通知飞书
|
// 通知飞书
|
||||||
notifyMes(sub_jo);
|
notifyMes(sub_jo);
|
||||||
throw new BadRequestException("重量不合格!系统重量浮动超过" + weight_sys + "KG,当前木称重重量:" + real_weight + ",已通知飞书处理!");
|
throw new BadRequestException("重量不合格!系统重量浮动超过" + weight_sys + "KG,当前木箱称重重量:" + real_weight + ",已通知飞书处理!");
|
||||||
} else {
|
} else {
|
||||||
if (sub_jo.getString("is_pass").equals(IOSEnum.IS_NOTANDYES.code("否"))) {
|
if (sub_jo.getString("is_pass").equals(IOSEnum.IS_NOTANDYES.code("否"))) {
|
||||||
throw new BadRequestException("请等待放行!");
|
throw new BadRequestException("请等待放行!");
|
||||||
@@ -366,6 +366,34 @@ public class ProductInstorServiceImpl implements ProductInstorService {
|
|||||||
form.put("task_type", "010507");
|
form.put("task_type", "010507");
|
||||||
cutConveyorTask.createTask(form);
|
cutConveyorTask.createTask(form);
|
||||||
} else {
|
} else {
|
||||||
|
/*
|
||||||
|
* 如果有实际重量则需要判断重量是否超标
|
||||||
|
*/
|
||||||
|
// 重量阈值系统参数
|
||||||
|
double weight_sys = Double.parseDouble(SpringContextHolder.getBean(SysParamServiceImpl.class).findByCode("weight_sys").getValue());
|
||||||
|
// 木箱系统重量
|
||||||
|
double box_weight = sub_jo.getDoubleValue("box_weight");
|
||||||
|
// 木箱实称重重量
|
||||||
|
double real_weight = sub_jo.getDoubleValue("real_weight");
|
||||||
|
|
||||||
|
if (ObjectUtil.isNotEmpty(sub_jo.getString("real_weight")) && "AC01".equals(sub_jo.getString("ext_code"))) {
|
||||||
|
// 判断木箱毛重是否超标
|
||||||
|
if (NumberUtil.sub(box_weight, weight_sys) <= real_weight && NumberUtil.add(box_weight, weight_sys) >= real_weight) {
|
||||||
|
} else {
|
||||||
|
//判断is_pass是否为空,如果为空则通知飞书,不为空判断:为0则不允许通过,为1则允许
|
||||||
|
if (ObjectUtil.isEmpty(sub_jo.getString("is_pass")) || sub_jo.getString("is_pass").equals(IOSEnum.IS_NOTANDYES.code("否")) ) {
|
||||||
|
// 通知飞书
|
||||||
|
notifyMes(sub_jo);
|
||||||
|
throw new BadRequestException("重量不合格!系统重量浮动超过" + weight_sys + "KG,当前木箱称重重量:" + real_weight + ",已通知飞书处理!");
|
||||||
|
} else {
|
||||||
|
if (sub_jo.getString("is_pass").equals(IOSEnum.IS_NOTANDYES.code("否"))) {
|
||||||
|
throw new BadRequestException("请等待放行!");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
JSONArray now_dis_rows = WQL.getWO("QST_IVT_RAWASSISTISTOR").addParam("flag", "18").addParam("box_no", map.get("box_no")).process().getResultJSONArray(0);
|
JSONArray now_dis_rows = WQL.getWO("QST_IVT_RAWASSISTISTOR").addParam("flag", "18").addParam("box_no", map.get("box_no")).process().getResultJSONArray(0);
|
||||||
if (now_dis_rows.size() > 0) {
|
if (now_dis_rows.size() > 0) {
|
||||||
throw new BadRequestException("该木箱已经分配过货位,无法继续分配!");
|
throw new BadRequestException("该木箱已经分配过货位,无法继续分配!");
|
||||||
|
|||||||
@@ -196,4 +196,9 @@ public class SubpackagerelationDto implements Serializable {
|
|||||||
* 要求幅宽
|
* 要求幅宽
|
||||||
*/
|
*/
|
||||||
private String width_standard;
|
private String width_standard;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 实际重量
|
||||||
|
*/
|
||||||
|
private BigDecimal real_weight;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -112,14 +112,14 @@ public class CutConveyorTask extends AbstractAcsTask {
|
|||||||
jsonTask.put("update_time", DateUtil.now());
|
jsonTask.put("update_time", DateUtil.now());
|
||||||
taskTab.update(jsonTask);
|
taskTab.update(jsonTask);
|
||||||
|
|
||||||
if ("010507".equals(jsonTask.getString("task_type"))) {
|
/* if ("010507".equals(jsonTask.getString("task_type"))) {
|
||||||
double weight = taskObj.getDoubleValue("weight");
|
double weight = taskObj.getDoubleValue("weight");
|
||||||
|
|
||||||
// 更新子卷包装实际重量
|
// 更新子卷包装实际重量
|
||||||
JSONObject param = new JSONObject();
|
JSONObject param = new JSONObject();
|
||||||
param.put("real_weight",weight);
|
param.put("real_weight",weight);
|
||||||
subTab.update(param,"package_box_sn ='"+jsonTask.getString("vehicle_code")+"'");
|
subTab.update(param,"package_box_sn ='"+jsonTask.getString("vehicle_code")+"'");
|
||||||
}
|
}*/
|
||||||
|
|
||||||
//只有输送入的时候才调用MES
|
//只有输送入的时候才调用MES
|
||||||
if ("010402".equals(jsonTask.getString("task_type")) && StrUtil.isNotEmpty(jsonTask.getString("vehicle_code"))) {
|
if ("010402".equals(jsonTask.getString("task_type")) && StrUtil.isNotEmpty(jsonTask.getString("vehicle_code"))) {
|
||||||
|
|||||||
@@ -235,7 +235,7 @@ public class StorPublicServiceImpl implements StorPublicService {
|
|||||||
|
|
||||||
wql.update(jo_in, "stockrecord_id='" + jo_in.getString("stockrecord_id") + "'");
|
wql.update(jo_in, "stockrecord_id='" + jo_in.getString("stockrecord_id") + "'");
|
||||||
} else {
|
} else {
|
||||||
throw new BadRequestException(struct_id_In + "仓位库存异常,请检查");
|
throw new BadRequestException(pcsn_In + "子卷仓位库存异常,请检查");
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case "12": //12减冻结、加可用:出库分配取消、移库移出取消
|
case "12": //12减冻结、加可用:出库分配取消、移库移出取消
|
||||||
@@ -253,7 +253,7 @@ public class StorPublicServiceImpl implements StorPublicService {
|
|||||||
}
|
}
|
||||||
wql.update(jo_in, "stockrecord_id='" + jo_in.getString("stockrecord_id") + "'");
|
wql.update(jo_in, "stockrecord_id='" + jo_in.getString("stockrecord_id") + "'");
|
||||||
} else {
|
} else {
|
||||||
throw new BadRequestException(struct_id_In + "仓位库存异常,请检查");
|
throw new BadRequestException(pcsn_In + "子卷仓位库存异常,请检查");
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case "21": //21减冻结、减库存:出库确认、移库移出确认
|
case "21": //21减冻结、减库存:出库确认、移库移出确认
|
||||||
@@ -274,7 +274,7 @@ public class StorPublicServiceImpl implements StorPublicService {
|
|||||||
}
|
}
|
||||||
wql.update(jo_in, "stockrecord_id='" + jo_in.getString("stockrecord_id") + "'");
|
wql.update(jo_in, "stockrecord_id='" + jo_in.getString("stockrecord_id") + "'");
|
||||||
} else {
|
} else {
|
||||||
throw new BadRequestException(struct_id_In + "仓位库存异常,请检查");
|
throw new BadRequestException(pcsn_In + "子卷仓位库存异常,请检查");
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case "22": //22加冻结、加库存:出库确认取消、移库移出确认取消
|
case "22": //22加冻结、加库存:出库确认取消、移库移出确认取消
|
||||||
@@ -337,7 +337,7 @@ public class StorPublicServiceImpl implements StorPublicService {
|
|||||||
}
|
}
|
||||||
wql.update(jo_in, "stockrecord_id='" + jo_in.getString("stockrecord_id") + "'");
|
wql.update(jo_in, "stockrecord_id='" + jo_in.getString("stockrecord_id") + "'");
|
||||||
} else {
|
} else {
|
||||||
throw new BadRequestException(struct_id_In + "仓位库存异常,请检查");
|
throw new BadRequestException(pcsn_In + "子卷仓位库存异常,请检查");
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case "31": //31加待入:入库分配、移库移入
|
case "31": //31加待入:入库分配、移库移入
|
||||||
@@ -360,7 +360,7 @@ public class StorPublicServiceImpl implements StorPublicService {
|
|||||||
}
|
}
|
||||||
wql.update(jo_in, "stockrecord_id='" + jo_in.getString("stockrecord_id") + "'");
|
wql.update(jo_in, "stockrecord_id='" + jo_in.getString("stockrecord_id") + "'");
|
||||||
} else {
|
} else {
|
||||||
throw new BadRequestException(struct_id_In + "仓位库存异常,请检查");
|
throw new BadRequestException(pcsn_In + "子卷仓位库存异常,请检查");
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case "33": //33减待入、加库存、加可用:入库确认、移库移入确认
|
case "33": //33减待入、加库存、加可用:入库确认、移库移入确认
|
||||||
@@ -379,7 +379,7 @@ public class StorPublicServiceImpl implements StorPublicService {
|
|||||||
}
|
}
|
||||||
wql.update(jo_in, "stockrecord_id='" + jo_in.getString("stockrecord_id") + "'");
|
wql.update(jo_in, "stockrecord_id='" + jo_in.getString("stockrecord_id") + "'");
|
||||||
} else {
|
} else {
|
||||||
throw new BadRequestException(struct_id_In + "仓位库存异常,请检查");
|
throw new BadRequestException(pcsn_In + "子卷仓位库存异常,请检查");
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case "34": //34加待入、减库存、减可用:入库确认取消、移库移入确认取消
|
case "34": //34加待入、减库存、减可用:入库确认取消、移库移入确认取消
|
||||||
@@ -401,7 +401,7 @@ public class StorPublicServiceImpl implements StorPublicService {
|
|||||||
}
|
}
|
||||||
wql.update(jo_in, "stockrecord_id='" + jo_in.getString("stockrecord_id") + "'");
|
wql.update(jo_in, "stockrecord_id='" + jo_in.getString("stockrecord_id") + "'");
|
||||||
} else {
|
} else {
|
||||||
throw new BadRequestException(struct_id_In + "仓位库存异常,请检查");
|
throw new BadRequestException(pcsn_In + "子卷仓位库存异常,请检查");
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
|
|||||||
@@ -220,8 +220,8 @@
|
|||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
<el-form-item label="保质期">
|
<el-form-item label="木箱实际重量">
|
||||||
<el-input v-model="form.quality_guaran_period" :disabled="crud.status.edit > 0 && form.status !== '0'" style="width: 300px;" />
|
<el-input v-model="form.real_weight" style="width: 300px;" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
@@ -402,6 +402,13 @@
|
|||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
|
<el-row>
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item label="保质期">
|
||||||
|
<el-input v-model="form.quality_guaran_period" :disabled="crud.status.edit > 0 && form.status !== '0'" style="width: 300px;" />
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
<el-row>
|
<el-row>
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
<el-form-item label="备注">
|
<el-form-item label="备注">
|
||||||
@@ -503,7 +510,11 @@
|
|||||||
:min-width="flexWidth('box_weight',crud.data,'木箱自身重量')"
|
:min-width="flexWidth('box_weight',crud.data,'木箱自身重量')"
|
||||||
:formatter="crud.formatNum3"
|
:formatter="crud.formatNum3"
|
||||||
/>
|
/>
|
||||||
<el-table-column prop="real_weight" label="实际重量"/>
|
<el-table-column
|
||||||
|
prop="real_weight"
|
||||||
|
label="木箱实际重量"
|
||||||
|
:min-width="flexWidth('real_weight',crud.data,'木箱实际重量')"
|
||||||
|
/>
|
||||||
<el-table-column
|
<el-table-column
|
||||||
prop="quality_guaran_period"
|
prop="quality_guaran_period"
|
||||||
label="保质期"
|
label="保质期"
|
||||||
@@ -633,7 +644,8 @@ const defaultForm = {
|
|||||||
isreprintpackageboxlabel: null,
|
isreprintpackageboxlabel: null,
|
||||||
isunpackbox: null,
|
isunpackbox: null,
|
||||||
thickness_request: null,
|
thickness_request: null,
|
||||||
width_standard: null
|
width_standard: null,
|
||||||
|
real_weight: null
|
||||||
}
|
}
|
||||||
export default {
|
export default {
|
||||||
name: 'Subpackagerelation',
|
name: 'Subpackagerelation',
|
||||||
|
|||||||
Reference in New Issue
Block a user