添加接口
This commit is contained in:
parent
227fe9b77a
commit
bea5b62923
|
|
@ -105,7 +105,7 @@ public class InvoicingApi {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ApiOperation(value="获取物料分类树", notes="获取物料分类树")
|
@ApiOperation(value="获取物料分类树(请购列表使用)", notes="获取物料分类树(请购列表使用)")
|
||||||
@GetMapping(value = "/getMaterialTreeData")
|
@GetMapping(value = "/getMaterialTreeData")
|
||||||
public Result<List<Map<String,Object>>> getMaterialTreeData(MaterialCategoryEntity configMaterialCategory) {
|
public Result<List<Map<String,Object>>> getMaterialTreeData(MaterialCategoryEntity configMaterialCategory) {
|
||||||
configMaterialCategory.setIzEnabled("0");
|
configMaterialCategory.setIzEnabled("0");
|
||||||
|
|
@ -114,6 +114,23 @@ public class InvoicingApi {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ApiOperation(value="获取物料分类树(购物车使用)", notes="获取物料分类树(购物车使用)")
|
||||||
|
@GetMapping(value = "/getGwcMaterialTreeData")
|
||||||
|
public Result<List<Map<String,Object>>> getGwcMaterialTreeData(MaterialCategoryEntity configMaterialCategory) {
|
||||||
|
configMaterialCategory.setIzEnabled("0");
|
||||||
|
List<Map<String,Object>> pageList = invoicingApi.getGwcMaterialTreeData(configMaterialCategory);
|
||||||
|
return Result.OK(pageList);
|
||||||
|
}
|
||||||
|
|
||||||
|
@ApiOperation(value="获取物料分类树(采购单使用)", notes="获取物料分类树(采购单使用)")
|
||||||
|
@GetMapping(value = "/getCgdMaterialTreeData")
|
||||||
|
public Result<List<Map<String,Object>>> getCgdMaterialTreeData(MaterialCategoryEntity configMaterialCategory) {
|
||||||
|
configMaterialCategory.setIzEnabled("0");
|
||||||
|
List<Map<String,Object>> pageList = invoicingApi.getCgdMaterialTreeData(configMaterialCategory);
|
||||||
|
return Result.OK(pageList);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
@ApiOperation(value="修改库房启用停用", notes="修改库房启用停用")
|
@ApiOperation(value="修改库房启用停用", notes="修改库房启用停用")
|
||||||
@AutoLog(value = "修改库房启用停用")
|
@AutoLog(value = "修改库房启用停用")
|
||||||
@PostMapping(value = "/updateKfstatus")
|
@PostMapping(value = "/updateKfstatus")
|
||||||
|
|
|
||||||
|
|
@ -60,6 +60,8 @@ public class MaterialCategoryEntity implements Serializable {
|
||||||
private Integer typeRowSpan;
|
private Integer typeRowSpan;
|
||||||
|
|
||||||
private Integer num;
|
private Integer num;
|
||||||
|
private String nuId;
|
||||||
|
private String cgdId;
|
||||||
|
|
||||||
private java.lang.String appIconPath;
|
private java.lang.String appIconPath;
|
||||||
private java.lang.String appCheckIconPath;
|
private java.lang.String appCheckIconPath;
|
||||||
|
|
|
||||||
|
|
@ -40,4 +40,8 @@ public interface IInvoicingApi {
|
||||||
void voidedCgdMain(CgdMainEntity cgdMainEntity);
|
void voidedCgdMain(CgdMainEntity cgdMainEntity);
|
||||||
|
|
||||||
void updateWarehouserEnabled(MaterialInfoEntity materialInfoEntity);
|
void updateWarehouserEnabled(MaterialInfoEntity materialInfoEntity);
|
||||||
|
|
||||||
|
List<Map<String, Object>> getGwcMaterialTreeData(MaterialCategoryEntity configMaterialCategory);
|
||||||
|
|
||||||
|
List<Map<String, Object>> getCgdMaterialTreeData(MaterialCategoryEntity configMaterialCategory);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -95,4 +95,8 @@ public class ConfigMaterialCategory implements Serializable {
|
||||||
|
|
||||||
@TableField(exist = false)
|
@TableField(exist = false)
|
||||||
private Integer num;
|
private Integer num;
|
||||||
|
@TableField(exist = false)
|
||||||
|
private String nuId;
|
||||||
|
@TableField(exist = false)
|
||||||
|
private String cgdId;;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -21,4 +21,10 @@ public interface ConfigMaterialCategoryMapper extends BaseMapper<ConfigMaterialC
|
||||||
IPage<ConfigMaterialCategory> selectMaterialList(Page<ConfigMaterialCategory> page,@Param(Constants.WRAPPER) QueryWrapper<ConfigMaterialCategory> queryWrapper);
|
IPage<ConfigMaterialCategory> selectMaterialList(Page<ConfigMaterialCategory> page,@Param(Constants.WRAPPER) QueryWrapper<ConfigMaterialCategory> queryWrapper);
|
||||||
|
|
||||||
List<ConfigMaterialCategory> selectIssjList();
|
List<ConfigMaterialCategory> selectIssjList();
|
||||||
|
|
||||||
|
List<ConfigMaterialCategory> getWarehouseInfoList(@Param("params") ConfigMaterialCategory configMaterialCategory);
|
||||||
|
|
||||||
|
List<ConfigMaterialCategory> getCgdMaterialTreeData(@Param("params") ConfigMaterialCategory configMaterialCategory);
|
||||||
|
|
||||||
|
List<ConfigMaterialCategory> getGwcMaterialTreeData(@Param("params") ConfigMaterialCategory configMaterialCategory);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -26,4 +26,23 @@
|
||||||
select a.id,count(a.id) as num from nu_config_material_category a , nu_config_material_info b
|
select a.id,count(a.id) as num from nu_config_material_category a , nu_config_material_info b
|
||||||
where a.id = b.category_id and (b.type_id = '' or b.type_id is null) GROUP BY a.id
|
where a.id = b.category_id and (b.type_id = '' or b.type_id is null) GROUP BY a.id
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
|
||||||
|
<select id="getWarehouseInfoList" resultType="com.nu.modules.ConfigMaterial.entity.ConfigMaterialCategory">
|
||||||
|
select b.category_id,b.type_id,b.medication_id from nu_warehouse_material_info a
|
||||||
|
left join nu_config_material_info b on a.wl_id = b.id
|
||||||
|
where a.nu_id = #{params.nuId} GROUP BY b.category_id,b.type_id,b.medication_id
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<select id="getCgdMaterialTreeData" resultType="com.nu.modules.ConfigMaterial.entity.ConfigMaterialCategory">
|
||||||
|
select b.category_id,b.type_id,b.medication_id from nu_invoicing_cgd_info a
|
||||||
|
left join nu_config_material_info b on a.wl_id = b.id
|
||||||
|
where a.cgd_id = #{params.cgdId} GROUP BY b.category_id,b.type_id,b.medication_id
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<select id="getGwcMaterialTreeData" resultType="com.nu.modules.ConfigMaterial.entity.ConfigMaterialCategory">
|
||||||
|
select b.category_id,b.type_id,b.medication_id from nu_invoicing_qgd_info a
|
||||||
|
left join nu_config_material_info b on a.wl_id = b.id
|
||||||
|
GROUP BY b.category_id,b.type_id,b.medication_id
|
||||||
|
</select>
|
||||||
</mapper>
|
</mapper>
|
||||||
|
|
@ -22,4 +22,10 @@ public interface IConfigMaterialCategoryService extends IService<ConfigMaterialC
|
||||||
List<Map<String,Object>> getMaterialTreeData(ConfigMaterialCategory configMaterialCategory);
|
List<Map<String,Object>> getMaterialTreeData(ConfigMaterialCategory configMaterialCategory);
|
||||||
|
|
||||||
void editQyty(ConfigMaterialCategory configMaterialCategory);
|
void editQyty(ConfigMaterialCategory configMaterialCategory);
|
||||||
|
|
||||||
|
List<Map<String, Object>> getAppMaterialTreeData(ConfigMaterialCategory configMaterialCategory);
|
||||||
|
|
||||||
|
List<Map<String, Object>> getGwcMaterialTreeData(ConfigMaterialCategory configMaterialCategory);
|
||||||
|
|
||||||
|
List<Map<String, Object>> getCgdMaterialTreeData(ConfigMaterialCategory configMaterialCategory);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -244,4 +244,404 @@ public class ConfigMaterialCategoryServiceImpl extends ServiceImpl<ConfigMateria
|
||||||
configMaterialInfoMapper.editQyty(configMaterialInfo);
|
configMaterialInfoMapper.editQyty(configMaterialInfo);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<Map<String, Object>> getAppMaterialTreeData(ConfigMaterialCategory configMaterialCategory) {
|
||||||
|
|
||||||
|
List<ConfigMaterialCategory> groupList = baseMapper.getWarehouseInfoList(configMaterialCategory);
|
||||||
|
|
||||||
|
String oneId = "";
|
||||||
|
String twoId = "";
|
||||||
|
String threeId = "";
|
||||||
|
for(ConfigMaterialCategory par:groupList){
|
||||||
|
oneId = oneId + par.getCategoryId()+",";
|
||||||
|
twoId = twoId + par.getTypeId()+",";
|
||||||
|
threeId = threeId + par.getMedicationId()+",";
|
||||||
|
}
|
||||||
|
String[] oneParts = oneId.split(",");
|
||||||
|
Set<String> oneSet = new LinkedHashSet<>(Arrays.asList(oneParts));
|
||||||
|
oneId = String.join(",", oneSet);
|
||||||
|
|
||||||
|
String[] twoParts = twoId.split(",");
|
||||||
|
Set<String> twoSet = new LinkedHashSet<>(Arrays.asList(twoParts));
|
||||||
|
twoId = String.join(",", twoSet);
|
||||||
|
|
||||||
|
String[] threeParts = threeId.split(",");
|
||||||
|
Set<String> threeSet = new LinkedHashSet<>(Arrays.asList(threeParts));
|
||||||
|
threeId = String.join(",", threeSet);
|
||||||
|
|
||||||
|
//查询护理分类信息
|
||||||
|
QueryWrapper<ConfigMaterialCategory> categoryQueryWrapper = new QueryWrapper<>();
|
||||||
|
categoryQueryWrapper.eq(StringUtils.isNotEmpty(configMaterialCategory.getIzEnabled()),"iz_enabled",configMaterialCategory.getIzEnabled());
|
||||||
|
categoryQueryWrapper.in("id",oneId.split(","));
|
||||||
|
categoryQueryWrapper.eq("del_flag","0");
|
||||||
|
categoryQueryWrapper.orderByAsc("sort");
|
||||||
|
List<ConfigMaterialCategory> list =baseMapper.selectList(categoryQueryWrapper);
|
||||||
|
|
||||||
|
//查询护理类型信息
|
||||||
|
QueryWrapper<ConfigMaterialType> typeQueryWrapper = new QueryWrapper<>();
|
||||||
|
typeQueryWrapper.eq(StringUtils.isNotEmpty(configMaterialCategory.getIzEnabled()),"iz_enabled",configMaterialCategory.getIzEnabled());
|
||||||
|
typeQueryWrapper.in("id",twoId.split(","));
|
||||||
|
typeQueryWrapper.eq("del_flag","0");
|
||||||
|
List<ConfigMaterialType> list2 = configMaterialTypeMapper.selectList(typeQueryWrapper);
|
||||||
|
|
||||||
|
//查询用药类型信息
|
||||||
|
QueryWrapper<ConfigMaterialMedication> medicationQueryWrapper = new QueryWrapper<>();
|
||||||
|
medicationQueryWrapper.eq(StringUtils.isNotEmpty(configMaterialCategory.getIzEnabled()),"iz_enabled",configMaterialCategory.getIzEnabled());
|
||||||
|
medicationQueryWrapper.in("id",threeId.split(","));
|
||||||
|
medicationQueryWrapper.eq("del_flag","0");
|
||||||
|
List<ConfigMaterialMedication> list3 = configMaterialMedicationMapper.selectList(medicationQueryWrapper);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
//查询物料类别下是否有物料数据
|
||||||
|
List<ConfigMaterialCategory> onesjlist =baseMapper.selectIssjList();
|
||||||
|
|
||||||
|
//查询物料类型下是否有物料数据
|
||||||
|
List<ConfigMaterialType> twosjlist =configMaterialTypeMapper.selectIssjList();
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
List<Map<String,Object>> wllxMapList = new ArrayList<Map<String,Object>>();
|
||||||
|
for(ConfigMaterialType par : list2){
|
||||||
|
Map<String,Object> wllxMap = new HashMap<String,Object>();
|
||||||
|
List<Map<String,Object>> yylxMapList = new ArrayList<Map<String,Object>>();
|
||||||
|
for(ConfigMaterialMedication yylxPar:list3){
|
||||||
|
if(StringUtils.equals(yylxPar.getTypeId(),par.getId())){
|
||||||
|
Map<String,Object> yylxMap = new HashMap<String,Object>();
|
||||||
|
yylxMap.put("key",yylxPar.getId());
|
||||||
|
yylxMap.put("levle","3");
|
||||||
|
yylxMap.put("title",yylxPar.getMedicationName());
|
||||||
|
yylxMap.put("izEnabled",yylxPar.getIzEnabled());
|
||||||
|
yylxMap.put("categoryId",yylxPar.getCategoryId());
|
||||||
|
yylxMap.put("typeId",yylxPar.getTypeId());
|
||||||
|
yylxMap.put("children","");
|
||||||
|
yylxMap.put("parentIzEnabled",par.getIzEnabled());
|
||||||
|
yylxMap.put("icon",yylxPar.getIcon());
|
||||||
|
yylxMapList.add(yylxMap);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
int tjxj = 0;
|
||||||
|
for(ConfigMaterialType twosjPar:twosjlist){
|
||||||
|
if (StringUtils.equals(twosjPar.getId(),par.getId())){
|
||||||
|
tjxj = 1;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
wllxMap.put("tjxj",tjxj);
|
||||||
|
wllxMap.put("key",par.getId());
|
||||||
|
wllxMap.put("parentId",par.getCategoryId());
|
||||||
|
wllxMap.put("title",par.getTypeName());
|
||||||
|
wllxMap.put("levle","2");
|
||||||
|
wllxMap.put("izEnabled",par.getIzEnabled());
|
||||||
|
wllxMap.put("children",yylxMapList);
|
||||||
|
wllxMap.put("categoryId",par.getCategoryId());
|
||||||
|
wllxMap.put("typeId",par.getId());
|
||||||
|
wllxMap.put("icon",par.getIcon());
|
||||||
|
wllxMapList.add(wllxMap);
|
||||||
|
}
|
||||||
|
|
||||||
|
List<Map<String,Object>> infoMapList = new ArrayList<Map<String,Object>>();
|
||||||
|
int index = 0;
|
||||||
|
for(ConfigMaterialCategory par : list){
|
||||||
|
index++;
|
||||||
|
Map<String,Object> infoMap = new HashMap<String,Object>();
|
||||||
|
List<Map<String,Object>> wllxMap2List = new ArrayList<Map<String,Object>>();
|
||||||
|
for(Map<String,Object> wllxPar : wllxMapList){
|
||||||
|
if(StringUtils.equals(par.getId(),wllxPar.get("parentId").toString())){
|
||||||
|
wllxPar.put("parentIzEnabled",par.getIzEnabled());
|
||||||
|
wllxMap2List.add(wllxPar);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
int tjxj = 0;
|
||||||
|
for(ConfigMaterialCategory onesjPar:onesjlist){
|
||||||
|
if (StringUtils.equals(onesjPar.getId(),par.getId())){
|
||||||
|
tjxj = 1;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
infoMap.put("tjxj",tjxj);
|
||||||
|
infoMap.put("key",par.getId());
|
||||||
|
infoMap.put("title",par.getCategoryName());
|
||||||
|
infoMap.put("levle","1");
|
||||||
|
infoMap.put("izEnabled",par.getIzEnabled());
|
||||||
|
infoMap.put("children",wllxMap2List);
|
||||||
|
infoMap.put("categoryId",par.getId());
|
||||||
|
infoMap.put("parentIzEnabled",par.getIzEnabled());
|
||||||
|
infoMap.put("appIconPath",par.getAppIconPath());
|
||||||
|
infoMap.put("appCheckIconPath",par.getAppCheckIconPath());
|
||||||
|
infoMap.put("icon",par.getIcon());
|
||||||
|
infoMapList.add(infoMap);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
return infoMapList;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<Map<String, Object>> getGwcMaterialTreeData(ConfigMaterialCategory configMaterialCategory) {
|
||||||
|
|
||||||
|
List<ConfigMaterialCategory> groupList = baseMapper.getGwcMaterialTreeData(configMaterialCategory);
|
||||||
|
|
||||||
|
String oneId = "";
|
||||||
|
String twoId = "";
|
||||||
|
String threeId = "";
|
||||||
|
for(ConfigMaterialCategory par:groupList){
|
||||||
|
oneId = oneId + par.getCategoryId()+",";
|
||||||
|
twoId = twoId + par.getTypeId()+",";
|
||||||
|
threeId = threeId + par.getMedicationId()+",";
|
||||||
|
}
|
||||||
|
String[] oneParts = oneId.split(",");
|
||||||
|
Set<String> oneSet = new LinkedHashSet<>(Arrays.asList(oneParts));
|
||||||
|
oneId = String.join(",", oneSet);
|
||||||
|
|
||||||
|
String[] twoParts = twoId.split(",");
|
||||||
|
Set<String> twoSet = new LinkedHashSet<>(Arrays.asList(twoParts));
|
||||||
|
twoId = String.join(",", twoSet);
|
||||||
|
|
||||||
|
String[] threeParts = threeId.split(",");
|
||||||
|
Set<String> threeSet = new LinkedHashSet<>(Arrays.asList(threeParts));
|
||||||
|
threeId = String.join(",", threeSet);
|
||||||
|
|
||||||
|
//查询护理分类信息
|
||||||
|
QueryWrapper<ConfigMaterialCategory> categoryQueryWrapper = new QueryWrapper<>();
|
||||||
|
categoryQueryWrapper.eq(StringUtils.isNotEmpty(configMaterialCategory.getIzEnabled()),"iz_enabled",configMaterialCategory.getIzEnabled());
|
||||||
|
categoryQueryWrapper.in("id",oneId.split(","));
|
||||||
|
categoryQueryWrapper.eq("del_flag","0");
|
||||||
|
categoryQueryWrapper.orderByAsc("sort");
|
||||||
|
List<ConfigMaterialCategory> list =baseMapper.selectList(categoryQueryWrapper);
|
||||||
|
|
||||||
|
//查询护理类型信息
|
||||||
|
QueryWrapper<ConfigMaterialType> typeQueryWrapper = new QueryWrapper<>();
|
||||||
|
typeQueryWrapper.eq(StringUtils.isNotEmpty(configMaterialCategory.getIzEnabled()),"iz_enabled",configMaterialCategory.getIzEnabled());
|
||||||
|
typeQueryWrapper.in("id",twoId.split(","));
|
||||||
|
typeQueryWrapper.eq("del_flag","0");
|
||||||
|
List<ConfigMaterialType> list2 = configMaterialTypeMapper.selectList(typeQueryWrapper);
|
||||||
|
|
||||||
|
//查询用药类型信息
|
||||||
|
QueryWrapper<ConfigMaterialMedication> medicationQueryWrapper = new QueryWrapper<>();
|
||||||
|
medicationQueryWrapper.eq(StringUtils.isNotEmpty(configMaterialCategory.getIzEnabled()),"iz_enabled",configMaterialCategory.getIzEnabled());
|
||||||
|
medicationQueryWrapper.in("id",threeId.split(","));
|
||||||
|
medicationQueryWrapper.eq("del_flag","0");
|
||||||
|
List<ConfigMaterialMedication> list3 = configMaterialMedicationMapper.selectList(medicationQueryWrapper);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
//查询物料类别下是否有物料数据
|
||||||
|
List<ConfigMaterialCategory> onesjlist =baseMapper.selectIssjList();
|
||||||
|
|
||||||
|
//查询物料类型下是否有物料数据
|
||||||
|
List<ConfigMaterialType> twosjlist =configMaterialTypeMapper.selectIssjList();
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
List<Map<String,Object>> wllxMapList = new ArrayList<Map<String,Object>>();
|
||||||
|
for(ConfigMaterialType par : list2){
|
||||||
|
Map<String,Object> wllxMap = new HashMap<String,Object>();
|
||||||
|
List<Map<String,Object>> yylxMapList = new ArrayList<Map<String,Object>>();
|
||||||
|
for(ConfigMaterialMedication yylxPar:list3){
|
||||||
|
if(StringUtils.equals(yylxPar.getTypeId(),par.getId())){
|
||||||
|
Map<String,Object> yylxMap = new HashMap<String,Object>();
|
||||||
|
yylxMap.put("key",yylxPar.getId());
|
||||||
|
yylxMap.put("levle","3");
|
||||||
|
yylxMap.put("title",yylxPar.getMedicationName());
|
||||||
|
yylxMap.put("izEnabled",yylxPar.getIzEnabled());
|
||||||
|
yylxMap.put("categoryId",yylxPar.getCategoryId());
|
||||||
|
yylxMap.put("typeId",yylxPar.getTypeId());
|
||||||
|
yylxMap.put("children","");
|
||||||
|
yylxMap.put("parentIzEnabled",par.getIzEnabled());
|
||||||
|
yylxMap.put("icon",yylxPar.getIcon());
|
||||||
|
yylxMapList.add(yylxMap);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
int tjxj = 0;
|
||||||
|
for(ConfigMaterialType twosjPar:twosjlist){
|
||||||
|
if (StringUtils.equals(twosjPar.getId(),par.getId())){
|
||||||
|
tjxj = 1;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
wllxMap.put("tjxj",tjxj);
|
||||||
|
wllxMap.put("key",par.getId());
|
||||||
|
wllxMap.put("parentId",par.getCategoryId());
|
||||||
|
wllxMap.put("title",par.getTypeName());
|
||||||
|
wllxMap.put("levle","2");
|
||||||
|
wllxMap.put("izEnabled",par.getIzEnabled());
|
||||||
|
wllxMap.put("children",yylxMapList);
|
||||||
|
wllxMap.put("categoryId",par.getCategoryId());
|
||||||
|
wllxMap.put("typeId",par.getId());
|
||||||
|
wllxMap.put("icon",par.getIcon());
|
||||||
|
wllxMapList.add(wllxMap);
|
||||||
|
}
|
||||||
|
|
||||||
|
List<Map<String,Object>> infoMapList = new ArrayList<Map<String,Object>>();
|
||||||
|
int index = 0;
|
||||||
|
for(ConfigMaterialCategory par : list){
|
||||||
|
index++;
|
||||||
|
Map<String,Object> infoMap = new HashMap<String,Object>();
|
||||||
|
List<Map<String,Object>> wllxMap2List = new ArrayList<Map<String,Object>>();
|
||||||
|
for(Map<String,Object> wllxPar : wllxMapList){
|
||||||
|
if(StringUtils.equals(par.getId(),wllxPar.get("parentId").toString())){
|
||||||
|
wllxPar.put("parentIzEnabled",par.getIzEnabled());
|
||||||
|
wllxMap2List.add(wllxPar);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
int tjxj = 0;
|
||||||
|
for(ConfigMaterialCategory onesjPar:onesjlist){
|
||||||
|
if (StringUtils.equals(onesjPar.getId(),par.getId())){
|
||||||
|
tjxj = 1;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
infoMap.put("tjxj",tjxj);
|
||||||
|
infoMap.put("key",par.getId());
|
||||||
|
infoMap.put("title",par.getCategoryName());
|
||||||
|
infoMap.put("levle","1");
|
||||||
|
infoMap.put("izEnabled",par.getIzEnabled());
|
||||||
|
infoMap.put("children",wllxMap2List);
|
||||||
|
infoMap.put("categoryId",par.getId());
|
||||||
|
infoMap.put("parentIzEnabled",par.getIzEnabled());
|
||||||
|
infoMap.put("appIconPath",par.getAppIconPath());
|
||||||
|
infoMap.put("appCheckIconPath",par.getAppCheckIconPath());
|
||||||
|
infoMap.put("icon",par.getIcon());
|
||||||
|
infoMapList.add(infoMap);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
return infoMapList;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<Map<String, Object>> getCgdMaterialTreeData(ConfigMaterialCategory configMaterialCategory) {
|
||||||
|
|
||||||
|
List<ConfigMaterialCategory> groupList = baseMapper.getCgdMaterialTreeData(configMaterialCategory);
|
||||||
|
|
||||||
|
String oneId = "";
|
||||||
|
String twoId = "";
|
||||||
|
String threeId = "";
|
||||||
|
for(ConfigMaterialCategory par:groupList){
|
||||||
|
oneId = oneId + par.getCategoryId()+",";
|
||||||
|
twoId = twoId + par.getTypeId()+",";
|
||||||
|
threeId = threeId + par.getMedicationId()+",";
|
||||||
|
}
|
||||||
|
String[] oneParts = oneId.split(",");
|
||||||
|
Set<String> oneSet = new LinkedHashSet<>(Arrays.asList(oneParts));
|
||||||
|
oneId = String.join(",", oneSet);
|
||||||
|
|
||||||
|
String[] twoParts = twoId.split(",");
|
||||||
|
Set<String> twoSet = new LinkedHashSet<>(Arrays.asList(twoParts));
|
||||||
|
twoId = String.join(",", twoSet);
|
||||||
|
|
||||||
|
String[] threeParts = threeId.split(",");
|
||||||
|
Set<String> threeSet = new LinkedHashSet<>(Arrays.asList(threeParts));
|
||||||
|
threeId = String.join(",", threeSet);
|
||||||
|
|
||||||
|
//查询护理分类信息
|
||||||
|
QueryWrapper<ConfigMaterialCategory> categoryQueryWrapper = new QueryWrapper<>();
|
||||||
|
categoryQueryWrapper.eq(StringUtils.isNotEmpty(configMaterialCategory.getIzEnabled()),"iz_enabled",configMaterialCategory.getIzEnabled());
|
||||||
|
categoryQueryWrapper.in("id",oneId.split(","));
|
||||||
|
categoryQueryWrapper.eq("del_flag","0");
|
||||||
|
categoryQueryWrapper.orderByAsc("sort");
|
||||||
|
List<ConfigMaterialCategory> list =baseMapper.selectList(categoryQueryWrapper);
|
||||||
|
|
||||||
|
//查询护理类型信息
|
||||||
|
QueryWrapper<ConfigMaterialType> typeQueryWrapper = new QueryWrapper<>();
|
||||||
|
typeQueryWrapper.eq(StringUtils.isNotEmpty(configMaterialCategory.getIzEnabled()),"iz_enabled",configMaterialCategory.getIzEnabled());
|
||||||
|
typeQueryWrapper.in("id",twoId.split(","));
|
||||||
|
typeQueryWrapper.eq("del_flag","0");
|
||||||
|
List<ConfigMaterialType> list2 = configMaterialTypeMapper.selectList(typeQueryWrapper);
|
||||||
|
|
||||||
|
//查询用药类型信息
|
||||||
|
QueryWrapper<ConfigMaterialMedication> medicationQueryWrapper = new QueryWrapper<>();
|
||||||
|
medicationQueryWrapper.eq(StringUtils.isNotEmpty(configMaterialCategory.getIzEnabled()),"iz_enabled",configMaterialCategory.getIzEnabled());
|
||||||
|
medicationQueryWrapper.in("id",threeId.split(","));
|
||||||
|
medicationQueryWrapper.eq("del_flag","0");
|
||||||
|
List<ConfigMaterialMedication> list3 = configMaterialMedicationMapper.selectList(medicationQueryWrapper);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
//查询物料类别下是否有物料数据
|
||||||
|
List<ConfigMaterialCategory> onesjlist =baseMapper.selectIssjList();
|
||||||
|
|
||||||
|
//查询物料类型下是否有物料数据
|
||||||
|
List<ConfigMaterialType> twosjlist =configMaterialTypeMapper.selectIssjList();
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
List<Map<String,Object>> wllxMapList = new ArrayList<Map<String,Object>>();
|
||||||
|
for(ConfigMaterialType par : list2){
|
||||||
|
Map<String,Object> wllxMap = new HashMap<String,Object>();
|
||||||
|
List<Map<String,Object>> yylxMapList = new ArrayList<Map<String,Object>>();
|
||||||
|
for(ConfigMaterialMedication yylxPar:list3){
|
||||||
|
if(StringUtils.equals(yylxPar.getTypeId(),par.getId())){
|
||||||
|
Map<String,Object> yylxMap = new HashMap<String,Object>();
|
||||||
|
yylxMap.put("key",yylxPar.getId());
|
||||||
|
yylxMap.put("levle","3");
|
||||||
|
yylxMap.put("title",yylxPar.getMedicationName());
|
||||||
|
yylxMap.put("izEnabled",yylxPar.getIzEnabled());
|
||||||
|
yylxMap.put("categoryId",yylxPar.getCategoryId());
|
||||||
|
yylxMap.put("typeId",yylxPar.getTypeId());
|
||||||
|
yylxMap.put("children","");
|
||||||
|
yylxMap.put("parentIzEnabled",par.getIzEnabled());
|
||||||
|
yylxMap.put("icon",yylxPar.getIcon());
|
||||||
|
yylxMapList.add(yylxMap);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
int tjxj = 0;
|
||||||
|
for(ConfigMaterialType twosjPar:twosjlist){
|
||||||
|
if (StringUtils.equals(twosjPar.getId(),par.getId())){
|
||||||
|
tjxj = 1;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
wllxMap.put("tjxj",tjxj);
|
||||||
|
wllxMap.put("key",par.getId());
|
||||||
|
wllxMap.put("parentId",par.getCategoryId());
|
||||||
|
wllxMap.put("title",par.getTypeName());
|
||||||
|
wllxMap.put("levle","2");
|
||||||
|
wllxMap.put("izEnabled",par.getIzEnabled());
|
||||||
|
wllxMap.put("children",yylxMapList);
|
||||||
|
wllxMap.put("categoryId",par.getCategoryId());
|
||||||
|
wllxMap.put("typeId",par.getId());
|
||||||
|
wllxMap.put("icon",par.getIcon());
|
||||||
|
wllxMapList.add(wllxMap);
|
||||||
|
}
|
||||||
|
|
||||||
|
List<Map<String,Object>> infoMapList = new ArrayList<Map<String,Object>>();
|
||||||
|
int index = 0;
|
||||||
|
for(ConfigMaterialCategory par : list){
|
||||||
|
index++;
|
||||||
|
Map<String,Object> infoMap = new HashMap<String,Object>();
|
||||||
|
List<Map<String,Object>> wllxMap2List = new ArrayList<Map<String,Object>>();
|
||||||
|
for(Map<String,Object> wllxPar : wllxMapList){
|
||||||
|
if(StringUtils.equals(par.getId(),wllxPar.get("parentId").toString())){
|
||||||
|
wllxPar.put("parentIzEnabled",par.getIzEnabled());
|
||||||
|
wllxMap2List.add(wllxPar);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
int tjxj = 0;
|
||||||
|
for(ConfigMaterialCategory onesjPar:onesjlist){
|
||||||
|
if (StringUtils.equals(onesjPar.getId(),par.getId())){
|
||||||
|
tjxj = 1;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
infoMap.put("tjxj",tjxj);
|
||||||
|
infoMap.put("key",par.getId());
|
||||||
|
infoMap.put("title",par.getCategoryName());
|
||||||
|
infoMap.put("levle","1");
|
||||||
|
infoMap.put("izEnabled",par.getIzEnabled());
|
||||||
|
infoMap.put("children",wllxMap2List);
|
||||||
|
infoMap.put("categoryId",par.getId());
|
||||||
|
infoMap.put("parentIzEnabled",par.getIzEnabled());
|
||||||
|
infoMap.put("appIconPath",par.getAppIconPath());
|
||||||
|
infoMap.put("appCheckIconPath",par.getAppCheckIconPath());
|
||||||
|
infoMap.put("icon",par.getIcon());
|
||||||
|
infoMapList.add(infoMap);
|
||||||
|
}
|
||||||
|
|
||||||
|
return infoMapList;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -447,7 +447,7 @@ public class NuInvoicingCgdMainServiceImpl extends ServiceImpl<NuInvoicingCgdMai
|
||||||
public List<Map<String, Object>> getMaterialTreeData(MaterialCategoryEntity materialCategoryEntity) {
|
public List<Map<String, Object>> getMaterialTreeData(MaterialCategoryEntity materialCategoryEntity) {
|
||||||
ConfigMaterialCategory configMaterialCategory = new ConfigMaterialCategory();
|
ConfigMaterialCategory configMaterialCategory = new ConfigMaterialCategory();
|
||||||
BeanUtils.copyProperties(materialCategoryEntity,configMaterialCategory);
|
BeanUtils.copyProperties(materialCategoryEntity,configMaterialCategory);
|
||||||
List<Map<String,Object>> pageList = configMaterialCategoryService.getMaterialTreeData(configMaterialCategory);
|
List<Map<String,Object>> pageList = configMaterialCategoryService.getAppMaterialTreeData(configMaterialCategory);
|
||||||
return pageList;
|
return pageList;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -508,4 +508,20 @@ public class NuInvoicingCgdMainServiceImpl extends ServiceImpl<NuInvoicingCgdMai
|
||||||
mterialInfoMapper.updateById(warehouseMaterialInfo);
|
mterialInfoMapper.updateById(warehouseMaterialInfo);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<Map<String, Object>> getGwcMaterialTreeData(MaterialCategoryEntity configMaterialCategoryEntity) {
|
||||||
|
ConfigMaterialCategory configMaterialCategory = new ConfigMaterialCategory();
|
||||||
|
BeanUtils.copyProperties(configMaterialCategoryEntity,configMaterialCategory);
|
||||||
|
List<Map<String,Object>> pageList = configMaterialCategoryService.getGwcMaterialTreeData(configMaterialCategory);
|
||||||
|
return pageList;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<Map<String, Object>> getCgdMaterialTreeData(MaterialCategoryEntity configMaterialCategoryEntity) {
|
||||||
|
ConfigMaterialCategory configMaterialCategory = new ConfigMaterialCategory();
|
||||||
|
BeanUtils.copyProperties(configMaterialCategoryEntity,configMaterialCategory);
|
||||||
|
List<Map<String,Object>> pageList = configMaterialCategoryService.getCgdMaterialTreeData(configMaterialCategory);
|
||||||
|
return pageList;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue