rev:软废等级处理
This commit is contained in:
@@ -643,6 +643,18 @@ public class HandNewMaterialServiceImpl implements HandNewMaterialService {
|
||||
total_qty = total_qty + bucket_now.getDoubleValue("storage_qty");
|
||||
}
|
||||
|
||||
// 判断等级是否一致
|
||||
JSONArray jsonDtlArr = io_dtl.query("iostorinv_id = '" + iostorinv_id + "'").getResultJSONArray(0);
|
||||
String ivt_level = jsonDtlArr.getJSONObject(0).getString("ivt_level");
|
||||
|
||||
boolean is_level = jsonDtlArr.stream()
|
||||
.map(row -> (JSONObject) row)
|
||||
.allMatch(row -> row.getString("ivt_level").equals(ivt_level));
|
||||
|
||||
if (!is_level) {
|
||||
throw new PdaRequestException("库存等级不一致,请检查!");
|
||||
}
|
||||
|
||||
HashMap<String, String> mst_map = new HashMap<>();
|
||||
mst_map.put("total_qty", total_qty + "");
|
||||
mst_map.put("detail_count", detail_count + "");
|
||||
|
||||
@@ -83,4 +83,11 @@ public class PdaBucketController {
|
||||
public ResponseEntity<Object> delete(@RequestBody Map<String, String> whereJson) {
|
||||
return new ResponseEntity<>(bucketService.delete(whereJson), HttpStatus.OK);
|
||||
}
|
||||
|
||||
@PostMapping("/getLevel")
|
||||
@Log("获取等级下拉框")
|
||||
@ApiOperation("获取等级下拉框")
|
||||
public ResponseEntity<Object> delete() {
|
||||
return new ResponseEntity<>(bucketService.getLevel(), HttpStatus.OK);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -53,4 +53,9 @@ public interface PdaBucketService {
|
||||
*/
|
||||
Map<String, Object> delete(Map<String, String> jsonObject);
|
||||
|
||||
/**
|
||||
* 获取等级下拉框
|
||||
* @return /
|
||||
*/
|
||||
JSONObject getLevel();
|
||||
}
|
||||
|
||||
@@ -149,6 +149,7 @@ public class PdaBucketServiceImpl implements PdaBucketService {
|
||||
UserDto userDto = userService.findById(currentUserId);
|
||||
String input_optname = mst.getString("user");
|
||||
String pcsn = mst.getString("pcsn");
|
||||
String ivt_level = mst.getString("ivt_level");
|
||||
|
||||
if (StrUtil.isEmpty(material_id)) {
|
||||
throw new PdaRequestException("物料标识不能为空!");
|
||||
@@ -177,7 +178,7 @@ public class PdaBucketServiceImpl implements PdaBucketService {
|
||||
bucketJo.put("pcsn", pcsn);
|
||||
bucketJo.put("qty_unit_id", materDto.getBase_unit_id());
|
||||
bucketJo.put("qty_unit_name", materDto.getBase_unit_name());
|
||||
bucketJo.put("ivt_level", "01");
|
||||
bucketJo.put("ivt_level", ivt_level);
|
||||
bucketJo.put("quality_scode", "02");
|
||||
bucketJo.put("storage_qty", mst.getString("storage_qty"));
|
||||
bucketJo.put("is_active", is_active);
|
||||
@@ -199,7 +200,7 @@ public class PdaBucketServiceImpl implements PdaBucketService {
|
||||
bucketJo.put("pcsn", pcsn);
|
||||
bucketJo.put("qty_unit_id", materDto.getBase_unit_id());
|
||||
bucketJo.put("qty_unit_name",materDto.getBase_unit_name());
|
||||
bucketJo.put("ivt_level", "01");
|
||||
bucketJo.put("ivt_level", ivt_level);
|
||||
bucketJo.put("quality_scode", "02");
|
||||
bucketJo.put("storage_qty", mst.getString("storage_qty"));
|
||||
bucketJo.put("is_active", is_active);
|
||||
@@ -245,7 +246,7 @@ public class PdaBucketServiceImpl implements PdaBucketService {
|
||||
changeObj.put("bucket_code", bucketunique);
|
||||
changeObj.put("material_id", material_id);
|
||||
changeObj.put("pcsn", pcsn);
|
||||
changeObj.put("ivt_level", "01");
|
||||
changeObj.put("ivt_level", ivt_level);
|
||||
changeObj.put("is_active", is_active);
|
||||
changeObj.put("quality_scode", "02");
|
||||
String change_type_scode = "";
|
||||
@@ -370,5 +371,17 @@ public class PdaBucketServiceImpl implements PdaBucketService {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public JSONObject getLevel() {
|
||||
|
||||
JSONArray resultJSONArray = WQL.getWO("QPADSTSETSERVICE").addParam("flag", "17").process().getResultJSONArray(0);
|
||||
|
||||
JSONObject returnjo = new JSONObject();
|
||||
returnjo.put("code", "1");
|
||||
returnjo.put("desc", "查询成功!");
|
||||
returnjo.put("result", resultJSONArray);
|
||||
return returnjo;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -495,3 +495,15 @@
|
||||
ENDSELECT
|
||||
ENDQUERY
|
||||
ENDIF
|
||||
|
||||
IF 输入.flag = "17"
|
||||
QUERY
|
||||
SELECT
|
||||
*
|
||||
FROM
|
||||
sys_dict_detail
|
||||
WHERE
|
||||
name = 'ST_IVT_LEVEL'
|
||||
ENDSELECT
|
||||
ENDQUERY
|
||||
ENDIF
|
||||
|
||||
Reference in New Issue
Block a user