修改删除分类需要判断旗下是否有二级分类及分类下是否关联有办事指南bug
| | |
| | | import com.dg.core.db.gen.entity.ClassifyAdministration; |
| | | import com.dg.core.db.gen.entity.TransactionEvent; |
| | | import com.dg.core.service.IClassifyAdministrationService; |
| | | import com.dg.core.service.ITransactionEventService; |
| | | import com.dg.core.util.TableDataInfo; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | |
| | | |
| | | @Autowired(required = true) |
| | | IClassifyAdministrationService iClassifyAdministrationService; |
| | | |
| | | @Autowired(required = true) |
| | | ITransactionEventService iTransactionEventService; |
| | | |
| | | /** |
| | | * 获取管理菜单列表 |
| | | * @return |
| | |
| | | { |
| | | return ResultData.error("id 不能为空"); |
| | | } |
| | | |
| | | /** |
| | | * 根据上级id查询子分类 |
| | | * @param parentId |
| | | * @return |
| | | */ |
| | | List<String> list=iClassifyAdministrationService.selectParent(Id); |
| | | if(list!=null && list.size()>0) |
| | | { |
| | | return ResultData.error("请先删除其下的二级分类"); |
| | | } |
| | | |
| | | List<String> listIds=iTransactionEventService.selectclassifyId(Id); |
| | | if(listIds!=null && listIds.size()>0) |
| | | { |
| | | return ResultData.error("分类下有办事指南!不能删除"); |
| | | } |
| | | |
| | | return toAjax(iClassifyAdministrationService.deleteConfigById(Id)); |
| | | } |
| | | |
| | |
| | | @Autowired |
| | | IGuideEvolveService iGuideEvolveService; |
| | | |
| | | //分类 |
| | | @Autowired |
| | | IClassifyAdministrationService iClassifyAdministrationService; |
| | | |
| | | @Autowired |
| | | HomeStatisticsService homeStatisticsService; |
| | |
| | | pieChartAll.setFingerpostNum(homeStatisticsService.countStatisticsNum(null)+""); |
| | | List<PieChart> workOrderList=new ArrayList<>(); |
| | | List<PieChart> fingerpostList=new ArrayList<>(); |
| | | List<ClassifyAdministration> oneIds=iClassifyAdministrationService.getClassify(null,"1"); |
| | | List<ClassifyAdministration> oneIds=homeStatisticsService.getClassify(null,"1"); |
| | | for (ClassifyAdministration oneClassify:oneIds) |
| | | { |
| | | PieChart workOrder=new PieChart(); |
| | | PieChart fingerpost=new PieChart(); |
| | | workOrder.setName(oneClassify.getClassifyName()); |
| | | fingerpost.setName(oneClassify.getClassifyName()); |
| | | List<ClassifyAdministration> twoIds = iClassifyAdministrationService.getClassify(oneClassify.getId()+"",null); |
| | | List<ClassifyAdministration> twoIds = homeStatisticsService.getClassify(oneClassify.getId()+"",null); |
| | | |
| | | List clasIds=new ArrayList(); |
| | | |
| | |
| | | |
| | | |
| | | /** |
| | | * 首页统计用 |
| | | * 根据上级id查询子分类 |
| | | * @param parentId |
| | | * @param classifyGrade |
| | | * @return |
| | | */ |
| | | public List<ClassifyAdministration> getClassify(@Param("parentId") String parentId, |
| | | @Param("classifyGrade") String classifyGrade); |
| | | List<String> selectParent(String parentId); |
| | | |
| | | |
| | | |
| | | |
| | | } |
| | |
| | | package com.dg.core.db.gen.mapper; |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.dg.core.db.gen.entity.ClassifyAdministration; |
| | | import com.dg.core.db.gen.entity.Guidance; |
| | | import com.dg.core.db.gen.entity.GuidePlate; |
| | | import com.dg.core.db.gen.entity.OrganizationEntity; |
| | | import org.springframework.data.repository.query.Param; |
| | | |
| | | import java.util.List; |
| | | |
| | |
| | | */ |
| | | int countStatisticsNum(List<String> classifyIds); |
| | | |
| | | |
| | | /** |
| | | * 首页统计用 |
| | | * @param parentId |
| | | * @param classifyGrade |
| | | * @return |
| | | */ |
| | | public List<ClassifyAdministration> getClassify(@Param("parentId") String parentId, |
| | | @Param("classifyGrade") String classifyGrade); |
| | | |
| | | } |
| | |
| | | String selectDataIfExist(@Param("departmentId") String departmentId, |
| | | @Param("matterName") String matterName); |
| | | |
| | | /** |
| | | * 根据办事分类获取办事指南 |
| | | */ |
| | | List<String> selectclassifyId(String classifyId); |
| | | |
| | | |
| | | |
| | | } |
| | |
| | | package com.dg.core.service; |
| | | |
| | | import com.dg.core.db.gen.entity.ClassifyAdministration; |
| | | import com.dg.core.db.gen.entity.Guidance; |
| | | import com.dg.core.db.gen.entity.GuidePlate; |
| | | import com.dg.core.db.gen.entity.OrganizationEntity; |
| | | import org.springframework.data.repository.query.Param; |
| | | |
| | | import java.util.List; |
| | | |
| | |
| | | * 获取统计数据 首页用 勿动 |
| | | */ |
| | | int countStatisticsNum(List<String> classifyIds); |
| | | |
| | | |
| | | /** |
| | | * 首页统计用 |
| | | * @param parentId |
| | | * @param classifyGrade |
| | | * @return |
| | | */ |
| | | public List<ClassifyAdministration> getClassify(@Param("parentId") String parentId, |
| | | @Param("classifyGrade") String classifyGrade); |
| | | |
| | | } |
| | |
| | | */ |
| | | ResultData queryListById(Integer id); |
| | | |
| | | |
| | | /** |
| | | * 首页统计用 |
| | | * 根据上级id查询子分类 |
| | | * @param parentId |
| | | * @param classifyGrade |
| | | * @return |
| | | */ |
| | | public List<ClassifyAdministration> getClassify(String parentId, |
| | | String classifyGrade); |
| | | |
| | | |
| | | List<String> selectParent(String parentId); |
| | | |
| | | |
| | | } |
| | |
| | | String selectDataIfExist(@Param("departmentId") String departmentId, |
| | | @Param("matterName") String matterName); |
| | | |
| | | |
| | | /** |
| | | * 根据办事分类获取办事指南 |
| | | */ |
| | | List<String> selectclassifyId(String classifyId); |
| | | |
| | | |
| | | } |
| | |
| | | } |
| | | |
| | | @Override |
| | | public List<ClassifyAdministration> getClassify(String parentId, String classifyGrade) { |
| | | return baseMapper.getClassify(parentId,classifyGrade); |
| | | public List<String> selectParent(String parentId) { |
| | | return baseMapper.selectParent(parentId); |
| | | } |
| | | |
| | | |
| | | @Override |
| | | public int insertConfig(ClassifyAdministration entity) { |
| | | return baseMapper.insertConfig(entity); |
| | |
| | | package com.dg.core.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.dg.core.db.gen.entity.ClassifyAdministration; |
| | | import com.dg.core.db.gen.entity.Guidance; |
| | | import com.dg.core.db.gen.entity.GuidePlate; |
| | | import com.dg.core.db.gen.entity.OrganizationEntity; |
| | |
| | | return baseMapper.countStatisticsNum(classifyIds); |
| | | } |
| | | |
| | | @Override |
| | | public List<ClassifyAdministration> getClassify(String parentId, String classifyGrade) { |
| | | return baseMapper.getClassify(parentId,classifyGrade); |
| | | } |
| | | |
| | | |
| | | } |
| | |
| | | return baseMapper.selectDataIfExist(departmentId,matterName); |
| | | } |
| | | |
| | | @Override |
| | | public List<String> selectclassifyId(String classifyId) { |
| | | return baseMapper.selectclassifyId(classifyId); |
| | | } |
| | | |
| | | |
| | | @Override |
| | | public int countNumByMatterName(String matterName) { |
| | |
| | | </where> |
| | | </select> |
| | | |
| | | <!-- 首页统计用 勿动 --> |
| | | <select id="getClassify" parameterType="string" resultType="com.dg.core.db.gen.entity.ClassifyAdministration"> |
| | | select id,classify_name from automessage_classify_administration |
| | | |
| | | |
| | | |
| | | <select id="selectParent" resultType="string"> |
| | | select id from automessage_classify_administration |
| | | <where> |
| | | <if test="parentId != null and parentId != ''"> |
| | | AND parent_id=#{parentId} |
| | | </if> |
| | | <if test="classifyGrade != null and classifyGrade != ''"> |
| | | AND classify_grade = #{classifyGrade} |
| | | AND parent_id = #{parentId} |
| | | </if> |
| | | </where> |
| | | |
| | | </select> |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | |
| | | </select> |
| | | |
| | | |
| | | <!-- 首页统计用 勿动 --> |
| | | <select id="getClassify" parameterType="string" resultType="com.dg.core.db.gen.entity.ClassifyAdministration"> |
| | | select id,classify_name from automessage_classify_administration |
| | | <where> |
| | | <if test="parentId != null and parentId != ''"> |
| | | AND parent_id=#{parentId} |
| | | </if> |
| | | <if test="classifyGrade != null and classifyGrade != ''"> |
| | | AND classify_grade = #{classifyGrade} |
| | | </if> |
| | | </where> |
| | | |
| | | </select> |
| | | |
| | | |
| | | </mapper> |
| | |
| | | |
| | | |
| | | <select id="selectDataIfExist" resultType="string"> |
| | | select id from automessage_transaction_event |
| | | select id from automessage_transaction_event |
| | | where department_id=#{departmentId} |
| | | and matter_name=#{matterName} |
| | | </select> |
| | | |
| | | <select id="selectclassifyId" resultType="string"> |
| | | select id from automessage_transaction_event |
| | | where classify_id=#{classifyId} |
| | | </select> |
| | | |
| | | |
| | | |
| | | </mapper> |