| | |
| | | |
| | | Integer NUMBER_EIGHT = 8; |
| | | |
| | | Integer NUMBER_SEVEN = 7; |
| | | |
| | | String RESIDENT = "居民"; |
| | | |
| | | |
| | |
| | | |
| | | String FIRE_SELF_CHECK_NOTICE = "消防自查"; |
| | | |
| | | String RESIDENCE_PERMIT_APPLICATION = "居住证申请"; |
| | | |
| | | } |
| | |
| | | and jpp.ethnicity != 1 |
| | | </if> |
| | | <if test="placePractitioner.type == 3"> |
| | | and (((YEAR(CURDATE()) - YEAR(jpp.birthday)) < 18) or ( jpp.ethnicity != 1)) |
| | | and (CURDATE() < DATE_ADD( birthday, INTERVAL 18 YEAR ) or ( jpp.ethnicity != 1)) |
| | | and jc.category_no in (180202,180201) |
| | | </if> |
| | | and jpp.is_deleted = 0 |
| | |
| | | jczz_place_practitioner |
| | | <where> |
| | | <if test="type == 1"> |
| | | and (YEAR(CURDATE()) - YEAR(birthday)) < 18 |
| | | and CURDATE() < DATE_ADD( birthday, INTERVAL 18 YEAR ) |
| | | </if> |
| | | <if test="type == 2"> |
| | | and ethnicity != 1 |
| | |
| | | @ApiOperationSupport(order = 4) |
| | | @ApiOperation(value = "新增", notes = "传入taskResidencePermitApply") |
| | | public R save(@Valid @RequestBody TaskResidencePermitApplyEntity taskResidencePermitApply) { |
| | | return R.status(taskResidencePermitApplyService.save(taskResidencePermitApply)); |
| | | return R.status(taskResidencePermitApplyService.saveResidencePermitApplyEntity(taskResidencePermitApply)); |
| | | } |
| | | |
| | | /** |
| | |
| | | private String houseCode; |
| | | |
| | | /** 事件类型(1:取保候审,2旅馆 3打金店 4二手手机 5二手车 6 校园安全) */ |
| | | @ApiModelProperty(value = "事件类型(1:取保候审,5二手交易 7.九小自查任务 8 九小整改任务 )", example = "") |
| | | @ApiModelProperty(value = "事件类型(1:取保候审,2.居住证申请 5二手交易 7.消防自查任务 8 九小整改任务 )", example = "") |
| | | @TableField("report_type") |
| | | private Integer reportType; |
| | | /** |
| | |
| | | @TableField("update_time") |
| | | private Date updateTime; |
| | | |
| | | /** 状态 1:待审核 2:审核通过 3:审核不通过 4: 待提交(待接收) */ |
| | | @ApiModelProperty(value = "状态 1:待审核 2:审核通过 3:审核不通过 4: 待提交(待接收)", example = "") |
| | | @TableField("status") |
| | | private Integer status; |
| | | |
| | | /** 创建人 */ |
| | | @ApiModelProperty(value = "创建人", example = "") |
| | | @TableField("create_user") |
| | |
| | | @TableField("remak") |
| | | private String remak; |
| | | |
| | | /** 网格编码 */ |
| | | @ApiModelProperty(value = "网格编码", example = "") |
| | | @TableField("grid_code") |
| | | private String gridCode; |
| | | |
| | | /** 更新人 */ |
| | | @ApiModelProperty(value = "更新人", example = "") |
| | | @TableField("update_user") |
| | | private Long updateUser; |
| | | |
| | | /** 确认人 */ |
| | | @ApiModelProperty(value = "确认人", example = "") |
| | | @TableField("confirm_user_id") |
| | | private Long confirmUserId; |
| | | |
| | | /** 确认时间 */ |
| | | @ApiModelProperty(value = "确认时间", example = "") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") |
| | | @TableField("confirm_time") |
| | | private Date confirmTime; |
| | | |
| | | /** 确认标记 1:待处理 2:处理中 3:已处理 */ |
| | | @ApiModelProperty(value = "确认标记 1:待处理 2:处理中 3:已处理", example = "") |
| | | @TableField("confirm_flag") |
| | | private Integer confirmFlag; |
| | | |
| | | /** 确认意见 */ |
| | | @ApiModelProperty(value = "确认意见", example = "") |
| | | @TableField("confirm_notion") |
| | | private String confirmNotion; |
| | | |
| | | /** |
| | | * 警务网格编号 |
| | | */ |
| | | @ApiModelProperty(value = "警务网格编号") |
| | | @TableField("jw_grid_code") |
| | | private String jwGridCode; |
| | | |
| | | } |
| | |
| | | |
| | | import org.apache.ibatis.annotations.Param; |
| | | import org.springblade.modules.task.entity.TaskResidencePermitApplyEntity; |
| | | import org.springblade.modules.task.vo.TaskReportForRepairsVO; |
| | | import org.springblade.modules.task.vo.TaskResidencePermitApplyVO; |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | |
| | | * @param taskResidencePermitApply |
| | | * @return |
| | | */ |
| | | List<TaskResidencePermitApplyVO> selectTaskResidencePermitApplyPage(IPage page, @Param("residen") TaskResidencePermitApplyVO taskResidencePermitApply); |
| | | List<TaskResidencePermitApplyVO> selectTaskResidencePermitApplyPage(IPage page, |
| | | @Param("residen") TaskResidencePermitApplyVO taskResidencePermitApply, |
| | | @Param("regionChildCodesList") List<String> regionChildCodesList, |
| | | @Param("isAdministrator") Integer isAdministrator, |
| | | @Param("gridCodeList") List<String> gridCodeList); |
| | | |
| | | |
| | | } |
| | |
| | | |
| | | <!-- 通用查询映射结果 --> |
| | | <resultMap id="taskResidencePermitApplyResultMap" |
| | | type="org.springblade.modules.task.entity.TaskResidencePermitApplyEntity"> |
| | | type="org.springblade.modules.task.vo.TaskResidencePermitApplyVO"> |
| | | </resultMap> |
| | | |
| | | |
| | | <select id="selectTaskResidencePermitApplyPage" resultMap="taskResidencePermitApplyResultMap"> |
| | | select * from jczz_task_residence_permit_apply |
| | | select |
| | | jtrpa.*, |
| | | br.town_name streetName, |
| | | jg.grid_name, |
| | | jda.aoi_name, |
| | | br.village_name communityName, |
| | | jda.address_name as addressName |
| | | from jczz_task_residence_permit_apply jtrpa |
| | | left join jczz_doorplate_address jda on jda.address_code = jtrpa.house_code |
| | | LEFT JOIN jczz_house jh on jh.house_code=jtrpa.house_code |
| | | left join jczz_grid jg on jg.grid_code = jh.grid_code and jg.is_deleted = 0 |
| | | left join blade_region br on br.code = jg.community_code |
| | | where jtrpa.is_deleted = 0 |
| | | <where> |
| | | <if test="residen.id != null ">and id = #{residen.id}</if> |
| | | <if test="residen.name != null and residen.name != ''">and name = #{residen.name}</if> |
| | |
| | | <if test="residen.taskId != null ">and task_id = #{residen.taskId}</if> |
| | | <if test="residen.createTime != null ">and create_time = #{residen.createTime}</if> |
| | | <if test="residen.updateTime != null ">and update_time = #{residen.updateTime}</if> |
| | | <if test="residen.status != null ">and status = #{residen.status}</if> |
| | | <if test="residen.createUser != null ">and create_user = #{residen.createUser}</if> |
| | | <if test="residen.houseRentalId != null ">and house_rental_id = #{residen.houseRentalId}</if> |
| | | <if test="residen.isDeleted != null ">and is_deleted = #{residen.isDeleted}</if> |
| | | <if test="residen.remak != null and residen.remak != ''">and remak = #{residen.remak}</if> |
| | | <if test="residen.gridCode != null and residen.gridCode != ''"> and grid_code = #{residen.gridCode}</if> |
| | | <if test="residen.updateUser != null "> and update_user = #{residen.updateUser}</if> |
| | | <if test="residen.confirmUserId != null "> and confirm_user_id = #{residen.confirmUserId}</if> |
| | | <if test="residen.confirmTime != null "> and confirm_time = #{residen.confirmTime}</if> |
| | | <if test="residen.confirmFlag != null "> and confirm_flag = #{residen.confirmFlag}</if> |
| | | <if test="residen.confirmNotion != null and residen.confirmNotion != ''"> and confirm_notion = #{residen.confirmNotion}</if> |
| | | <if test="residen.jwGridCode != null and residen.jwGridCode != ''"> and jw_grid_code = #{residen.jwGridCode}</if> |
| | | |
| | | <if test="isAdministrator==2"> |
| | | <!-- 网格员及其他 --> |
| | | <if test="vo.roleType ==null"> |
| | | <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 |
| | | jp.grid_code in |
| | | <foreach collection="regionChildCodesList" item="code" open="(" close=")" separator=","> |
| | | #{code} |
| | | </foreach> |
| | | ) |
| | | </when> |
| | | </choose> |
| | | |
| | | <choose> |
| | | <when test="gridCodeList !=null and gridCodeList.size()>0"> |
| | | and ( |
| | | jg.grid_code in |
| | | <foreach collection="gridCodeList" item="code" open="(" close=")" separator=","> |
| | | #{code} |
| | | </foreach> |
| | | or |
| | | jp.grid_code in |
| | | <foreach collection="gridCodeList" item="code" open="(" close=")" separator=","> |
| | | #{code} |
| | | </foreach> |
| | | ) |
| | | </when> |
| | | <otherwise> |
| | | and jg.grid_code in ('') |
| | | </otherwise> |
| | | </choose> |
| | | |
| | | <if test="vo.confirmUserId != null "> |
| | | or jtrfr.confirm_user_id = #{vo.confirmUserId} |
| | | </if> |
| | | |
| | | </if> |
| | | </if> |
| | | and is_deleted = 0 |
| | | </where> |
| | | </select> |
| | |
| | | <result property="taskId" column="task_id"/> |
| | | <result property="createTime" column="create_time"/> |
| | | <result property="updateTime" column="update_time"/> |
| | | <result property="status" column="status"/> |
| | | <result property="createUser" column="create_user"/> |
| | | <result property="houseRentalId" column="house_rental_id"/> |
| | | <result property="isDeleted" column="is_deleted"/> |
| | | <result property="remak" column="remak"/> |
| | | <result property="gridCode" column="grid_code"/> |
| | | <result property="updateUser" column="update_user"/> |
| | | <result property="confirmUserId" column="confirm_user_id"/> |
| | | <result property="confirmTime" column="confirm_time"/> |
| | | <result property="confirmFlag" column="confirm_flag"/> |
| | | <result property="confirmNotion" column="confirm_notion"/> |
| | | <result property="jwGridCode" column="jw_grid_code"/> |
| | | </resultMap> |
| | | |
| | | <sql id="selectTaskResidencePermitApply"> |
| | | select id, |
| | | name, |
| | | phone, |
| | | id_card, |
| | | address, |
| | | house_code, |
| | | task_id, |
| | | create_time, |
| | | update_time, |
| | | status, |
| | | create_user, |
| | | house_rental_id, |
| | | is_deleted, |
| | | remak |
| | | from jczz_task_residence_permit_apply |
| | | select |
| | | id, |
| | | name, |
| | | phone, |
| | | id_card, |
| | | address, |
| | | house_code, |
| | | task_id, |
| | | create_time, |
| | | update_time, |
| | | create_user, |
| | | house_rental_id, |
| | | is_deleted, |
| | | remak, |
| | | grid_code, |
| | | update_user, |
| | | confirm_user_id, |
| | | confirm_time, |
| | | confirm_flag, |
| | | confirm_notion, |
| | | jw_grid_code |
| | | from |
| | | jczz_task_residence_permit_apply |
| | | </sql> |
| | | |
| | | |
| | | |
| | | </mapper> |
| | |
| | | */ |
| | | IPage<TaskResidencePermitApplyVO> selectTaskResidencePermitApplyPage(IPage<TaskResidencePermitApplyVO> page, TaskResidencePermitApplyVO taskResidencePermitApply); |
| | | |
| | | |
| | | /** |
| | | * 新增 |
| | | * @param taskResidencePermitApply |
| | | * @return |
| | | */ |
| | | Boolean saveResidencePermitApplyEntity(TaskResidencePermitApplyEntity taskResidencePermitApply); |
| | | } |
| | |
| | | // 1.保存任务表 |
| | | ITaskService bean2 = SpringUtils.getBean(ITaskService.class); |
| | | Long aLong = bean2.saveTask(CommonConstant.NUMBER_ONE, DictConstant.FIRE_SELF_CHECK_NOTICE, 1, |
| | | "", AuthUtil.getUserId(), taskPlaceSelfCheck.getHouseCode(), CommonConstant.NUMBER_TWO, 1); |
| | | "", AuthUtil.getUserId(), taskPlaceSelfCheck.getHouseCode(), CommonConstant.NUMBER_SEVEN, 1); |
| | | if (aLong <= 0) { |
| | | return false; |
| | | } |
| | |
| | | */ |
| | | package org.springblade.modules.task.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import org.apache.commons.lang3.StringUtils; |
| | | import org.springblade.common.constant.CommonConstant; |
| | | import org.springblade.common.constant.DictConstant; |
| | | import org.springblade.common.param.CommonParamSet; |
| | | import org.springblade.common.utils.SpringUtils; |
| | | import org.springblade.core.secure.utils.AuthUtil; |
| | | import org.springblade.core.tool.utils.SpringUtil; |
| | | import org.springblade.modules.house.entity.HouseEntity; |
| | | import org.springblade.modules.house.service.IHouseService; |
| | | import org.springblade.modules.place.entity.PlaceEntity; |
| | | import org.springblade.modules.place.service.IPlaceService; |
| | | import org.springblade.modules.task.entity.TaskPlaceRecordEntity; |
| | | import org.springblade.modules.task.entity.TaskResidencePermitApplyEntity; |
| | | import org.springblade.modules.task.service.ITaskPlaceRecordService; |
| | | import org.springblade.modules.task.service.ITaskService; |
| | | import org.springblade.modules.task.vo.TaskPlaceRecordVO; |
| | | import org.springblade.modules.task.vo.TaskReportForRepairsVO; |
| | | import org.springblade.modules.task.vo.TaskResidencePermitApplyVO; |
| | | import org.springblade.modules.task.mapper.TaskResidencePermitApplyMapper; |
| | | import org.springblade.modules.task.service.ITaskResidencePermitApplyService; |
| | | import org.springblade.core.mp.base.BaseServiceImpl; |
| | | import org.springframework.context.annotation.Lazy; |
| | | import org.springframework.stereotype.Service; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.util.List; |
| | | import java.util.stream.Collectors; |
| | | |
| | | /** |
| | | * 居住证申请 服务实现类 |
| | |
| | | @Service |
| | | public class TaskResidencePermitApplyServiceImpl extends ServiceImpl<TaskResidencePermitApplyMapper, TaskResidencePermitApplyEntity> implements ITaskResidencePermitApplyService { |
| | | |
| | | @Resource |
| | | @Lazy |
| | | private ITaskService taskService; |
| | | |
| | | @Override |
| | | public IPage<TaskResidencePermitApplyVO> selectTaskResidencePermitApplyPage(IPage<TaskResidencePermitApplyVO> page, TaskResidencePermitApplyVO taskResidencePermitApply) { |
| | | return page.setRecords(baseMapper.selectTaskResidencePermitApplyPage(page, taskResidencePermitApply)); |
| | | CommonParamSet commonParamSet = new CommonParamSet().invoke(TaskResidencePermitApplyVO.class, taskResidencePermitApply); |
| | | |
| | | return page.setRecords(baseMapper.selectTaskResidencePermitApplyPage(page, taskResidencePermitApply, |
| | | commonParamSet.getRegionChildCodesList(), commonParamSet.getIsAdministrator(), commonParamSet.getGridCodeList())); |
| | | } |
| | | |
| | | @Override |
| | | public Boolean saveResidencePermitApplyEntity(TaskResidencePermitApplyEntity permitApply) { |
| | | permitApply.setCreateUser(AuthUtil.getUserId()); |
| | | // 1.保存任务表 |
| | | ITaskService taskService = SpringUtils.getBean(ITaskService.class); |
| | | Long aLong = taskService.saveTask(CommonConstant.NUMBER_ONE, DictConstant.RESIDENCE_PERMIT_APPLICATION, 1, |
| | | "", AuthUtil.getUserId(), permitApply.getHouseCode(), CommonConstant.NUMBER_TWO, 1); |
| | | if (aLong <= 0) { |
| | | return false; |
| | | } |
| | | if (StringUtils.isNotBlank(permitApply.getHouseCode())) { |
| | | // 设置网格编码 |
| | | IHouseService houseService = SpringUtils.getBean(IHouseService.class); |
| | | HouseEntity houseEntity = houseService.getOne(Wrappers.<HouseEntity>lambdaQuery() |
| | | .eq(HouseEntity::getHouseCode, permitApply.getHouseCode())); |
| | | permitApply.setGridCode(houseEntity.getGridCode()); |
| | | permitApply.setJwGridCode(houseEntity.getJwGridCode()); |
| | | } |
| | | |
| | | permitApply.setTaskId(aLong); |
| | | // 2.保存任务详情 |
| | | boolean save = save(permitApply); |
| | | return save; |
| | | } |
| | | } |
| | |
| | | Integer xfzc = SpringUtils.getBean(ITaskPlaceSelfCheckService.class).getCount(neiCode, 1); |
| | | // 消防隐患整改 |
| | | Integer xfyhzg = SpringUtils.getBean(ITaskPlaceRectificationService.class).getCount(neiCode, 1); |
| | | // 居住证申请 |
| | | taskVO.setReportType(2); |
| | | Integer jzzsq = baseMapper.selectTaskCount(taskVO,commonParamSet.getRegionChildCodesList(), |
| | | commonParamSet.getIsAdministrator(),commonParamSet.getGridCodeList()); |
| | | // 设置 |
| | | objectObjectHashMap.put("qbhs", qbhs);// 取保候审 |
| | | objectObjectHashMap.put("bqsj", bqsj);// 标签报事-二手交易 |
| | |
| | | objectObjectHashMap.put("zfrw", zfrw);// 走访日志 |
| | | objectObjectHashMap.put("xfzc", xfzc);// 消防自查 |
| | | objectObjectHashMap.put("xfyhzg", xfyhzg);// 消防隐患整改 |
| | | objectObjectHashMap.put("jzzsq", jzzsq);// 居住证申请 |
| | | return objectObjectHashMap; |
| | | } |
| | | |
| | |
| | | */ |
| | | package org.springblade.modules.task.vo; |
| | | |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import org.springblade.modules.task.entity.TaskResidencePermitApplyEntity; |
| | | import lombok.Data; |
| | | import lombok.EqualsAndHashCode; |
| | |
| | | public class TaskResidencePermitApplyVO extends TaskResidencePermitApplyEntity { |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | // 角色名称 |
| | | @ApiModelProperty(value = "角色名称", example = "") |
| | | private String roleName; |
| | | |
| | | // 社区编号 |
| | | @ApiModelProperty(value = "社区编号", example = "") |
| | | private String communityCode; |
| | | |
| | | @ApiModelProperty(value = "地址", example = "") |
| | | private String addressName; |
| | | |
| | | @ApiModelProperty(value = "社区名称", example = "") |
| | | private String communityName; |
| | | |
| | | @ApiModelProperty(value = "小区名称", example = "") |
| | | private String aoiName; |
| | | |
| | | @ApiModelProperty(value = "网格名称", example = "") |
| | | private String gridName; |
| | | |
| | | @ApiModelProperty(value = "街道名称", example = "") |
| | | private String streetName; |
| | | } |