Merge remote-tracking branch 'origin/huacheng_test' into huacheng_test
| | |
| | | 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 |
| | | ITransactionEventService iTransactionEventService; |
| | | |
| | | @Autowired |
| | | HomeStatisticsService homeStatisticsService; |
| | |
| | | { |
| | | PieChartAll pieChartAll=new PieChartAll(); |
| | | pieChartAll.setWorkOrderNum(iGuideRepairOrderService.countStatisticsNum("",null,null,null,null,null)+""); |
| | | pieChartAll.setFingerpostNum(iTransactionEventService.countStatisticsNum(null)+""); |
| | | 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(); |
| | | |
| | |
| | | if(clasIds.size()>0) |
| | | { |
| | | workOrderNum=iGuideRepairOrderService.countStatisticsNum(null,null,null,null,null,clasIds); |
| | | fingerpostNum=iTransactionEventService.countStatisticsNum(clasIds); |
| | | fingerpostNum=homeStatisticsService.countStatisticsNum(clasIds); |
| | | } |
| | | workOrder.setNum(workOrderNum+""); |
| | | fingerpost.setNum(fingerpostNum+""); |
| | |
| | | import com.dg.core.util.TableDataInfo; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.apache.commons.lang3.StringUtils; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.util.Assert; |
| | | import org.springframework.web.bind.annotation.*; |
| | |
| | | @Authorization |
| | | public ResultData insertConfig(@RequestBody TransactionEvent entity) |
| | | { |
| | | if(StringUtils.isEmpty(entity.getDepartmentId())) |
| | | { |
| | | return ResultData.error("部门id不能为空"); |
| | | } |
| | | |
| | | if(StringUtils.isEmpty(entity.getMatterName())) |
| | | { |
| | | return ResultData.error("事件名称不能为空"); |
| | | } |
| | | |
| | | String id=iTransactionEventService.selectDataIfExist(entity.getDepartmentId(),entity.getMatterName()); |
| | | if(!StringUtils.isEmpty(id)) |
| | | { |
| | | return ResultData.error("事件名称已存在"); |
| | | } |
| | | |
| | | return toAjax(iTransactionEventService.insertConfig(entity)); |
| | | } |
| | | |
| | |
| | | @Authorization |
| | | public ResultData updateConfig(@RequestBody TransactionEvent entity) |
| | | { |
| | | if(StringUtils.isEmpty(entity.getDepartmentId())) |
| | | { |
| | | return ResultData.error("部门id不能为空"); |
| | | } |
| | | |
| | | if(StringUtils.isEmpty(entity.getMatterName())) |
| | | { |
| | | return ResultData.error("事件名称不能为空"); |
| | | } |
| | | |
| | | String id=iTransactionEventService.selectDataIfExist(entity.getDepartmentId(),entity.getMatterName()); |
| | | if(!StringUtils.isEmpty(id)) |
| | | { |
| | | return ResultData.error("事件名称已存在"); |
| | | } |
| | | |
| | | return toAjax(iTransactionEventService.updateConfig(entity)); |
| | | } |
| | | |
| | |
| | | |
| | | |
| | | /** |
| | | * 首页统计用 |
| | | * 根据上级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; |
| | | |
| | |
| | | * @return |
| | | */ |
| | | List<Guidance> guidanceBrowse(); |
| | | |
| | | /** |
| | | * 获取统计数据 首页用 勿动 |
| | | */ |
| | | int countStatisticsNum(List<String> classifyIds); |
| | | |
| | | |
| | | /** |
| | | * 首页统计用 |
| | | * @param parentId |
| | | * @param classifyGrade |
| | | * @return |
| | | */ |
| | | public List<ClassifyAdministration> getClassify(@Param("parentId") String parentId, |
| | | @Param("classifyGrade") String classifyGrade); |
| | | |
| | | } |
| | |
| | | */ |
| | | List<TransactionEvent> selectListByIds(String[] list); |
| | | |
| | | /** |
| | | * 根据部门判断是否有事项名称重复 |
| | | */ |
| | | String selectDataIfExist(@Param("departmentId") String departmentId, |
| | | @Param("matterName") String matterName); |
| | | |
| | | /** |
| | | * 获取统计数据 首页用 勿动 |
| | | * 根据办事分类获取办事指南 |
| | | */ |
| | | int countStatisticsNum(List<String> classifyIds); |
| | | 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; |
| | | |
| | |
| | | * @return |
| | | */ |
| | | Integer countWork(); |
| | | |
| | | /** |
| | | * 获取统计数据 首页用 勿动 |
| | | */ |
| | | 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); |
| | | |
| | | |
| | | } |
| | |
| | | import com.dg.core.db.manual.pojo.QueryResults; |
| | | import com.dg.core.db.manual.pojo.RecommendResult; |
| | | import com.dg.core.db.manual.pojo.Search; |
| | | import org.springframework.data.repository.query.Param; |
| | | |
| | | import java.util.List; |
| | | |
| | |
| | | |
| | | |
| | | /** |
| | | * 获取统计数据 首页用 勿动 |
| | | * 根据部门判断是否有事项名称重复 |
| | | */ |
| | | int countStatisticsNum(List<String> classifyIds); |
| | | 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.countWork(); |
| | | } |
| | | |
| | | @Override |
| | | public int countStatisticsNum(List<String> classifyIds) { |
| | | return baseMapper.countStatisticsNum(classifyIds); |
| | | } |
| | | |
| | | @Override |
| | | public List<ClassifyAdministration> getClassify(String parentId, String classifyGrade) { |
| | | return baseMapper.getClassify(parentId,classifyGrade); |
| | | } |
| | | |
| | | |
| | | } |
| | |
| | | } |
| | | |
| | | @Override |
| | | public int countStatisticsNum(List<String> classifyIds) { |
| | | return baseMapper.countStatisticsNum(classifyIds); |
| | | public String selectDataIfExist(String departmentId, String matterName) { |
| | | return baseMapper.selectDataIfExist(departmentId,matterName); |
| | | } |
| | | |
| | | @Override |
| | | public List<String> selectclassifyId(String classifyId) { |
| | | return baseMapper.selectclassifyId(classifyId); |
| | | } |
| | | |
| | | |
| | | @Override |
| | | public int countNumByMatterName(String matterName) { |
| | | return baseMapper.countNumByMatterName(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 id="countStatisticsNum" resultType="integer"> |
| | | select count(id) from automessage_transaction_event |
| | | <where> |
| | | <if test="classifyIds != null"> |
| | | and classify_id IN |
| | | <foreach collection="classifyIds" item="param" open="(" close=")" separator=","> |
| | | #{param} |
| | | </foreach> |
| | | </if> |
| | | </where> |
| | | </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="selectSearch" resultType="com.dg.core.db.manual.pojo.Search"> |
| | | select id,title,content,views, type FROM( |
| | | select id,organization_name title,resume content,null views,1 type from automessage_organization_chart UNION |
| | | select id,matter_name title,concat((select classify_name from automessage_classify_administration |
| | | where id=(select parent_id from automessage_classify_administration where id=automessage_transaction_event.classify_id)), |
| | | '>',(select classify_name from automessage_classify_administration where id=automessage_transaction_event.classify_id)) content, |
| | | transaction_num views,2 type from automessage_transaction_event |
| | | ) k |
| | | select id,organization_name title,resume content,null views,1 type from automessage_organization_chart UNION |
| | | select id,matter_name title,concat((select classify_name from automessage_classify_administration |
| | | where id=(select parent_id from automessage_classify_administration where id=automessage_transaction_event.classify_id)), |
| | | '>',(select classify_name from automessage_classify_administration where id=automessage_transaction_event.classify_id)) content, |
| | | transaction_num views,2 type from automessage_transaction_event |
| | | ) k |
| | | where k.title like concat('%',#{keyWord}, '%') or k.content like concat('%', #{keyWord}, '%') |
| | | </select> |
| | | |
| | |
| | | </select> |
| | | |
| | | <select id="selectSearchAssociate" resultType="com.dg.core.db.manual.pojo.Search"> |
| | | select id,matter_name title,concat((select classify_name from automessage_classify_administration |
| | | where id=(select parent_id from automessage_classify_administration where id=automessage_transaction_event.classify_id)), |
| | | '>',(select classify_name from automessage_classify_administration where id=automessage_transaction_event.classify_id)) content, |
| | | transaction_num views ,3 type from automessage_transaction_event where associate_names like concat('%',#{keyWord}, '%') |
| | | select id,matter_name title,concat((select classify_name from automessage_classify_administration |
| | | where id=(select parent_id from automessage_classify_administration where id=automessage_transaction_event.classify_id)), |
| | | '>',(select classify_name from automessage_classify_administration where id=automessage_transaction_event.classify_id)) content, |
| | | transaction_num views ,3 type from automessage_transaction_event where associate_names like concat('%',#{keyWord}, '%') |
| | | </select> |
| | | |
| | | |
| | | <!-- 首页统计 勿动 --> |
| | | <select id="countStatisticsNum" resultType="integer"> |
| | | select count(id) from automessage_transaction_event |
| | | <where> |
| | | <if test="classifyIds != null"> |
| | | and classify_id IN |
| | | <foreach collection="classifyIds" item="param" open="(" close=")" separator=","> |
| | | #{param} |
| | | </foreach> |
| | | </if> |
| | | </where> |
| | | |
| | | <select id="selectDataIfExist" resultType="string"> |
| | | 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> |
| | | |
| | | |
| | | |
| | |
| | | @ApiOperation(value = "分页展示操作日志", response = SysOperLogVO.class) |
| | | @PostMapping("pageoperlog") |
| | | public R pageOperLog(@RequestBody SysOperLogVO sysOperLogVO) { |
| | | sysOperLogVO.setCommunityId(0l); |
| | | // sysOperLogVO.setCommunityId(0l); |
| | | // sysOperLogVO.setAreaCode(this.getAreaCode()); |
| | | return userService.pageOperLog(sysOperLogVO); |
| | | } |
| | |
| | | |
| | | |
| | | <select id="pageOperLog" resultType="com.panzhihua.common.model.vos.user.SysOperLogVO"> |
| | | select * from sys_oper_log where community_id = #{sysOperLogVO.communityId} <if test="sysOperLogVO.areaCode !=null"> and area_code = #{sysOperLogVO.areaCode} </if> order by oper_time desc |
| | | select * from sys_oper_log where 1=1 <if test="sysOperLogVO.communityId != null">and community_id = #{sysOperLogVO.communityId}</if> <if test="sysOperLogVO.areaCode !=null"> and area_code = #{sysOperLogVO.areaCode} </if> order by oper_time desc |
| | | </select> |
| | | |
| | | |