rev:1.接口日志信息2.二期出库下发任务时校验木箱规格信息是否维护
This commit is contained in:
@@ -152,6 +152,7 @@ public class TwoExcepionalMoveTask extends AbstractAcsTask {
|
||||
json.put("task_group_id", form.getLongValue("task_group_id"));
|
||||
json.put("point_code1", form.getString("start_device_code"));
|
||||
json.put("point_code2", form.getString("next_device_code"));
|
||||
json.put("car_no", form.getString("car_no"));
|
||||
json.put("handle_class", this.getClass().getName());
|
||||
json.put("create_id", SecurityUtils.getCurrentUserId());
|
||||
json.put("create_name", SecurityUtils.getCurrentUsername());
|
||||
|
||||
@@ -14,7 +14,9 @@ import org.nl.b_lms.pdm_manage.enums.SUBEnum;
|
||||
import org.nl.b_lms.sch.tasks.TwoOutExceptionalTask;
|
||||
import org.nl.b_lms.sch.tasks.TwoOutTask;
|
||||
import org.nl.b_lms.storage_manage.database.service.IBstIvtBoxinfoService;
|
||||
import org.nl.b_lms.storage_manage.database.service.IMdpbBoxtypeService;
|
||||
import org.nl.b_lms.storage_manage.database.service.dao.BstIvtBoxinfo;
|
||||
import org.nl.b_lms.storage_manage.database.service.dao.MdpbBoxtype;
|
||||
import org.nl.b_lms.storage_manage.ios.enums.IOSEnum;
|
||||
import org.nl.b_lms.storage_manage.ios.service.iostorInv.IStIvtIostorinvOutService;
|
||||
import org.nl.b_lms.storage_manage.ios.service.iostorInv.IStIvtIostorinvService;
|
||||
@@ -103,12 +105,24 @@ public class StIvtIostorinvOutServiceImpl extends ServiceImpl<StIvtIostorinvOutM
|
||||
@Autowired
|
||||
private InBussManageService inBussManageService;
|
||||
|
||||
/**
|
||||
* 木箱信息服务
|
||||
*/
|
||||
@Autowired
|
||||
private IBstIvtBoxinfoService iBstIvtBoxinfoService;
|
||||
|
||||
/**
|
||||
* 系统参数服务
|
||||
*/
|
||||
@Autowired
|
||||
private ISysParamService iSysParamService;
|
||||
|
||||
/**
|
||||
* 木箱类型服务
|
||||
*/
|
||||
@Autowired
|
||||
private IMdpbBoxtypeService iMdpbBoxtypeService;
|
||||
|
||||
@Override
|
||||
@Transactional
|
||||
public String insertMst(JSONObject whereJson) {
|
||||
@@ -612,6 +626,9 @@ public class StIvtIostorinvOutServiceImpl extends ServiceImpl<StIvtIostorinvOutM
|
||||
// 创建手动式事务
|
||||
ArrayList<String> arr = new ArrayList<>();
|
||||
TranUtil.openTransaction((req, allTransactionConsumer) -> {
|
||||
// 校验是否有木箱规格没有维护
|
||||
boxCheck(whereJson.getString("iostorinv_id"));
|
||||
|
||||
// 查询此明细所有未生成的分配明细
|
||||
List<JSONObject> disDaoList = stIvtIostorinvdisMapper.getNotCreateDis(whereJson);
|
||||
|
||||
@@ -2036,4 +2053,57 @@ public class StIvtIostorinvOutServiceImpl extends ServiceImpl<StIvtIostorinvOutM
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* 出库下发任务前校验:校验木箱类型数据是否都已经维护
|
||||
* @param iostorinv_id 主表id
|
||||
*/
|
||||
private void boxCheck(String iostorinv_id) {
|
||||
// 查此单据下面的所有分配明细木箱
|
||||
List<StIvtIostorinvdis> listDis = iStIvtIostorinvdisService.list(
|
||||
new QueryWrapper<StIvtIostorinvdis>().lambda()
|
||||
.eq(StIvtIostorinvdis::getIostorinv_id, iostorinv_id)
|
||||
);
|
||||
|
||||
List<String> collectBox = listDis.stream()
|
||||
.map(StIvtIostorinvdis::getBox_no)
|
||||
.distinct()
|
||||
.collect(Collectors.toList());
|
||||
|
||||
// 查询木箱信息
|
||||
List<BstIvtBoxinfo> listBoxInfo = iBstIvtBoxinfoService.list(
|
||||
new QueryWrapper<BstIvtBoxinfo>().lambda()
|
||||
.in(BstIvtBoxinfo::getBox_no, collectBox)
|
||||
);
|
||||
|
||||
List<String> collectBoxType = listBoxInfo.stream()
|
||||
.map(BstIvtBoxinfo::getMaterial_code)
|
||||
.distinct()
|
||||
.collect(Collectors.toList());
|
||||
|
||||
// 查询木箱类型信息
|
||||
List<MdpbBoxtype> listBoxType = iMdpbBoxtypeService.list(
|
||||
new QueryWrapper<MdpbBoxtype>().lambda()
|
||||
.in(MdpbBoxtype::getBox_type, collectBoxType)
|
||||
);
|
||||
|
||||
// 校验是否都维护了数据
|
||||
List<MdpbBoxtype> boxTypeList = listBoxType.stream()
|
||||
.filter(row -> ObjectUtil.isEmpty(row.getLash_num()) ||
|
||||
ObjectUtil.isEmpty(row.getLash_num_one()) ||
|
||||
ObjectUtil.isEmpty(row.getLash_num_tow()) ||
|
||||
ObjectUtil.isEmpty(row.getNeed_lash_one()) ||
|
||||
ObjectUtil.isEmpty(row.getNeed_lash_two()) ||
|
||||
ObjectUtil.isEmpty(row.getExpend_width())
|
||||
)
|
||||
.collect(Collectors.toList());
|
||||
|
||||
if (ObjectUtil.isNotEmpty(boxTypeList)) {
|
||||
String message = boxTypeList.stream()
|
||||
.map(MdpbBoxtype::getBox_type)
|
||||
.collect(Collectors.joining("','"));
|
||||
|
||||
throw new BadRequestException("请先维护规格类型为【"+message+"】的木箱规格类型信息!");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -207,6 +207,7 @@ public class OutBoxManageServiceImpl implements OutBoxManageService {
|
||||
taskParam.put("start_device_code", jsonAttrNow.getString("struct_code"));
|
||||
taskParam.put("next_device_code", IOSEnum.OUT_POINT.code(jsonAttrNow.getString("row_num")));
|
||||
taskParam.put("task_type", "010712");
|
||||
taskParam.put("car_no", "此货位LMS系统未有库存,请待出至【CK2001】点位后确认实物并重新手工入回库!");
|
||||
taskParam.put("vehicle_code",IOSEnum.IS_NOTANDYES.code("否"));
|
||||
|
||||
TwoExcepionalMoveTask taskBean = new TwoExcepionalMoveTask();
|
||||
|
||||
@@ -191,6 +191,7 @@ public class OutVehicleManageServiceImpl implements OutVehicleManageService {
|
||||
taskParam.put("start_device_code", jsonAttrNow.getString("struct_code"));
|
||||
taskParam.put("next_device_code", IOSEnum.OUT_POINT.code(jsonAttrNow.getString("row_num")));
|
||||
taskParam.put("task_type", "010712");
|
||||
taskParam.put("car_no", "此货位LMS系统未有库存,请待出至【CK2001】点位后确认实物并重新手工入回库!");
|
||||
taskParam.put("vehicle_code",IOSEnum.IS_NOTANDYES.code("否"));
|
||||
|
||||
TwoExcepionalMoveTask taskBean = new TwoExcepionalMoveTask();
|
||||
|
||||
@@ -215,7 +215,7 @@ public class InAndOutRetrunServiceImpl implements InAndOutReturnService {
|
||||
details.add(jsonParamDtl);
|
||||
}
|
||||
param.put("Details", details);
|
||||
new LmsToMesServiceImpl().lmsPackage(param);
|
||||
SpringContextHolder.getBean(LmsToMesServiceImpl.class).lmsPackage(param);
|
||||
}
|
||||
jo_mst.put("upload_mes", "1");
|
||||
jo_mst.put("is_upload", "1");
|
||||
@@ -241,7 +241,7 @@ public class InAndOutRetrunServiceImpl implements InAndOutReturnService {
|
||||
details.add(jsonParamDtl);
|
||||
}
|
||||
param.put("Details", details);
|
||||
new LmsToMesServiceImpl().lmsUnPackage(param);
|
||||
SpringContextHolder.getBean(LmsToMesServiceImpl.class).lmsUnPackage(param);
|
||||
}
|
||||
jo_mst.put("upload_mes", "1");
|
||||
jo_mst.put("is_upload", "1");
|
||||
@@ -275,7 +275,7 @@ public class InAndOutRetrunServiceImpl implements InAndOutReturnService {
|
||||
details.add(jsonParamDtl);
|
||||
}
|
||||
param.put("Details", details);
|
||||
new LmsToMesServiceImpl().lmsUnPackage(param);
|
||||
SpringContextHolder.getBean(LmsToMesServiceImpl.class).lmsUnPackage(param);
|
||||
}
|
||||
jo_mst.put("upload_mes", "1");
|
||||
jo_mst.put("is_upload", "1");
|
||||
@@ -311,7 +311,7 @@ public class InAndOutRetrunServiceImpl implements InAndOutReturnService {
|
||||
paramMesMst.put("item", paramArr);
|
||||
|
||||
// 调用接口回传
|
||||
new LmsToMesServiceImpl().childRollFGOutboundComplete(paramMesMst);
|
||||
SpringContextHolder.getBean(LmsToMesServiceImpl.class).childRollFGOutboundComplete(paramMesMst);
|
||||
|
||||
jo_mst.put("upload_mes", "1");
|
||||
if ("1".equals(jo_mst.getString("upload_sap"))) {
|
||||
@@ -349,7 +349,7 @@ public class InAndOutRetrunServiceImpl implements InAndOutReturnService {
|
||||
paramMesMst.put("item", paramArr);
|
||||
|
||||
// 调用接口回传
|
||||
new LmsToMesServiceImpl().childRollFGOutboundComplete(paramMesMst);
|
||||
SpringContextHolder.getBean(LmsToMesServiceImpl.class).childRollFGOutboundComplete(paramMesMst);
|
||||
|
||||
jo_mst.put("upload_mes", "1");
|
||||
jo_mst.put("is_upload", "1");
|
||||
@@ -388,7 +388,7 @@ public class InAndOutRetrunServiceImpl implements InAndOutReturnService {
|
||||
details.add(jsonParamDtl);
|
||||
}
|
||||
param.put("Details", details);
|
||||
new LmsToMesServiceImpl().lmsUnPackage(param);
|
||||
SpringContextHolder.getBean(LmsToMesServiceImpl.class).lmsUnPackage(param);
|
||||
}
|
||||
jo_mst.put("upload_mes", "1");
|
||||
jo_mst.put("is_upload", "1");
|
||||
@@ -444,7 +444,7 @@ public class InAndOutRetrunServiceImpl implements InAndOutReturnService {
|
||||
|
||||
// 仓库编码
|
||||
param.put("WareHouse", jsonStor.getString("ext_id"));
|
||||
new LmsToMesServiceImpl().ChildScrapUpdate(param);
|
||||
SpringContextHolder.getBean(LmsToMesServiceImpl.class).ChildScrapUpdate(param);
|
||||
|
||||
// 更新分配回传成功
|
||||
JSONObject jsonUpdate = new JSONObject();
|
||||
@@ -572,7 +572,7 @@ public class InAndOutRetrunServiceImpl implements InAndOutReturnService {
|
||||
param.put("HEAD", paramSapMstArr);
|
||||
|
||||
// 调用接口回传
|
||||
new LmsToSapServiceImpl().returnDelivery(param);
|
||||
SpringContextHolder.getBean(LmsToSapServiceImpl.class).returnDelivery(param);
|
||||
|
||||
jo_mst.put("upload_sap", "1");
|
||||
jo_mst.put("is_upload", "1");
|
||||
@@ -646,7 +646,7 @@ public class InAndOutRetrunServiceImpl implements InAndOutReturnService {
|
||||
if (ObjectUtil.isNotEmpty(vbeln)) {
|
||||
try {
|
||||
// 调用接口回传
|
||||
new LmsToSapServiceImpl().returnDelivery(param);
|
||||
SpringContextHolder.getBean(LmsToSapServiceImpl.class).returnDelivery(param);
|
||||
} catch (Exception e) {
|
||||
throw new BadRequestException("回传sap失败:" + e.getMessage());
|
||||
}
|
||||
@@ -720,7 +720,7 @@ public class InAndOutRetrunServiceImpl implements InAndOutReturnService {
|
||||
param.put("HEAD", paramSapMstArr);
|
||||
|
||||
// 调用接口回传
|
||||
new LmsToSapServiceImpl().returnDelivery(param);
|
||||
SpringContextHolder.getBean(LmsToSapServiceImpl.class).returnDelivery(param);
|
||||
|
||||
jo_mst.put("upload_sap", "1");
|
||||
if ("1".equals(jo_mst.getString("upload_mes")) || "0".equals(is_productstore)) {
|
||||
@@ -777,7 +777,7 @@ public class InAndOutRetrunServiceImpl implements InAndOutReturnService {
|
||||
param.put("ZZCX", out_mst.getString("car_type"));
|
||||
|
||||
// 调用接口回传
|
||||
new LmsToSapServiceImpl().returnOutDtl(param);
|
||||
SpringContextHolder.getBean(LmsToSapServiceImpl.class).returnOutDtl(param);
|
||||
|
||||
jo_mst.put("upload_sap", "1");
|
||||
jo_mst.put("is_upload", "1");
|
||||
@@ -912,7 +912,7 @@ public class InAndOutRetrunServiceImpl implements InAndOutReturnService {
|
||||
if (ObjectUtil.isNotEmpty(vbeln)) {
|
||||
try {
|
||||
// 调用接口回传
|
||||
new LmsToSapServiceImpl().returnDelivery(param);
|
||||
SpringContextHolder.getBean(LmsToSapServiceImpl.class).returnDelivery(param);
|
||||
} catch (Exception e) {
|
||||
throw new BadRequestException("回传sap失败:" + e.getMessage());
|
||||
}
|
||||
@@ -1092,7 +1092,8 @@ public class InAndOutRetrunServiceImpl implements InAndOutReturnService {
|
||||
JSONObject param = new JSONObject();
|
||||
param.put("HEAD", paramSapMstArr);
|
||||
// 调用接口回传
|
||||
new LmsToSapServiceImpl().returnDelivery(param);
|
||||
LmsToSapServiceImpl bean = SpringContextHolder.getBean(LmsToSapServiceImpl.class);
|
||||
bean.returnDelivery(param);
|
||||
|
||||
jo_mst.put("upload_sap", "1");
|
||||
jo_mst.put("is_upload", "1");
|
||||
@@ -1146,7 +1147,8 @@ public class InAndOutRetrunServiceImpl implements InAndOutReturnService {
|
||||
param.put("ZZCX", out_mst.getString("car_type"));
|
||||
|
||||
// 调用接口回传
|
||||
new LmsToSapServiceImpl().returnOutDtl(param);
|
||||
LmsToSapServiceImpl bean = SpringContextHolder.getBean(LmsToSapServiceImpl.class);
|
||||
bean.returnOutDtl(param);
|
||||
|
||||
jo_mst.put("upload_sap", "1");
|
||||
jo_mst.put("is_upload", "1");
|
||||
@@ -1172,7 +1174,8 @@ public class InAndOutRetrunServiceImpl implements InAndOutReturnService {
|
||||
details.add(jsonParamDtl);
|
||||
}
|
||||
param.put("Details", details);
|
||||
new LmsToMesServiceImpl().lmsPackage(param);
|
||||
LmsToMesServiceImpl bean = SpringContextHolder.getBean(LmsToMesServiceImpl.class);
|
||||
bean.lmsPackage(param);
|
||||
}
|
||||
jo_mst.put("upload_mes", "1");
|
||||
jo_mst.put("is_upload", "1");
|
||||
@@ -1245,7 +1248,8 @@ public class InAndOutRetrunServiceImpl implements InAndOutReturnService {
|
||||
if (ObjectUtil.isNotEmpty(vbeln)) {
|
||||
try {
|
||||
// 调用接口回传
|
||||
new LmsToSapServiceImpl().returnDelivery(param);
|
||||
LmsToSapServiceImpl bean = SpringContextHolder.getBean(LmsToSapServiceImpl.class);
|
||||
bean.returnDelivery(param);
|
||||
} catch (Exception e) {
|
||||
throw new BadRequestException("回传sap失败:" + e.getMessage());
|
||||
}
|
||||
@@ -1270,7 +1274,8 @@ public class InAndOutRetrunServiceImpl implements InAndOutReturnService {
|
||||
details.add(jsonParamDtl);
|
||||
}
|
||||
param.put("Details", details);
|
||||
new LmsToMesServiceImpl().lmsUnPackage(param);
|
||||
LmsToMesServiceImpl bean = SpringContextHolder.getBean(LmsToMesServiceImpl.class);
|
||||
bean.lmsUnPackage(param);
|
||||
}
|
||||
jo_mst.put("upload_mes", "1");
|
||||
jo_mst.put("is_upload", "1");
|
||||
@@ -1346,7 +1351,8 @@ public class InAndOutRetrunServiceImpl implements InAndOutReturnService {
|
||||
param.put("HEAD", paramSapMstArr);
|
||||
|
||||
// 调用接口回传
|
||||
new LmsToSapServiceImpl().returnDelivery(param);
|
||||
LmsToSapServiceImpl bean = SpringContextHolder.getBean(LmsToSapServiceImpl.class);
|
||||
bean.returnDelivery(param);
|
||||
|
||||
jo_mst.put("upload_sap", "1");
|
||||
WQLObject.getWQLObject("ST_IVT_IOStorInv").update(jo_mst);
|
||||
@@ -1377,7 +1383,7 @@ public class InAndOutRetrunServiceImpl implements InAndOutReturnService {
|
||||
paramMesMst.put("item", paramArr);
|
||||
|
||||
// 调用接口回传
|
||||
new LmsToMesServiceImpl().childRollFGOutboundComplete(paramMesMst);
|
||||
SpringContextHolder.getBean(LmsToMesServiceImpl.class).childRollFGOutboundComplete(paramMesMst);
|
||||
|
||||
jo_mst.put("upload_mes", "1");
|
||||
// }
|
||||
@@ -1467,7 +1473,7 @@ public class InAndOutRetrunServiceImpl implements InAndOutReturnService {
|
||||
paramMesMst.put("item", paramArr);
|
||||
|
||||
// 调用接口回传
|
||||
new LmsToMesServiceImpl().childRollFGOutboundComplete(paramMesMst);
|
||||
SpringContextHolder.getBean(LmsToMesServiceImpl.class).childRollFGOutboundComplete(paramMesMst);
|
||||
|
||||
jo_mst.put("upload_mes", "1");
|
||||
jo_mst.put("is_upload", "1");
|
||||
@@ -1505,7 +1511,7 @@ public class InAndOutRetrunServiceImpl implements InAndOutReturnService {
|
||||
details.add(jsonParamDtl);
|
||||
}
|
||||
param.put("Details", details);
|
||||
new LmsToMesServiceImpl().lmsUnPackage(param);
|
||||
SpringContextHolder.getBean(LmsToMesServiceImpl.class).lmsUnPackage(param);
|
||||
}
|
||||
jo_mst.put("upload_mes", "1");
|
||||
jo_mst.put("is_upload", "1");
|
||||
@@ -1539,7 +1545,7 @@ public class InAndOutRetrunServiceImpl implements InAndOutReturnService {
|
||||
details.add(jsonParamDtl);
|
||||
}
|
||||
param.put("Details", details);
|
||||
new LmsToMesServiceImpl().lmsUnPackage(param);
|
||||
SpringContextHolder.getBean(LmsToMesServiceImpl.class).lmsUnPackage(param);
|
||||
}
|
||||
jo_mst.put("upload_mes", "1");
|
||||
jo_mst.put("is_upload", "1");
|
||||
@@ -1612,7 +1618,7 @@ public class InAndOutRetrunServiceImpl implements InAndOutReturnService {
|
||||
if (ObjectUtil.isNotEmpty(vbeln)) {
|
||||
try {
|
||||
// 调用接口回传
|
||||
new LmsToSapServiceImpl().returnDelivery(param);
|
||||
SpringContextHolder.getBean(LmsToSapServiceImpl.class).returnDelivery(param);
|
||||
} catch (Exception e) {
|
||||
throw new BadRequestException("回传sap失败:" + e.getMessage());
|
||||
}
|
||||
@@ -1667,7 +1673,7 @@ public class InAndOutRetrunServiceImpl implements InAndOutReturnService {
|
||||
|
||||
// 仓库编码
|
||||
param.put("WareHouse", jsonStor.getString("ext_id"));
|
||||
new LmsToMesServiceImpl().ChildScrapUpdate(param);
|
||||
SpringContextHolder.getBean(LmsToMesServiceImpl.class).ChildScrapUpdate(param);
|
||||
|
||||
// 更新分配回传成功
|
||||
JSONObject jsonUpdate = new JSONObject();
|
||||
|
||||
Reference in New Issue
Block a user