rev: 成品入库分配修改
This commit is contained in:
@@ -72,10 +72,10 @@ public class SectattrController {
|
|||||||
return new ResponseEntity<>(HttpStatus.OK);
|
return new ResponseEntity<>(HttpStatus.OK);
|
||||||
}
|
}
|
||||||
|
|
||||||
@GetMapping("/getSect")
|
@PostMapping("/getSect")
|
||||||
@Log("查询库区下拉框")
|
@Log("查询库区下拉框")
|
||||||
@ApiOperation("查询库区下拉框")
|
@ApiOperation("查询库区下拉框")
|
||||||
public ResponseEntity<Object> querySect(@RequestParam JSONObject query) {
|
public ResponseEntity<Object> querySect(@RequestBody JSONObject query) {
|
||||||
List<Map> list = isectattrService.getSect(query);
|
List<Map> list = isectattrService.getSect(query);
|
||||||
return new ResponseEntity<>(TableDataInfo.build(list), HttpStatus.OK);
|
return new ResponseEntity<>(TableDataInfo.build(list), HttpStatus.OK);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -7,9 +7,9 @@
|
|||||||
st_ivt_sectattr.sect_name,
|
st_ivt_sectattr.sect_name,
|
||||||
st_ivt_sectattr.sect_id,
|
st_ivt_sectattr.sect_id,
|
||||||
st_ivt_sectattr.sect_code,
|
st_ivt_sectattr.sect_code,
|
||||||
st_ivt_bsrealstorattr.stor_name,
|
stor.stor_name,
|
||||||
st_ivt_bsrealstorattr.stor_id,
|
stor.stor_id,
|
||||||
st_ivt_bsrealstorattr.stor_code
|
stor.stor_code
|
||||||
FROM
|
FROM
|
||||||
st_ivt_sectattr
|
st_ivt_sectattr
|
||||||
LEFT JOIN st_ivt_bsrealstorattr stor ON st_ivt_sectattr.stor_id = stor.stor_id
|
LEFT JOIN st_ivt_bsrealstorattr stor ON st_ivt_sectattr.stor_id = stor.stor_id
|
||||||
|
|||||||
@@ -321,6 +321,7 @@ public class StIvtIostorinvCpServiceImpl extends ServiceImpl<StIvtIostorinvCpMap
|
|||||||
6.更新库存、日物流表等、
|
6.更新库存、日物流表等、
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
String struct_id = whereJson.getString("struct_id");
|
String struct_id = whereJson.getString("struct_id");
|
||||||
StIvtStructattr attrDao = new StIvtStructattr();
|
StIvtStructattr attrDao = new StIvtStructattr();
|
||||||
|
|
||||||
@@ -335,10 +336,7 @@ public class StIvtIostorinvCpServiceImpl extends ServiceImpl<StIvtIostorinvCpMap
|
|||||||
/* 手动分配 */
|
/* 手动分配 */
|
||||||
|
|
||||||
// 查出对应仓位
|
// 查出对应仓位
|
||||||
attrDao = iStIvtStructattrService.getOne(
|
attrDao = iStIvtStructattrService.getById(struct_id);
|
||||||
new QueryWrapper<StIvtStructattr>().lambda()
|
|
||||||
.eq(StIvtStructattr::getStruct_id,struct_id)
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (ObjectUtil.isEmpty(attrDao.getStruct_code())) throw new BadRequestException("未找到仓位!");
|
if (ObjectUtil.isEmpty(attrDao.getStruct_code())) throw new BadRequestException("未找到仓位!");
|
||||||
@@ -346,7 +344,18 @@ public class StIvtIostorinvCpServiceImpl extends ServiceImpl<StIvtIostorinvCpMap
|
|||||||
// 2.更新分配明细、分配、明细、主表
|
// 2.更新分配明细、分配、明细、主表
|
||||||
updateDivIos(attrDao,whereJson);
|
updateDivIos(attrDao,whereJson);
|
||||||
|
|
||||||
// TODO 更新点位
|
// 3.更新仓位状态 - 锁定
|
||||||
|
StIvtIostorinvCp mstDao = this.getById(whereJson.getString("iostorinv_id"));
|
||||||
|
|
||||||
|
attrDao.setLock_type("01"); // TODO 暂时写死
|
||||||
|
attrDao.setUpdate_id(SecurityUtils.getCurrentUserId());
|
||||||
|
attrDao.setUpdate_name(SecurityUtils.getCurrentNickName());
|
||||||
|
attrDao.setUpdate_time(new Date());
|
||||||
|
attrDao.setInv_type(IOSEnum.IO_TYPE.code("入库"));
|
||||||
|
attrDao.setInv_id(mstDao.getIostorinv_id());
|
||||||
|
attrDao.setInv_code(mstDao.getBill_code());
|
||||||
|
iStIvtStructattrService.updateById(attrDao);
|
||||||
|
|
||||||
// TODO 更新库存、物流等
|
// TODO 更新库存、物流等
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
56
mes/hd/nladmin-system/src/test/java/Test3.java
Normal file
56
mes/hd/nladmin-system/src/test/java/Test3.java
Normal file
@@ -0,0 +1,56 @@
|
|||||||
|
import com.alibaba.fastjson.JSONArray;
|
||||||
|
import com.alibaba.fastjson.JSONObject;
|
||||||
|
|
||||||
|
import java.util.*;
|
||||||
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
|
public class Test3 {
|
||||||
|
public static void main(String[] args) {
|
||||||
|
JSONArray array = new JSONArray();
|
||||||
|
|
||||||
|
JSONObject jsonObject1 = new JSONObject();
|
||||||
|
jsonObject1.put("name", "小三");
|
||||||
|
jsonObject1.put("age", "12");
|
||||||
|
array.add(jsonObject1);
|
||||||
|
|
||||||
|
JSONObject jsonObject2 = new JSONObject();
|
||||||
|
jsonObject2.put("name", "小二");
|
||||||
|
jsonObject2.put("age", "17");
|
||||||
|
array.add(jsonObject2);
|
||||||
|
|
||||||
|
JSONObject jsonObject3 = new JSONObject();
|
||||||
|
jsonObject3.put("name", "小二");
|
||||||
|
jsonObject3.put("age", "17");
|
||||||
|
array.add(jsonObject3);
|
||||||
|
|
||||||
|
Set<JSONObject> name = array.stream().map(row -> ((JSONObject) row)).collect(Collectors.toSet());
|
||||||
|
HashMap<String, JSONObject> name1 = array.stream().collect(HashMap::new, (k, v) -> k.put(((JSONObject) v).getString("name"), (JSONObject) v), HashMap::putAll);
|
||||||
|
HashSet<JSONObject> collect = array.stream().collect(HashSet::new, (k, v) -> k.add((JSONObject) v), HashSet::addAll);
|
||||||
|
collect.stream().forEach(json -> a(json.getString("name")));
|
||||||
|
|
||||||
|
List<Map> maps = new ArrayList<>();
|
||||||
|
|
||||||
|
HashMap<String, String> map = new HashMap<>();
|
||||||
|
map.put("storagevehicle_code","1");
|
||||||
|
map.put("storagevehicle_name","sadfs");
|
||||||
|
maps.add(map);
|
||||||
|
HashMap<String, String> map2 = new HashMap<>();
|
||||||
|
map2.put("storagevehicle_code","2");
|
||||||
|
map2.put("storagevehicle_name","sdfd");
|
||||||
|
maps.add(map2);
|
||||||
|
|
||||||
|
boolean age = array.stream().filter(row -> ((JSONObject) row).getString("age").equals("18")).findAny().isPresent();
|
||||||
|
System.out.println(age);
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
public static void a(String name) {
|
||||||
|
}
|
||||||
|
|
||||||
|
public static void b(String name) {
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
@@ -24,11 +24,11 @@ export function edit(data) {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
export function getSect(params) {
|
export function getSect(data) {
|
||||||
return request({
|
return request({
|
||||||
url: 'api/sectattr/getSect',
|
url: 'api/sectattr/getSect',
|
||||||
method: 'get',
|
method: 'post',
|
||||||
params
|
data
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -2,7 +2,7 @@ import request from '@/utils/request'
|
|||||||
|
|
||||||
export function add(data) {
|
export function add(data) {
|
||||||
return request({
|
return request({
|
||||||
url: '/api/stIvtBsrealstorattr',
|
url: '/api/Storattr',
|
||||||
method: 'post',
|
method: 'post',
|
||||||
data
|
data
|
||||||
})
|
})
|
||||||
@@ -10,7 +10,7 @@ export function add(data) {
|
|||||||
|
|
||||||
export function del(ids) {
|
export function del(ids) {
|
||||||
return request({
|
return request({
|
||||||
url: '/api/stIvtBsrealstorattr',
|
url: '/api/Storattr',
|
||||||
method: 'delete',
|
method: 'delete',
|
||||||
data: ids
|
data: ids
|
||||||
})
|
})
|
||||||
@@ -18,7 +18,7 @@ export function del(ids) {
|
|||||||
|
|
||||||
export function edit(data) {
|
export function edit(data) {
|
||||||
return request({
|
return request({
|
||||||
url: '/api/stIvtBsrealstorattr',
|
url: '/api/Storattr',
|
||||||
method: 'put',
|
method: 'put',
|
||||||
data
|
data
|
||||||
})
|
})
|
||||||
@@ -26,7 +26,7 @@ export function edit(data) {
|
|||||||
|
|
||||||
export function getStor(params) {
|
export function getStor(params) {
|
||||||
return request({
|
return request({
|
||||||
url: '/api/stIvtBsrealstorattr/getStor',
|
url: '/api/Storattr/getStor',
|
||||||
method: 'get',
|
method: 'get',
|
||||||
params
|
params
|
||||||
})
|
})
|
||||||
@@ -34,7 +34,7 @@ export function getStor(params) {
|
|||||||
|
|
||||||
export function changeActive(data) {
|
export function changeActive(data) {
|
||||||
return request({
|
return request({
|
||||||
url: '/api/stIvtBsrealstorattr/changeActive',
|
url: '/api/Storattr/changeActive',
|
||||||
method: 'put',
|
method: 'put',
|
||||||
data
|
data
|
||||||
})
|
})
|
||||||
@@ -42,7 +42,7 @@ export function changeActive(data) {
|
|||||||
|
|
||||||
export function queryStor(data) {
|
export function queryStor(data) {
|
||||||
return request({
|
return request({
|
||||||
url: '/api/stIvtBsrealstorattr/queryStor',
|
url: '/api/Storattr/queryStor',
|
||||||
method: 'post',
|
method: 'post',
|
||||||
data
|
data
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -223,6 +223,7 @@ import StructDiv from '@/views/wms/pub/StructDialog'
|
|||||||
import crudProductIn from '@/views/wms/storage_manage/product/productIn/productin'
|
import crudProductIn from '@/views/wms/storage_manage/product/productIn/productin'
|
||||||
import crudPoint from '@/api/wms/sch/point'
|
import crudPoint from '@/api/wms/sch/point'
|
||||||
import AddBox from '@/views/wms/storage_manage/product/productIn/AddBox'
|
import AddBox from '@/views/wms/storage_manage/product/productIn/AddBox'
|
||||||
|
import crudSectattr from '@/api/wms/basedata/st/sectattr'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'DivDialog',
|
name: 'DivDialog',
|
||||||
@@ -285,7 +286,7 @@ export default {
|
|||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
open() {
|
open() {
|
||||||
crudProductIn.getSect({ 'stor_id': this.storId }).then(res => {
|
crudSectattr.getSect({ 'stor_id': this.storId }).then(res => {
|
||||||
this.sects = res.content
|
this.sects = res.content
|
||||||
})
|
})
|
||||||
const area_type = 'A1_RK01'
|
const area_type = 'A1_RK01'
|
||||||
|
|||||||
Reference in New Issue
Block a user