代码更新

This commit is contained in:
2022-11-16 15:42:51 +08:00
parent d981946584
commit 27553ac074
3 changed files with 60 additions and 2 deletions

View File

@@ -43,4 +43,5 @@ public interface StorPublicService {
* }
*/
void updateStructAndPoint(JSONObject from);
void updateStructAndPoint2(JSONObject from);
}

View File

@@ -481,4 +481,61 @@ public class StorPublicServiceImpl implements StorPublicService {
wo_Point.update(map,"point_id = '"+jo.getString("point_id")+"'");
}
@Override
public void updateStructAndPoint2(JSONObject from) {
//货位表
WQLObject wo_Struct = WQLObject.getWQLObject("ST_IVT_StructAttr");
//点位表
WQLObject wo_Point = WQLObject.getWQLObject("SCH_BASE_Point");
//载具表
WQLObject wo_Storage = WQLObject.getWQLObject("MD_PB_StorageVehicleInfo");
String struct_id = from.getString("struct_id");
String point_code = from.getString("point_code");
//锁定类型
String lock_type = from.getString("lock_type");
//载具编码
String storagevehicle_code = from.getString("storagevehicle_code");
if (StrUtil.isEmpty(struct_id) && StrUtil.isEmpty(point_code)) {
throw new BadRequestException("点位仓位更新出入参数异常!");
}
if (StrUtil.isEmpty(lock_type)) {
throw new BadRequestException("点位仓位更新出入参数异常!");
}
JSONObject jo = WQL.getWO("ST_PUB_QUERY_01")
.addParam("flag", "3")
.addParam("id", struct_id)
.addParam("point_code", point_code)
.process().uniqueResult(0);
if(jo==null){
throw new BadRequestException("点位仓位更新未查询到符合条件的点位仓位!");
}
HashMap<String,String> map = new HashMap<>();
if(lock_type.equals("1")){//解锁
map.put("lock_type",lock_type);
map.put("task_code","");
map.put("inv_type","");
map.put("inv_id","");
map.put("inv_code","");
map.put("point_status","1");
wo_Struct.update(map,"struct_id = '"+jo.getString("struct_id")+"'");
wo_Point.update(map,"point_id = '"+jo.getString("point_id")+"'");
}else{//锁定
map.put("lock_type",lock_type);
map.put("taskdtl_type",from.getString("task_type"));
map.put("taskdtl_id",from.getString("task_id"));
map.put("task_code",from.getString("task_code"));
map.put("inv_type",from.getString("inv_type"));
map.put("inv_id",from.getString("inv_id"));
map.put("inv_code",from.getString("inv_code"));
if (StrUtil.isNotEmpty(storagevehicle_code)) {
map.put("storagevehicle_code",storagevehicle_code);
map.put("storagevehicle_qty","1");
map.put("vehicle_code",storagevehicle_code);
map.put("point_status","01");
}
}
wo_Struct.update(map,"struct_id = '"+jo.getString("struct_id")+"'");
wo_Point.update(map,"point_id = '"+jo.getString("point_id")+"'");
}
}

View File

@@ -956,13 +956,13 @@ public class CheckOutBillServiceImpl implements CheckOutBillService {
JSONObject from_start = new JSONObject();
from_start.put("struct_id", dis.getString("struct_id"));
from_start.put("lock_type", "1");
storPublicService.updateStructAndPoint(from_start);
storPublicService.updateStructAndPoint2(from_start);
//解锁终点仓位点位
if (StrUtil.isNotEmpty(dis.getString("point_code"))) {
JSONObject from_end = new JSONObject();
from_end.put("point_code", dis.getString("point_code"));
from_end.put("lock_type", "1");
storPublicService.updateStructAndPoint(from_end);
storPublicService.updateStructAndPoint2(from_end);
}
} else {//仓位载具扔有冻结数,需改任务类型为拣选出库
//任务号不为空