合并master1到0523

This commit is contained in:
zhouz
2025-08-15 10:20:10 +08:00
7 changed files with 249 additions and 149 deletions

View File

@@ -162,7 +162,7 @@ public class ProductInstorServiceImpl implements ProductInstorService {
//判断明细数组中箱号与扫码的箱子是否一致,不一致让客户重新扫码
if (ObjectUtil.isNotEmpty(package_box_sn)) {
if (!box_no.equals(package_box_sn)) {
throw new BadRequestException("扫码箱号:"+box_no+"与明细数据中箱号:"+package_box_sn+"不一致,请重新扫码操作!");
throw new BadRequestException("扫码箱号:" + box_no + "与明细数据中箱号:" + package_box_sn + "不一致,请重新扫码操作!");
}
}
for (int i = 0; i < box_rows.size(); i++) {
@@ -216,36 +216,39 @@ public class ProductInstorServiceImpl implements ProductInstorService {
double box_weight = sub_jo.getDoubleValue("box_weight");
// 木箱实称重重量
double real_weight = sub_jo.getDoubleValue("real_weight");
if (ObjectUtil.isEmpty(sub_jo.getString("real_weight"))) {
throw new BadRequestException("请先进行木箱称重校验!");
//一楼是否异常
String one_exc_param = SpringContextHolder.getBean(SysParamServiceImpl.class).findByCode("one_exc_param").getValue();
if (!"1".equals(one_exc_param)) {
if (ObjectUtil.isEmpty(sub_jo.getString("real_weight"))) {
throw new BadRequestException("请先进行木箱称重校验!");
}
}
// 判断木箱毛重是否超标
if (NumberUtil.sub(box_weight, weight_sys) <= real_weight && NumberUtil.add(box_weight, weight_sys) >= real_weight) {
} else {
//调用ACS让对应蜂鸣器报警
JSONObject param = new JSONObject();
param.put("code", "to_command");
param.put("product_area", "LK");
param.put("value", "99");
param.put("device_code", point_code);
JSONArray rows = new JSONArray();
rows.add(param);
WmsToAcsService wmsToAcsService = SpringContextHolder.getBean(WmsToAcsService.class);
wmsToAcsService.action(rows);
if (!"1".equals(one_exc_param)) {
//调用ACS让对应蜂鸣器报警
JSONObject param = new JSONObject();
param.put("code", "to_command");
param.put("product_area", "LK");
param.put("value", "99");
param.put("device_code", point_code);
JSONArray rows = new JSONArray();
rows.add(param);
WmsToAcsService wmsToAcsService = SpringContextHolder.getBean(WmsToAcsService.class);
wmsToAcsService.action(rows);
//判断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("请等待放行!");
//判断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("请等待放行!");
}
}
}
}
//判断是该包装计划是否存在长宽高
@@ -371,7 +374,9 @@ public class ProductInstorServiceImpl implements ProductInstorService {
form.put("vehicle_code", box_no);
form.put("task_type", "010507");
cutConveyorTask.createTask(form);
if (!"1".equals(one_exc_param)) {
cutConveyorTask.createTask(form);
}
} else {
/*
* 如果有实际重量则需要判断重量是否超标
@@ -413,13 +418,13 @@ public class ProductInstorServiceImpl implements ProductInstorService {
.uniqueResult(0);
if ("XN01".equals(jsonObject.getString("sect_code"))) {
whereJson.put("sect_id","1712667908095741952");
whereJson.put("sect_id", "1712667908095741952");
}
if ("XN02".equals(jsonObject.getString("sect_code"))) {
whereJson.put("sect_id","1760184056861036544");
whereJson.put("sect_id", "1760184056861036544");
}
if ("TH01".equals(jsonObject.getString("sect_code"))) {
whereJson.put("sect_id","1760183817781514240");
whereJson.put("sect_id", "1760183817781514240");
}
}
@@ -686,7 +691,7 @@ public class ProductInstorServiceImpl implements ProductInstorService {
JSONObject data = jsonObject.getJSONArray("data").getJSONObject(0);
double weight_now = NumberUtil.div(data.getDoubleValue("weight"), 10);
if (data.getDoubleValue("weight") <= 0) {
throw new BadRequestException("当前称重重量有误,请检查!当前称重重量为【"+weight_now+"");
throw new BadRequestException("当前称重重量有误,请检查!当前称重重量为【" + weight_now + "");
}
// 获取系统参数1

View File

@@ -3149,7 +3149,8 @@ public class CheckOutBillServiceImpl implements CheckOutBillService {
+ "' and row_num = '" + jsonRow.getString("row_num") + "' and is_used = '1' and is_delete = '0' and lock_type not in ('1','6','3')").getResultJSONArray(0);
if (ObjectUtil.isNotEmpty(structArr)) {
throw new BadRequestException("有其他任务正在执行中,请稍后在试!");
JSONObject jsonObject = structArr.getJSONObject(0);
throw new BadRequestException("当前排存在单据号为【"+jsonObject.getString("inv_code")+"】的仓位【"+jsonObject.getString("struct_code")+"】正在执行任务,请稍后在试!");
}
}

View File

@@ -407,6 +407,8 @@ public class OutBillQueryServiceImpl implements OutBillQueryService {
mp.put("物流公司", json.getString("cust_name"));
mp.put("运费", json.getString("estimated_freight"));
mp.put("木箱号", json.getString("box_no"));
mp.put("木箱编码", json.getString("box_material_code"));
mp.put("木箱描述", json.getString("box_material_name"));
mp.put("物料编码", json.getString("material_code"));
mp.put("物料名称", json.getString("material_name"));
mp.put("子卷号", json.getString("pcsn"));

View File

@@ -266,6 +266,8 @@
base.cust_name,
dis.sect_name,
dis.box_no,
sub.box_type box_material_code,
mmm.material_name box_material_name,
dis.qty_unit_name,
mater.material_code,
mater.material_name,
@@ -327,6 +329,7 @@
record.bill_code,
record.container_name,
record.package_box_sn,
record.box_type,
record.sap_pcsn,
max(record.customer_name) as customer_name,
max(record.customer_description) as customer_description,
@@ -350,7 +353,9 @@
record.bill_code,
record.container_name,
record.sap_pcsn,
record.package_box_sn) sub ON (sub.container_name = dis.pcsn AND sub.package_box_sn = dis.box_no AND sub.bill_id = mst.iostorinv_id)
record.package_box_sn,
record.box_type) sub ON (sub.container_name = dis.pcsn AND sub.package_box_sn = dis.box_no AND sub.bill_id = mst.iostorinv_id)
LEFT JOIN md_me_materialbase mmm ON sub.box_type = mmm.material_code
LEFT JOIN md_cs_customerbase cust ON cust.cust_code = sub.customer_name
LEFT JOIN (SELECT
container_name,
@@ -385,6 +390,8 @@
base.cust_name,
dis.sect_name,
dis.box_no,
sub.box_type box_material_code,
mmm.material_name box_material_name,
dis.qty_unit_name,
mater.material_code,
mater.material_name,
@@ -446,6 +453,7 @@
record.bill_code,
record.container_name,
record.package_box_sn,
record.box_type,
record.sap_pcsn,
max(record.customer_name) as customer_name,
max(record.customer_description) as customer_description,
@@ -469,7 +477,9 @@
record.bill_code,
record.container_name,
record.sap_pcsn,
record.package_box_sn) sub ON (sub.container_name = dis.pcsn AND sub.package_box_sn = dis.box_no AND sub.bill_id = mst.iostorinv_id)
record.package_box_sn,
record.box_type) sub ON (sub.container_name = dis.pcsn AND sub.package_box_sn = dis.box_no AND sub.bill_id = mst.iostorinv_id)
LEFT JOIN md_me_materialbase mmm ON sub.box_type = mmm.material_code
LEFT JOIN md_cs_customerbase cust ON cust.cust_code = sub.customer_name
LEFT JOIN (SELECT
container_name,