Merge remote-tracking branch 'origin/master_merge' into master_merge

This commit is contained in:
zhouz
2024-07-30 13:49:18 +08:00
26 changed files with 87 additions and 11 deletions

View File

@@ -73,7 +73,7 @@ public class ProductOutTwoServiceImpl implements ProductOutTwoService {
.map(BstIvtBoxlashbound::getBox_no)
.collect(Collectors.joining("','"));
JSONObject jsonPoint = schBasePointService.query("vehicle_code IN ('" + box_in + "') and is_delete = '0' and is_used = '1' and point_type = '9'").uniqueResult(0);
JSONObject jsonPoint = schBasePointService.query("vehicle_code IN ('" + box_in + "') and is_delete = '0' and is_used = '1' and point_type = '8'").uniqueResult(0);
if (ObjectUtil.isEmpty(jsonPoint)) {
throw new BadRequestException("请输入正确的木箱或查看点位是否存在");
@@ -86,7 +86,10 @@ public class ProductOutTwoServiceImpl implements ProductOutTwoService {
schBasePointService.update(jsonPoint);
// 删除木箱绑定关系
iBstIvtBoxlashboundService.removeByIds(boundDaoList);
iBstIvtBoxlashboundService.remove(
new QueryWrapper<BstIvtBoxlashbound>().lambda()
.eq(BstIvtBoxlashbound::getBound_id, boundDaoList.get(0).getBound_id())
);
JSONObject result = new JSONObject();
result.put("message", "解绑成功!");

View File

@@ -52,6 +52,7 @@ public class TwoBoxExcepTask extends AbstractAcsTask {
.vehicle_code(json.getString("vehicle_code"))
.priority(json.getString("priority"))
.class_type(json.getString("task_type"))
.product_area(IOSEnum.PRODUCT_AREA.code("BLK"))
.dtl_type(String.valueOf(dtl_type))
.remark(json.getString("remark"))
.build();

View File

@@ -50,6 +50,7 @@ public class TwoExcepionalMoveTask extends AbstractAcsTask {
.priority(json.getString("priority"))
.class_type(json.getString("task_type"))
.dtl_type(String.valueOf(dtl_type))
.product_area(IOSEnum.PRODUCT_AREA.code("BLK"))
.remark(json.getString("remark"))
.build();
resultList.add(dto);

View File

@@ -55,6 +55,7 @@ public class TwoExceptionInTask extends AbstractAcsTask {
.priority(json.getString("priority"))
.class_type(json.getString("task_type"))
.remark(json.getString("remark"))
.product_area(IOSEnum.PRODUCT_AREA.code("BLK"))
.build();
resultList.add(dto);

View File

@@ -55,6 +55,7 @@ public class TwoInBoxTask extends AbstractAcsTask {
.class_type(json.getString("task_type"))
.interaction_json(json.getJSONObject("request_param"))
.dtl_type(String.valueOf(dtl_type))
.product_area(IOSEnum.PRODUCT_AREA.code("BLK"))
.remark(json.getString("remark"))
.build();
resultList.add(dto);

View File

@@ -52,11 +52,17 @@ public class TwoInBoxTrussTask extends AbstractAcsTask {
.route_plan_code(getRoutePlanCode(json.getString("point_code2")))
.vehicle_code(json.getString("vehicle_code"))
.priority(json.getString("priority"))
.class_type(json.getString("task_type"))
.class_type(IOSEnum.ACS_TYPE.code("木箱入库行架任务"))
.dtl_type(String.valueOf(dtl_type))
.interaction_json(json.getJSONObject("request_param"))
.remark(json.getString("remark"))
.product_area(IOSEnum.PRODUCT_AREA.code("BLK"))
.build();
dto.setClass_type(json.getString("point_code1").equals(IOSEnum.POINT_CODE.code("退货入库位"))
? IOSEnum.ACS_TYPE.code("退货入库行架任务") : IOSEnum.ACS_TYPE.code("木箱入库行架任务")
);
resultList.add(dto);
}
return resultList;

View File

@@ -55,6 +55,7 @@ public class TwoInEmpExcepTask extends AbstractAcsTask {
.class_type(json.getString("task_type"))
.dtl_type("7")
.remark(json.getString("remark"))
.product_area(IOSEnum.PRODUCT_AREA.code("BLK"))
.build();
resultList.add(dto);
}

View File

@@ -58,6 +58,7 @@ public class TwoInEmpTask extends AbstractAcsTask {
.vehicle_code(json.getString("vehicle_code"))
.priority(json.getString("priority"))
.class_type(json.getString("task_type"))
.product_area(IOSEnum.PRODUCT_AREA.code("BLK"))
.dtl_type("7")
.remark(json.getString("remark"))
.build();

View File

@@ -71,6 +71,7 @@ public class TwoInTask extends AbstractAcsTask {
.priority(json.getString("priority"))
.class_type(json.getString("task_type"))
.dtl_type(String.valueOf(dtl_type))
.product_area(IOSEnum.PRODUCT_AREA.code("BLK"))
.remark(json.getString("remark"))
.build();
resultList.add(dto);

View File

@@ -142,6 +142,7 @@ public class TwoLashTask extends AbstractAcsTask {
.class_type(json.getString("task_type"))
.dtl_type(String.valueOf(dtl_type))
.remark(json.getString("remark"))
.product_area(IOSEnum.PRODUCT_AREA.code("BLK"))
.interaction_json(interaction_json)
.build();
resultList.add(dto);

View File

@@ -53,6 +53,7 @@ public class TwoMoveBoxTask extends AbstractAcsTask {
.priority(json.getString("priority"))
.class_type(json.getString("task_type"))
.dtl_type(String.valueOf(dtl_type))
.product_area(IOSEnum.PRODUCT_AREA.code("BLK"))
.remark(json.getString("remark"))
.build();
resultList.add(dto);

View File

@@ -93,6 +93,7 @@ public class TwoOutBoxTask extends AbstractAcsTask {
.priority(json.getString("priority"))
.class_type(json.getString("task_type"))
.dtl_type(String.valueOf(dtl_type))
.product_area(IOSEnum.PRODUCT_AREA.code("BLK"))
.remark(json.getString("remark"))
.build();
resultList.add(dto);

View File

@@ -54,6 +54,7 @@ public class TwoOutEmpTask extends AbstractAcsTask {
.class_type(json.getString("task_type"))
.interaction_json(json.getJSONObject("request_param"))
.dtl_type(String.valueOf(dtl_type))
.product_area(IOSEnum.PRODUCT_AREA.code("BLK"))
.remark(json.getString("remark"))
.build();
resultList.add(dto);

View File

@@ -55,6 +55,7 @@ public class TwoOutExceptionalTask extends AbstractAcsTask {
.class_type(json.getString("task_type"))
.route_plan_code(getRoutePlanCode(json.getString("point_code1")))
.dtl_type(String.valueOf(dtl_type))
.product_area(IOSEnum.PRODUCT_AREA.code("BLK"))
.remark(json.getString("remark"))
.build();
resultList.add(dto);

View File

@@ -57,8 +57,9 @@ public class TwoOutHeapTask extends AbstractAcsTask {
.vehicle_code(json.getString("vehicle_code2"))
.interaction_json(json.getJSONObject("request_param"))
.priority(json.getString("priority"))
.class_type(json.getString("task_type"))
.class_type(IOSEnum.ACS_TYPE.code("RGV输送任务"))
.dtl_type(String.valueOf(dtl_type))
.product_area(IOSEnum.PRODUCT_AREA.code("BLK"))
.remark(json.getString("remark"))
.build();

View File

@@ -107,6 +107,7 @@ public class TwoOutTask extends AbstractAcsTask {
.priority(json.getString("priority"))
.class_type(json.getString("task_type"))
.dtl_type(String.valueOf(dtl_type))
.product_area(IOSEnum.PRODUCT_AREA.code("BLK"))
.remark(json.getString("remark"))
.build();
resultList.add(dto);

View File

@@ -104,6 +104,7 @@ public class TwoSendOutTask extends AbstractAcsTask {
.dtl_type(String.valueOf(dtl_type))
.route_plan_code(getRoutePlanCode(json.getString("point_code1")))
.remark(json.getString("remark"))
.product_area(IOSEnum.PRODUCT_AREA.code("BLK"))
.interaction_json(param)
.build();
resultList.add(dto);

View File

@@ -96,6 +96,7 @@ public class MzhcwTask extends AbstractAcsTask {
.vehicle_code(r.getVehicle_code())
.priority(r.getPriority())
.remark(r.getRemark())
.class_type(IOSEnum.ACS_TYPE.code("子卷下线行架任务"))
.product_area(r.getProduct_area())
.agv_action_type(PackageInfoIvtEnum.AGV_ACTION_TYPE.code("普通任务"))
.interaction_json(JSON.parseObject(r.getRequest_param()))

View File

@@ -98,6 +98,7 @@ public class ZxDjwTask extends AbstractAcsTask {
.priority(r.getPriority())
.remark(r.getRemark())
.product_area(r.getProduct_area())
.class_type(IOSEnum.ACS_TYPE.code("装箱入库行架任务"))
//.agv_system_type(PackageInfoIvtEnum.AGV_SYSTEM_TYPE.code("1楼诺宝任务"))
//.truss_type(PackageInfoIvtEnum.TRUSS_TYPE.code("点对点任务"))
//.dtl_type(r.getDtl_type())

View File

@@ -110,6 +110,9 @@ public enum IOSEnum {
// 行架点位
OUT_HANGER(MapOf.of("行架位1", "CK2013","行架位2", "CK2017")),
// 点位
POINT_CODE(MapOf.of("退货入库位", "THRKDJW1")),
//acs申请任务
ACSTOLMS_TYPE(MapOf.of("成品入库任务", "1","空盘入库","2","空盘出库","3","异常处理位","4","木箱入库","5","退货入库","6","贴标","1","捆扎","2")),
@@ -118,6 +121,11 @@ public enum IOSEnum {
// 异常出库口
EXCEP_OUT(MapOf.of("异常出库口", "CK2001")),
// 下发acs任务类型明细
ACS_TYPE(MapOf.of("木箱入库行架任务", "12","装箱入库行架任务", "13",
"子卷下线行架任务", "16","退货入库行架任务", "14","RGV输送任务", "15"
)),
;
private Map<String, String> code;

View File

@@ -148,4 +148,19 @@ public class StIvtIostorinvdis implements Serializable {
*/
private String box_no;
/**
* 是否超期
*/
private String is_overdue;
/**
* 入库时间
*/
private String instorage_time;
/**
* 是否回传
*/
private String is_upload;
}

View File

@@ -301,6 +301,8 @@ public class OutBussManageServiceImpl implements OutBussManageService {
.qty_unit_name(jsonUnit.getString("unit_name"))
.plan_qty(jsonIvt.getBigDecimal("canuse_qty"))
.real_qty(jsonIvt.getBigDecimal("canuse_qty"))
.instorage_time(jsonIvt.getString("instorage_time"))
.is_overdue(jsonIvt.getString("is_overdue"))
.work_status(work_status)
.box_no(jsonSub.getString("package_box_sn"))
.build();

View File

@@ -58,7 +58,14 @@
attr.sect_id,
attr.sect_code,
attr.sect_name,
sub.sale_order_name
sub.sale_order_name,
CASE
WHEN SUBSTRING(sub.container_name,1,1) = 'B' AND DATEDIFF( NOW(), sub.date_of_production ) > '180'
THEN '1'
WHEN SUBSTRING(sub.container_name,1,1) != 'B' AND DATEDIFF( NOW(), sub.date_of_production ) > '90'
THEN '1'
ELSE '0'
END AS is_overdue
FROM
ST_IVT_StructIvt ivt
LEFT JOIN ST_IVT_StructAttr attr ON attr.struct_id = ivt.struct_id
@@ -80,6 +87,9 @@
attr.storagevehicle_code in 输入.box_in
ENDOPTION
order by ivt.instorage_time ASC
ENDSELECT
ENDQUERY
ENDIF

View File

@@ -8,12 +8,15 @@ import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.nl.b_lms.storage_manage.ios.enums.IOSEnum;
import org.nl.b_lms.storage_manage.ios.service.iostorInv.IStIvtIostorinvOutService;
import org.nl.modules.common.exception.BadRequestException;
import org.nl.modules.wql.WQL;
import org.nl.modules.wql.core.bean.WQLObject;
import org.nl.wms.basedata.st.service.impl.UserStorServiceImpl;
import org.nl.wms.pda.st.service.VirtualOutService;
import org.nl.wms.st.inbill.service.CheckOutBillService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
@@ -29,6 +32,9 @@ public class VirtualOutServiceImpl implements VirtualOutService {
private final CheckOutBillService checkOutBillService;
@Autowired
private IStIvtIostorinvOutService iStIvtIostorinvOutService;
@Override
public JSONObject ivtQuery(JSONObject whereJson) {
@@ -108,6 +114,7 @@ public class VirtualOutServiceImpl implements VirtualOutService {
WQLObject disTab = WQLObject.getWQLObject("ST_IVT_IOStorInvDis"); // 出入库分配明细表
WQLObject dtlTab = WQLObject.getWQLObject("ST_IVT_IOStorInvDtl"); // 出入库明细表
WQLObject mstTab = WQLObject.getWQLObject("st_ivt_iostorinv"); // 出入库主表
JSONArray box_rows = whereJson.getJSONArray("box_rows");
@@ -121,6 +128,8 @@ public class VirtualOutServiceImpl implements VirtualOutService {
if (ObjectUtil.isEmpty(disArr)) {
throw new BadRequestException("木箱码无效");
}
// 查询主表
JSONObject jsonMst = mstTab.query("iostorinv_id = '" + disArr.getJSONObject(0).getString("iostorinv_id") + "'").uniqueResult(0);
for (int i = 0; i < disArr.size(); i++) {
JSONObject jsonDis = disArr.getJSONObject(i);
// 更新状态为完成
@@ -138,10 +147,12 @@ public class VirtualOutServiceImpl implements VirtualOutService {
// 判断此明细是否全部完成
JSONArray dtlNoArr = dtlTab.query("iostorinv_id = '" + jsonDis.getString("iostorinv_id") + "' and bill_status <> '99'").getResultJSONArray(0);
if (ObjectUtil.isEmpty(dtlNoArr)) {
// 调用强制完成接口
JSONObject param = new JSONObject();
param.put("iostorinv_id", jsonDis.getString("iostorinv_id"));
checkOutBillService.confirmOrder(param);
// 调用强制完成接口(判断是一期还是二期)
if (jsonMst.getString("stor_id").equals(IOSEnum.STOR_ID.code("二期"))) {
iStIvtIostorinvOutService.confirm(jsonMst);
} else {
checkOutBillService.confirmOrder(jsonMst);
}
}
}
}

View File

@@ -85,7 +85,8 @@
WHERE
mst.is_delete = '0'
AND mst.io_type = '1'
AND point.point_type = '9'
AND point.point_type = '8'
AND mst.stor_code = 'BC01'
OPTION 输入.box_no <> ""
point.vehicle_code LIKE 输入.box_no
@@ -141,7 +142,7 @@
WHERE
mst.is_delete = '0'
AND mst.io_type = '1'
AND point.point_type = '9'
AND point.point_type = '8'
OPTION 输入.box_no <> ""
point.vehicle_code LIKE 输入.box_no

View File

@@ -219,11 +219,14 @@
mst.is_delete = '0'
AND mst.io_type = '1'
AND dis.work_status <> '99'
AND mst.bill_status <> '99'
OPTION 输入.box_no <> ""
dis.box_no = 输入.box_no
ENDOPTION
ORDER BY mst.input_time DESC
ENDSELECT
ENDQUERY
ENDIF