opt:代码提交
This commit is contained in:
@@ -277,12 +277,12 @@ public class VehicleTwoServiceImpl implements VehicleTwoService {
|
||||
|
||||
} else {
|
||||
String pcsn = mdPdStoragevehicleext.getPcsn();
|
||||
if (StringUtils.isNotEmpty(pcsn)) {
|
||||
JSONArray stIvtStructattr = WQLObject.getWQLObject("st_ivt_structattr").query("storagevehicle_code = '" + pcsn + "'").getResultJSONArray(0);
|
||||
if (stIvtStructattr != null && stIvtStructattr.size() > 0) {
|
||||
throw new BadRequestException("当前托盘" + whereJson.getString("vehicle_code") + "已经绑定木箱" + pcsn);
|
||||
}
|
||||
}
|
||||
// if (StringUtils.isNotEmpty(pcsn)) {
|
||||
// JSONArray stIvtStructattr = WQLObject.getWQLObject("st_ivt_structattr").query("storagevehicle_code = '" + pcsn + "'").getResultJSONArray(0);
|
||||
// if (stIvtStructattr != null && stIvtStructattr.size() > 0) {
|
||||
// throw new BadRequestException("当前托盘" + whereJson.getString("vehicle_code") + "已经绑定木箱" + pcsn);
|
||||
// }
|
||||
// }
|
||||
|
||||
if(StringUtils.isBlank(mdPdStoragevehicleext.getQty())){
|
||||
mdPdStoragevehicleext.setQty("1");
|
||||
@@ -318,7 +318,10 @@ public class VehicleTwoServiceImpl implements VehicleTwoService {
|
||||
whereJson.put("material_barcode", material_barcode);
|
||||
whereJson.put("bill_type", IOSEnum.IN_TYPE.code("盘点入库"));
|
||||
if (whereJson.getString("vehicle_code").startsWith("YNY")) {
|
||||
whereJson.put("move_block_num", "4");
|
||||
|
||||
//whereJson.put("move_block_num", "4");
|
||||
} else{
|
||||
// whereJson.put("move_block_num", "2");
|
||||
}
|
||||
if (!whereJson.containsKey("point_code")) {
|
||||
whereJson.put("point_code", whereJson.getString("device_code"));
|
||||
@@ -462,10 +465,9 @@ public class VehicleTwoServiceImpl implements VehicleTwoService {
|
||||
//KMXRKW2 退货入库
|
||||
if ("KMXRKW1".equals(startCode) || "KMXRKW2".equals(startCode)) {
|
||||
inBoxManageService.boxBinVehicleByTHRK(whereJson);
|
||||
} else {
|
||||
JSONObject result = new JSONObject();
|
||||
result.put("message", "点位异常!");
|
||||
return result;
|
||||
} else if("KMXRKW3".equals(startCode) || "KMXRKW4".equals(startCode)){
|
||||
//空木箱入库
|
||||
inBoxManageService.boxBinVehicleByTHRK(whereJson);
|
||||
}
|
||||
|
||||
JSONObject result = new JSONObject();
|
||||
|
||||
@@ -277,6 +277,9 @@ public class TwoOutTask extends AbstractAcsTask {
|
||||
&&!"RK1010".equals(jsonTask.getPoint_code2())
|
||||
&&!"RK1003".equals(jsonTask.getPoint_code2())
|
||||
&& !"RK2005".equals(jsonTask.getPoint_code2())
|
||||
&& !"RK1018".equals(jsonTask.getPoint_code2())
|
||||
&& !"RK1020".equals(jsonTask.getPoint_code2())
|
||||
&& !"RK1022".equals(jsonTask.getPoint_code2())
|
||||
&& !"RK2008".equals(jsonTask.getPoint_code2())) {
|
||||
|
||||
LashManageServiceImpl bean1 = SpringContextHolder.getBean(LashManageServiceImpl.class);
|
||||
|
||||
@@ -41,7 +41,7 @@ public enum IOSEnum {
|
||||
)),
|
||||
|
||||
//出库单据类型
|
||||
OUT_TYPE(MapOf.of("发货出库", "1001", "改切出库", "1003", "调拨出库", "1004", "拆箱出库", "1005",
|
||||
OUT_TYPE(MapOf.of("发货出库", "1001", "改切出库", "1003", "调拨出库", "1004", "拆箱出库", "1005",
|
||||
"返检出库", "1006", "超期报废", "1007", "退货报废", "1008", "质量问题报废", "1010", "其他报废", "1002",
|
||||
"手工出库", "1009","转单出库", "1020","贴标出库", "1021","管控出库", "1099","换标出库", "1012","盘点出库","1016"
|
||||
)),
|
||||
@@ -130,8 +130,9 @@ public enum IOSEnum {
|
||||
|
||||
//acs申请任务
|
||||
ACSTOLMS_TYPE(MapOf.of("成品入库任务", "1"
|
||||
,"空盘入库","2","空盘出库"
|
||||
,"3","异常处理位","4"
|
||||
,"空盘入库","2"
|
||||
,"空盘出库","3"
|
||||
,"异常处理位","4"
|
||||
,"木箱入库","5"
|
||||
,"退货入库","6"
|
||||
,"贴标","1"
|
||||
@@ -153,6 +154,9 @@ public enum IOSEnum {
|
||||
// 换标出库口
|
||||
CHANGE_OUT(MapOf.of("换标出库口", "CK1119")),
|
||||
|
||||
// 盘点出库口,巷道对应出库口
|
||||
INVENTORY_OUT(MapOf.of("1", "CK1119","2", "CK1119","3", "CK1119","4", "CK1119")),
|
||||
|
||||
// 下发acs任务类型(明细)
|
||||
ACS_TYPE(MapOf.of("木箱入库行架任务", "12","装箱入库行架任务", "13",
|
||||
"子卷下线行架任务", "16","退货入库行架任务", "14","RGV输送任务", "15",
|
||||
|
||||
@@ -1259,25 +1259,32 @@ public class StIvtIostorinvOutServiceImpl extends ServiceImpl<StIvtIostorinvOutM
|
||||
// 确定起点
|
||||
String start_device_code = json.getString("struct_code");
|
||||
|
||||
// 确定终点: 根据仓位所在排确定终点
|
||||
// 确定终点: 根据仓位所在排确定终点,
|
||||
String end_device_code = "";
|
||||
if ("true".equals(where.getString("checked"))) {
|
||||
if("RK2009".equals(where.getString("point_code"))
|
||||
||"RK1010".equals(where.getString("point_code"))
|
||||
||"RK1018".equals(where.getString("point_code"))
|
||||
||"RK1020".equals(where.getString("point_code"))
|
||||
||"RK1022".equals(where.getString("point_code"))
|
||||
||"RK1003".equals(where.getString("point_code"))){
|
||||
if(StringUtils.isBlank(json.getString("storagevehicle_type"))){
|
||||
throw new BadRequestException("点位没有大小托盘类型,请确认" );
|
||||
}
|
||||
if(!IOSEnum.EXCEP_OUT.code(json.getString("storagevehicle_type")).equals(where.getString("point_code"))){
|
||||
throw new BadRequestException("出库口选择有误,请确认起点的大小托盘类型与终点是否匹配" );
|
||||
}
|
||||
// if(!IOSEnum.EXCEP_OUT.code(json.getString("storagevehicle_type")).equals(where.getString("point_code"))){
|
||||
// throw new BadRequestException("出库口选择有误,请确认起点的大小托盘类型与终点是否匹配" );
|
||||
// }
|
||||
end_device_code = where.getString("point_code");
|
||||
} else {
|
||||
throw new BadRequestException("异常出库点位只能选择【RK2009】" );
|
||||
}
|
||||
} else {
|
||||
if("RK2009".equals(where.getString("point_code")) ||"RK1010".equals(where.getString("point_code"))
|
||||
||"RK1003".equals(where.getString("point_code"))){
|
||||
if("RK2009".equals(where.getString("point_code"))
|
||||
||"RK1010".equals(where.getString("point_code"))
|
||||
||"RK1003".equals(where.getString("point_code"))
|
||||
||"RK1018".equals(where.getString("point_code"))
|
||||
||"RK1020".equals(where.getString("point_code"))
|
||||
||"RK1022".equals(where.getString("point_code"))){
|
||||
throw new BadRequestException("此点位为异常出库点,请勾选【是否异常出库】" );
|
||||
}
|
||||
end_device_code = IsEndCode(json);
|
||||
|
||||
@@ -208,6 +208,128 @@ public class InBoxManageServiceImpl implements InBoxManageService {
|
||||
notInBlockList.clear();
|
||||
}
|
||||
|
||||
@Override
|
||||
@Transactional
|
||||
public void emptyBoxIn(JSONObject whereJson) {
|
||||
IschBasePointService pointService = SpringContextHolder.getBean(IschBasePointService.class);
|
||||
SchBasePoint point = pointService.getOne(new LambdaQueryWrapper<SchBasePoint>().eq(SchBasePoint::getPoint_code, whereJson.getString("point_code")));
|
||||
if (ObjectUtil.isEmpty(point)) {
|
||||
throw new BadRequestException("未查询到点位【" + whereJson.getString("point_code") + "】!");
|
||||
}
|
||||
String box_no = whereJson.getString("box_no");
|
||||
String[] split = box_no.split(",");
|
||||
String boxType = "";
|
||||
int layer = whereJson.getIntValue("layer");
|
||||
if (layer != split.length) {
|
||||
throw new BadRequestException("扫描的木箱个数和选择的木箱层数不一致!");
|
||||
}
|
||||
Set<String> collect = Arrays.stream(split).collect(Collectors.toSet());
|
||||
if (collect.size() != split.length) {
|
||||
throw new BadRequestException("扫描的木箱条码不能相同");
|
||||
}
|
||||
if (split.length > 3) {
|
||||
throw new BadRequestException("堆叠木箱最大不能超过3层");
|
||||
}
|
||||
// 校验是否有相同木箱号
|
||||
List<String> strings = Arrays.asList(split);
|
||||
int size = (int) strings.stream()
|
||||
.distinct().count();
|
||||
|
||||
if (size != split.length) {
|
||||
throw new BadRequestException("木箱号有相同,请重新扫码!");
|
||||
}
|
||||
//查询仓库是否存在相同木箱
|
||||
for (String boxSn : split) {
|
||||
JSONArray stIvtStructattr = WQLObject.getWQLObject("st_ivt_structattr").query("storagevehicle_code = '" + boxSn + "'").getResultJSONArray(0);
|
||||
if (stIvtStructattr != null && stIvtStructattr.size() > 0) {
|
||||
throw new BadRequestException("当前木箱已经存在库中" + stIvtStructattr.getJSONObject(0).getString("struct_code"));
|
||||
}
|
||||
}
|
||||
|
||||
for (int i = 0; i < split.length; i++) {
|
||||
String boxNO = split[i];
|
||||
JSONObject jo = new JSONObject();
|
||||
jo.put("box_no", boxNO);
|
||||
//调用MES接口插入或更新木箱信息
|
||||
String isConnect2 = SpringContextHolder.getBean(SysParamServiceImpl.class).findByCode("IS_CONNECT_MES2").getValue();
|
||||
if ("1".equals(isConnect2)) {
|
||||
lmsToMesService.momGetPackingInfo(jo);
|
||||
}
|
||||
}
|
||||
|
||||
for (int i = 0; i < split.length; i++) {
|
||||
String boxNo = split[i];
|
||||
BstIvtBoxinfo boxinfo = iBstIvtBoxinfoService.getOne(
|
||||
new QueryWrapper<BstIvtBoxinfo>().lambda()
|
||||
.eq(BstIvtBoxinfo::getBox_no, boxNo));
|
||||
//2026.3.27木箱重量改为称重模块获取,在空木箱入库口进行校验
|
||||
/*if (ObjectUtil.isEmpty(boxinfo.getBox_weight()) || Double.parseDouble(boxinfo.getBox_weight()) == 0) {
|
||||
throw new BadRequestException("请先维护木箱重量后进行入库!");
|
||||
}*/
|
||||
if (StrUtil.isEmpty(boxType)) {
|
||||
boxType = boxinfo.getMaterial_code();
|
||||
} else {
|
||||
if (!boxType.equals(boxinfo.getMaterial_code())) {
|
||||
throw new BadRequestException("请扫码相同规格的木箱进行堆叠入库!");
|
||||
}
|
||||
}
|
||||
}
|
||||
//如果小木箱入库时没有小托盘时候是否考虑叫大托盘
|
||||
// 查询木箱信息
|
||||
BstIvtBoxinfo boxDao = iBstIvtBoxinfoService.getOne(
|
||||
new QueryWrapper<BstIvtBoxinfo>().lambda()
|
||||
.eq(BstIvtBoxinfo::getBox_no, split[0])
|
||||
);
|
||||
if (boxDao == null) {
|
||||
throw new BadRequestException("木箱不存在!");
|
||||
}
|
||||
|
||||
//校验长宽高是否符合
|
||||
String box_limit_width = iSysParamService.findByCode("box_limit_width").getValue();
|
||||
String box_limit_length = iSysParamService.findByCode("box_limit_length").getValue();
|
||||
String box_limit_height = iSysParamService.findByCode("box_limit_height").getValue();
|
||||
if (Integer.parseInt(box_limit_width) < Integer.parseInt(boxDao.getBox_width())) {
|
||||
throw new BadRequestException("当前木箱宽度大于【" + box_limit_width + "】,不允许入库!");
|
||||
}
|
||||
if (Integer.parseInt(box_limit_length) < Integer.parseInt(boxDao.getBox_length())) {
|
||||
throw new BadRequestException("当前木箱长度大于【" + box_limit_width + "】,不允许入库!");
|
||||
}
|
||||
if (Integer.parseInt(box_limit_height) < Integer.parseInt(boxDao.getBox_high())) {
|
||||
throw new BadRequestException("当前木箱高度大于【" + box_limit_width + "】,不允许入库!");
|
||||
}
|
||||
|
||||
|
||||
JSONObject taskParam = new JSONObject();
|
||||
taskParam.put("task_type", "010713");
|
||||
taskParam.put("start_device_code", whereJson.getString("point_code"));
|
||||
taskParam.put("next_device_code", IOSEnum.VEHICLE_TYPE_SCAN_POINT.code("1"));
|
||||
taskParam.put("vehicle_code", whereJson.getString("box_no"));
|
||||
JSONObject param = new JSONObject();
|
||||
param.put("layer", whereJson.getString("layer"));
|
||||
param.put("length", boxDao.getBox_length());
|
||||
param.put("width", boxDao.getBox_width());
|
||||
param.put("height", boxDao.getBox_high());
|
||||
param.put("containerType", boxDao.getVehicle_type());
|
||||
param.put("barcode", whereJson.getString("box_no"));
|
||||
//根据木箱高度,判断入库仓位的高度
|
||||
String height = "";
|
||||
String heightLevel1 = iSysParamService.findByCode("height_level_1").getValue();
|
||||
String heightLevel2 = iSysParamService.findByCode("height_level_2").getValue();
|
||||
String box_high = boxDao.getBox_high();
|
||||
if (Integer.parseInt(box_high) <= Integer.parseInt(heightLevel1)) {
|
||||
height = "1";
|
||||
} else if (Integer.parseInt(box_high) > Integer.parseInt(heightLevel1) && Integer.parseInt(box_high) <= Integer.parseInt(heightLevel2)) {
|
||||
height = "2";
|
||||
} else {
|
||||
height = "3";
|
||||
}
|
||||
param.put("heightLevel", height);
|
||||
taskParam.put("request_param", param.toString());
|
||||
TwoInBoxTrussTask taskBean = new TwoInBoxTrussTask();
|
||||
taskBean.createTask(taskParam);
|
||||
taskBean.immediateNotifyAcs(null);
|
||||
}
|
||||
|
||||
@Override
|
||||
@Transactional
|
||||
public void boxBinVehicle(JSONObject whereJson) {
|
||||
|
||||
@@ -95,9 +95,9 @@ public class OutVehicleManageServiceImpl implements OutVehicleManageService {
|
||||
//判断当前点位是否存在任务,如果存在则不生成任务
|
||||
List<SchBaseTask> taskList = schBaseTaskMapper.selectList(new QueryWrapper<SchBaseTask>().lambda().eq(SchBaseTask::getPoint_code2, whereJson.getString("device_code")).lt(SchBaseTask::getTask_status, "07").eq(SchBaseTask::getIs_delete, "0"));
|
||||
|
||||
if (ObjectUtil.isNotEmpty(taskList)) {
|
||||
throw new BadRequestException("点位【" + taskList.get(0).getPoint_code2() + "】正在出空托盘任务!");
|
||||
}
|
||||
// if (ObjectUtil.isNotEmpty(taskList)) {
|
||||
// throw new BadRequestException("点位【" + taskList.get(0).getPoint_code2() + "】正在出空托盘任务!");
|
||||
// }
|
||||
JSONObject jsonAttr = getStruct(whereJson);
|
||||
|
||||
if (ObjectUtil.isEmpty(jsonAttr)) {
|
||||
|
||||
@@ -38,6 +38,8 @@ public interface InBoxManageService {
|
||||
void boxBinVehicle(JSONObject whereJson);
|
||||
void boxBinVehicleByTHRK(JSONObject whereJson);
|
||||
|
||||
void emptyBoxIn(JSONObject whereJson);
|
||||
|
||||
/**
|
||||
* 任务异常处理(1.满入 2.浅货位有货-放货时)
|
||||
* @param jsonObject {
|
||||
|
||||
@@ -1323,7 +1323,7 @@ public class AcsToWmsServiceImpl implements AcsToWmsService {
|
||||
whereJson.put("material_barcode",containers);
|
||||
if(whereJson.getString("vehicle_code").startsWith("YNX")) {
|
||||
//todo 默认需要调整,根据当前的出库任务确认,如果是2楼入库,则需要判断出库任务,如果出库任务
|
||||
//whereJson.put("move_block_num", "1");
|
||||
//whereJson.put("move_block_num", "3");
|
||||
} else if(whereJson.getString("vehicle_code").startsWith("YNY")) {
|
||||
whereJson.put("move_block_num", "4");
|
||||
}
|
||||
@@ -1480,7 +1480,7 @@ public class AcsToWmsServiceImpl implements AcsToWmsService {
|
||||
//优先巷道
|
||||
if(whereJson.getString("vehicle_code").startsWith("YNX")) {
|
||||
//todo 默认需要调整,根据当前的出库任务确认,如果是2楼入库,则需要判断出库任务,如果出库任务
|
||||
//whereJson.put("move_block_num", "1");
|
||||
//whereJson.put("move_block_num", "3");
|
||||
} else if(whereJson.getString("vehicle_code").startsWith("YNY")) {
|
||||
whereJson.put("move_block_num", "4");
|
||||
}
|
||||
|
||||
@@ -102,6 +102,15 @@ public class PointController {
|
||||
return new ResponseEntity<>(pointService.getPoint(whereJson), HttpStatus.OK);
|
||||
}
|
||||
|
||||
@PostMapping("/getPointByBillType")
|
||||
@Log("查询点位下拉框")
|
||||
|
||||
//@SaCheckPermission("materialtype:list")
|
||||
public ResponseEntity<Object> getPointByBillType(@RequestBody Map whereJson) {
|
||||
return new ResponseEntity<>(pointService.getPointByBillType(whereJson), HttpStatus.OK);
|
||||
}
|
||||
|
||||
|
||||
@GetMapping("/selectPoint")
|
||||
@Log("查询点位管理")
|
||||
|
||||
|
||||
@@ -81,6 +81,8 @@ public interface PointService {
|
||||
|
||||
JSONArray getPoint(Map wherJson);
|
||||
|
||||
JSONArray getPointByBillType(Map wherJson);
|
||||
|
||||
/**
|
||||
* 获取点位
|
||||
*/
|
||||
|
||||
@@ -268,6 +268,14 @@ public class PointServiceImpl implements PointService {
|
||||
return point_rows;
|
||||
}
|
||||
|
||||
@Override
|
||||
public JSONArray getPointByBillType(Map wherJson) {
|
||||
String area_type = (String) wherJson.get("area_type");
|
||||
String bill_type = (String) wherJson.get("bill_type");
|
||||
JSONArray point_rows = WQLObject.getWQLObject("sch_base_point").query("region_id IN (" + area_type + ") AND is_used = '1' AND is_delete = '0' and remark like '%"+ bill_type +"%' order by point_code").getResultJSONArray(0);
|
||||
return point_rows;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Map<String, Object> selectPoint(Map whereJson, Pageable page) {
|
||||
String search = MapUtil.getStr(whereJson, "search");
|
||||
|
||||
Reference in New Issue
Block a user