fix:高度校验

This commit is contained in:
zhouz
2024-05-22 16:09:52 +08:00
parent fbf5640d2d
commit 8e5fcb1006
3 changed files with 58 additions and 0 deletions

View File

@@ -204,4 +204,11 @@ public class AcsToWmsController {
public ResponseEntity<Object> applicationForLabeling(@RequestBody JSONObject param) {
return new ResponseEntity<>(acsToWmsService.applicationForLabeling(param), HttpStatus.OK);
}
@PostMapping("/getBoxInfo")
@Log(value = "二期获取木箱高度", isInterfaceLog = true, interfaceLogType = InterfaceLogType.ACS_TO_LMS)
@SaIgnore
public ResponseEntity<Object> getBoxInfo(@RequestBody JSONObject param) {
return new ResponseEntity<>(acsToWmsService.getBoxInfo(param), HttpStatus.OK);
}
}

View File

@@ -195,4 +195,11 @@ public interface AcsToWmsService {
* @return /
*/
JSONObject applicationForLabeling(JSONObject param);
/**
* 二期输送机申请贴标
* @param param /
* @return /
*/
JSONObject getBoxInfo(JSONObject param);
}

View File

@@ -27,6 +27,8 @@ import org.nl.b_lms.sch.task.service.IschBaseTaskService;
import org.nl.b_lms.sch.tasks.TwoBoxExcepTask;
import org.nl.b_lms.sch.tasks.first_floor_area.MzhcwTask;
import org.nl.b_lms.sch.tasks.slitter.service.SlitterService;
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.enums.TASKEnum;
import org.nl.b_lms.storage_manage.ios.service.iostorInv.util.service.*;
@@ -38,6 +40,7 @@ import org.nl.modules.wql.WQL;
import org.nl.modules.wql.core.bean.WQLObject;
import org.nl.modules.wql.util.SpringContextHolder;
import org.nl.system.service.notice.ISysNoticeService;
import org.nl.system.service.param.ISysParamService;
import org.nl.system.service.param.impl.SysParamServiceImpl;
import org.nl.wms.ext.acs.service.AcsToWmsService;
import org.nl.wms.pda.mps.service.CasingService;
@@ -125,6 +128,8 @@ public class AcsToWmsServiceImpl implements AcsToWmsService {
*/
private final OutBoxManageService outBoxManageService;
private final IBstIvtBoxinfoService iBstIvtBoxinfoService;
@Resource
private IschBaseTaskService taskService;
@@ -134,6 +139,9 @@ public class AcsToWmsServiceImpl implements AcsToWmsService {
@Resource
private MzhcwTask mzhcwTask;
@Autowired
private ISysParamService iSysParamService;
private final SlitterService slitterService;
private final IPdmBiSlittingproductionplanService slittingproductionplanService;
@@ -2169,4 +2177,40 @@ public class AcsToWmsServiceImpl implements AcsToWmsService {
return param;
}
@Override
public JSONObject getBoxInfo(JSONObject param) {
String device_code = param.getString("device_code");
String material_barcode = param.getString("material_barcode");
String vehicle_code = param.getString("vehicle_code");
if (device_code.equals("RK1005")) {
JSONObject vehicle_info = WQLObject.getWQLObject("md_pb_storagevehicleext").query("storagevehicle_code = '" + vehicle_code + "'").uniqueResult(0);
if (ObjectUtil.isEmpty(vehicle_info)) {
throw new BadRequestException("未查询到载具号【" + vehicle_code + "】对应的载具信息!");
}
material_barcode = vehicle_info.getString("pcsn");
}
// 查询木箱信息
BstIvtBoxinfo boxDao = iBstIvtBoxinfoService.getOne(
new QueryWrapper<BstIvtBoxinfo>().lambda()
.eq(BstIvtBoxinfo::getBox_no, material_barcode)
);
//根据木箱高度,判断入库仓位的高度
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";
}
JSONObject jsonObject = new JSONObject();
jsonObject.put("heightLevel", height);
return jsonObject;
}
}