1.增加删除评论功能 2.修改根据办事指南id获取所属地区 3.修改接口文档
| | |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 删除评论 |
| | | * @return |
| | | */ |
| | | @ApiOperation(value = "删除评论",response = GuideRepairOrder.class) |
| | | @GetMapping("/deleteComment") |
| | | @Authorization |
| | | public ResultData deleteComment(@RequestParam(value = "id",required = false) Integer id,@CurrentUser SysUser sysUser){ |
| | | return iGuideRepairOrderService.deleteComment(id,sysUser); |
| | | } |
| | | |
| | | |
| | | } |
| | |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 删除评论 |
| | | * @return |
| | | */ |
| | | @ApiOperation(value = "删除评论",response = GuideRepairOrder.class) |
| | | @GetMapping("/deleteComment") |
| | | @Authorization |
| | | public ResultData deleteComment(@RequestParam(value = "id",required = false) Integer id,@CurrentUser SysUser sysUser){ |
| | | return iGuideRepairOrderService.deleteComment(id,sysUser); |
| | | } |
| | | |
| | | |
| | | } |
| | |
| | | * |
| | | * @return 结果 |
| | | */ |
| | | @ApiOperation("获取登录人员信息") |
| | | @ApiOperation(value = "获取登录人员信息,userType=1 为超级管理员 isDivisionHead=1 为部门领导",response = SysUser.class) |
| | | @PostMapping("/getLoginInformation") |
| | | @Authorization |
| | | public ResultData getLoginInformation(@CurrentUser SysUser sysUse) |
| | |
| | | * 删除评论 |
| | | * @return |
| | | */ |
| | | int deleteComment(Integer id); |
| | | ResultData deleteComment(Integer id, SysUser sysUser); |
| | | |
| | | } |
| | |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.util.ArrayList; |
| | | import java.util.Arrays; |
| | | import java.util.HashMap; |
| | | import java.util.List; |
| | | |
| | |
| | | private TransactionEventMapper transactionEventMapper; |
| | | |
| | | @Override |
| | | public List<AreaCode2022> getAreaCodeByTransactionId(Integer transactionId){ |
| | | // HashMap<Object, Object> objectObjectHashMap = new HashMap<>(); |
| | | public List<AreaCode2022> getAreaCodeByTransactionId(Integer transactionId) { |
| | | List<String> areaCodes = new ArrayList<>(); |
| | | TransactionEvent transactionEvent = transactionEventMapper.selectOne(new QueryWrapper<TransactionEvent>().lambda(). |
| | | eq(TransactionEvent::getId, transactionId)); |
| | | OrganizationChartEntity organizationChartEntity = organizationChartMapper.selectOne(new QueryWrapper<OrganizationChartEntity>().lambda() |
| | | .eq(OrganizationChartEntity::getId, transactionEvent.getDepartmentId())); |
| | | List<String> areaCodes=new ArrayList<>(); |
| | | if (organizationChartEntity!=null){ |
| | | if (organizationChartEntity.getCity()!=null) |
| | | areaCodes.add(organizationChartEntity.getCity()); |
| | | if (organizationChartEntity.getDistrict()!=null) |
| | | areaCodes.add(organizationChartEntity.getDistrict()); |
| | | if (organizationChartEntity.getVillage()!=null) |
| | | areaCodes.add(organizationChartEntity.getVillage()); |
| | | getAreaCodeIds(areaCodes,organizationChartEntity); |
| | | List<String> departmentIds = new ArrayList<>(Arrays.asList(transactionEvent.getDepartmentIds().split(","))); |
| | | departmentIds.add(transactionEvent.getDepartmentId()); |
| | | for (String departmentId : departmentIds) { |
| | | OrganizationChartEntity organizationChartEntity = organizationChartMapper.selectOne(new QueryWrapper<OrganizationChartEntity>().lambda() |
| | | .eq(OrganizationChartEntity::getId, departmentId)); |
| | | if (organizationChartEntity != null) { |
| | | if (organizationChartEntity.getCity() != null) |
| | | areaCodes.add(organizationChartEntity.getCity()); |
| | | if (organizationChartEntity.getDistrict() != null) |
| | | areaCodes.add(organizationChartEntity.getDistrict()); |
| | | if (organizationChartEntity.getVillage() != null) |
| | | areaCodes.add(organizationChartEntity.getVillage()); |
| | | } |
| | | |
| | | } |
| | | if (areaCodes.size()==0) |
| | | return null; |
| | | else |
| | | return baseMapper.selectByIdSet(areaCodes); |
| | | return baseMapper.selectByIdSet(areaCodes); |
| | | } |
| | | |
| | | |
| | | public List<String> getAreaCodeIds(List<String> areaCodes, OrganizationChartEntity organizationChartEntity){ |
| | | List<OrganizationChartEntity> organizationChartEntitys= organizationChartMapper.selectList(new QueryWrapper<OrganizationChartEntity>().lambda() |
| | | public List<String> getAreaCodeIds(List<String> areaCodes, OrganizationChartEntity organizationChartEntity) { |
| | | List<OrganizationChartEntity> organizationChartEntitys = organizationChartMapper.selectList(new QueryWrapper<OrganizationChartEntity>().lambda() |
| | | .eq(OrganizationChartEntity::getParentId, organizationChartEntity.getId())); |
| | | for (OrganizationChartEntity organizationChart:organizationChartEntitys) { |
| | | if (organizationChart.getCity()!=null) |
| | | for (OrganizationChartEntity organizationChart : organizationChartEntitys) { |
| | | if (organizationChart.getCity() != null) |
| | | areaCodes.add(organizationChart.getCity()); |
| | | if (organizationChart.getDistrict()!=null) |
| | | if (organizationChart.getDistrict() != null) |
| | | areaCodes.add(organizationChart.getDistrict()); |
| | | if (organizationChart.getVillage()!=null) |
| | | if (organizationChart.getVillage() != null) |
| | | areaCodes.add(organizationChart.getVillage()); |
| | | getAreaCodeIds(areaCodes,organizationChart); |
| | | getAreaCodeIds(areaCodes, organizationChart); |
| | | } |
| | | return areaCodes; |
| | | return areaCodes; |
| | | } |
| | | |
| | | @Override |
| | | public List<AreaCode2022> getListByPCode(String id){ |
| | | public List<AreaCode2022> getListByPCode(String id) { |
| | | List<AreaCode2022> areaCode2022s = baseMapper.selectList(new QueryWrapper<AreaCode2022>().lambda().eq(AreaCode2022::getPcode, id)); |
| | | for (AreaCode2022 areaCode2022:areaCode2022s) { |
| | | if (areaCode2022.getLevel()!=3) |
| | | areaCode2022.setChild(this.getListByPCode(areaCode2022.getCode().toString())); |
| | | for (AreaCode2022 areaCode2022 : areaCode2022s) { |
| | | if (areaCode2022.getLevel() != 3) |
| | | areaCode2022.setChild(this.getListByPCode(areaCode2022.getCode().toString())); |
| | | } |
| | | return areaCode2022s; |
| | | return areaCode2022s; |
| | | } |
| | | |
| | | |
| | |
| | | @Override |
| | | public List<AutomessagePolicyDocuments> selectConfigList(IPage<AutomessagePolicyDocuments> page, Integer state, String name, String type, SysUser sysUser,Integer departmentId) { |
| | | List<AutomessagePolicyDocuments> automessagePolicyDocumentsList = baseMapper.selectConfigList(page, state, name, type, departmentId); |
| | | if (sysUser!=null){ |
| | | for (AutomessagePolicyDocuments automessagePolicyDocuments:automessagePolicyDocumentsList) { |
| | | if(sysUser.getUserType().equals("1")){//超级管理员 |
| | | automessagePolicyDocuments.setIsDelete(1); |
| | |
| | | } |
| | | } |
| | | } |
| | | } |
| | | return automessagePolicyDocumentsList; |
| | | } |
| | | |
| | |
| | | for (String departmentId : departmentIdsParent) { |
| | | OrganizationChartEntity organizationChart = organizationChartMapper.selectOne(new QueryWrapper<OrganizationChartEntity>().lambda().eq(OrganizationChartEntity::getId, departmentId)); |
| | | OrganizationChartEntity organizationChartParent = organizationChartMapper.selectOne(new QueryWrapper<OrganizationChartEntity>().lambda().eq(OrganizationChartEntity::getId, organizationChart.getParentId())); |
| | | if (organizationChartParent!=null) |
| | | { |
| | | if (organizationChartParent != null) { |
| | | departmentIds.add(organizationChartParent.getId().toString()); |
| | | } |
| | | } |
| | |
| | | public List<GuideRepairOrder> selectConfigList(IPage<GuideRepairOrder> page, Integer state, |
| | | String matterName, List<String> ids, String status, |
| | | String guideUserId, String createTimeStartTime, |
| | | String createTimeTimeEndTime,String classifyId) { |
| | | return baseMapper.selectConfigList(page, state, matterName, ids, status, guideUserId,createTimeStartTime,createTimeTimeEndTime,classifyId); |
| | | String createTimeTimeEndTime, String classifyId) { |
| | | return baseMapper.selectConfigList(page, state, matterName, ids, status, guideUserId, createTimeStartTime, createTimeTimeEndTime, classifyId); |
| | | } |
| | | |
| | | @Override |
| | | public List<GuideRepairOrder> selectConfigList(String matterName, List<String> ids, String status, |
| | | String guideUserId, String createTimeStartTime,String createTimeTimeEndTime,String classifyId) { |
| | | return baseMapper.selectConfigList(matterName, ids, status, guideUserId,createTimeStartTime,createTimeTimeEndTime,classifyId); |
| | | String guideUserId, String createTimeStartTime, String createTimeTimeEndTime, String classifyId) { |
| | | return baseMapper.selectConfigList(matterName, ids, status, guideUserId, createTimeStartTime, createTimeTimeEndTime, classifyId); |
| | | } |
| | | |
| | | @Override |
| | |
| | | } |
| | | |
| | | @Override |
| | | public int deleteComment(Integer id) { |
| | | GuideRepairOrder guideRepairOrder = baseMapper.selectOne(new QueryWrapper<GuideRepairOrder>().lambda().eq(GuideRepairOrder::getId, id)); |
| | | guideRepairOrder.setIsHideComments(1); |
| | | baseMapper.updateById(guideRepairOrder); |
| | | //新增删除评论进展 |
| | | GuideEvolveEntity entity = new GuideEvolveEntity(); |
| | | entity.setCreateTime(LocalDateTime.now()); |
| | | entity.setUpdateTime(LocalDateTime.now()); |
| | | entity.setState("14"); |
| | | entity.setFromUserId(guideRepairOrder.getSubmitUserId() + ""); |
| | | entity.setGuideId(guideRepairOrder.getId().toString()); |
| | | guideEvolveMapper.insertConfig(entity); |
| | | return baseMapper.updateById(guideRepairOrder); |
| | | public ResultData deleteComment(Integer id, SysUser sysUser) { |
| | | if (sysUser.getUserType().equals("1") || sysUser.getIsDivisionHead().equals("1")) { |
| | | GuideRepairOrder guideRepairOrder = baseMapper.selectOne(new QueryWrapper<GuideRepairOrder>().lambda().eq(GuideRepairOrder::getId, id)); |
| | | if (guideRepairOrder!=null&&guideRepairOrder.getState().equals("3")) { |
| | | guideRepairOrder.setIsHideComments(1); |
| | | baseMapper.updateById(guideRepairOrder); |
| | | //新增删除评论进展 |
| | | GuideEvolveEntity entity = new GuideEvolveEntity(); |
| | | entity.setCreateTime(LocalDateTime.now()); |
| | | entity.setUpdateTime(LocalDateTime.now()); |
| | | entity.setState("14"); |
| | | entity.setFromUserId(guideRepairOrder.getSubmitUserId() + ""); |
| | | entity.setGuideId(guideRepairOrder.getId().toString()); |
| | | guideEvolveMapper.insertConfig(entity); |
| | | baseMapper.updateById(guideRepairOrder); |
| | | return ResultData.success("删除评论成功"); |
| | | } else { |
| | | ResultData.error("已办结的单据才能进行删除评论操作"); |
| | | } |
| | | } else { |
| | | ResultData.error("只能部门领导和超级管理员才能删除评论"); |
| | | } |
| | | return ResultData.error(); |
| | | } |
| | | |
| | | |