fix:高度校验
This commit is contained in:
@@ -204,4 +204,11 @@ public class AcsToWmsController {
|
|||||||
public ResponseEntity<Object> applicationForLabeling(@RequestBody JSONObject param) {
|
public ResponseEntity<Object> applicationForLabeling(@RequestBody JSONObject param) {
|
||||||
return new ResponseEntity<>(acsToWmsService.applicationForLabeling(param), HttpStatus.OK);
|
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);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -195,4 +195,11 @@ public interface AcsToWmsService {
|
|||||||
* @return /
|
* @return /
|
||||||
*/
|
*/
|
||||||
JSONObject applicationForLabeling(JSONObject param);
|
JSONObject applicationForLabeling(JSONObject param);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 二期输送机申请贴标
|
||||||
|
* @param param /
|
||||||
|
* @return /
|
||||||
|
*/
|
||||||
|
JSONObject getBoxInfo(JSONObject param);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -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.TwoBoxExcepTask;
|
||||||
import org.nl.b_lms.sch.tasks.first_floor_area.MzhcwTask;
|
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.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.IOSEnum;
|
||||||
import org.nl.b_lms.storage_manage.ios.enums.TASKEnum;
|
import org.nl.b_lms.storage_manage.ios.enums.TASKEnum;
|
||||||
import org.nl.b_lms.storage_manage.ios.service.iostorInv.util.service.*;
|
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.core.bean.WQLObject;
|
||||||
import org.nl.modules.wql.util.SpringContextHolder;
|
import org.nl.modules.wql.util.SpringContextHolder;
|
||||||
import org.nl.system.service.notice.ISysNoticeService;
|
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.system.service.param.impl.SysParamServiceImpl;
|
||||||
import org.nl.wms.ext.acs.service.AcsToWmsService;
|
import org.nl.wms.ext.acs.service.AcsToWmsService;
|
||||||
import org.nl.wms.pda.mps.service.CasingService;
|
import org.nl.wms.pda.mps.service.CasingService;
|
||||||
@@ -125,6 +128,8 @@ public class AcsToWmsServiceImpl implements AcsToWmsService {
|
|||||||
*/
|
*/
|
||||||
private final OutBoxManageService outBoxManageService;
|
private final OutBoxManageService outBoxManageService;
|
||||||
|
|
||||||
|
private final IBstIvtBoxinfoService iBstIvtBoxinfoService;
|
||||||
|
|
||||||
@Resource
|
@Resource
|
||||||
private IschBaseTaskService taskService;
|
private IschBaseTaskService taskService;
|
||||||
|
|
||||||
@@ -134,6 +139,9 @@ public class AcsToWmsServiceImpl implements AcsToWmsService {
|
|||||||
@Resource
|
@Resource
|
||||||
private MzhcwTask mzhcwTask;
|
private MzhcwTask mzhcwTask;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private ISysParamService iSysParamService;
|
||||||
|
|
||||||
private final SlitterService slitterService;
|
private final SlitterService slitterService;
|
||||||
|
|
||||||
private final IPdmBiSlittingproductionplanService slittingproductionplanService;
|
private final IPdmBiSlittingproductionplanService slittingproductionplanService;
|
||||||
@@ -2169,4 +2177,40 @@ public class AcsToWmsServiceImpl implements AcsToWmsService {
|
|||||||
return param;
|
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;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user