| | |
| | | flow.setProcessIsFinished(FlowEngineConstant.STATUS_UNFINISHED); |
| | | } |
| | | } |
| | | // IPropertyCapitalApplyService bean = SpringUtils.getBean(IPropertyCapitalApplyService.class); |
| | | // PropertyCapitalApplyEntity capitalApplyEntity = bean.getOne(Wrappers.<PropertyCapitalApplyEntity>lambdaQuery().eq(PropertyCapitalApplyEntity::getProcessInstanceId, historicTaskInstance.getProcessInstanceId())); |
| | | // if (capitalApplyEntity != null) { |
| | | // flow.setName(capitalApplyEntity.getName()); |
| | | // flow.setDistrictId(capitalApplyEntity.getDistrictId()); |
| | | // flow.setLinkman(capitalApplyEntity.getLinkman()); |
| | | // flow.setLinkPhone(capitalApplyEntity.getLinkPhone()); |
| | | // } |
| | | |
| | | IPropertyCapitalApplyService bean = SpringUtils.getBean(IPropertyCapitalApplyService.class); |
| | | PropertyCapitalApplyEntity capitalApplyEntity = bean.getOne(Wrappers.<PropertyCapitalApplyEntity>lambdaQuery().eq(PropertyCapitalApplyEntity::getProcessInstanceId, historicTaskInstance.getProcessInstanceId())); |
| | | if (capitalApplyEntity != null) { |
| | | flow.setName(capitalApplyEntity.getName()); |
| | | flow.setDistrictId(capitalApplyEntity.getDistrictId()); |
| | | IDistrictService bean1 = SpringUtils.getBean(IDistrictService.class); |
| | | DistrictEntity one = bean1.getOne(Wrappers.<DistrictEntity>lambdaQuery().eq(DistrictEntity::getId, capitalApplyEntity.getDistrictId())); |
| | | if (one != null) { |
| | | flow.setDistrictName(one.getName()); |
| | | } |
| | | flow.setLinkman(capitalApplyEntity.getLinkman()); |
| | | flow.setLinkPhone(capitalApplyEntity.getLinkPhone()); |
| | | } |
| | | |
| | | flow.setStatus(FlowEngineConstant.STATUS_FINISH); |
| | | flowList.add(flow); |
| | | // flowList.add(flow); |
| | | Boolean districtNameFlag = true; |
| | | Boolean nameFlag = true; |
| | | Boolean dateFlag = true; |
| | | Boolean isFilter = false; |
| | | |
| | | if (StringUtils.isNotBlank(bladeFlow.getDistrictName())) { |
| | | isFilter = true; |
| | | // 小区、项目名称、申请时间 |
| | | districtNameFlag = flow.getDistrictName().contains(bladeFlow.getDistrictName()); |
| | | } else if (StringUtils.isNotBlank(bladeFlow.getName())) { |
| | | isFilter = true; |
| | | // 小区、项目名称、申请时间 |
| | | nameFlag = flow.getName().contains(bladeFlow.getName()); |
| | | } else if (bladeFlow.getStartTimes() != null && bladeFlow.getEndTimes() != null) { |
| | | isFilter = true; |
| | | // 小区、项目名称、申请时间 |
| | | dateFlag = flow.getCreateTime().after(bladeFlow.getStartTimes()) |
| | | && flow.getCreateTime().before(bladeFlow.getEndTimes()); |
| | | } |
| | | if (isFilter ) { |
| | | if(districtNameFlag && nameFlag && dateFlag){ |
| | | flowList.add(flow); |
| | | } |
| | | } else { |
| | | flowList.add(flow); |
| | | } |
| | | }); |
| | | // 计算总数 |
| | | long count = doneQuery.count(); |
| | |
| | | flow.setProcessDefinitionVersion(processDefinition.getVersion()); |
| | | flow.setProcessInstanceId(task.getProcessInstanceId()); |
| | | flow.setStatus(status); |
| | | Boolean districtNameFlag = false; |
| | | Boolean nameFlag = false; |
| | | Boolean dateFlag = false; |
| | | Boolean districtNameFlag = true; |
| | | Boolean nameFlag = true; |
| | | Boolean dateFlag = true; |
| | | Boolean isFilter = false; |
| | | |
| | | if (StringUtils.isNotBlank(bladeFlow.getDistrictName())) { |
| | |
| | | && flow.getCreateTime().before(bladeFlow.getEndTimes()); |
| | | } |
| | | if (isFilter ) { |
| | | if(districtNameFlag || nameFlag || dateFlag){ |
| | | if(districtNameFlag && nameFlag && dateFlag){ |
| | | flowList.add(flow); |
| | | } |
| | | } else { |
| | |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import liquibase.pro.packaged.S; |
| | | import lombok.Data; |
| | | |
| | | import java.io.Serializable; |
| | |
| | | @TableField("option_number") |
| | | private Integer optionNumber; |
| | | |
| | | /** 必选:1:否 2:是 */ |
| | | @ApiModelProperty(value = "必选:1:否 2:是", example = "") |
| | | @TableField("mandatory_flag") |
| | | private Integer mandatoryFlag; |
| | | |
| | | /** 附件 */ |
| | | @ApiModelProperty(value = "附件", example = "") |
| | | @TableField("attachment") |
| | | private String attachment; |
| | | |
| | | } |
| | | |
| | |
| | | <result property="optionContent" column="option_content" /> |
| | | <result property="optionDetail" column="option_detail" /> |
| | | <result property="number" column="number" /> |
| | | <result property="createTime" column="crete_time" /> |
| | | <result property="createTime" column="create_time" /> |
| | | <result property="updateTime" column="update_time" /> |
| | | <result property="deleteFlag" column="delete_flag" /> |
| | | <result property="publicDiscussId" column="public_discuss_id" /> |
| | | <result property="parentId" column="parent_id" /> |
| | | <result property="level" column="level" /> |
| | | <result property="selected" column="selected" /> |
| | | <result property="articleId" column="article_id" /> |
| | | <result property="optionNumber" column="option_number" /> |
| | | <result property="mandatoryFlag" column="mandatory_flag" /> |
| | | <result property="attachment" column="attachment" /> |
| | | </resultMap> |
| | | |
| | | |
| | |
| | | <result property="parentId" column="parent_id" /> |
| | | <result property="level" column="level" /> |
| | | <result property="selected" column="selected" /> |
| | | <result property="articleId" column="article_id" /> |
| | | <result property="optionNumber" column="option_number" /> |
| | | <result property="mandatoryFlag" column="mandatory_flag" /> |
| | | <result property="attachment" column="attachment" /> |
| | | <collection property="children" column="id" javaType="list" ofType="org.springblade.modules.discuss.dto.TopicsDTO" select="selectStlCount"> |
| | | </collection> |
| | | |
| | |
| | | level, |
| | | selected, |
| | | article_id, |
| | | option_number |
| | | option_number, |
| | | mandatory_flag, |
| | | attachment |
| | | from |
| | | jczz_topics |
| | | </sql> |
| | |
| | | */ |
| | | List<HouseRentalExcel> export(@Param("vo") HouseRentalTenantVO houseRental); |
| | | |
| | | Integer getStatisticsCount(@Param("house") HouseRentalTenantVO houseRental, |
| | | Integer getStatisticsCount(@Param("vo") HouseRentalTenantVO houseRental, |
| | | @Param("regionChildCodesList") List<String> regionChildCodesList, |
| | | @Param("gridCodeList") List<String> gridCodeList, |
| | | @Param("isAdministrator") Integer isAdministrator); |
| | |
| | | |
| | | <select id="getStatisticsCount" resultType="java.lang.Integer"> |
| | | SELECT |
| | | count( 1 ) |
| | | FROM |
| | | jczz_house_rental jhr |
| | | LEFT JOIN jczz_doorplate_address jda ON jhr.house_code = jda.address_code |
| | | LEFT JOIN jczz_house jh ON jh.house_code = jhr.house_code |
| | | AND jh.is_deleted = 0 |
| | | LEFT JOIN jczz_grid jg ON jg.grid_code = jh.grid_code |
| | | AND jg.is_deleted = 0 |
| | | LEFT JOIN jczz_police_affairs_grid jpag ON jh.jw_grid_code = jpag.jw_grid_code |
| | | AND jpag.is_deleted = 0 |
| | | <where> |
| | | <if test="house.neiCode != null and house.neiCode != ''"> |
| | | and jda.nei_code = #{house.neiCode} |
| | | count(1) |
| | | FROM jczz_house_rental jhr |
| | | JOIN jczz_house jh ON jh.house_code = jhr.house_code and jh.is_deleted = 0 |
| | | LEFT JOIN jczz_grid jg on jg.grid_code = jh.grid_code and jg.is_deleted = 0 |
| | | LEFT JOIN jczz_police_affairs_grid jpag on jh.jw_grid_code= jpag.jw_grid_code and jpag.is_deleted = 0 |
| | | LEFT JOIN ( |
| | | SELECT jht.housing_rental_id,jht.name as tenantName,jht.phone_number as phone |
| | | FROM jczz_household jht RIGHT JOIN ( |
| | | SELECT MAX(ID) as id,housing_rental_id |
| | | FROM jczz_household |
| | | WHERE is_deleted = 0 |
| | | <if test="vo.tenantName != null and vo.tenantName != ''"> |
| | | AND name LIKE CONCAT('%',#{vo.tenantName},'%') |
| | | </if> |
| | | and housing_rental_id is not null |
| | | GROUP BY housing_rental_id |
| | | ) a ON a.id = jht.id and a.housing_rental_id is not null |
| | | ) b ON b.housing_rental_id = jhr.id |
| | | WHERE jhr.is_deleted = 0 |
| | | <if test="vo.auditStatus != null"> |
| | | <if test="vo.auditStatus ==1"> |
| | | AND jhr.audit_status = 1 |
| | | </if> |
| | | <if test="isAdministrator==2"> |
| | | <choose> |
| | | <when test="house.roleName != null and house.roleName != ''"> |
| | | <if test="house.roleName=='wgy'"> |
| | | <choose> |
| | | <when test="gridCodeList !=null and gridCodeList.size()>0"> |
| | | and jh.grid_code in |
| | | <foreach collection="gridCodeList" item="code" open="(" close=")" separator=","> |
| | | #{code} |
| | | </foreach> |
| | | </when> |
| | | <otherwise> |
| | | and jh.grid_code in ('') |
| | | </otherwise> |
| | | </choose> |
| | | </if> |
| | | <if test="house.roleName=='mj'"> |
| | | <choose> |
| | | <when test="regionChildCodesList !=null and regionChildCodesList.size()>0"> |
| | | and jpag.community_code in |
| | | <foreach collection="regionChildCodesList" item="code" open="(" close=")" |
| | | separator=","> |
| | | #{code} |
| | | </foreach> |
| | | </when> |
| | | <otherwise> |
| | | and jpag.community_code in ('') |
| | | </otherwise> |
| | | </choose> |
| | | </if> |
| | | </when> |
| | | <otherwise> |
| | | <choose> |
| | | <when test="regionChildCodesList !=null and regionChildCodesList.size()>0"> |
| | | and |
| | | ( |
| | | jg.grid_code in |
| | | <foreach collection="regionChildCodesList" item="code" open="(" close=")" separator=","> |
| | | #{code} |
| | | </foreach> |
| | | or |
| | | jpag.community_code in |
| | | <foreach collection="regionChildCodesList" item="code" open="(" close=")" separator=","> |
| | | #{code} |
| | | </foreach> |
| | | ) |
| | | </when> |
| | | <otherwise> |
| | | <if test="vo.auditStatus ==2"> |
| | | AND jhr.audit_status = 0 |
| | | </if> |
| | | <if test="vo.auditStatus ==10"> |
| | | AND date_format(jhr.due_time,'%Y-%m-%d')>= date_format(now(),'%Y-%m-%d') |
| | | </if> |
| | | <if test="vo.auditStatus ==20"> |
| | | AND TIMESTAMPDIFF( day, now(), jhr.due_time )<30 |
| | | AND TIMESTAMPDIFF( day, now(), jhr.due_time )>= 0 |
| | | </if> |
| | | <if test="vo.auditStatus ==30"> |
| | | AND date_format(jhr.due_time,'%Y-%m-%d')< date_format(now(),'%Y-%m-%d') |
| | | </if> |
| | | </if> |
| | | <if test="vo.tenantName != null and vo.tenantName != ''"> |
| | | AND b.tenantName LIKE CONCAT('%',#{vo.tenantName},'%') |
| | | </if> |
| | | <if test="vo.tenantRelationship != null"> |
| | | AND jhr.tenant_relationship = #{vo.tenantRelationship} |
| | | </if> |
| | | <if test="vo.houseStatus != null"> |
| | | AND jhr.house_status = #{vo.houseStatus} |
| | | </if> |
| | | <if test="vo.rentalUse != null"> |
| | | AND jhr.rental_use = #{vo.rentalUse} |
| | | </if> |
| | | <if test="vo.dldType != null"> |
| | | <if test="vo.dldType ==1 "> |
| | | AND TIMESTAMPDIFF( MONTH, jhr.rental_time, jhr.due_time )>= 8 |
| | | </if> |
| | | <if test="vo.dldType ==2 "> |
| | | AND 4 <= TIMESTAMPDIFF( MONTH, jhr.rental_time, jhr.due_time ) |
| | | AND TIMESTAMPDIFF( MONTH, jhr.rental_time, jhr.due_time )<=8 |
| | | </if> |
| | | <if test="vo.dldType ==3 "> |
| | | AND TIMESTAMPDIFF( MONTH, jhr.rental_time, jhr.due_time )<4 |
| | | </if> |
| | | </if> |
| | | <if test="vo.startTime != null and vo.startTime != '' and vo.endTime != null and vo.endTime != '' "> |
| | | AND jhr.create_time BETWEEN #{vo.startTime} and #{vo.endTime} |
| | | </if> |
| | | |
| | | </otherwise> |
| | | </choose> |
| | | </otherwise> |
| | | </choose> |
| | | </if> |
| | | and jhr.is_deleted = 0 |
| | | and jhr.audit_status = 0 |
| | | </where> |
| | | <if test="vo.communityCode != null and vo.communityCode != ''"> |
| | | AND jpag.community_code = #{vo.communityCode} |
| | | </if> |
| | | |
| | | <include refid="filterData"/> |
| | | |
| | | </select> |
| | | |
| | |
| | | LEFT JOIN jczz_grid jg on jg.grid_code = jhs.grid_code and jg.is_deleted = 0 |
| | | LEFT JOIN jczz_police_affairs_grid jpag on jhs.jw_grid_code= jpag.jw_grid_code and jpag.is_deleted = 0 |
| | | <where> |
| | | <if test="household.neiCode != null and household.neiCode != ''"> |
| | | and jda.nei_code = #{household.neiCode} |
| | | <if test="household.communityCode != null and household.communityCode != ''"> |
| | | and jg.community_code = #{household.communityCode} |
| | | </if> |
| | | <if test="household.confirmFlag != null and household.confirmFlag != ''"> |
| | | <if test="household.confirmFlag != null"> |
| | | and jh.confirm_flag = #{household.confirmFlag} |
| | | </if> |
| | | <if test="isAdministrator==2"> |
| | |
| | | @Override |
| | | public Integer getStatisticsCount(HouseRentalTenantVO houseRental) { |
| | | CommonParamSet<Object> commonParamSet = new CommonParamSet<>().invoke(HouseRentalTenantVO.class, houseRental); |
| | | return baseMapper.getStatisticsCount(houseRental, commonParamSet.getGridCodeList(), |
| | | commonParamSet.getRegionChildCodesList(), commonParamSet.getIsAdministrator()); |
| | | return baseMapper.getStatisticsCount(houseRental, commonParamSet.getRegionChildCodesList(), |
| | | commonParamSet.getGridCodeList(), commonParamSet.getIsAdministrator()); |
| | | } |
| | | } |
| | |
| | | public Integer statistics(Long userId, String neiCode, Integer confirmFlag) { |
| | | HouseholdVO householdVO = new HouseholdVO(); |
| | | householdVO.setConfirmFlag(confirmFlag); |
| | | householdVO.setNeiCode(neiCode); |
| | | householdVO.setCommunityCode(neiCode); |
| | | CommonParamSet commonParamSet = new CommonParamSet().invoke(HouseholdVO.class, householdVO); |
| | | |
| | | return baseMapper.statistics(householdVO, commonParamSet.getIsAdministrator(), |
| | |
| | | // 修改link |
| | | changeLink(bladeFile); |
| | | // 返回 |
| | | return R.data(200,bladeFile,""); |
| | | return R.data(200, bladeFile, ""); |
| | | } |
| | | |
| | | /** |
| | | * 上传文件 |
| | | * |
| | | * @param file 文件 |
| | | * @return ObjectStat |
| | | */ |
| | | @SneakyThrows |
| | | @PostMapping("/put-pdfFile") |
| | | public R<BladeFile> putPdfFile(@RequestParam MultipartFile file) { |
| | | String originalFilename = file.getOriginalFilename(); |
| | | String fileExtension = originalFilename.substring(originalFilename.lastIndexOf(".") + 1); |
| | | if (fileExtension.equalsIgnoreCase("pdf")) { |
| | | BladeFile bladeFile = ossBuilder.template().putFile(file.getOriginalFilename(), file.getInputStream()); |
| | | // 修改link |
| | | changeLink(bladeFile); |
| | | // 返回 |
| | | return R.data(200, bladeFile, ""); |
| | | } else { |
| | | return R.fail("上传的附件必须是pdf格式!"); |
| | | } |
| | | |
| | | } |
| | | |
| | | /** |
| | | * 修改link |
| | | * |
| | | * @param bladeFile |
| | | */ |
| | | private void changeLink(BladeFile bladeFile) { |
| | | if (null!=bladeFile){ |
| | | if (null != bladeFile) { |
| | | // 替换url link 前缀 |
| | | String newLink = ossBuilder.ossProperties().getEndpoint() + bladeFile.getName(); |
| | | bladeFile.setLink(newLink); |
| | |
| | | /** |
| | | * 自定义前缀上传文件 |
| | | * |
| | | * @param file 文件 |
| | | * @param file 文件 |
| | | * @param prefixPath 文件 |
| | | * @param isCheck 是否校验 |
| | | * @param isCheck 是否校验 |
| | | * @return ObjectStat |
| | | */ |
| | | @SneakyThrows |
| | |
| | | @RequestParam(required = false) String prefixPath, |
| | | @RequestParam(required = false) Integer isCheck) { |
| | | // 不传默认不检验 |
| | | if(null!=isCheck){ |
| | | if (null != isCheck) { |
| | | String checkResult = WeiXinSecurityUtil.checkImg(file); |
| | | JSONObject jsonObject = JSONObject.parseObject(checkResult); |
| | | Integer errorCode = Integer.parseInt(jsonObject.getString("errcode")); |
| | | if (errorCode!=0){ |
| | | return R.data(201,null,"图片存在敏感内容,请更换其他图片!"); |
| | | if (errorCode != 0) { |
| | | return R.data(201, null, "图片存在敏感内容,请更换其他图片!"); |
| | | } |
| | | } |
| | | BladeFile bladeFile = ossBuilder.templateByPrefixPath(prefixPath).putFile(file.getOriginalFilename(), file.getInputStream()); |
| | | // 修改link |
| | | changeLink(bladeFile); |
| | | return R.data(200,bladeFile,""); |
| | | return R.data(200, bladeFile, ""); |
| | | } |
| | | |
| | | /** |
| | | * 自定义前缀上传文件并保存至附件表 |
| | | * |
| | | * @param file 文件 |
| | | * @param file 文件 |
| | | * @param prefixPath 文件 |
| | | * @param isCheck 是否校验 |
| | | * @param isCheck 是否校验 |
| | | * @return ObjectStat |
| | | */ |
| | | @SneakyThrows |
| | |
| | | @RequestParam(required = false) String prefixPath, |
| | | @RequestParam(required = false) Integer isCheck) { |
| | | // 不传默认不检验 |
| | | if(null!=isCheck){ |
| | | if (null != isCheck) { |
| | | String checkResult = WeiXinSecurityUtil.checkImg(file); |
| | | JSONObject jsonObject = JSONObject.parseObject(checkResult); |
| | | Integer errorCode = Integer.parseInt(jsonObject.getString("errcode")); |
| | | if (errorCode!=0){ |
| | | return R.data(201,null,"图片存在敏感内容,请更换其他图片!"); |
| | | if (errorCode != 0) { |
| | | return R.data(201, null, "图片存在敏感内容,请更换其他图片!"); |
| | | } |
| | | } |
| | | String fileName = file.getOriginalFilename(); |
| | | BladeFile bladeFile = ossBuilder.templateByPrefixPath(prefixPath).putFile(file.getOriginalFilename(), file.getInputStream()); |
| | | Long attachId = buildAttach(fileName, file.getSize(), bladeFile); |
| | | buildAttachData(attachId,fileName, file.getSize(), bladeFile,file); |
| | | buildAttachData(attachId, fileName, file.getSize(), bladeFile, file); |
| | | bladeFile.setAttachId(attachId); |
| | | // 修改link |
| | | changeLink(bladeFile); |
| | | return R.data(200,bladeFile,""); |
| | | return R.data(200, bladeFile, ""); |
| | | } |
| | | |
| | | /** |
| | |
| | | /** |
| | | * 构建附件数据表 |
| | | * |
| | | * @param attachId 附件id |
| | | * @param attachId 附件id |
| | | * @param fileName 文件名 |
| | | * @param fileSize 文件大小 |
| | | * @param bladeFile 对象存储文件 |
| | | * @return attachId |
| | | */ |
| | | private Long buildAttachData(Long attachId,String fileName, Long fileSize, BladeFile bladeFile,MultipartFile file) { |
| | | private Long buildAttachData(Long attachId, String fileName, Long fileSize, BladeFile bladeFile, MultipartFile file) { |
| | | String fileExtension = FileUtil.getFileExtension(fileName); |
| | | AttachData attach = new AttachData(); |
| | | attach.setAttachId(attachId); |
| | |
| | | Integer zhsh = iHouseholdService.statistics(roleType > 0 ? AuthUtil.getUserId() : null, neiCode,0); |
| | | // 出租审核 |
| | | HouseRentalTenantVO houseRentalTenantVO = new HouseRentalTenantVO(); |
| | | houseRentalTenantVO.setNeiCode(neiCode); |
| | | houseRentalTenantVO.setCommunityCode(neiCode); |
| | | houseRentalTenantVO.setAuditStatus(2); |
| | | Integer czsh = iHouseRentalService.getStatisticsCount(houseRentalTenantVO); |
| | | // 场所审核 |
| | | Integer cssh = SpringUtils.getBean(IPlaceExtService.class).selectCount(roleType > 0 ? AuthUtil.getUserId() : null, neiCode, 1); |