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"))
|
||||
.start_device_code(json.getString("point_code1"))
|
||||
.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")))
|
||||
.priority(json.getString("priority"))
|
||||
.class_type(IOSEnum.ACS_TYPE.code("木箱堆叠行架任务"))
|
||||
|
||||
@@ -35,4 +35,11 @@ public interface StIvtIostorinvMapper extends BaseMapper<StIvtIostorinv> {
|
||||
* @return 、
|
||||
*/
|
||||
JSONObject queryBoxMst(JSONObject whereJson);
|
||||
|
||||
/**
|
||||
* 判断是否是第一次入库
|
||||
* @param box_no : 木箱号
|
||||
* @return 分配明细集合
|
||||
*/
|
||||
List<JSONObject> queryFirstInBox(String box_no);
|
||||
}
|
||||
|
||||
@@ -139,4 +139,23 @@
|
||||
|
||||
</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>
|
||||
|
||||
@@ -700,7 +700,7 @@ public class StIvtIostorinvOutServiceImpl extends ServiceImpl<StIvtIostorinvOutM
|
||||
.anyMatch(row -> row.getBill_status().equals(IOSEnum.BILL_STATUS.code("生成")));
|
||||
|
||||
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.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.InBussManageService;
|
||||
import org.nl.common.utils.IdUtil;
|
||||
import org.nl.modules.common.exception.BadRequestException;
|
||||
import org.nl.modules.wql.WQL;
|
||||
@@ -82,6 +83,8 @@ public class InBoxManageServiceImpl implements InBoxManageService {
|
||||
@Autowired
|
||||
private LmsToMesService lmsToMesService;
|
||||
|
||||
@Autowired
|
||||
private InBussManageService inBussManageService;
|
||||
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
@@ -313,8 +316,26 @@ public class InBoxManageServiceImpl implements InBoxManageService {
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
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")
|
||||
|
||||
@@ -406,6 +406,15 @@ public class InBussManageServiceImpl implements InBussManageService {
|
||||
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);
|
||||
|
||||
/**
|
||||
* 判断是否是第一次入库
|
||||
* @param box_no: 木箱号
|
||||
* @return /
|
||||
*/
|
||||
boolean firstInBox(String box_no);
|
||||
|
||||
}
|
||||
|
||||
@@ -220,7 +220,7 @@ public class ProductInstorServiceImpl implements ProductInstorService {
|
||||
//调用ACS让对应蜂鸣器报警
|
||||
JSONObject param = new JSONObject();
|
||||
param.put("code", "to_command");
|
||||
param.put("product_area", "BLK");
|
||||
param.put("product_area", "LK");
|
||||
param.put("value", "99");
|
||||
param.put("device_code", point_code);
|
||||
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("否")) ) {
|
||||
// 通知飞书
|
||||
notifyMes(sub_jo);
|
||||
throw new BadRequestException("重量不合格!系统重量浮动超过" + weight_sys + "KG,当前木称重重量:" + real_weight + ",已通知飞书处理!");
|
||||
throw new BadRequestException("重量不合格!系统重量浮动超过" + weight_sys + "KG,当前木箱称重重量:" + real_weight + ",已通知飞书处理!");
|
||||
} else {
|
||||
if (sub_jo.getString("is_pass").equals(IOSEnum.IS_NOTANDYES.code("否"))) {
|
||||
throw new BadRequestException("请等待放行!");
|
||||
@@ -366,6 +366,34 @@ public class ProductInstorServiceImpl implements ProductInstorService {
|
||||
form.put("task_type", "010507");
|
||||
cutConveyorTask.createTask(form);
|
||||
} 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);
|
||||
if (now_dis_rows.size() > 0) {
|
||||
throw new BadRequestException("该木箱已经分配过货位,无法继续分配!");
|
||||
|
||||
@@ -196,4 +196,9 @@ public class SubpackagerelationDto implements Serializable {
|
||||
* 要求幅宽
|
||||
*/
|
||||
private String width_standard;
|
||||
|
||||
/**
|
||||
* 实际重量
|
||||
*/
|
||||
private BigDecimal real_weight;
|
||||
}
|
||||
|
||||
@@ -112,14 +112,14 @@ public class CutConveyorTask extends AbstractAcsTask {
|
||||
jsonTask.put("update_time", DateUtil.now());
|
||||
taskTab.update(jsonTask);
|
||||
|
||||
if ("010507".equals(jsonTask.getString("task_type"))) {
|
||||
/* if ("010507".equals(jsonTask.getString("task_type"))) {
|
||||
double weight = taskObj.getDoubleValue("weight");
|
||||
|
||||
// 更新子卷包装实际重量
|
||||
JSONObject param = new JSONObject();
|
||||
param.put("real_weight",weight);
|
||||
subTab.update(param,"package_box_sn ='"+jsonTask.getString("vehicle_code")+"'");
|
||||
}
|
||||
}*/
|
||||
|
||||
//只有输送入的时候才调用MES
|
||||
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") + "'");
|
||||
} else {
|
||||
throw new BadRequestException(struct_id_In + "仓位库存异常,请检查");
|
||||
throw new BadRequestException(pcsn_In + "子卷仓位库存异常,请检查");
|
||||
}
|
||||
break;
|
||||
case "12": //12减冻结、加可用:出库分配取消、移库移出取消
|
||||
@@ -253,7 +253,7 @@ public class StorPublicServiceImpl implements StorPublicService {
|
||||
}
|
||||
wql.update(jo_in, "stockrecord_id='" + jo_in.getString("stockrecord_id") + "'");
|
||||
} else {
|
||||
throw new BadRequestException(struct_id_In + "仓位库存异常,请检查");
|
||||
throw new BadRequestException(pcsn_In + "子卷仓位库存异常,请检查");
|
||||
}
|
||||
break;
|
||||
case "21": //21减冻结、减库存:出库确认、移库移出确认
|
||||
@@ -274,7 +274,7 @@ public class StorPublicServiceImpl implements StorPublicService {
|
||||
}
|
||||
wql.update(jo_in, "stockrecord_id='" + jo_in.getString("stockrecord_id") + "'");
|
||||
} else {
|
||||
throw new BadRequestException(struct_id_In + "仓位库存异常,请检查");
|
||||
throw new BadRequestException(pcsn_In + "子卷仓位库存异常,请检查");
|
||||
}
|
||||
break;
|
||||
case "22": //22加冻结、加库存:出库确认取消、移库移出确认取消
|
||||
@@ -337,7 +337,7 @@ public class StorPublicServiceImpl implements StorPublicService {
|
||||
}
|
||||
wql.update(jo_in, "stockrecord_id='" + jo_in.getString("stockrecord_id") + "'");
|
||||
} else {
|
||||
throw new BadRequestException(struct_id_In + "仓位库存异常,请检查");
|
||||
throw new BadRequestException(pcsn_In + "子卷仓位库存异常,请检查");
|
||||
}
|
||||
break;
|
||||
case "31": //31加待入:入库分配、移库移入
|
||||
@@ -360,7 +360,7 @@ public class StorPublicServiceImpl implements StorPublicService {
|
||||
}
|
||||
wql.update(jo_in, "stockrecord_id='" + jo_in.getString("stockrecord_id") + "'");
|
||||
} else {
|
||||
throw new BadRequestException(struct_id_In + "仓位库存异常,请检查");
|
||||
throw new BadRequestException(pcsn_In + "子卷仓位库存异常,请检查");
|
||||
}
|
||||
break;
|
||||
case "33": //33减待入、加库存、加可用:入库确认、移库移入确认
|
||||
@@ -379,7 +379,7 @@ public class StorPublicServiceImpl implements StorPublicService {
|
||||
}
|
||||
wql.update(jo_in, "stockrecord_id='" + jo_in.getString("stockrecord_id") + "'");
|
||||
} else {
|
||||
throw new BadRequestException(struct_id_In + "仓位库存异常,请检查");
|
||||
throw new BadRequestException(pcsn_In + "子卷仓位库存异常,请检查");
|
||||
}
|
||||
break;
|
||||
case "34": //34加待入、减库存、减可用:入库确认取消、移库移入确认取消
|
||||
@@ -401,7 +401,7 @@ public class StorPublicServiceImpl implements StorPublicService {
|
||||
}
|
||||
wql.update(jo_in, "stockrecord_id='" + jo_in.getString("stockrecord_id") + "'");
|
||||
} else {
|
||||
throw new BadRequestException(struct_id_In + "仓位库存异常,请检查");
|
||||
throw new BadRequestException(pcsn_In + "子卷仓位库存异常,请检查");
|
||||
}
|
||||
break;
|
||||
default:
|
||||
|
||||
@@ -220,8 +220,8 @@
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<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 label="木箱实际重量">
|
||||
<el-input v-model="form.real_weight" style="width: 300px;" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
@@ -402,6 +402,13 @@
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</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-col :span="12">
|
||||
<el-form-item label="备注">
|
||||
@@ -503,7 +510,11 @@
|
||||
:min-width="flexWidth('box_weight',crud.data,'木箱自身重量')"
|
||||
: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
|
||||
prop="quality_guaran_period"
|
||||
label="保质期"
|
||||
@@ -633,7 +644,8 @@ const defaultForm = {
|
||||
isreprintpackageboxlabel: null,
|
||||
isunpackbox: null,
|
||||
thickness_request: null,
|
||||
width_standard: null
|
||||
width_standard: null,
|
||||
real_weight: null
|
||||
}
|
||||
export default {
|
||||
name: 'Subpackagerelation',
|
||||
|
||||
Reference in New Issue
Block a user