rev:异常口入库

This commit is contained in:
2024-07-27 13:29:29 +08:00
parent ead1f87a7d
commit ea62fbeb6a

View File

@@ -179,7 +179,10 @@ public class VehicleTwoServiceImpl implements VehicleTwoService {
}
@Override
@Transactional(rollbackFor = Exception.class)
public JSONObject reback(JSONObject whereJson) {
WQLObject extTab = WQLObject.getWQLObject("md_pb_storagevehicleext");
String bill_type = whereJson.getString("bill_type");
whereJson.put("material_barcode", whereJson.getString("box_no"));
whereJson.put("device_code", whereJson.getString("point_code"));
@@ -217,6 +220,8 @@ public class VehicleTwoServiceImpl implements VehicleTwoService {
);
if (boxDao != null) {
whereJson.put("vehicleType", boxDao.getVehicle_type());
boxDao.setIs_packing("1");
iBstIvtBoxinfoService.updateById(boxDao);
} else {
//查询mes木箱信息插入木箱信息表
try {
@@ -230,8 +235,18 @@ public class VehicleTwoServiceImpl implements VehicleTwoService {
new QueryWrapper<BstIvtBoxinfo>().lambda()
.eq(BstIvtBoxinfo::getBox_no, boxNo)
);
boxDao1.setIs_packing("1");
iBstIvtBoxinfoService.updateById(boxDao1);
whereJson.put("vehicleType", boxDao1.getVehicle_type());
}
// 更新载具对应木箱信息
JSONObject jsonExt = extTab.query("storagevehicle_code = '" + whereJson.getString("vehicle_code") + "'").uniqueResult(0);
if (ObjectUtil.isEmpty(jsonExt)) {
throw new BadRequestException("载具不存在!"+whereJson.getString("vehicle_code"));
}
jsonExt.put("pcsn", whereJson.getString("box_no"));
extTab.update(jsonExt);
inBussManageService.inTask(whereJson);
JSONObject result = new JSONObject();
result.put("message", "入库成功!");