| | |
| | | @TableField("category") |
| | | @ApiModelProperty(value = "问题类别(1-违规 2-违建)") |
| | | private Integer category; |
| | | /** |
| | | * 问题类别文本 |
| | | */ |
| | | @TableField(value = "category_text",exist = false) |
| | | @ApiModelProperty(value = "问题类别文本") |
| | | private String categoryText; |
| | | |
| | | /** |
| | | * 所属街道 |
| | |
| | | @TableField("street_id") |
| | | @ApiModelProperty(value = "所属街道") |
| | | private Integer streetId; |
| | | /** |
| | | * 所属街道文本 |
| | | */ |
| | | @TableField(value = "street_text",exist = false) |
| | | @ApiModelProperty(value = "所属社区名称") |
| | | private String streetText; |
| | | |
| | | /** |
| | | * 所属社区 |
| | |
| | | @TableField("community_id") |
| | | @ApiModelProperty(value = "所属社区") |
| | | private Integer communityId; |
| | | |
| | | /** |
| | | * 所属社区文本 |
| | | */ |
| | | @TableField(value = "community_text",exist = false) |
| | | @ApiModelProperty(value = "所属社区文本") |
| | | private String communityText; |
| | | |
| | | /** |
| | | * 报警点位 事发地点 |
| | |
| | | private Long createUser; |
| | | |
| | | /** |
| | | * 登记人文本 |
| | | */ |
| | | @TableField(value = "create_user_text",exist = false) |
| | | @ApiModelProperty(value = "登记人文本") |
| | | private String createUserText; |
| | | |
| | | |
| | | /** |
| | | * 处理状态(0误报 1上报 2立案 3派遣 4处置 5核查 6结案) |
| | | */ |
| | | @TableField("state") |
| | |
| | | @ApiModelProperty(value = "距离") |
| | | private Integer distance; |
| | | /** |
| | | * 处置日期 |
| | | * 处置限时 |
| | | */ |
| | | @TableField("dispose_date") |
| | | @ApiModelProperty(value = "处置日期") |
| | | @ApiModelProperty(value = "处置限时") |
| | | private Date disposeDate; |
| | | /** |
| | | * 派遣意见 |
| | |
| | | @ApiModelProperty(value = "视频报警id") |
| | | private Integer videoAlarmReportId; |
| | | |
| | | /** |
| | | * 大类文本 |
| | | */ |
| | | @TableField(value = "category_text",exist = false) |
| | | @ApiModelProperty(value = "所属社区文本") |
| | | private String categoryText; |
| | | /** |
| | | * 小类文本 |
| | | */ |
| | | @TableField(value = "type_text",exist = false) |
| | | @ApiModelProperty(value = "小类文本") |
| | | private String typeText; |
| | | /** |
| | | * 事件等级文本 |
| | | */ |
| | | @TableField(value = "grade_text",exist = false) |
| | | @ApiModelProperty(value = "事件等级文本") |
| | | private String gradeText; |
| | | } |
| | |
| | | import com.ycl.bo.casePool.CasePoolViolationDO; |
| | | import com.ycl.entity.caseHandler.BaseCase; |
| | | |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * <p> |
| | | * 案件基本信息 Mapper 接口 |
| | |
| | | Page<CasePoolViolationDO> listViolationsPage(Page page, Integer state, Integer type, Integer resource); |
| | | |
| | | Page<CasePoolIllegalBuildingDO> listIllegalBuildingsPage(Page page, Integer state, Integer type, Integer resource); |
| | | |
| | | BaseCase selectCondMap(Map map); |
| | | } |
| | |
| | | package com.ycl.mapper.caseHandler; |
| | | |
| | | import com.ycl.entity.caseHandler.Violations; |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.ycl.entity.caseHandler.Violations; |
| | | |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * <p> |
| | |
| | | */ |
| | | public interface ViolationsMapper extends BaseMapper<Violations> { |
| | | |
| | | Violations selectCondMap(Map map); |
| | | |
| | | } |
| | |
| | | public BaseCaseDetail baseCaseDetail(String code) { |
| | | BaseCaseDetail bcd = new BaseCaseDetail(); |
| | | //1.查询案件基本信息 |
| | | QueryWrapper<BaseCase> wrapper = new QueryWrapper<>(); |
| | | wrapper.lambda().eq(BaseCase::getCode, code); |
| | | BaseCase baseCase = baseCaseMapper.selectOne(wrapper); |
| | | Map map = new HashMap(); |
| | | map.put("code", code); |
| | | BaseCase baseCase = baseCaseMapper.selectCondMap(map); |
| | | if (baseCase == null) { |
| | | return null; |
| | | } |
| | | //查询案件违规信息 |
| | | if (baseCase.getCategory() == 1) { |
| | | Violations violations = violationsMapper.selectById(baseCase.getId()); |
| | | Map mapV = new HashMap(); |
| | | mapV.put("id", baseCase.getId()); |
| | | Violations violations = violationsMapper.selectCondMap(mapV); |
| | | baseCase.setViolations(violations); |
| | | } else { |
| | | IllegalBuilding illegalBuilding = illegalBuildingMapper.selectById(baseCase.getId()); |
| | |
| | | <result column="final_opinion" property="finalOpinion"/> |
| | | <result column="create_time" property="createTime"/> |
| | | </resultMap> |
| | | <resultMap type="com.ycl.entity.caseHandler.BaseCase" id="CondMapResultMap" extends="BaseResultMap"> |
| | | <result column="category_text" property="categoryText" /> |
| | | <result column="street_text" property="streetText" /> |
| | | <result column="community_text" property="communityText" /> |
| | | <result column="create_user_text" property="createUserText" /> |
| | | </resultMap> |
| | | |
| | | <!-- 通用查询映射结果 --> |
| | | <resultMap id="settingsResultMap" type="com.ycl.vo.IllegalBuildingSettingVO"> |
| | |
| | | </where> |
| | | |
| | | </select> |
| | | |
| | | |
| | | <select id="selectCondMap" parameterType="map" resultMap="CondMapResultMap"> |
| | | SELECT |
| | | ubc.*, |
| | | udd.name category_text, |
| | | usr.region_name street_text, |
| | | usr2.region_name community_text, |
| | | ua.username create_user_text |
| | | FROM |
| | | ums_base_case ubc |
| | | LEFT JOIN ums_data_dictionary udd on ubc.category = udd.id and udd.type_code = '01' |
| | | LEFT JOIN ums_sccg_region usr on ubc.street_id=usr.id |
| | | LEFT JOIN ums_sccg_region usr2 on ubc.community_id=usr2.id |
| | | LEFT JOIN ums_admin ua on ubc.create_user = ua.id |
| | | WHERE |
| | | ubc.`code` = #{code} |
| | | </select> |
| | | |
| | | </mapper> |
| | |
| | | <result column="informant_phone_code" property="informantPhoneCode" /> |
| | | <result column="informant_id_card" property="informantIdCard" /> |
| | | </resultMap> |
| | | |
| | | <resultMap type="com.ycl.entity.caseHandler.Violations" id="CondMapResultMap" extends="BaseResultMap"> |
| | | <result column="category_text" property="categoryText" /> |
| | | <result column="type_text" property="typeText" /> |
| | | <result column="grade_text" property="gradeText" /> |
| | | </resultMap> |
| | | <!-- 通用查询结果列 --> |
| | | <sql id="Base_Column_List"> |
| | | id, category_id, type_id, grade_id, action_cause, link_shop, shop_name, car_number, description, informant, informant_phone_code, informant_id_card |
| | | </sql> |
| | | |
| | | <select id="selectCondMap" parameterType="map" resultMap="CondMapResultMap"> |
| | | SELECT |
| | | uv.*, |
| | | udd.name category_text, |
| | | udd2.name type_text, |
| | | udd3.name grade_text |
| | | FROM |
| | | ums_violations uv |
| | | LEFT JOIN ums_data_dictionary udd on uv.category_id = udd.id and udd.type_code = '01' |
| | | LEFT JOIN ums_data_dictionary udd2 on uv.type_id = udd2.id and udd.type_code = '01' |
| | | LEFT JOIN ums_data_dictionary udd3 on uv.grade_id = udd3.id and udd.type_code = '01' |
| | | WHERE |
| | | uv.`id` = #{id} |
| | | </select> |
| | | </mapper> |