Compare commits
3 Commits
feature/vo
...
master
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
aba35e4c31 | ||
|
|
b68a029c4b | ||
|
|
08f052231d |
@@ -65,6 +65,12 @@ public class SectattrController {
|
||||
return new ResponseEntity<>(iSectattrService.getSect(whereJson), HttpStatus.OK);
|
||||
}
|
||||
|
||||
@GetMapping("/getSectCode")
|
||||
@Log("查询库区下拉框")
|
||||
public ResponseEntity<Object> querySectCode(@RequestParam Map whereJson) {
|
||||
return new ResponseEntity<>(iSectattrService.getSectCode(whereJson), HttpStatus.OK);
|
||||
}
|
||||
|
||||
@PutMapping("/changeActive")
|
||||
@Log("修改库区状态")
|
||||
public ResponseEntity<Object> update(@RequestBody JSONObject json) {
|
||||
|
||||
@@ -59,6 +59,7 @@ public interface ISectattrService extends IService<Sectattr> {
|
||||
void deleteAll(String[] ids);
|
||||
|
||||
JSONObject getSect(Map whereJson);
|
||||
JSONObject getSectCode(Map whereJson);
|
||||
|
||||
/**
|
||||
* 改变启用状态
|
||||
|
||||
@@ -179,7 +179,68 @@ public class SectattrServiceImpl extends ServiceImpl<SectattrMapper, Sectattr> i
|
||||
stor_cas.put("label", stor_jo.getStor_name());
|
||||
|
||||
List<Sectattr> sectattrList = sectattrMapper.selectList(new LambdaQueryWrapper<>(Sectattr.class)
|
||||
.select(Sectattr::getSect_code,Sectattr::getSect_name)
|
||||
.select(Sectattr::getSect_code,Sectattr::getSect_id,Sectattr::getSect_name)
|
||||
.eq(StrUtil.isNotEmpty(stor_jo.getStor_id()),Sectattr::getStor_id,stor_jo.getStor_id())
|
||||
.eq(StrUtil.isNotEmpty(sect_type_attr),Sectattr::getSect_type_attr,sect_type_attr)
|
||||
.eq(Sectattr::getIs_delete,BaseDataEnum.IS_YES_NOT.code("否"))
|
||||
.eq(Sectattr::getIs_used, BaseDataEnum.IS_YES_NOT.code("是"))
|
||||
);
|
||||
|
||||
if (!sectattrList.isEmpty()) {
|
||||
JSONArray sect_ja = new JSONArray();
|
||||
for (int j = 0; j < sectattrList.size(); j++) {
|
||||
Sectattr sect_jo = sectattrList.get(j);
|
||||
JSONObject sect_cas = new JSONObject();
|
||||
sect_cas.put("value", sect_jo.getSect_id());
|
||||
sect_cas.put("label", sect_jo.getSect_name());
|
||||
sect_ja.add(sect_cas);
|
||||
}
|
||||
stor_cas.put("children", sect_ja);
|
||||
}
|
||||
new_ja.add(stor_cas);
|
||||
}
|
||||
JSONObject jo = new JSONObject();
|
||||
jo.put("content", new_ja);
|
||||
return jo;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public JSONObject getSectCode(Map whereJson) {
|
||||
JSONArray new_ja = new JSONArray();
|
||||
|
||||
String is_materialstore = (String) whereJson.get("is_materialstore");
|
||||
String is_virtualstore = (String) whereJson.get("is_virtualstore");
|
||||
String is_semi_finished = (String) whereJson.get("is_semi_finished");
|
||||
String is_productstore = (String) whereJson.get("is_productstore");
|
||||
String is_attachment = (String) whereJson.get("is_attachment");
|
||||
String is_reversed = (String) whereJson.get("is_reversed");
|
||||
String sect_type_attr = (String) whereJson.get("sect_type_attr");
|
||||
String stor_id = (String) whereJson.get("stor_id");
|
||||
|
||||
LambdaQueryWrapper<BsrealStorattr> queryWrapper = new LambdaQueryWrapper<>(BsrealStorattr.class)
|
||||
.select(BsrealStorattr::getStor_id, BsrealStorattr::getStor_code, BsrealStorattr::getStor_name)
|
||||
.eq(StrUtil.isNotEmpty(is_materialstore),BsrealStorattr::getIs_materialstore,is_materialstore)
|
||||
.eq(StrUtil.isNotEmpty(is_virtualstore),BsrealStorattr::getIs_virtualstore,is_virtualstore)
|
||||
.eq(StrUtil.isNotEmpty(is_semi_finished),BsrealStorattr::getIs_materialstore,is_semi_finished)
|
||||
.eq(StrUtil.isNotEmpty(is_productstore),BsrealStorattr::getIs_materialstore,is_productstore)
|
||||
.eq(StrUtil.isNotEmpty(is_attachment),BsrealStorattr::getIs_materialstore,is_attachment)
|
||||
.eq(StrUtil.isNotEmpty(is_reversed),BsrealStorattr::getIs_materialstore,is_reversed)
|
||||
.eq(StrUtil.isNotEmpty(stor_id),BsrealStorattr::getStor_id,stor_id)
|
||||
.eq(BsrealStorattr::getIs_delete, BaseDataEnum.IS_YES_NOT.code("否"))
|
||||
.eq(BsrealStorattr::getIs_used, BaseDataEnum.IS_YES_NOT.code("是")
|
||||
);
|
||||
|
||||
List<BsrealStorattr> bsrealStorattrList = iBsrealStorattrService.list(queryWrapper);
|
||||
|
||||
for (int i = 0; i < bsrealStorattrList.size(); i++) {
|
||||
BsrealStorattr stor_jo = bsrealStorattrList.get(i);
|
||||
JSONObject stor_cas = new JSONObject();
|
||||
stor_cas.put("value", stor_jo.getStor_code());
|
||||
stor_cas.put("label", stor_jo.getStor_name());
|
||||
|
||||
List<Sectattr> sectattrList = sectattrMapper.selectList(new LambdaQueryWrapper<>(Sectattr.class)
|
||||
.select(Sectattr::getSect_code,Sectattr::getSect_id,Sectattr::getSect_name)
|
||||
.eq(StrUtil.isNotEmpty(stor_jo.getStor_id()),Sectattr::getStor_id,stor_jo.getStor_id())
|
||||
.eq(StrUtil.isNotEmpty(sect_type_attr),Sectattr::getSect_type_attr,sect_type_attr)
|
||||
.eq(Sectattr::getIs_delete,BaseDataEnum.IS_YES_NOT.code("否"))
|
||||
|
||||
@@ -54,7 +54,6 @@ public class ForewarningTask {
|
||||
|
||||
//定时任务
|
||||
@SneakyThrows
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public void run() {
|
||||
RLock lock = redissonClient.getLock(this.getClass().getName());
|
||||
boolean tryLock = lock.tryLock(2, TimeUnit.SECONDS);
|
||||
|
||||
@@ -119,7 +119,7 @@ public class UpdateIvtUtils {
|
||||
* @param where 输入参数
|
||||
*/
|
||||
private void updateAddCanuseInsertIvt(JSONObject where) {
|
||||
throw new BadRequestException("当前载具已存在库存物料,请检查数据!");
|
||||
// throw new BadRequestException("当前载具已存在库存物料,请检查数据!");
|
||||
// 判断当前载具是否有物料
|
||||
// MdPbStoragevehicleext extDao = iMdPbStoragevehicleextService.getOne(
|
||||
// new QueryWrapper<MdPbStoragevehicleext>().lambda()
|
||||
@@ -197,7 +197,7 @@ public class UpdateIvtUtils {
|
||||
}
|
||||
// 如果可用数和冻结数都为零则删除数据
|
||||
if (frozen_qty == 0 && extDao.getQty().doubleValue() == 0) {
|
||||
iMdPbStoragevehicleextService.removeById(extDao);
|
||||
// iMdPbStoragevehicleextService.removeById(extDao);
|
||||
} else {
|
||||
extDao.setFrozen_qty(BigDecimal.valueOf(frozen_qty));
|
||||
extDao.setUpdate_id(SecurityUtils.getCurrentUserId());
|
||||
|
||||
@@ -12,7 +12,7 @@ spring:
|
||||
url: jdbc:mysql://${DB_HOST:192.168.81.251}:${DB_PORT:3306}/${DB_NAME:wms_standardv1}?serverTimezone=Asia/Shanghai&characterEncoding=utf8&useSSL=false&useOldAliasMetadataBehavior=true&allowPublicKeyRetrieval=true&useSSL=false
|
||||
# url: jdbc:mysql://${DB_HOST:localhost}:${DB_PORT:3306}/${DB_NAME:wms_oulun}?serverTimezone=Asia/Shanghai&characterEncoding=utf8&useSSL=false&useOldAliasMetadataBehavior=true&allowPublicKeyRetrieval=true&useSSL=false
|
||||
username: ${DB_USER:root}
|
||||
password: ${DB_PWD:123456}
|
||||
password: ${DB_PWD:P@ssw0rd.}
|
||||
# 初始连接数
|
||||
initial-size: 15
|
||||
# 最小连接数
|
||||
|
||||
@@ -102,9 +102,9 @@
|
||||
@selection-change="crud.selectionChangeHandler"
|
||||
>
|
||||
<el-table-column prop="material_code" label="物料编码" width="160" />
|
||||
<el-table-column prop="material_name" label="物料名称" width="180" show-overflow-tooltip />
|
||||
<el-table-column prop="material_spec" label="物料规格" width="140" />
|
||||
<el-table-column prop="material_model" label="物料型号" />
|
||||
<el-table-column prop="material_name" label="物料名称" width="160" show-overflow-tooltip />
|
||||
<el-table-column prop="material_spec" label="物料规格" width="160" show-overflow-tooltip />
|
||||
<el-table-column prop="material_model" label="物料型号" width="680" show-overflow-tooltip />
|
||||
<el-table-column prop="class_name" label="物料分类" width="140" />
|
||||
<el-table-column label="启用" align="center" prop="is_used">
|
||||
<template slot-scope="scope">
|
||||
|
||||
@@ -32,6 +32,14 @@ export function getSect(params) {
|
||||
})
|
||||
}
|
||||
|
||||
export function getSectCode(params) {
|
||||
return request({
|
||||
url: 'api/sectattr/getSectCode',
|
||||
method: 'get',
|
||||
params
|
||||
})
|
||||
}
|
||||
|
||||
export function changeActive(data) {
|
||||
return request({
|
||||
url: 'api/sectattr/changeActive',
|
||||
@@ -40,4 +48,4 @@ export function changeActive(data) {
|
||||
})
|
||||
}
|
||||
|
||||
export default { add, edit, del, getSect, changeActive }
|
||||
export default { add, edit, del, getSect, getSectCode, changeActive }
|
||||
|
||||
@@ -71,8 +71,12 @@
|
||||
</el-form-item>
|
||||
<el-form-item label="物料编码" prop="material_code">
|
||||
<template slot-scope="scope">
|
||||
<el-input v-model="materialForm.material_code" clearable style="width: 370px"
|
||||
@clear="materialForm.material_id='',materialForm.material_code='',materialForm.material_name='',materialForm.material_spec=''">
|
||||
<el-input
|
||||
v-model="materialForm.material_code"
|
||||
clearable
|
||||
style="width: 370px"
|
||||
@clear="materialForm.material_id='',materialForm.material_code='',materialForm.material_name='',materialForm.material_spec=''"
|
||||
>
|
||||
<el-button slot="append" icon="el-icon-plus" @click="queryMater" />
|
||||
</el-input>
|
||||
</template>
|
||||
@@ -249,6 +253,7 @@
|
||||
<udOperation
|
||||
:data="scope.row"
|
||||
:permission="permission"
|
||||
:disabled-edit="true"
|
||||
/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
@@ -275,7 +280,6 @@ import pagination from '@crud/Pagination'
|
||||
import { getLodop } from '@/assets/js/lodop/LodopFuncs'
|
||||
import MaterDtl from '@/views/wms/basedata/material/MaterialDialog'
|
||||
|
||||
|
||||
const defaultForm = {
|
||||
vehicle_code: null,
|
||||
vehicle_name: null,
|
||||
@@ -298,7 +302,7 @@ const defaultForm = {
|
||||
}
|
||||
export default {
|
||||
name: 'Storagevehicleinfo',
|
||||
dicts: ['storagevehicle_type', "VEHICLE_OVER_TYPE"],
|
||||
dicts: ['storagevehicle_type', 'VEHICLE_OVER_TYPE'],
|
||||
components: { pagination, crudOperation, rrOperation, udOperation, MaterDtl },
|
||||
mixins: [presenter(), header(), form(defaultForm), crud()],
|
||||
cruds() {
|
||||
|
||||
@@ -272,16 +272,17 @@
|
||||
{{ dict.label.placement_type[scope.row.placement_type] }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="是否启用" align="center" prop="is_used">
|
||||
<template slot-scope="scope">
|
||||
<el-switch
|
||||
:value="format_is_used(scope.row.is_used)"
|
||||
active-color="#409EFF"
|
||||
inactive-color="#F56C6C"
|
||||
@change="changeEnabled(scope.row, scope.row.is_used)"
|
||||
/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<!-- <el-table-column label="是否启用" align="center" prop="is_used">-->
|
||||
<!-- <template slot-scope="scope">-->
|
||||
<!-- <el-switch-->
|
||||
<!-- :value="format_is_used(scope.row.is_used)"-->
|
||||
<!-- active-color="#409EFF"-->
|
||||
<!-- inactive-color="#F56C6C"-->
|
||||
<!-- @change="changeEnabled(scope.row, scope.row.is_used)"-->
|
||||
<!-- />-->
|
||||
<!-- </template>-->
|
||||
<!-- </el-table-column>-->
|
||||
<!-- <el-table-column prop="is_used" label="是否启用" />-->
|
||||
<el-table-column prop="taskdtl_type" label="锁定任务类型" width="150" :formatter="taskdtl_typeFormat" />
|
||||
<el-table-column prop="task_code" label="锁定任务编码" width="150" />
|
||||
<el-table-column prop="inv_code" label="锁定单据编码" width="150" />
|
||||
|
||||
@@ -255,7 +255,7 @@ export default {
|
||||
},
|
||||
methods: {
|
||||
open() {
|
||||
crudSectattr.getSect({ 'stor_id': this.storId }).then(res => {
|
||||
crudSectattr.getSectCode({ 'stor_id': this.storId }).then(res => {
|
||||
this.sects = res.content
|
||||
})
|
||||
|
||||
|
||||
@@ -297,7 +297,7 @@ export default {
|
||||
sects: [],
|
||||
pointList: [],
|
||||
rules: {
|
||||
},
|
||||
}
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
@@ -320,7 +320,7 @@ export default {
|
||||
},
|
||||
methods: {
|
||||
open() {
|
||||
crudSectattr.getSect({ 'stor_id': this.storId }).then(res => {
|
||||
crudSectattr.getSectCode({ 'stor_id': this.storId }).then(res => {
|
||||
this.sects = res.content
|
||||
})
|
||||
|
||||
|
||||
Reference in New Issue
Block a user