12 files modified
1 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 |
| | |
| | | * @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()); |
| | | } |
| | | } |