删除重复接口

This commit is contained in:
SUNJIABIN
2023-04-07 22:24:57 +08:00
parent 960fb4c422
commit c58b5f1dea
5 changed files with 3 additions and 90 deletions
@@ -95,17 +95,7 @@ public class SarStandItemsController extends BaseController<SarStandItems> {
return Result.success(pageInfo);
}
@ApiOperation(value = "分解单查询")
@GetMapping("/selectSarItemAndInterpretation")
public ResponseMessage selectSarItemAndInterpretation(String standId)throws Exception{
FindSarItemsPageReqDTO page = new FindSarItemsPageReqDTO();
page.setStandId(standId);
Map<String,Object> map = ServiceImpl.selectSarItemAndInterpretation(page.getStandId());
page.getPager().setRowCount((Integer) map.get("count"));
return Result.success(getPageInfo(page.getPager(), (List<SarStandItems>) map.get("list")));
}
@ApiOperation(value = "分解单更新")
@PutMapping("/updateSarItemAndInterpretation")
public ResponseMessage updateSarItemAndInterpretation(@RequestBody SarStandItems resolveListForm){
@@ -371,75 +371,4 @@ public class SarStandItemsServiceImpl extends ServiceImpl<SarStandItemsDao, SarS
return sarStandItemsDtos;
}
/**
* 分解单查询
* @param standId
* @return
*/
public Map<String,Object> selectSarItemAndInterpretation(String standId)throws Exception {
QueryWrapper<SarFileSplitInfoEO> queryWrapper = new QueryWrapper<>();
queryWrapper.eq("STAND_ID",standId);
List<SarFileSplitInfoEO> sarFileSplitInfoEO = sarFileSplitInfoEODao.selectList(queryWrapper);
for (SarFileSplitInfoEO data : sarFileSplitInfoEO){
String idInfo = data.getId();
SarFileSplitItemsEOPage page = new SarFileSplitItemsEOPage();
String id = sarFileSplitMenuEOService.selectByInfoId(idInfo);
page.setId(id);
//ValidFlag为0的意思是有效,设置这个文件分解清单的有效性为有效
page.setValidFlag("0");
//把SAR_FILE_SPLIT_MENU表里的数据按照display_seq的从小到大的正序进行排列
page.setOrderBy("SAR_FILE_SPLIT_MENU.display_seq asc");
//如果SAR_FILE_SPLIT_ITEMS表里的拆分目录ID即MenuId不为空
if (com.adc.da.util.utils.StringUtils.isNotEmpty(page.getMenuId())) {
//把根据条件查询SAR_FILE_SPLIT_MENU表查出来的数据放到sarFileSplitMenuEOList里
List<SarFileSplitMenuEO> sarFileSplitMenuEOList = sarFileSplitMenuEOService.queryByList(new SarFileSplitMenuEOPage());
//把这个sarFileSplitMenuEOList转换成树的形式
Tree tree = new Tree<>(sarFileSplitMenuEOList);
//treeNode就是树的子节点中的SAR_FILE_SPLIT_ITEMS表中的menuId
TreeNode treeNode = tree.getTreeNode(page.getMenuId());
List<String> menuIds = new ArrayList<>();
//然后把刚刚的treeNode的nodeId放到menuIds数组里
menuIds.add(treeNode.getNodeId());
for (TreeNode node : treeNode.getAllChildren()) {
//把所有的treeNode的nodeId放到menuIds数组里
menuIds.add(node.getNodeId());
}
//把它放到MenuIdList里
page.setMenuIdList(menuIds);
}
//数出SAR_FILE_SPLIT_ITEMS这个表里MENU_ID不为空或id不为空的记录一共有几条(基本上就是数出这个表一共有几条数据)
int count = sarFileSplitItemsEODao.queryByCount(page);
//把page里的值当做条件一顿左联查询了SAR_FILE_SPLIT_ITEMS这个表
List<SarFileSplitItemsEO> rows = sarFileSplitItemsEODao.queryByPage(page);
//如果查询出来的结果不为空
if (rows != null && !rows.isEmpty()) {
//遍历rows
for (SarFileSplitItemsEO sarFileSplitItemsEO : rows) {
//查询svpps
String svppsShow = sysInfoEOService.getSvppsNamesByIds(sarFileSplitItemsEO.getSvpps());
sarFileSplitItemsEO.setSvppsShow(svppsShow);
SarFileSplitItemsParamsEOPage paramPage = new SarFileSplitItemsParamsEOPage();
paramPage.setItemId(sarFileSplitItemsEO.getId());
List<SarFileSplitItemsParamsEO> paramList = sarFileSplitItemsParamsEODao.queryByList(paramPage);
sarFileSplitItemsEO.setParamsList(paramList);
String foName = sysInfoEOService.getRoleNamesByIds(sarFileSplitItemsEO.getFo());
sarFileSplitItemsEO.setFoShow(foName);
//TODO 2021年6月17日 补充责任部门和项目评估角色回显时如果时多个时回显为空的情况
String dutyEngineerName = sysInfoEOService.getRoleNamesByIds(sarFileSplitItemsEO.getDutyEngineer());
sarFileSplitItemsEO.setDutyEngineerShow(dutyEngineerName);
//责任部门多个时
String orgNames = sysInfoEOService.getOrgNamesByIds(sarFileSplitItemsEO.getResponsibleUnit());
sarFileSplitItemsEO.setResponsibleUnitShow(orgNames);
}
}
Map<String,Object> map = new HashMap<>();
map.put("list",rows);
map.put("count",count);
return map;
}
return null;
}
}
@@ -61,6 +61,5 @@ public interface SarFileSplitItemsEODao extends BaseMapper<SarFileSplitItemsEO>
int deleteByPrimaryKey(String id);
@Select("select ID from sar_file_split_info where INFO_ID=#{infoId}")
String selectByInfoId(String infoId);
}
@@ -33,5 +33,4 @@ public interface SarFileSplitMenuEOService {
List<String> getChildData(String id);
String selectByInfoId(String infoId);
}
@@ -459,11 +459,7 @@ public class SarFileSplitMenuEOServiceImpl implements SarFileSplitMenuEOService
return dealData(id,res);
}
@Override
public String selectByInfoId(String infoId) {
String info = sarFileSplitItemsEODao.selectByInfoId(infoId);
return info;
}
private List<String> dealData(String id ,List<String> res){
List<String> strings = SarFileSplitMenuEODao.getChildData(id);