油漆线并发问题

This commit is contained in:
qinx
2023-02-25 15:07:53 +08:00
parent a0f39f30c2
commit 2593d16b7b

View File

@@ -158,7 +158,8 @@ public class YqxSendMaterialTask extends AbstractAcsTask {
String vehicleType = workOrderObj.getString("vehicle_type");
if (ObjectUtil.isEmpty(vehicleType)) throw new BadRequestException("载具类型不能为空");
JSONObject jsonObject = pointTab.query("region_code = 'YQQY01' and point_type = '4' and can_vehicle_type = '" + vehicleType + "'").uniqueResult(0);
//JSONObject jsonObject = pointTab.query("region_code = 'YQQY01' and point_type = '4' and can_vehicle_type = '" + vehicleType + "'").uniqueResult(0);
JSONObject jsonObject = pointTab.query("region_code = 'YQQY01' and point_type = '4' and can_vehicle_type = '" + vehicleType + "' FOR UPDATE").uniqueResult(0);
if (ObjectUtil.isEmpty(jsonObject)) throw new BadRequestException("找不到油漆线物料下料起点");
String startPointCode = jsonObject.getString("point_code");
//判断当前点是否有未完成的任务