47 changed files with 1390 additions and 195 deletions
@ -0,0 +1,64 @@ |
|||
package com.epmet.opendata.dto.ca; |
|||
|
|||
import java.io.Serializable; |
|||
import java.util.Date; |
|||
import lombok.Data; |
|||
|
|||
|
|||
/** |
|||
* |
|||
* |
|||
* @author generator generator@elink-cn.com |
|||
* @since v1.0.0 2022-06-22 |
|||
*/ |
|||
@Data |
|||
public class CaResidentUserDTO implements Serializable { |
|||
|
|||
private static final long serialVersionUID = 1L; |
|||
|
|||
/** |
|||
* 身份证号 |
|||
*/ |
|||
private String idCard; |
|||
|
|||
/** |
|||
* ic_resi_user表id |
|||
*/ |
|||
private String icResiUserId; |
|||
|
|||
/** |
|||
* 绑定的房屋id |
|||
*/ |
|||
private String homeId; |
|||
|
|||
/** |
|||
* 创建人 |
|||
*/ |
|||
private Long createBy; |
|||
|
|||
/** |
|||
* 创建时间 |
|||
*/ |
|||
private Date createDate; |
|||
|
|||
/** |
|||
* 最后修改人 |
|||
*/ |
|||
private Long updateBy; |
|||
|
|||
/** |
|||
* 最后修改时间 |
|||
*/ |
|||
private Date updateDate; |
|||
|
|||
/** |
|||
* 删除标记,normal |
|||
*/ |
|||
private String deleteFlag; |
|||
|
|||
/** |
|||
* 乐观锁 |
|||
*/ |
|||
private Integer versions; |
|||
|
|||
} |
@ -0,0 +1,14 @@ |
|||
package com.epmet.opendata.dto.form; |
|||
|
|||
import lombok.Data; |
|||
|
|||
import java.io.Serializable; |
|||
|
|||
@Data |
|||
public class GetResidentDetailByIdCardFormDTO implements Serializable { |
|||
|
|||
private static final long serialVersionUID = 2717574179375935921L; |
|||
|
|||
private String idCard; |
|||
|
|||
} |
@ -0,0 +1,57 @@ |
|||
package com.epmet.opendata.dto.form; |
|||
|
|||
import lombok.Data; |
|||
|
|||
import java.io.Serializable; |
|||
import java.util.Date; |
|||
|
|||
@Data |
|||
public class SaveCaResidentUserFormDTO implements Serializable { |
|||
|
|||
private static final long serialVersionUID = -182571137927356144L; |
|||
|
|||
/** |
|||
* 身份证号 |
|||
*/ |
|||
private String idCard; |
|||
|
|||
/** |
|||
* ic_resi_user表id |
|||
*/ |
|||
private String icResiUserId; |
|||
|
|||
/** |
|||
* 房屋id |
|||
*/ |
|||
private String homeId; |
|||
|
|||
/** |
|||
* 创建人 |
|||
*/ |
|||
private Long createdBy; |
|||
|
|||
/** |
|||
* 创建时间 |
|||
*/ |
|||
private Date createdDate; |
|||
|
|||
/** |
|||
* 最后修改人 |
|||
*/ |
|||
private Long updatedBy; |
|||
|
|||
/** |
|||
* 最后修改时间 |
|||
*/ |
|||
private Date updatedDate; |
|||
|
|||
/** |
|||
* 删除标记 |
|||
*/ |
|||
private String delFlag; |
|||
|
|||
/** |
|||
* 乐观锁 |
|||
*/ |
|||
private Integer versions; |
|||
} |
@ -0,0 +1,187 @@ |
|||
package com.epmet.opendata.dto.result; |
|||
|
|||
import lombok.Data; |
|||
|
|||
import java.io.Serializable; |
|||
import java.util.Date; |
|||
|
|||
@Data |
|||
public class ResidentByIdCardResultDTO implements Serializable { |
|||
|
|||
private static final long serialVersionUID = 3809219691923066512L; |
|||
|
|||
/** |
|||
* 人口性质 |
|||
*/ |
|||
private String residentProperty; |
|||
|
|||
/** |
|||
* 居民分类 |
|||
*/ |
|||
private String residentType; |
|||
|
|||
/** |
|||
* 证件类型 |
|||
*/ |
|||
private String idType; |
|||
|
|||
/** |
|||
* 证件号码(公民身份证号) |
|||
*/ |
|||
private String idCard; |
|||
|
|||
/** |
|||
* 姓名 |
|||
*/ |
|||
private String residentName; |
|||
|
|||
/** |
|||
* 性别 |
|||
*/ |
|||
private String sex; |
|||
|
|||
/** |
|||
* 出生日期 |
|||
*/ |
|||
private Date birthday; |
|||
|
|||
/** |
|||
* 民族 |
|||
*/ |
|||
private String nation; |
|||
|
|||
/** |
|||
* 联系方式 |
|||
*/ |
|||
private String telephone; |
|||
|
|||
/** |
|||
* 户籍省 |
|||
*/ |
|||
private String householdProv; |
|||
|
|||
/** |
|||
* 户籍市 |
|||
*/ |
|||
private String householdCity; |
|||
|
|||
/** |
|||
* 户籍县(区) |
|||
*/ |
|||
private String householdCounty; |
|||
|
|||
/** |
|||
* 户籍镇街 |
|||
*/ |
|||
private String householdTown; |
|||
|
|||
/** |
|||
* 户籍社区/村 |
|||
*/ |
|||
private String householdVillage; |
|||
|
|||
/** |
|||
* 户籍详址 |
|||
*/ |
|||
private String householdAddressDetail; |
|||
|
|||
/** |
|||
* 现住省 |
|||
*/ |
|||
private String curliveProv; |
|||
|
|||
/** |
|||
* 现住市 |
|||
*/ |
|||
private String curliveCity; |
|||
|
|||
/** |
|||
* 现住县(区) |
|||
*/ |
|||
private String curliveCounty; |
|||
|
|||
/** |
|||
* 现住镇街 |
|||
*/ |
|||
private String curliveTown; |
|||
|
|||
/** |
|||
* 现住社区/村 |
|||
*/ |
|||
private String curliveVillage; |
|||
|
|||
/** |
|||
* 现住详址 |
|||
*/ |
|||
private String curliveAddressDetail; |
|||
|
|||
/** |
|||
* 籍贯省 |
|||
*/ |
|||
private String nativeAddressProv; |
|||
|
|||
/** |
|||
* 籍贯市 |
|||
*/ |
|||
private String nativeAddressCity; |
|||
|
|||
/** |
|||
* 籍贯县(区) |
|||
*/ |
|||
private String nativeAddressCounty; |
|||
|
|||
/** |
|||
* 曾用名 |
|||
*/ |
|||
private String formerName; |
|||
|
|||
/** |
|||
* 学历 |
|||
*/ |
|||
private String education; |
|||
|
|||
/** |
|||
* 职业 |
|||
*/ |
|||
private String occupation; |
|||
|
|||
/** |
|||
* 职业类别 |
|||
*/ |
|||
private String occupationType; |
|||
|
|||
/** |
|||
* 服务处所 |
|||
*/ |
|||
private String serviceAddress; |
|||
|
|||
/** |
|||
* 婚姻状况 |
|||
*/ |
|||
private String marriageStatus; |
|||
|
|||
/** |
|||
* 政治面貌 |
|||
*/ |
|||
private String party; |
|||
|
|||
/** |
|||
* 宗教信仰 |
|||
*/ |
|||
private String religious; |
|||
|
|||
/** |
|||
* 有无皈依(已受洗) |
|||
*/ |
|||
private String conversionState; |
|||
|
|||
/** |
|||
* 国籍 |
|||
*/ |
|||
private String nationality; |
|||
|
|||
/** |
|||
* 数据来源 |
|||
*/ |
|||
private String platCode; |
|||
} |
@ -1,14 +1,24 @@ |
|||
package com.epmet.opendata.feign; |
|||
|
|||
import com.epmet.commons.tools.utils.Result; |
|||
import com.epmet.opendata.dto.form.GetResidentDetailByIdCardFormDTO; |
|||
import com.epmet.opendata.dto.form.PreserVationFormDTO; |
|||
import com.epmet.opendata.dto.form.SaveCaResidentUserFormDTO; |
|||
import com.epmet.opendata.dto.result.ResidentByIdCardResultDTO; |
|||
import com.epmet.opendata.feign.impl.GuardarDatosFeignClientFallBack; |
|||
import org.springframework.cloud.openfeign.FeignClient; |
|||
import org.springframework.web.bind.annotation.PostMapping; |
|||
import org.springframework.web.bind.annotation.RequestBody; |
|||
|
|||
@FeignClient(name = "open-data-worker-server", fallback = GuardarDatosFeignClientFallBack.class) |
|||
public interface GuardarDatosFeignClient { |
|||
|
|||
@PostMapping("/opendata/caTask/guardarDatosTask") |
|||
Result guardarDatosTask(PreserVationFormDTO dto); |
|||
|
|||
@PostMapping("/opendata/caResident/getResidentDetailByIdCard") |
|||
Result<ResidentByIdCardResultDTO> getResidentDetailByIdCard(GetResidentDetailByIdCardFormDTO form); |
|||
|
|||
@PostMapping("/opendata/caResidentUser/saveCaResidentUser") |
|||
Result saveCaResidentUser(@RequestBody SaveCaResidentUserFormDTO dto); |
|||
} |
|||
|
@ -0,0 +1,88 @@ |
|||
package com.epmet.opendata.controller; |
|||
|
|||
import com.epmet.commons.tools.aop.NoRepeatSubmit; |
|||
import com.epmet.commons.tools.page.PageData; |
|||
import com.epmet.commons.tools.utils.ExcelUtils; |
|||
import com.epmet.commons.tools.utils.Result; |
|||
import com.epmet.commons.tools.validator.AssertUtils; |
|||
import com.epmet.commons.tools.validator.ValidatorUtils; |
|||
import com.epmet.commons.tools.validator.group.AddGroup; |
|||
import com.epmet.commons.tools.validator.group.UpdateGroup; |
|||
import com.epmet.commons.tools.validator.group.DefaultGroup; |
|||
|
|||
import com.epmet.opendata.dto.ca.CaResidentUserDTO; |
|||
import com.epmet.opendata.dto.form.SaveCaResidentUserFormDTO; |
|||
import com.epmet.opendata.excel.CaResidentUserExcel; |
|||
import com.epmet.opendata.service.CaResidentUserService; |
|||
import org.springframework.beans.factory.annotation.Autowired; |
|||
import org.springframework.web.bind.annotation.*; |
|||
|
|||
import javax.servlet.http.HttpServletResponse; |
|||
import java.util.List; |
|||
import java.util.Map; |
|||
|
|||
|
|||
/** |
|||
* |
|||
* |
|||
* @author generator generator@elink-cn.com |
|||
* @since v1.0.0 2022-06-22 |
|||
*/ |
|||
@RestController |
|||
@RequestMapping("caResidentUser") |
|||
public class CaResidentUserController { |
|||
|
|||
@Autowired |
|||
private CaResidentUserService caResidentUserService; |
|||
|
|||
@RequestMapping("page") |
|||
public Result<PageData<CaResidentUserDTO>> page(@RequestParam Map<String, Object> params){ |
|||
PageData<CaResidentUserDTO> page = caResidentUserService.page(params); |
|||
return new Result<PageData<CaResidentUserDTO>>().ok(page); |
|||
} |
|||
|
|||
@RequestMapping(value = "{id}",method = {RequestMethod.POST,RequestMethod.GET}) |
|||
public Result<CaResidentUserDTO> get(@PathVariable("id") String id){ |
|||
CaResidentUserDTO data = caResidentUserService.get(id); |
|||
return new Result<CaResidentUserDTO>().ok(data); |
|||
} |
|||
|
|||
@NoRepeatSubmit |
|||
@PostMapping("save") |
|||
public Result save(@RequestBody CaResidentUserDTO dto){ |
|||
//效验数据
|
|||
ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class); |
|||
caResidentUserService.save(dto); |
|||
return new Result(); |
|||
} |
|||
|
|||
@NoRepeatSubmit |
|||
@PostMapping("update") |
|||
public Result update(@RequestBody CaResidentUserDTO dto){ |
|||
//效验数据
|
|||
ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class); |
|||
caResidentUserService.update(dto); |
|||
return new Result(); |
|||
} |
|||
|
|||
@PostMapping("delete") |
|||
public Result delete(@RequestBody String[] ids){ |
|||
//效验数据
|
|||
AssertUtils.isArrayEmpty(ids, "id"); |
|||
caResidentUserService.delete(ids); |
|||
return new Result(); |
|||
} |
|||
|
|||
@GetMapping("export") |
|||
public void export(@RequestParam Map<String, Object> params, HttpServletResponse response) throws Exception { |
|||
List<CaResidentUserDTO> list = caResidentUserService.list(params); |
|||
ExcelUtils.exportExcelToTarget(response, null, list, CaResidentUserExcel.class); |
|||
} |
|||
|
|||
@PostMapping("saveCaResidentUser") |
|||
public Result saveCaResidentUser(@RequestBody SaveCaResidentUserFormDTO dto){ |
|||
caResidentUserService.saveCaResidentUser(dto); |
|||
return new Result(); |
|||
} |
|||
|
|||
} |
@ -0,0 +1,21 @@ |
|||
package com.epmet.opendata.dao; |
|||
|
|||
import com.epmet.commons.mybatis.dao.BaseDao; |
|||
|
|||
import com.epmet.opendata.dto.form.SaveCaResidentUserFormDTO; |
|||
import com.epmet.opendata.entity.CaResidentUserEntity; |
|||
import org.apache.ibatis.annotations.Mapper; |
|||
import org.apache.ibatis.annotations.Param; |
|||
|
|||
/** |
|||
* |
|||
* |
|||
* @author generator generator@elink-cn.com |
|||
* @since v1.0.0 2022-06-22 |
|||
*/ |
|||
@Mapper |
|||
public interface CaResidentUserDao extends BaseDao<CaResidentUserEntity> { |
|||
|
|||
|
|||
|
|||
} |
@ -0,0 +1,42 @@ |
|||
package com.epmet.opendata.entity; |
|||
|
|||
import com.baomidou.mybatisplus.annotation.TableName; |
|||
|
|||
import com.epmet.commons.mybatis.entity.BaseEntity; |
|||
import com.epmet.commons.mybatis.entity.BaseEpmetEntity; |
|||
import lombok.Data; |
|||
import lombok.EqualsAndHashCode; |
|||
|
|||
import java.util.Date; |
|||
|
|||
/** |
|||
* |
|||
* |
|||
* @author generator generator@elink-cn.com |
|||
* @since v1.0.0 2022-06-22 |
|||
*/ |
|||
@Data |
|||
@EqualsAndHashCode(callSuper=false) |
|||
@TableName("ca_resident_user") |
|||
public class CaResidentUserEntity extends BaseEpmetEntity { |
|||
|
|||
private static final long serialVersionUID = 1L; |
|||
|
|||
/** |
|||
* 身份证号 |
|||
*/ |
|||
private String idCard; |
|||
|
|||
/** |
|||
* ic_resi_user表id |
|||
*/ |
|||
private String icResiUserId; |
|||
|
|||
/** |
|||
* 绑定的房屋id |
|||
*/ |
|||
private String homeId; |
|||
|
|||
|
|||
|
|||
} |
@ -0,0 +1,45 @@ |
|||
package com.epmet.opendata.excel; |
|||
|
|||
import cn.afterturn.easypoi.excel.annotation.Excel; |
|||
import lombok.Data; |
|||
|
|||
import java.util.Date; |
|||
|
|||
/** |
|||
* |
|||
* |
|||
* @author generator generator@elink-cn.com |
|||
* @since v1.0.0 2022-06-22 |
|||
*/ |
|||
@Data |
|||
public class CaResidentUserExcel { |
|||
|
|||
@Excel(name = "身份证号") |
|||
private String idCard; |
|||
|
|||
@Excel(name = "ic_resi_user表id") |
|||
private String icResiUserId; |
|||
|
|||
@Excel(name = "绑定的房屋id") |
|||
private String homeId; |
|||
|
|||
@Excel(name = "创建人") |
|||
private Long createBy; |
|||
|
|||
@Excel(name = "创建时间") |
|||
private Date createDate; |
|||
|
|||
@Excel(name = "最后修改人") |
|||
private Long updateBy; |
|||
|
|||
@Excel(name = "最后修改时间") |
|||
private Date updateDate; |
|||
|
|||
@Excel(name = "删除标记,normal") |
|||
private String deleteFlag; |
|||
|
|||
@Excel(name = "乐观锁") |
|||
private Integer versions; |
|||
|
|||
|
|||
} |
@ -0,0 +1,30 @@ |
|||
package com.epmet.opendata.redis; |
|||
|
|||
import com.epmet.commons.tools.redis.RedisUtils; |
|||
import org.springframework.beans.factory.annotation.Autowired; |
|||
import org.springframework.stereotype.Component; |
|||
|
|||
/** |
|||
* |
|||
* |
|||
* @author generator generator@elink-cn.com |
|||
* @since v1.0.0 2022-06-22 |
|||
*/ |
|||
@Component |
|||
public class CaResidentUserRedis { |
|||
@Autowired |
|||
private RedisUtils redisUtils; |
|||
|
|||
public void delete(Object[] ids) { |
|||
|
|||
} |
|||
|
|||
public void set(){ |
|||
|
|||
} |
|||
|
|||
public String get(String id){ |
|||
return null; |
|||
} |
|||
|
|||
} |
@ -0,0 +1,82 @@ |
|||
package com.epmet.opendata.service; |
|||
|
|||
import com.epmet.commons.mybatis.service.BaseService; |
|||
import com.epmet.commons.tools.page.PageData; |
|||
import com.epmet.opendata.dto.ca.CaResidentUserDTO; |
|||
import com.epmet.opendata.dto.form.SaveCaResidentUserFormDTO; |
|||
import com.epmet.opendata.entity.CaResidentUserEntity; |
|||
|
|||
|
|||
import java.util.List; |
|||
import java.util.Map; |
|||
|
|||
/** |
|||
* |
|||
* |
|||
* @author generator generator@elink-cn.com |
|||
* @since v1.0.0 2022-06-22 |
|||
*/ |
|||
public interface CaResidentUserService extends BaseService<CaResidentUserEntity> { |
|||
|
|||
/** |
|||
* 默认分页 |
|||
* |
|||
* @param params |
|||
* @return PageData<CaResidentUserDTO> |
|||
* @author generator |
|||
* @date 2022-06-22 |
|||
*/ |
|||
PageData<CaResidentUserDTO> page(Map<String, Object> params); |
|||
|
|||
/** |
|||
* 默认查询 |
|||
* |
|||
* @param params |
|||
* @return java.util.List<CaResidentUserDTO> |
|||
* @author generator |
|||
* @date 2022-06-22 |
|||
*/ |
|||
List<CaResidentUserDTO> list(Map<String, Object> params); |
|||
|
|||
/** |
|||
* 单条查询 |
|||
* |
|||
* @param id |
|||
* @return CaResidentUserDTO |
|||
* @author generator |
|||
* @date 2022-06-22 |
|||
*/ |
|||
CaResidentUserDTO get(String id); |
|||
|
|||
/** |
|||
* 默认保存 |
|||
* |
|||
* @param dto |
|||
* @return void |
|||
* @author generator |
|||
* @date 2022-06-22 |
|||
*/ |
|||
void save(CaResidentUserDTO dto); |
|||
|
|||
/** |
|||
* 默认更新 |
|||
* |
|||
* @param dto |
|||
* @return void |
|||
* @author generator |
|||
* @date 2022-06-22 |
|||
*/ |
|||
void update(CaResidentUserDTO dto); |
|||
|
|||
/** |
|||
* 批量删除 |
|||
* |
|||
* @param ids |
|||
* @return void |
|||
* @author generator |
|||
* @date 2022-06-22 |
|||
*/ |
|||
void delete(String[] ids); |
|||
|
|||
void saveCaResidentUser(SaveCaResidentUserFormDTO dto); |
|||
} |
@ -0,0 +1,99 @@ |
|||
package com.epmet.opendata.service.impl; |
|||
|
|||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
|||
import com.baomidou.mybatisplus.core.metadata.IPage; |
|||
import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; |
|||
import com.epmet.commons.tools.page.PageData; |
|||
import com.epmet.commons.tools.utils.ConvertUtils; |
|||
import com.epmet.commons.tools.constant.FieldConstant; |
|||
|
|||
import com.epmet.commons.tools.utils.DateUtils; |
|||
import com.epmet.opendata.dao.CaResidentUserDao; |
|||
import com.epmet.opendata.dto.ca.CaResidentUserDTO; |
|||
import com.epmet.opendata.dto.form.SaveCaResidentUserFormDTO; |
|||
import com.epmet.opendata.entity.CaResidentEntity; |
|||
import com.epmet.opendata.entity.CaResidentUserEntity; |
|||
import com.epmet.opendata.redis.CaResidentUserRedis; |
|||
import com.epmet.opendata.service.CaResidentUserService; |
|||
import org.apache.commons.lang3.StringUtils; |
|||
import org.springframework.beans.factory.annotation.Autowired; |
|||
import org.springframework.stereotype.Service; |
|||
import org.springframework.transaction.annotation.Transactional; |
|||
|
|||
import java.text.SimpleDateFormat; |
|||
import java.util.Arrays; |
|||
import java.util.Date; |
|||
import java.util.List; |
|||
import java.util.Map; |
|||
|
|||
/** |
|||
* |
|||
* |
|||
* @author generator generator@elink-cn.com |
|||
* @since v1.0.0 2022-06-22 |
|||
*/ |
|||
@Service |
|||
public class CaResidentUserServiceImpl extends BaseServiceImpl<CaResidentUserDao, CaResidentUserEntity> implements CaResidentUserService { |
|||
|
|||
@Autowired |
|||
private CaResidentUserRedis caResidentUserRedis; |
|||
|
|||
@Override |
|||
public PageData<CaResidentUserDTO> page(Map<String, Object> params) { |
|||
IPage<CaResidentUserEntity> page = baseDao.selectPage( |
|||
getPage(params, FieldConstant.CREATED_TIME, false), |
|||
getWrapper(params) |
|||
); |
|||
return getPageData(page, CaResidentUserDTO.class); |
|||
} |
|||
|
|||
@Override |
|||
public List<CaResidentUserDTO> list(Map<String, Object> params) { |
|||
List<CaResidentUserEntity> entityList = baseDao.selectList(getWrapper(params)); |
|||
|
|||
return ConvertUtils.sourceToTarget(entityList, CaResidentUserDTO.class); |
|||
} |
|||
|
|||
private QueryWrapper<CaResidentUserEntity> getWrapper(Map<String, Object> params){ |
|||
String id = (String)params.get(FieldConstant.ID_HUMP); |
|||
|
|||
QueryWrapper<CaResidentUserEntity> wrapper = new QueryWrapper<>(); |
|||
wrapper.eq(StringUtils.isNotBlank(id), FieldConstant.ID, id); |
|||
|
|||
return wrapper; |
|||
} |
|||
|
|||
@Override |
|||
public CaResidentUserDTO get(String id) { |
|||
CaResidentUserEntity entity = baseDao.selectById(id); |
|||
return ConvertUtils.sourceToTarget(entity, CaResidentUserDTO.class); |
|||
} |
|||
|
|||
@Override |
|||
@Transactional(rollbackFor = Exception.class) |
|||
public void save(CaResidentUserDTO dto) { |
|||
CaResidentUserEntity entity = ConvertUtils.sourceToTarget(dto, CaResidentUserEntity.class); |
|||
insert(entity); |
|||
} |
|||
|
|||
@Override |
|||
@Transactional(rollbackFor = Exception.class) |
|||
public void update(CaResidentUserDTO dto) { |
|||
CaResidentUserEntity entity = ConvertUtils.sourceToTarget(dto, CaResidentUserEntity.class); |
|||
updateById(entity); |
|||
} |
|||
|
|||
@Override |
|||
@Transactional(rollbackFor = Exception.class) |
|||
public void delete(String[] ids) { |
|||
// 逻辑删除(@TableLogic 注解)
|
|||
baseDao.deleteBatchIds(Arrays.asList(ids)); |
|||
} |
|||
|
|||
@Override |
|||
public void saveCaResidentUser(SaveCaResidentUserFormDTO dto) { |
|||
CaResidentUserEntity entity = ConvertUtils.sourceToTarget(dto,CaResidentUserEntity.class); |
|||
insert(entity); |
|||
} |
|||
|
|||
} |
@ -0,0 +1,3 @@ |
|||
ALTER TABLE `epmet_open_data`.`ca_resident` |
|||
DROP COLUMN `home_id`, |
|||
DROP COLUMN `ic_resi_user`; |
@ -0,0 +1,52 @@ |
|||
DROP TABLE IF EXISTS `business_bind_org`; |
|||
CREATE TABLE `business_bind_org` ( |
|||
`ID` varchar(64) CHARACTER SET utf8mb4 NOT NULL COMMENT '主键', |
|||
`CUSTOMER_ID` varchar(64) CHARACTER SET utf8mb4 NOT NULL COMMENT '客户Id', |
|||
`business_org_id` varchar(64) CHARACTER SET utf8mb4 NOT NULL COMMENT '本系统业务机构ID', |
|||
`business_code` varchar(32) CHARACTER SET utf8mb4 NOT NULL COMMENT '综治ca;网格化wgh', |
|||
`third_org_id` varchar(64) CHARACTER SET utf8mb4 NOT NULL COMMENT '第三方机构ID', |
|||
`DEL_FLAG` varchar(1) CHARACTER SET utf8mb4 NOT NULL DEFAULT '0' COMMENT '删除标识 0.未删除 1.已删除', |
|||
`REVISION` int(11) NOT NULL DEFAULT '1' COMMENT '乐观锁', |
|||
`CREATED_BY` varchar(64) CHARACTER SET utf8mb4 NOT NULL COMMENT '创建人', |
|||
`CREATED_TIME` datetime NOT NULL COMMENT '创建时间', |
|||
`UPDATED_BY` varchar(64) CHARACTER SET utf8mb4 NOT NULL COMMENT '更新人', |
|||
`UPDATED_TIME` datetime NOT NULL COMMENT '更新时间', |
|||
PRIMARY KEY (`ID`), |
|||
KEY `idx_grid_grid_id` (`third_org_id`(8)) USING BTREE |
|||
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin; |
|||
|
|||
|
|||
DROP VIEW IF EXISTS `view_grid_comm_street`; |
|||
|
|||
CREATE ALGORITHM = UNDEFINED SQL SECURITY DEFINER VIEW `view_grid_comm_street_ca` AS SELECT |
|||
`g4`.`grid_id` AS `grid_id`, |
|||
`g4`.`grid_name` AS `grid_name`, |
|||
`g3`.`grid_id` AS `community_id`, |
|||
`g3`.`grid_name` AS `community_name`, |
|||
`g2`.`grid_id` AS `street_id`, |
|||
`g2`.`grid_name` AS `street_name`, |
|||
concat( `g2`.`grid_id`, ':', `g3`.`grid_id`, ':', `g4`.`grid_id` ) AS `grid_id_path`, |
|||
`bbo`.`business_org_id` AS `business_org_id` |
|||
FROM |
|||
((( |
|||
`ca_bm_grid` `g4` |
|||
JOIN `ca_bm_grid` `g3` ON ((( |
|||
`g3`.`grid_id` = `g4`.`parent_id` |
|||
) |
|||
AND ( `g3`.`grid_level` = 'level3' ) |
|||
AND ( `g3`.`delete_flag` = 'normal' )))) |
|||
JOIN `ca_bm_grid` `g2` ON ((( |
|||
`g2`.`grid_id` = `g3`.`parent_id` |
|||
) |
|||
AND ( `g2`.`grid_level` = 'level2' ) |
|||
AND ( `g2`.`delete_flag` = 'normal' )))) |
|||
LEFT JOIN `business_bind_org` `bbo` ON ((( |
|||
`g4`.`grid_id` = `bbo`.`business_org_id` |
|||
) |
|||
AND ( `bbo`.`business_code` = 'ca' ) |
|||
AND ( `bbo`.`DEL_FLAG` = '0' )))) |
|||
WHERE |
|||
(( |
|||
`g4`.`grid_level` = 'level4' |
|||
) |
|||
AND ( `g4`.`delete_flag` = 'normal' )) |
@ -0,0 +1,14 @@ |
|||
DROP TABLE IF EXISTS `ca_resident_user`; |
|||
CREATE TABLE `ca_resident_user` ( |
|||
`id` varchar(64) NOT NULL, |
|||
`id_card` varchar(64) DEFAULT NULL COMMENT '身份证号', |
|||
`ic_resi_user_id` varchar(255) DEFAULT NULL COMMENT 'ic_resi_user表id', |
|||
`home_id` varchar(200) DEFAULT NULL COMMENT '绑定的房屋id', |
|||
`created_by` varchar(64) DEFAULT NULL COMMENT '创建人', |
|||
`CREATED_TIME` datetime DEFAULT NULL COMMENT '创建时间', |
|||
`updated_by` varchar(64) DEFAULT NULL COMMENT '最后修改人', |
|||
`updated_time` datetime DEFAULT NULL COMMENT '最后修改时间', |
|||
`del_flag` varchar(1) DEFAULT NULL COMMENT '删除标记,normal', |
|||
`revision` int(11) DEFAULT '1' COMMENT '乐观锁', |
|||
PRIMARY KEY (`id`) |
|||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; |
@ -0,0 +1,8 @@ |
|||
<?xml version="1.0" encoding="UTF-8"?> |
|||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
|||
|
|||
<mapper namespace="com.epmet.opendata.dao.CaResidentUserDao"> |
|||
|
|||
|
|||
|
|||
</mapper> |
@ -0,0 +1,29 @@ |
|||
package com.epmet.dto.form; |
|||
|
|||
import lombok.Data; |
|||
|
|||
import javax.validation.constraints.NotBlank; |
|||
import java.io.Serializable; |
|||
|
|||
@Data |
|||
public class BindHomeFormDTO implements Serializable { |
|||
|
|||
private static final long serialVersionUID = -6084569462551209768L; |
|||
|
|||
/** |
|||
* 身份证号 |
|||
*/ |
|||
@NotBlank(message = "身份证号不能为空") |
|||
private String idCard; |
|||
|
|||
/** |
|||
* 房屋id |
|||
*/ |
|||
@NotBlank(message = "房屋id不能为空") |
|||
private String homeId; |
|||
|
|||
/** |
|||
* 用户id |
|||
*/ |
|||
private String customerId; |
|||
} |
Loading…
Reference in new issue