|
|
@ -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("否")) |
|
|
|