fix: 修复工单前端物料对话框不请空,修复与前端接口字段一致,修复反馈前端信息
This commit is contained in:
@@ -183,17 +183,14 @@ public class ProduceWorkorderServiceImpl implements ProduceWorkorderService {
|
||||
public void deleteAll(String[] ids) {
|
||||
String currentUserId = SecurityUtils.getCurrentUserId();
|
||||
String nickName = SecurityUtils.getCurrentNickName();
|
||||
|
||||
|
||||
WQLObject wo = WQLObject.getWQLObject("pdm_produce_workorder");
|
||||
for (String workorder_id : ids) {
|
||||
JSONObject param = new JSONObject();
|
||||
param.put("workorder_id", String.valueOf(workorder_id));
|
||||
param.put("is_delete", "1");
|
||||
param.put("update_id", currentUserId);
|
||||
param.put("update_name", nickName);
|
||||
param.put("update_time", DateUtil.now());
|
||||
wo.update(param);
|
||||
wo.update(param, "workorder_id = '" + workorder_id + "'");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -194,8 +194,7 @@ public class CacheLineHandController{
|
||||
@ApiOperation("设置满框")
|
||||
public ResponseEntity<Object> setfullBox(@RequestBody JSONObject param) {
|
||||
log.info("海亮缓存线手持服务 [设置满框] 接口被请求, 请求参数-{}", param);
|
||||
cacheLineHandService.setfullBox(param);
|
||||
return new ResponseEntity<>(HttpStatus.OK);
|
||||
return new ResponseEntity<>(cacheLineHandService.setfullBox(param), HttpStatus.OK);
|
||||
}
|
||||
|
||||
@PostMapping("/setEmptyBox")
|
||||
@@ -203,8 +202,7 @@ public class CacheLineHandController{
|
||||
@ApiOperation("设置空框")
|
||||
public ResponseEntity<Object> setEmptyBox(@RequestBody JSONObject param) {
|
||||
log.info("海亮缓存线手持服务 [设置空框] 接口被请求, 请求参数-{}", param);
|
||||
cacheLineHandService.setEmptyBox(param);
|
||||
return new ResponseEntity<>(HttpStatus.OK);
|
||||
return new ResponseEntity<>(cacheLineHandService.setEmptyBox(param), HttpStatus.OK);
|
||||
}
|
||||
|
||||
@PostMapping("/deleteBox")
|
||||
@@ -212,8 +210,7 @@ public class CacheLineHandController{
|
||||
@ApiOperation("删除箱子")
|
||||
public ResponseEntity<Object> deleteBox(@RequestBody JSONObject param) {
|
||||
log.info("海亮缓存线手持服务 [设置空框] 接口被请求, 请求参数-{}", param);
|
||||
cacheLineHandService.deleteBox(param);
|
||||
return new ResponseEntity<>(HttpStatus.OK);
|
||||
return new ResponseEntity<>(cacheLineHandService.deleteBox(param), HttpStatus.OK);
|
||||
}
|
||||
|
||||
@PostMapping("/agvInBoxExceptionQuery")
|
||||
|
||||
@@ -169,7 +169,7 @@ public interface CacheLineHandService{
|
||||
* @author gbx
|
||||
* @date 2023/3/24
|
||||
*/
|
||||
void setfullBox(JSONObject param);
|
||||
JSONObject setfullBox(JSONObject param);
|
||||
|
||||
/**
|
||||
* 设置空框
|
||||
@@ -178,7 +178,7 @@ public interface CacheLineHandService{
|
||||
* @author gbx
|
||||
* @date 2023/3/24
|
||||
*/
|
||||
void setEmptyBox(JSONObject param);
|
||||
JSONObject setEmptyBox(JSONObject param);
|
||||
|
||||
/**
|
||||
* AGV入箱异常-查询
|
||||
@@ -284,5 +284,5 @@ public interface CacheLineHandService{
|
||||
*
|
||||
* @param param
|
||||
*/
|
||||
void deleteBox(JSONObject param);
|
||||
JSONObject deleteBox(JSONObject param);
|
||||
}
|
||||
|
||||
@@ -311,7 +311,7 @@ public class CacheLineHandServiceImpl implements CacheLineHandService{
|
||||
*/
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public void setfullBox(JSONObject param) {
|
||||
public JSONObject setfullBox(JSONObject param) {
|
||||
//物料ID
|
||||
String semimanufactures_uuid = param.getString("material_uuid");
|
||||
// 缓存线位置编码
|
||||
@@ -319,7 +319,7 @@ public class CacheLineHandServiceImpl implements CacheLineHandService{
|
||||
// 料箱码
|
||||
String vehicle_code = param.getString("vehicle_code");
|
||||
//工序
|
||||
String workprocedure_code = param.getString("workprocedure_code");
|
||||
// String workprocedure_code = param.getString("workprocedure_code");
|
||||
// 缓存线
|
||||
String cacheLine_code = param.getString("wcsdevice_code");
|
||||
String weight = param.getString("weight");
|
||||
@@ -339,10 +339,10 @@ public class CacheLineHandServiceImpl implements CacheLineHandService{
|
||||
//物料表
|
||||
WQLObject meTab = WQLObject.getWQLObject("md_me_materialbase");
|
||||
// 查询工序信息
|
||||
JSONObject wpObj = wpTab.query("workprocedure_code = '" + workprocedure_code + "'").uniqueResult(0);
|
||||
if(ObjectUtil.isEmpty(wpObj)) {
|
||||
throw new BadRequestException("工序查询错误,请检查工序");
|
||||
}
|
||||
// JSONObject wpObj = wpTab.query("workprocedure_code = '" + workprocedure_code + "'").uniqueResult(0);
|
||||
// if(ObjectUtil.isEmpty(wpObj)) {
|
||||
// throw new BadRequestException("工序查询错误,请检查工序");
|
||||
// }
|
||||
JSONObject meObj = meTab.query("material_id = '" + semimanufactures_uuid + "'").uniqueResult(0);
|
||||
if(ObjectUtil.isEmpty(meObj)) {
|
||||
throw new BadRequestException("物料查询错误,请检查物料");
|
||||
@@ -365,19 +365,21 @@ public class CacheLineHandServiceImpl implements CacheLineHandService{
|
||||
json.put("material_name", meObj.getString("material_name"));
|
||||
json.put("weight", weight);
|
||||
json.put("quantity", quantity);
|
||||
json.put("workprocedure_code", wpObj.getString("workprocedure_code"));
|
||||
json.put("workprocedure_name", wpObj.getString("workprocedure_name"));
|
||||
// json.put("workprocedure_code", wpObj.getString("workprocedure_code"));
|
||||
// json.put("workprocedure_name", wpObj.getString("workprocedure_name"));
|
||||
//有箱有料
|
||||
json.put("vehicle_status", StatusEnum.CACHE_VEL_FULL.getCode());
|
||||
json.put("create_time", DateUtil.now());
|
||||
//4.重新新建该缓存线位置上的料箱为满箱及所属工序,生产区域等信息
|
||||
ivtTab.insert(json);
|
||||
JSONObject res = new JSONObject();
|
||||
res.put("message", "设置成功");
|
||||
return res;
|
||||
}
|
||||
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public void setEmptyBox(
|
||||
JSONObject param) {
|
||||
public JSONObject setEmptyBox( JSONObject param) {
|
||||
// 缓存线位置编码
|
||||
String position_code = param.getString("position_code");
|
||||
// 载具条码
|
||||
@@ -406,6 +408,9 @@ public class CacheLineHandServiceImpl implements CacheLineHandService{
|
||||
json.put("workprocedure_name", "");
|
||||
json.put("update_time", DateUtil.now());
|
||||
ivtTab.update(json);
|
||||
JSONObject res = new JSONObject();
|
||||
res.put("message", "设置成功");
|
||||
return res;
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -850,23 +855,36 @@ public class CacheLineHandServiceImpl implements CacheLineHandService{
|
||||
AtomicReference<JSONArray> res = new AtomicReference<>(new JSONArray());
|
||||
RedissonUtils.lock(() -> {
|
||||
// 生产区域
|
||||
res.set(WQL.getWO("PDA_QUERY").addParamMap(MapOf.of("flag", "8", "product_area", productArea, "cacheLine_code", pointCode)).process().getResultJSONArray(0));
|
||||
res.set(WQL.getWO("PDA_QUERY")
|
||||
.addParamMap(MapOf.of("flag", "8",
|
||||
"product_area", productArea,
|
||||
"cacheLine_code", pointCode))
|
||||
.process()
|
||||
.getResultJSONArray(0));
|
||||
}, pointCode, 3);
|
||||
return res.get();
|
||||
}
|
||||
|
||||
@Override
|
||||
public JSONArray getProductArea() {
|
||||
JSONArray res = WQL.getWO("PDA_QUERY").addParamMap(MapOf.of("flag", "9")).process().getResultJSONArray(0);
|
||||
JSONArray res = WQL.getWO("PDA_QUERY")
|
||||
.addParamMap(MapOf.of("flag", "9"))
|
||||
.process()
|
||||
.getResultJSONArray(0);
|
||||
return res;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void deleteBox(JSONObject param) {
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public JSONObject deleteBox(JSONObject param) {
|
||||
JSONObject res = new JSONObject();
|
||||
res.put("message", "删除失败");
|
||||
WQLObject cvTab = WQLObject.getWQLObject("SCH_CacheLine_VehileMaterial");
|
||||
String vehicleCode = param.getString("vehicle_code");
|
||||
if(ObjectUtil.isNotEmpty(vehicleCode)) {
|
||||
cvTab.delete("vehicle_code = '" + vehicleCode + "'");
|
||||
res.put("message", "删除成功");
|
||||
}
|
||||
return res;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -188,7 +188,7 @@
|
||||
sch_cacheline_position.positionorder_no as seat_order_num,
|
||||
sch_cacheline_vehilematerial.workprocedure_code,
|
||||
sch_cacheline_vehilematerial.workprocedure_name,
|
||||
sch_cacheline_vehilematerial.material_id,
|
||||
sch_cacheline_vehilematerial.material_id as material_uuid,
|
||||
sch_cacheline_vehilematerial.material_code,
|
||||
sch_cacheline_vehilematerial.material_name,
|
||||
sch_cacheline_vehilematerial.material_spec,
|
||||
|
||||
@@ -461,6 +461,8 @@ const defaultForm = {
|
||||
material_id: null,
|
||||
material_code: null,
|
||||
material_weight: null,
|
||||
material_name: null,
|
||||
material_spec: null,
|
||||
planproducestart_date: null,
|
||||
planproduceend_date: null,
|
||||
realproducestart_date: null,
|
||||
|
||||
Reference in New Issue
Block a user