fix:基础版本维护
This commit is contained in:
@@ -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("否"))
|
||||
|
||||
@@ -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
|
||||
# 最小连接数
|
||||
|
||||
Reference in New Issue
Block a user