add:新增是否开盖接口
This commit is contained in:
@@ -218,6 +218,13 @@ public class AcsToWmsController {
|
|||||||
return new ResponseEntity<>(acsToWmsService.getBoxInfo(param), HttpStatus.OK);
|
return new ResponseEntity<>(acsToWmsService.getBoxInfo(param), HttpStatus.OK);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@PostMapping("/getIsUncap")
|
||||||
|
@Log(value = "二期是否开盖", isInterfaceLog = true, interfaceLogType = InterfaceLogType.ACS_TO_LMS)
|
||||||
|
@SaIgnore
|
||||||
|
public ResponseEntity<Object> getIsUncap(@RequestBody JSONObject param) {
|
||||||
|
return new ResponseEntity<>(acsToWmsService.getIsUncap(param), HttpStatus.OK);
|
||||||
|
}
|
||||||
|
|
||||||
@PostMapping("/acsCallShaftFromCache")
|
@PostMapping("/acsCallShaftFromCache")
|
||||||
@Log(value = "二期ACS请求出轴", isInterfaceLog = true, interfaceLogType = InterfaceLogType.ACS_TO_LMS)
|
@Log(value = "二期ACS请求出轴", isInterfaceLog = true, interfaceLogType = InterfaceLogType.ACS_TO_LMS)
|
||||||
@SaIgnore
|
@SaIgnore
|
||||||
|
|||||||
@@ -216,4 +216,13 @@ public interface AcsToWmsService {
|
|||||||
* @return /
|
* @return /
|
||||||
*/
|
*/
|
||||||
JSONObject acsCallShaftFromCache(JSONObject param);
|
JSONObject acsCallShaftFromCache(JSONObject param);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 捆扎模版
|
||||||
|
* @param param:{
|
||||||
|
*
|
||||||
|
* }
|
||||||
|
* @return JSONObject
|
||||||
|
*/
|
||||||
|
JSONObject getIsUncap(JSONObject param);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2542,4 +2542,60 @@ public class AcsToWmsServiceImpl implements AcsToWmsService {
|
|||||||
public JSONObject acsCallShaftFromCache(JSONObject param) {
|
public JSONObject acsCallShaftFromCache(JSONObject param) {
|
||||||
return slitterService.acsCallShaftFromCache(param);
|
return slitterService.acsCallShaftFromCache(param);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public JSONObject getIsUncap(JSONObject param) {
|
||||||
|
String material_barcode = param.getString("material_barcode");
|
||||||
|
String vehicle_code = param.getString("vehicle_code");
|
||||||
|
//干燥剂模板
|
||||||
|
String desiccantTemplate = "6";
|
||||||
|
//是否开盖
|
||||||
|
String isUncap = "1";
|
||||||
|
JSONObject vehicle_info = WQLObject.getWQLObject("md_pb_storagevehicleext").query("storagevehicle_code = '" + material_barcode + "'").uniqueResult(0);
|
||||||
|
if (ObjectUtil.isEmpty(vehicle_info)) {
|
||||||
|
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)
|
||||||
|
);
|
||||||
|
|
||||||
|
//获取包装关系
|
||||||
|
JSONObject sub_jo = WQLObject.getWQLObject("pdm_bi_subpackagerelation").query("package_box_sn = '" + material_barcode + "'").uniqueResult(0);
|
||||||
|
if (ObjectUtil.isNotEmpty(sub_jo)) {
|
||||||
|
String material_type = sub_jo.getString("material_type");
|
||||||
|
if (material_type.equals("FG1")) {
|
||||||
|
desiccantTemplate = "6";
|
||||||
|
}
|
||||||
|
if (material_type.equals("FG2")) {
|
||||||
|
desiccantTemplate = "4";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
//根据木箱高度,判断入库仓位的高度
|
||||||
|
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("boxLength", boxDao.getBox_length());
|
||||||
|
jsonObject.put("boxWidth", boxDao.getBox_width());
|
||||||
|
jsonObject.put("boxHigh", boxDao.getBox_high());
|
||||||
|
jsonObject.put("desiccantTemplate", desiccantTemplate);
|
||||||
|
jsonObject.put("isUncap", isUncap);
|
||||||
|
jsonObject.put("heightLevel", height);
|
||||||
|
jsonObject.put("status", HttpStatus.OK.value());
|
||||||
|
return jsonObject;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user