Merge remote-tracking branch 'origin/master'
14 files modified
2 files added
| | |
| | | public interface PartyOrganizationMapper extends BaseMapper<PartyOrganization> { |
| | | |
| | | |
| | | List<PartyOrganizationVO> getPage(IPage<PartyOrganizationVO> page, @Param("vo") PartyOrganizationVO partyOrganizationVO); |
| | | List<PartyOrganizationVO> getPage(IPage<PartyOrganizationVO> page, |
| | | @Param("vo") PartyOrganizationVO partyOrganizationVO, |
| | | @Param("regionChildCodesList") List<String> regionChildCodesList, |
| | | @Param("isAdministrator") Integer isAdministrator); |
| | | } |
| | |
| | | left join jczz_household jh ON jh.id = jpom.household_id |
| | | WHERE |
| | | jpo.is_deleted = 0 |
| | | |
| | | <if test="vo.organizationName != null and vo.organizationName != ''"> |
| | | AND jpo.organization_name LIKE CONCAT('%',#{vo.organizationName},'%') |
| | | </if> |
| | |
| | | package org.springblade.modules.partyOrganization.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import org.springblade.common.cache.SysCache; |
| | | import org.springblade.core.mp.base.BaseServiceImpl; |
| | | import org.springblade.core.secure.utils.AuthUtil; |
| | | import org.springblade.modules.partyOrganization.entity.PartyOrganization; |
| | |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import java.util.List; |
| | | |
| | | @Service |
| | | public class PartyOrganizationServiceImpl extends BaseServiceImpl<PartyOrganizationMapper, PartyOrganization> implements IPartyOrganizationService { |
| | | |
| | | @Autowired |
| | | private IDeptService deptService; |
| | | |
| | | @Override |
| | | public IPage<PartyOrganizationVO> getPage(IPage<PartyOrganizationVO> page, PartyOrganizationVO partyOrganizationVO) { |
| | | |
| | | Dept dept = deptService.getById(AuthUtil.getDeptId()); |
| | | if (null!=dept){ |
| | | partyOrganizationVO.setAreaId(dept.getRegionCode()); |
| | | } |
| | | return page.setRecords(baseMapper.getPage(page,partyOrganizationVO)); |
| | | List<String> regionChildCodesList = SysCache.getRegionChildCodesByDeptId(AuthUtil.getDeptId()); |
| | | Integer isAdministrator = AuthUtil.isAdministrator()==true?1:2; |
| | | return page.setRecords(baseMapper.getPage(page,partyOrganizationVO,regionChildCodesList,isAdministrator)); |
| | | } |
| | | } |
| | |
| | | */ |
| | | List<PlaceExtVO> selectPlaceExtPage(IPage page, |
| | | @Param("placeExt") PlaceExtVO placeExt, |
| | | @Param("houseCodeList") List<String> houseCodeList); |
| | | @Param("houseCodeList") List<String> houseCodeList, |
| | | @Param("regionChildCodesList") List<String> regionChildCodesList, |
| | | @Param("isAdministrator") Integer isAdministrator); |
| | | |
| | | /** |
| | | * 场所详情表 自定义详情 |
| | |
| | | LEFT JOIN jczz_grid jg on jg.id = jgr.grid_id |
| | | WHERE |
| | | jpe.is_deleted = 0 |
| | | <if test="placeExt.communityCode != null and placeExt.communityCode != ''"> |
| | | and jg.community_code like concat('%',#{placeExt.communityCode},'%') |
| | | <if test="isAdministrator==2"> |
| | | <choose> |
| | | <when test="regionChildCodesList !=null and regionChildCodesList.size()>0"> |
| | | and jg.community_code in |
| | | <foreach collection="regionChildCodesList" item="code" open="(" close=")" separator=","> |
| | | #{code} |
| | | </foreach> |
| | | </when> |
| | | <otherwise> |
| | | and jg.community_code in ('') |
| | | </otherwise> |
| | | </choose> |
| | | </if> |
| | | <if test="placeExt.placeName != null and placeExt.placeName != ''"> |
| | | and jp.place_name like concat('%',#{placeExt.placeName},'%') |
| | |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import org.apache.logging.log4j.util.Strings; |
| | | import org.springblade.common.cache.SysCache; |
| | | import org.springblade.core.secure.utils.AuthUtil; |
| | | import org.springblade.modules.grid.service.IGridService; |
| | | import org.springblade.modules.place.entity.PlaceEntity; |
| | |
| | | placeExt.setCreateUser(AuthUtil.getUserId()); |
| | | } |
| | | } |
| | | Dept dept = deptService.getById(AuthUtil.getDeptId()); |
| | | if (null != dept) { |
| | | placeExt.setCommunityCode(dept.getRegionCode()); |
| | | } |
| | | List<String> regionChildCodesList = SysCache.getRegionChildCodesByDeptId(AuthUtil.getDeptId()); |
| | | Integer isAdministrator = AuthUtil.isAdministrator()==true?1:2; |
| | | if (AuthUtil.getUserAccount().equals("18879306957")) { |
| | | placeExt.setCommunityCode("361102003027"); |
| | | placeExt.setCreateUser(null); |
| | | } |
| | | return page.setRecords(baseMapper.selectPlaceExtPage(page, placeExt, list)); |
| | | return page.setRecords(baseMapper.selectPlaceExtPage(page, placeExt, list,regionChildCodesList,isAdministrator)); |
| | | } |
| | | |
| | | /** |
| | |
| | | * @return |
| | | */ |
| | | List<PropertyCapitalApplyVO> selectPropertyCapitalApplyPage(IPage page, |
| | | @Param("propertyCapitalApply") PropertyCapitalApplyVO propertyCapitalApply); |
| | | @Param("propertyCapitalApply") PropertyCapitalApplyVO propertyCapitalApply, |
| | | @Param("regionChildCodesList") List<String> regionChildCodesList, |
| | | @Param("isAdministrator") Integer isAdministrator); |
| | | |
| | | |
| | | } |
| | |
| | | #{item} |
| | | </foreach> |
| | | </if> |
| | | <if test="propertyCapitalApply.regionCode != null and propertyCapitalApply.regionCode !='' "> |
| | | and jd.community_code like concat('%',#{propertyCapitalApply.regionCode},'%') |
| | | <if test="isAdministrator==2"> |
| | | <choose> |
| | | <when test="regionChildCodesList !=null and regionChildCodesList.size()>0"> |
| | | and jd.community_code in |
| | | <foreach collection="regionChildCodesList" item="code" open="(" close=")" separator=","> |
| | | #{code} |
| | | </foreach> |
| | | </when> |
| | | <otherwise> |
| | | and jd.community_code in ('') |
| | | </otherwise> |
| | | </choose> |
| | | </if> |
| | | order by jpca.create_time desc |
| | | </select> |
| | |
| | | import org.flowable.engine.RepositoryService; |
| | | import org.flowable.engine.repository.ProcessDefinition; |
| | | import org.flowable.engine.repository.ProcessDefinitionQuery; |
| | | import org.springblade.common.cache.SysCache; |
| | | import org.springblade.common.constant.CommonConstant; |
| | | import org.springblade.common.utils.SpringUtils; |
| | | import org.springblade.core.log.exception.ServiceException; |
| | |
| | | |
| | | @Override |
| | | public IPage<PropertyCapitalApplyVO> selectPropertyCapitalApplyPage(IPage<PropertyCapitalApplyVO> page, PropertyCapitalApplyVO propertyCapitalApply) { |
| | | Dept dept = deptService.getById(AuthUtil.getDeptId()); |
| | | if (null != dept) { |
| | | propertyCapitalApply.setRegionCode(dept.getRegionCode()); |
| | | } |
| | | List<String> regionChildCodesList = SysCache.getRegionChildCodesByDeptId(AuthUtil.getDeptId()); |
| | | Integer isAdministrator = AuthUtil.isAdministrator()==true?1:2; |
| | | // 判断角色,物业角色只能查询当前小区的 |
| | | String userRole = AuthUtil.getUserRole(); |
| | | if (userRole.contains("wygly")) { |
| | |
| | | return page.setRecords(new ArrayList<PropertyCapitalApplyVO>()); |
| | | } |
| | | } |
| | | return page.setRecords(baseMapper.selectPropertyCapitalApplyPage(page, propertyCapitalApply)); |
| | | return page.setRecords(baseMapper.selectPropertyCapitalApplyPage(page, propertyCapitalApply,regionChildCodesList,isAdministrator)); |
| | | } |
| | | |
| | | @Autowired |
| | |
| | | <resultMap id="selectUserDetailMap" type="org.springblade.modules.system.vo.UserDetailVO" autoMapping="true"> |
| | | <id property="id" column="id" /> |
| | | <collection property="deptList" javaType="java.util.List" |
| | | ofType="org.springblade.modules.system.entity.Dept" autoMapping="true"> |
| | | ofType="org.springblade.modules.system.vo.DeptDetailVO" autoMapping="true"> |
| | | <id property="id" column="cid"/> |
| | | <id property="level" column="region_level"/> |
| | | </collection> |
| | | </resultMap> |
| | | |
| | |
| | | <select id="getUserInfo" resultMap="selectUserDetailMap"> |
| | | SELECT |
| | | bu.*, |
| | | bd.id as cid,bd.parent_id,bd.ancestors,bd.dept_category,bd.dept_name,bd.full_name,bd.sort,bd.region_code |
| | | bd.id as cid,bd.parent_id,bd.ancestors,bd.dept_category,bd.dept_name,bd.full_name,bd.sort,bd.region_code, |
| | | br.region_level |
| | | FROM blade_user bu |
| | | left join blade_user_dept bud on bud.user_id = bu.id |
| | | left join blade_dept bd on bud.dept_id = bd.id and bd.is_deleted = 0 |
| | | left join blade_region br on br.code = bd.region_code |
| | | where bu.is_deleted = 0 |
| | | and bu.id = #{userId} |
| | | </select> |
| New file |
| | |
| | | /* |
| | | * Copyright (c) 2018-2028, Chill Zhuang All rights reserved. |
| | | * |
| | | * Redistribution and use in source and binary forms, with or without |
| | | * modification, are permitted provided that the following conditions are met: |
| | | * |
| | | * Redistributions of source code must retain the above copyright notice, |
| | | * this list of conditions and the following disclaimer. |
| | | * Redistributions in binary form must reproduce the above copyright |
| | | * notice, this list of conditions and the following disclaimer in the |
| | | * documentation and/or other materials provided with the distribution. |
| | | * Neither the name of the dreamlu.net developer nor the names of its |
| | | * contributors may be used to endorse or promote products derived from |
| | | * this software without specific prior written permission. |
| | | * Author: Chill 庄骞 (smallchill@163.com) |
| | | */ |
| | | package org.springblade.modules.system.vo; |
| | | |
| | | import com.fasterxml.jackson.annotation.JsonInclude; |
| | | import com.fasterxml.jackson.databind.annotation.JsonSerialize; |
| | | import com.fasterxml.jackson.databind.ser.std.ToStringSerializer; |
| | | import io.swagger.annotations.ApiModel; |
| | | import lombok.Data; |
| | | import lombok.EqualsAndHashCode; |
| | | import org.springblade.core.tool.node.INode; |
| | | import org.springblade.modules.system.entity.Dept; |
| | | |
| | | import java.util.ArrayList; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * 视图实体类 |
| | | * |
| | | * @author Chill |
| | | */ |
| | | @Data |
| | | @EqualsAndHashCode(callSuper = true) |
| | | @ApiModel(value = "DeptVO对象", description = "DeptVO对象") |
| | | public class DeptDetailVO extends Dept { |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | /** |
| | | * 层级 |
| | | */ |
| | | private Integer level; |
| | | } |
| | |
| | | |
| | | private List<Role> roleList = new ArrayList<>(); |
| | | |
| | | private List<Dept> deptList = new ArrayList<>(); |
| | | private List<DeptDetailVO> deptList = new ArrayList<>(); |
| | | } |
| | |
| | | * @param userId |
| | | * @return |
| | | */ |
| | | TaskReportStatistics getStatisticsCount(@Param("userId") Long userId, @Param("houseCode") String houseCode, @Param("neiCode") String neiCode); |
| | | TaskReportStatistics getStatisticsCount(@Param("userId") Long userId, |
| | | @Param("houseCode") String houseCode, |
| | | @Param("regionChildCodesList") List<String> regionChildCodesList, |
| | | @Param("isAdministrator") Integer isAdministrator); |
| | | |
| | | Integer getStatistics(Long userId,String neiCode); |
| | | |
| | |
| | | WHERE is_deleted = 0 |
| | | <if test="userId != null"> |
| | | and create_user = #{userId} |
| | | |
| | | </if> |
| | | <if test="houseCode != null and houseCode != ''"> |
| | | and address_code = #{houseCode} |
| | | </if> |
| | | <if test="neiCode != null and neiCode != ''"> |
| | | AND jda.nei_code LIKE concat( #{neiCode}, '%' ) |
| | | <if test="isAdministrator==2"> |
| | | <choose> |
| | | <when test="regionChildCodesList !=null and regionChildCodesList.size()>0"> |
| | | and jda.nei_code in |
| | | <foreach collection="regionChildCodesList" item="code" open="(" close=")" separator=","> |
| | | #{code} |
| | | </foreach> |
| | | </when> |
| | | <otherwise> |
| | | and jda.nei_code in ('') |
| | | </otherwise> |
| | | </choose> |
| | | </if> |
| | | </select> |
| | | |
| | |
| | | */ |
| | | @Override |
| | | public TaskReportStatistics getStatisticsCount(String houseCode) { |
| | | String neiCode = ""; |
| | | Dept dept = deptService.getById(AuthUtil.getDeptId()); |
| | | if (null != dept) { |
| | | neiCode = dept.getRegionCode(); |
| | | } |
| | | return baseMapper.getStatisticsCount(AuthUtil.getUserId(), houseCode, neiCode); |
| | | List<String> regionChildCodesList = SysCache.getRegionChildCodesByDeptId(AuthUtil.getDeptId()); |
| | | Integer isAdministrator = AuthUtil.isAdministrator()==true?1:2; |
| | | return baseMapper.getStatisticsCount(AuthUtil.getUserId(), houseCode, regionChildCodesList,isAdministrator); |
| | | } |
| | | |
| | | /** |
| New file |
| | |
| | | package org.springblade.modules.ureport; |
| | | |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import org.springblade.core.mp.support.Condition; |
| | | import org.springblade.core.mp.support.Query; |
| | | import org.springblade.core.tool.api.R; |
| | | import org.springblade.modules.house.entity.HouseholdEntity; |
| | | import org.springblade.modules.house.service.IUserHouseLabelService; |
| | | import org.springblade.modules.house.vo.HouseholdLabelVO; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Component; |
| | | |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * 住户bean |
| | | */ |
| | | @Component |
| | | public class HouseholdBean { |
| | | |
| | | @Autowired |
| | | private IUserHouseLabelService householdLabelService; |
| | | |
| | | /** |
| | | * 统计标签 |
| | | * @param dsName |
| | | * @param datasetName |
| | | * @param parameters |
| | | * @return |
| | | */ |
| | | public R statisticalLabels(String dsName, String datasetName, Map<String, Object> parameters) { |
| | | HouseholdLabelVO householdLabel = new HouseholdLabelVO(); |
| | | Query query= new Query(); |
| | | query.setCurrent(1); |
| | | query.setSize(100); |
| | | IPage<HouseholdLabelVO> pages = householdLabelService.statisticalLabels(Condition.getPage(query), householdLabel); |
| | | return R.data(pages.getRecords()); |
| | | } |
| | | } |