400 changed files with 29732 additions and 145 deletions
@ -0,0 +1,162 @@ |
|||||
|
package com.epmet.controller; |
||||
|
|
||||
|
import cn.hutool.core.bean.BeanUtil; |
||||
|
import com.epmet.commons.tools.constant.AppClientConstant; |
||||
|
import com.epmet.commons.tools.constant.ServiceConstant; |
||||
|
import com.epmet.commons.tools.exception.EpmetErrorCode; |
||||
|
import com.epmet.commons.tools.exception.RenException; |
||||
|
import com.epmet.commons.tools.feign.ResultDataResolver; |
||||
|
import com.epmet.commons.tools.redis.RedisKeys; |
||||
|
import com.epmet.commons.tools.redis.RedisUtils; |
||||
|
import com.epmet.commons.tools.security.password.PasswordUtils; |
||||
|
import com.epmet.commons.tools.utils.Result; |
||||
|
import com.epmet.commons.tools.validator.ValidatorUtils; |
||||
|
import com.epmet.dto.CustomerStaffDTO; |
||||
|
import com.epmet.dto.form.LoginByPassWordFormDTO; |
||||
|
import com.epmet.dto.form.RootOrgListByStaffIdFormDTO; |
||||
|
import com.epmet.dto.result.StaffOrgsResultDTO; |
||||
|
import com.epmet.dto.result.UserTokenResultDTO; |
||||
|
import com.epmet.feign.EpmetUserFeignClient; |
||||
|
import com.epmet.feign.GovOrgOpenFeignClient; |
||||
|
import com.epmet.redis.CaptchaRedis; |
||||
|
import com.epmet.redis.IcLoginTicketCacheBean; |
||||
|
import com.epmet.service.IcLoginService; |
||||
|
import org.apache.commons.collections4.CollectionUtils; |
||||
|
import org.apache.commons.lang3.StringUtils; |
||||
|
import org.springframework.beans.factory.annotation.Autowired; |
||||
|
import org.springframework.web.bind.annotation.PostMapping; |
||||
|
import org.springframework.web.bind.annotation.RequestBody; |
||||
|
import org.springframework.web.bind.annotation.RequestMapping; |
||||
|
import org.springframework.web.bind.annotation.RestController; |
||||
|
|
||||
|
import java.util.*; |
||||
|
|
||||
|
@RestController |
||||
|
@RequestMapping("ic") |
||||
|
public class IcLoinController implements ResultDataResolver { |
||||
|
|
||||
|
public static final long IC_LOGIN_TICKET_EXPIRE_SECONDS = 2 * 60l; |
||||
|
|
||||
|
@Autowired |
||||
|
private EpmetUserFeignClient epmetUserFeignClient; |
||||
|
|
||||
|
@Autowired |
||||
|
private GovOrgOpenFeignClient govOrgOpenFeignClient; |
||||
|
|
||||
|
@Autowired |
||||
|
private CaptchaRedis captchaRedis; |
||||
|
|
||||
|
@Autowired |
||||
|
private IcLoginService icLoginService; |
||||
|
|
||||
|
@Autowired |
||||
|
private RedisUtils redisUtils; |
||||
|
|
||||
|
/** |
||||
|
* @description 基层治理赋能平台-根据手机号密码获取组织列表 |
||||
|
* |
||||
|
* @param input |
||||
|
* @return |
||||
|
* @author wxz |
||||
|
* @date 2021.10.25 09:56:33 |
||||
|
*/ |
||||
|
@PostMapping("getmyorgsbypassword") |
||||
|
public Result<HashMap<String, Object>> getMyOrgsByPassword(@RequestBody LoginByPassWordFormDTO input) { |
||||
|
ValidatorUtils.validateEntity(input, LoginByPassWordFormDTO.IcGetOrgsByPwdGroup.class); |
||||
|
String captcha = input.getCaptcha(); |
||||
|
String mobile = input.getMobile(); |
||||
|
String password = input.getPassword(); |
||||
|
String uuid = input.getUuid(); |
||||
|
|
||||
|
// 图片验证码
|
||||
|
String captchaInCache = captchaRedis.getIcLoginCaptcha(uuid); |
||||
|
if (StringUtils.isBlank(captchaInCache) || !captcha.equals(captchaInCache)) { |
||||
|
throw new RenException(EpmetErrorCode.ERR10019.getCode()); |
||||
|
} |
||||
|
|
||||
|
// 获取用户信息
|
||||
|
Result<List<CustomerStaffDTO>> staffResult = epmetUserFeignClient.checkCustomerStaff(mobile); |
||||
|
List<CustomerStaffDTO> staffList = getResultDataOrThrowsException(staffResult, ServiceConstant.EPMET_USER_SERVER, EpmetErrorCode.SERVER_ERROR.getCode(), "【基层治理平台登录】获取用户信息失败", null); |
||||
|
if (CollectionUtils.isEmpty(staffList)) { |
||||
|
throw new RenException(EpmetErrorCode.ERR10003.getCode()); |
||||
|
} |
||||
|
|
||||
|
CustomerStaffDTO staffInfo = staffList.get(0); |
||||
|
|
||||
|
if (!PasswordUtils.matches(password, staffInfo.getPassword())) { |
||||
|
throw new RenException(EpmetErrorCode.ERR10004.getCode()); |
||||
|
} |
||||
|
|
||||
|
String staffId = staffInfo.getUserId(); |
||||
|
|
||||
|
// 查询跟组织列表
|
||||
|
RootOrgListByStaffIdFormDTO orgListForm = new RootOrgListByStaffIdFormDTO(); |
||||
|
orgListForm.setStaffId(staffId); |
||||
|
Result<List<StaffOrgsResultDTO>> orgListResult = govOrgOpenFeignClient.getStaffOrgListByStaffId(orgListForm); |
||||
|
List<StaffOrgsResultDTO> orgs = getResultDataOrThrowsException(orgListResult, ServiceConstant.GOV_ORG_SERVER, EpmetErrorCode.SERVER_ERROR.getCode(), "【基层治理平台登录】根据staffId查询所属客户跟组织列表失败", null); |
||||
|
|
||||
|
// 生成登录票据
|
||||
|
String ticket = UUID.randomUUID().toString().replace("-", ""); |
||||
|
IcLoginTicketCacheBean ticketCacheBean = new IcLoginTicketCacheBean(); |
||||
|
ticketCacheBean.setMobile(mobile); |
||||
|
ticketCacheBean.setStaffId(staffId); |
||||
|
cacheTicket(ticket, ticketCacheBean); |
||||
|
|
||||
|
HashMap<String, Object> resultMap = new HashMap<>(); |
||||
|
resultMap.put("staffId", staffId); |
||||
|
resultMap.put("ticket", ticket); |
||||
|
resultMap.put("orgs", orgs); |
||||
|
|
||||
|
return new Result<HashMap<String, Object>>().ok(resultMap); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* @description IC登录 |
||||
|
* |
||||
|
* @param input |
||||
|
* @return |
||||
|
* @author wxz |
||||
|
* @date 2021.10.25 21:14:22 |
||||
|
*/ |
||||
|
@PostMapping("login") |
||||
|
public Result<UserTokenResultDTO> login(@RequestBody LoginByPassWordFormDTO input) { |
||||
|
ValidatorUtils.validateEntity(input, LoginByPassWordFormDTO.IcLoginGroup.class); |
||||
|
String ticket = input.getTicket(); |
||||
|
String orgId = input.getRootAgencyId(); |
||||
|
String staffId = input.getStaffId(); |
||||
|
|
||||
|
// ticket校验
|
||||
|
IcLoginTicketCacheBean ticketCache = getTicketCache(ticket); |
||||
|
if (ticketCache == null || !ticketCache.getStaffId().equals(staffId)) { |
||||
|
// ticket&userId不对应
|
||||
|
throw new RenException(EpmetErrorCode.ERR10008.getCode()); |
||||
|
} |
||||
|
|
||||
|
UserTokenResultDTO tokenInfo = icLoginService.login(staffId, orgId); |
||||
|
return new Result<UserTokenResultDTO>().ok(tokenInfo); |
||||
|
} |
||||
|
|
||||
|
private void cacheTicket(String ticket, IcLoginTicketCacheBean cacheBean) { |
||||
|
Map<String, Object> stringObjectMap = BeanUtil.beanToMap(cacheBean, false, true); |
||||
|
redisUtils.hMSet(RedisKeys.loginTicket(AppClientConstant.APP_IC, ticket), stringObjectMap, IC_LOGIN_TICKET_EXPIRE_SECONDS); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* @description 从缓存中取出ticket,并删除 |
||||
|
* |
||||
|
* @param ticket |
||||
|
* @return |
||||
|
* @author wxz |
||||
|
* @date 2021.10.26 08:58:27 |
||||
|
*/ |
||||
|
private IcLoginTicketCacheBean getTicketCache(String ticket) { |
||||
|
String key = RedisKeys.loginTicket(AppClientConstant.APP_IC, ticket); |
||||
|
Map<String, Object> map = redisUtils.hGetAll(key); |
||||
|
if (CollectionUtils.sizeIsEmpty(map)) { |
||||
|
return null; |
||||
|
} |
||||
|
redisUtils.expire(key, 0); |
||||
|
return BeanUtil.mapToBean(map, IcLoginTicketCacheBean.class, false); |
||||
|
} |
||||
|
|
||||
|
} |
@ -0,0 +1,9 @@ |
|||||
|
package com.epmet.redis; |
||||
|
|
||||
|
import lombok.Data; |
||||
|
|
||||
|
@Data |
||||
|
public class IcLoginTicketCacheBean { |
||||
|
private String staffId; |
||||
|
private String mobile; |
||||
|
} |
@ -0,0 +1,9 @@ |
|||||
|
package com.epmet.service; |
||||
|
|
||||
|
import com.epmet.dto.result.UserTokenResultDTO; |
||||
|
|
||||
|
public interface IcLoginService { |
||||
|
|
||||
|
|
||||
|
UserTokenResultDTO login(String staffId, String orgId); |
||||
|
} |
@ -0,0 +1,177 @@ |
|||||
|
package com.epmet.service.impl; |
||||
|
|
||||
|
import cn.hutool.core.bean.BeanUtil; |
||||
|
import com.epmet.auth.constants.AuthOperationConstants; |
||||
|
import com.epmet.commons.rocketmq.messages.LoginMQMsg; |
||||
|
import com.epmet.commons.tools.constant.AppClientConstant; |
||||
|
import com.epmet.commons.tools.constant.ServiceConstant; |
||||
|
import com.epmet.commons.tools.exception.EpmetErrorCode; |
||||
|
import com.epmet.commons.tools.exception.RenException; |
||||
|
import com.epmet.commons.tools.feign.ResultDataResolver; |
||||
|
import com.epmet.commons.tools.redis.RedisKeys; |
||||
|
import com.epmet.commons.tools.redis.RedisUtils; |
||||
|
import com.epmet.commons.tools.security.dto.IcTokenDto; |
||||
|
import com.epmet.commons.tools.utils.CpUserDetailRedis; |
||||
|
import com.epmet.commons.tools.utils.IpUtils; |
||||
|
import com.epmet.commons.tools.utils.Result; |
||||
|
import com.epmet.dto.CustomerAgencyDTO; |
||||
|
import com.epmet.dto.form.SystemMsgFormDTO; |
||||
|
import com.epmet.dto.result.UserTokenResultDTO; |
||||
|
import com.epmet.feign.EpmetMessageOpenFeignClient; |
||||
|
import com.epmet.feign.GovOrgOpenFeignClient; |
||||
|
import com.epmet.jwt.JwtTokenProperties; |
||||
|
import com.epmet.jwt.JwtTokenUtils; |
||||
|
import com.epmet.service.IcLoginService; |
||||
|
import lombok.extern.slf4j.Slf4j; |
||||
|
import org.springframework.beans.factory.annotation.Autowired; |
||||
|
import org.springframework.stereotype.Service; |
||||
|
import org.springframework.web.context.request.RequestContextHolder; |
||||
|
import org.springframework.web.context.request.ServletRequestAttributes; |
||||
|
|
||||
|
import javax.servlet.http.HttpServletRequest; |
||||
|
import java.util.*; |
||||
|
|
||||
|
@Service |
||||
|
@Slf4j |
||||
|
public class IcLoginServiceImpl implements IcLoginService, ResultDataResolver { |
||||
|
|
||||
|
@Autowired |
||||
|
private JwtTokenUtils jwtTokenUtils; |
||||
|
|
||||
|
@Autowired |
||||
|
private RedisUtils redisUtils; |
||||
|
|
||||
|
@Autowired |
||||
|
private CpUserDetailRedis cpUserDetailRedis; |
||||
|
|
||||
|
@Autowired |
||||
|
private JwtTokenProperties jwtTokenProperties; |
||||
|
|
||||
|
@Autowired |
||||
|
private EpmetMessageOpenFeignClient messageOpenFeignClient; |
||||
|
|
||||
|
@Autowired |
||||
|
private GovOrgOpenFeignClient govOrgOpenFeignClient; |
||||
|
|
||||
|
@Autowired |
||||
|
private ThirdLoginServiceImpl thirdLoginService; |
||||
|
|
||||
|
@Override |
||||
|
public UserTokenResultDTO login(String staffId, String orgId) { |
||||
|
String app = AppClientConstant.APP_IC; |
||||
|
String client = AppClientConstant.CLIENT_WEB; |
||||
|
|
||||
|
// 1.获取用户token
|
||||
|
String token = this.generateIcToken(staffId, app, client); |
||||
|
|
||||
|
Result<CustomerAgencyDTO> agencyResult = govOrgOpenFeignClient.getAgencyById(orgId); |
||||
|
CustomerAgencyDTO agencyInfo = getResultDataOrThrowsException(agencyResult, ServiceConstant.GOV_ORG_SERVER, EpmetErrorCode.SERVER_ERROR.getCode(), "【IC平台登录】获取组织信息失败", null); |
||||
|
|
||||
|
// 2.缓存token
|
||||
|
cacheToken(app, client, staffId, token, orgId, agencyInfo.getCustomerId()); |
||||
|
|
||||
|
UserTokenResultDTO userTokenResultDTO = new UserTokenResultDTO(); |
||||
|
userTokenResultDTO.setToken(token); |
||||
|
userTokenResultDTO.setCustomerId(agencyInfo.getCustomerId()); |
||||
|
|
||||
|
//7.发送登录事件
|
||||
|
try { |
||||
|
sendLoginEvent(staffId, app, client); |
||||
|
} catch (RenException e) { |
||||
|
log.error(e.getInternalMsg()); |
||||
|
} catch (Exception e) { |
||||
|
log.error("【工作端workLogin登录】发送登录事件失败,程序继续执行。"); |
||||
|
} |
||||
|
|
||||
|
return userTokenResultDTO; |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* @param staffId |
||||
|
* @return |
||||
|
* @description 生成Ic平台的Token |
||||
|
* @author wxz |
||||
|
* @date 2021.10.26 13:42:36 |
||||
|
*/ |
||||
|
private String generateIcToken(String staffId, String app, String client) { |
||||
|
Map<String, Object> map = new HashMap<>(); |
||||
|
map.put("app", app); |
||||
|
map.put("client", client); |
||||
|
map.put("userId", staffId); |
||||
|
String token = jwtTokenUtils.createToken(map); |
||||
|
return token; |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* @param userId |
||||
|
* @param fromApp |
||||
|
* @param fromClient |
||||
|
* @return |
||||
|
* @description 发布登录时间 |
||||
|
* @author wxz |
||||
|
* @date 2021.10.26 13:45:59 |
||||
|
*/ |
||||
|
private void sendLoginEvent(String userId, String fromApp, String fromClient) { |
||||
|
HttpServletRequest request = ((ServletRequestAttributes) RequestContextHolder.getRequestAttributes()).getRequest(); |
||||
|
|
||||
|
LoginMQMsg loginMQMsg = new LoginMQMsg(); |
||||
|
loginMQMsg.setUserId(userId); |
||||
|
loginMQMsg.setLoginTime(new Date()); |
||||
|
loginMQMsg.setIp(IpUtils.getIpAddr(request)); |
||||
|
loginMQMsg.setFromApp(fromApp); |
||||
|
loginMQMsg.setFromClient(fromClient); |
||||
|
|
||||
|
SystemMsgFormDTO form = new SystemMsgFormDTO(); |
||||
|
form.setMessageType(AuthOperationConstants.LOGIN); |
||||
|
form.setContent(loginMQMsg); |
||||
|
messageOpenFeignClient.sendSystemMsgByMQ(form); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* @description 缓存token到redis |
||||
|
* |
||||
|
* @param app |
||||
|
* @param client |
||||
|
* @param userId |
||||
|
* @param token |
||||
|
* @param rootAgencyId |
||||
|
* @return |
||||
|
* @author wxz |
||||
|
* @date 2021.10.26 14:19:07 |
||||
|
*/ |
||||
|
private void cacheToken(String app, |
||||
|
String client, |
||||
|
String userId, |
||||
|
String token, |
||||
|
String rootAgencyId, |
||||
|
String customerId) { |
||||
|
|
||||
|
IcTokenDto tokenDto = new IcTokenDto(); |
||||
|
int expire = jwtTokenProperties.getExpire(); |
||||
|
long expireTime = jwtTokenUtils.getExpiration(token).getTime(); |
||||
|
|
||||
|
tokenDto.setApp(app); |
||||
|
tokenDto.setClient(client); |
||||
|
tokenDto.setUserId(userId); |
||||
|
tokenDto.setToken(token); |
||||
|
tokenDto.setExpireTime(expireTime); |
||||
|
tokenDto.setRootAgencyId(rootAgencyId); |
||||
|
tokenDto.setCustomerId(customerId); |
||||
|
|
||||
|
//设置部门,网格,角色列表
|
||||
|
tokenDto.setDeptIdList(thirdLoginService.getDeptartmentIdList(userId)); |
||||
|
tokenDto.setGridIdList(thirdLoginService.getGridIdList(userId)); |
||||
|
CustomerAgencyDTO agency = thirdLoginService.getAgencyByStaffId(userId); |
||||
|
if (agency != null) { |
||||
|
tokenDto.setAgencyId(agency.getId()); |
||||
|
tokenDto.setRoleList(thirdLoginService.queryGovStaffRoles(userId, agency.getId())); |
||||
|
} |
||||
|
tokenDto.setOrgIdPath(thirdLoginService.getOrgIdPath(userId)); |
||||
|
|
||||
|
String key = RedisKeys.getCpUserKey(app, client, userId); |
||||
|
Map<String, Object> map = BeanUtil.beanToMap(tokenDto, false, true); |
||||
|
redisUtils.hMSet(key, map, expire); |
||||
|
} |
||||
|
|
||||
|
|
||||
|
} |
@ -0,0 +1,20 @@ |
|||||
|
package com.epmet.commons.rocketmq.messages; |
||||
|
|
||||
|
import lombok.Data; |
||||
|
|
||||
|
import java.io.Serializable; |
||||
|
|
||||
|
/** |
||||
|
* 居民信息新增、修改推送MQ |
||||
|
* @author sun |
||||
|
*/ |
||||
|
@Data |
||||
|
public class IcResiUserAddMQMsg implements Serializable { |
||||
|
|
||||
|
//客户Id
|
||||
|
private String customerId; |
||||
|
//居民ID
|
||||
|
private String icResiUser; |
||||
|
|
||||
|
|
||||
|
} |
@ -0,0 +1,20 @@ |
|||||
|
package com.epmet.commons.tools.dto.form; |
||||
|
|
||||
|
import lombok.Data; |
||||
|
|
||||
|
import javax.validation.constraints.NotBlank; |
||||
|
|
||||
|
/** |
||||
|
* @Description 字典数据查询-接口入参 |
||||
|
* @Author sun |
||||
|
*/ |
||||
|
@Data |
||||
|
public class DictListFormDTO { |
||||
|
|
||||
|
/** |
||||
|
* 字典类型 |
||||
|
*/ |
||||
|
@NotBlank(message = "字典类型不能为空") |
||||
|
private String dictType; |
||||
|
|
||||
|
} |
@ -0,0 +1,17 @@ |
|||||
|
package com.epmet.commons.tools.dto.result; |
||||
|
|
||||
|
import lombok.Data; |
||||
|
|
||||
|
import java.io.Serializable; |
||||
|
import java.util.List; |
||||
|
|
||||
|
/** |
||||
|
* @Description 字典数据查询-接口返参 |
||||
|
* @Author sun |
||||
|
*/ |
||||
|
@Data |
||||
|
public class DictListResultDTO implements Serializable { |
||||
|
private static final long serialVersionUID = 8618231166600518980L; |
||||
|
private String label; |
||||
|
private String value; |
||||
|
} |
@ -0,0 +1,20 @@ |
|||||
|
package com.epmet.commons.tools.dto.result; |
||||
|
|
||||
|
import lombok.Data; |
||||
|
|
||||
|
import java.io.Serializable; |
||||
|
import java.util.List; |
||||
|
|
||||
|
/** |
||||
|
* @Description |
||||
|
* @Author zhaoqifeng |
||||
|
* @Date 2021/10/26 13:53 |
||||
|
*/ |
||||
|
@Data |
||||
|
public class OptionResultDTO implements Serializable { |
||||
|
private static final long serialVersionUID = 8618231166600518980L; |
||||
|
private String label; |
||||
|
private String value; |
||||
|
private String sysDictDataId; |
||||
|
private List<OptionResultDTO> children; |
||||
|
} |
@ -0,0 +1,53 @@ |
|||||
|
/** |
||||
|
* Copyright (c) 2018 人人开源 All rights reserved. |
||||
|
* |
||||
|
* https://www.renren.io
|
||||
|
* |
||||
|
* 版权所有,侵权必究! |
||||
|
*/ |
||||
|
|
||||
|
package com.epmet.commons.tools.enums; |
||||
|
|
||||
|
/** |
||||
|
* form表单 配置item类型 枚举 |
||||
|
* |
||||
|
* @author Mark sunlightcs@gmail.com |
||||
|
* @since 1.0.0 |
||||
|
*/ |
||||
|
public enum FormItemTypeEnum { |
||||
|
//枚举类型
|
||||
|
INPUT("input", "输入框"), |
||||
|
RADIO("radio", "单选框"), |
||||
|
CHECKBOX("checkbox", "复选框"), |
||||
|
SELECT("select", "下拉框"), |
||||
|
TEXTAREA("textarea", "文本域"), |
||||
|
CASCADER("cascader", "及联"), |
||||
|
DATE_PICKER("datepicker", "组织"), |
||||
|
UN_KNOWN("un_known", "不支持的类型"); |
||||
|
|
||||
|
private String code; |
||||
|
private String desc; |
||||
|
|
||||
|
FormItemTypeEnum(String value,String name) { |
||||
|
this.code = value; |
||||
|
this.desc = name; |
||||
|
} |
||||
|
|
||||
|
public static FormItemTypeEnum getEnum(String code) { |
||||
|
FormItemTypeEnum[] values = FormItemTypeEnum.values(); |
||||
|
for (FormItemTypeEnum value : values) { |
||||
|
if (value.getCode().equals(code)) { |
||||
|
return value; |
||||
|
} |
||||
|
} |
||||
|
return UN_KNOWN; |
||||
|
} |
||||
|
|
||||
|
public String getCode() { |
||||
|
return code; |
||||
|
} |
||||
|
|
||||
|
public String getDesc() { |
||||
|
return desc; |
||||
|
} |
||||
|
} |
@ -0,0 +1,44 @@ |
|||||
|
package com.epmet.commons.tools.enums; |
||||
|
|
||||
|
import com.epmet.commons.tools.exception.EpmetErrorCode; |
||||
|
|
||||
|
public enum GenderEnum { |
||||
|
MAN("1", "男"), |
||||
|
WOMAN("2", "女"), |
||||
|
UN_KNOWN("0", "未知"); |
||||
|
|
||||
|
private String code; |
||||
|
private String name; |
||||
|
|
||||
|
|
||||
|
GenderEnum(String code, String name) { |
||||
|
this.code = code; |
||||
|
this.name = name; |
||||
|
} |
||||
|
|
||||
|
public static String getName(String code) { |
||||
|
GenderEnum[] genderEnums = values(); |
||||
|
for (GenderEnum genderEnum : genderEnums) { |
||||
|
if (genderEnum.getCode() == code) { |
||||
|
return genderEnum.getName(); |
||||
|
} |
||||
|
} |
||||
|
return EpmetErrorCode.SERVER_ERROR.getMsg(); |
||||
|
} |
||||
|
|
||||
|
public String getCode() { |
||||
|
return code; |
||||
|
} |
||||
|
|
||||
|
public void setCode(String code) { |
||||
|
this.code = code; |
||||
|
} |
||||
|
|
||||
|
public String getName() { |
||||
|
return name; |
||||
|
} |
||||
|
|
||||
|
public void setName(String name) { |
||||
|
this.name = name; |
||||
|
} |
||||
|
} |
@ -0,0 +1,45 @@ |
|||||
|
package com.epmet.commons.tools.enums; |
||||
|
|
||||
|
import com.epmet.commons.tools.exception.EpmetErrorCode; |
||||
|
|
||||
|
public enum HouseTypeEnum { |
||||
|
//房屋类型,1楼房,2平房,3别墅
|
||||
|
LOUFANG("1", "楼房"), |
||||
|
PINGFANG("2", "平房"), |
||||
|
BIESHU("3", "别墅"); |
||||
|
|
||||
|
private String code; |
||||
|
private String name; |
||||
|
|
||||
|
|
||||
|
HouseTypeEnum(String code, String name) { |
||||
|
this.code = code; |
||||
|
this.name = name; |
||||
|
} |
||||
|
|
||||
|
public static String getName(String code) { |
||||
|
HouseTypeEnum[] houseTypeEnums = values(); |
||||
|
for (HouseTypeEnum houseTypeEnum : houseTypeEnums) { |
||||
|
if (houseTypeEnum.getCode() == code) { |
||||
|
return houseTypeEnum.getName(); |
||||
|
} |
||||
|
} |
||||
|
return EpmetErrorCode.SERVER_ERROR.getMsg(); |
||||
|
} |
||||
|
|
||||
|
public String getCode() { |
||||
|
return code; |
||||
|
} |
||||
|
|
||||
|
public void setCode(String code) { |
||||
|
this.code = code; |
||||
|
} |
||||
|
|
||||
|
public String getName() { |
||||
|
return name; |
||||
|
} |
||||
|
|
||||
|
public void setName(String name) { |
||||
|
this.name = name; |
||||
|
} |
||||
|
} |
@ -0,0 +1,58 @@ |
|||||
|
package com.epmet.commons.tools.enums; |
||||
|
|
||||
|
/** |
||||
|
* @author Administrator |
||||
|
*/ |
||||
|
|
||||
|
public enum RelationshipEnum { |
||||
|
/** |
||||
|
* 环境变量枚举 |
||||
|
*/ |
||||
|
UN_KNOWN("0", "暂不清楚", 0), |
||||
|
SELF("1", "本人", 1), |
||||
|
spouse("2", "配偶", 2), |
||||
|
CHILD("3", "子女", 3), |
||||
|
PARENT("4", "父母", 4), |
||||
|
PARENT_IN_LAW("5", "岳父母或公婆", 5), |
||||
|
GRANDPARENT_IN_LAW("6", "祖父母", 6), |
||||
|
CHILD_IN_LAW("7", "媳婿", 7), |
||||
|
GRANDCHILD("8", "孙子女", 8), |
||||
|
BROTHER_AND_SISTER("9", "兄弟姐妹", 9), |
||||
|
OTHER("10", "其他", 10), |
||||
|
; |
||||
|
|
||||
|
private final String code; |
||||
|
private final String name; |
||||
|
private final Integer sort; |
||||
|
|
||||
|
|
||||
|
|
||||
|
RelationshipEnum(String code, String name, Integer sort) { |
||||
|
this.code = code; |
||||
|
this.name = name; |
||||
|
this.sort = sort; |
||||
|
} |
||||
|
|
||||
|
public static RelationshipEnum getEnum(String code) { |
||||
|
RelationshipEnum[] values = RelationshipEnum.values(); |
||||
|
for (RelationshipEnum value : values) { |
||||
|
if (value.getCode().equals(code)) { |
||||
|
return value; |
||||
|
} |
||||
|
} |
||||
|
return RelationshipEnum.UN_KNOWN; |
||||
|
} |
||||
|
|
||||
|
|
||||
|
public String getCode() { |
||||
|
return code; |
||||
|
} |
||||
|
|
||||
|
public String getName() { |
||||
|
return name; |
||||
|
} |
||||
|
|
||||
|
public Integer getSort(){ |
||||
|
return sort; |
||||
|
} |
||||
|
} |
@ -0,0 +1,81 @@ |
|||||
|
package com.epmet.commons.tools.security.dto; |
||||
|
|
||||
|
import com.alibaba.fastjson.JSON; |
||||
|
import lombok.AllArgsConstructor; |
||||
|
import lombok.Data; |
||||
|
import lombok.NoArgsConstructor; |
||||
|
|
||||
|
import java.util.List; |
||||
|
import java.util.Set; |
||||
|
|
||||
|
/** |
||||
|
* @Description ic平台token |
||||
|
* @author wxz |
||||
|
* @date 2021.10.26 13:58:03 |
||||
|
*/ |
||||
|
@Data |
||||
|
@AllArgsConstructor |
||||
|
@NoArgsConstructor |
||||
|
public class IcTokenDto extends BaseTokenDto { |
||||
|
|
||||
|
/** |
||||
|
* 当前登录的组织id(顶级) |
||||
|
*/ |
||||
|
private String rootAgencyId; |
||||
|
|
||||
|
/** |
||||
|
* 当前用户所属的机关单位id |
||||
|
*/ |
||||
|
private String agencyId; |
||||
|
|
||||
|
/** |
||||
|
* 当前网格对应的组织结构id的全路径用:隔开 |
||||
|
*/ |
||||
|
private String orgIdPath; |
||||
|
|
||||
|
/** |
||||
|
* 当前所在网格id |
||||
|
*/ |
||||
|
private String gridId; |
||||
|
|
||||
|
/*** |
||||
|
* 所在网格列表 |
||||
|
*/ |
||||
|
private Set<String> gridIdList; |
||||
|
|
||||
|
/** |
||||
|
* 部门id列表 |
||||
|
*/ |
||||
|
private Set<String> deptIdList; |
||||
|
|
||||
|
/** |
||||
|
* 功能权限列表,实际上是gov_staff => staff_role => role_operation查询到的operationKey |
||||
|
*/ |
||||
|
private Set<String> permissions; |
||||
|
|
||||
|
/** |
||||
|
* 角色ID列表 |
||||
|
*/ |
||||
|
private List<GovTokenDto.Role> roleList; |
||||
|
|
||||
|
/** |
||||
|
* 过期时间戳 |
||||
|
*/ |
||||
|
private Long expireTime; |
||||
|
|
||||
|
@Data |
||||
|
public static class Role { |
||||
|
|
||||
|
private String id; |
||||
|
private String roleKey; |
||||
|
private String roleName; |
||||
|
|
||||
|
public Role() { |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
@Override |
||||
|
public String toString() { |
||||
|
return JSON.toJSONString(this); |
||||
|
} |
||||
|
} |
@ -0,0 +1,16 @@ |
|||||
|
package com.epmet.dataaggre.dto.epmetuser; |
||||
|
|
||||
|
import lombok.Data; |
||||
|
|
||||
|
/** |
||||
|
* @Description TODO |
||||
|
* @Author yinzuomei |
||||
|
* @Date 2021/10/27 4:26 下午 |
||||
|
*/ |
||||
|
@Data |
||||
|
public class IcFormResColumnDTO { |
||||
|
private String tableName; |
||||
|
private String columnName; |
||||
|
private String label; |
||||
|
} |
||||
|
|
@ -0,0 +1,58 @@ |
|||||
|
package com.epmet.utils; |
||||
|
|
||||
|
import com.alibaba.excel.EasyExcelFactory; |
||||
|
|
||||
|
import java.io.File; |
||||
|
import java.util.ArrayList; |
||||
|
import java.util.List; |
||||
|
import java.util.Map; |
||||
|
|
||||
|
/** |
||||
|
* @description excel解析 |
||||
|
* |
||||
|
* @return |
||||
|
* @author wxz |
||||
|
* @date 2021.10.28 13:36:26 |
||||
|
*/ |
||||
|
public class ExcelPaseTest { |
||||
|
|
||||
|
public static void main(String[] args) { |
||||
|
new ExcelPaseTest().sqlizeGridNameAndCodeFromExcel(); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* @description 读取excel,生成根据网格name更新网格code的sql |
||||
|
* |
||||
|
* @param |
||||
|
* @return |
||||
|
* @author wxz |
||||
|
* @date 2021.10.28 13:34:31 |
||||
|
*/ |
||||
|
public void sqlizeGridNameAndCodeFromExcel() { |
||||
|
TempDynamicEasyExcelListener readListener = new TempDynamicEasyExcelListener(); |
||||
|
EasyExcelFactory.read(new File("/Users/wangxianzhang/Documents/1027平阴县网格编码及人员统计表.xls"), IndexOrNameData.class, readListener).headRowNumber(4).sheet(0).doRead(); |
||||
|
List<Map<Integer, String>> headList = readListener.getHeadList(); |
||||
|
List<IndexOrNameData> dataList = readListener.getDataList(); |
||||
|
|
||||
|
List<String> exceptList = new ArrayList<>(); |
||||
|
|
||||
|
for (IndexOrNameData data : dataList) { |
||||
|
String content = data.getColumn(); |
||||
|
|
||||
|
int startIndex = content.indexOf("370"); |
||||
|
if (startIndex == -1) { |
||||
|
exceptList.add(content); |
||||
|
} else { |
||||
|
String gridName = content.substring(0, startIndex).trim(); |
||||
|
String gridCode = content.substring(startIndex); |
||||
|
String sqlPattern = String.format("update customer_grid set CODE='%s' where GRID_NAME='%s';", gridCode, gridName); |
||||
|
System.out.println(sqlPattern); |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
System.err.println("========异常行======="); |
||||
|
for (String s : exceptList) { |
||||
|
System.err.println(s); |
||||
|
} |
||||
|
} |
||||
|
} |
@ -0,0 +1,20 @@ |
|||||
|
package com.epmet.utils; |
||||
|
|
||||
|
import com.alibaba.excel.annotation.ExcelProperty; |
||||
|
import lombok.Data; |
||||
|
|
||||
|
@Data |
||||
|
public class IndexOrNameData { |
||||
|
/** |
||||
|
* 强制读取第三个 这里不建议 index 和 name 同时用,要么一个对象只用index,要么一个对象只用name去匹配 |
||||
|
*/ |
||||
|
@ExcelProperty(index = 3) |
||||
|
private String column; |
||||
|
///**
|
||||
|
// * 用名字去匹配,这里需要注意,如果名字重复,会导致只有一个字段读取到数据
|
||||
|
// */
|
||||
|
//@ExcelProperty("字符串标题")
|
||||
|
//private String string;
|
||||
|
//@ExcelProperty("日期标题")
|
||||
|
//private Date date;
|
||||
|
} |
@ -0,0 +1,82 @@ |
|||||
|
package com.epmet.utils; |
||||
|
|
||||
|
import com.alibaba.excel.context.AnalysisContext; |
||||
|
import com.alibaba.excel.event.AnalysisEventListener; |
||||
|
import com.alibaba.fastjson.JSON; |
||||
|
import lombok.extern.slf4j.Slf4j; |
||||
|
|
||||
|
import java.util.ArrayList; |
||||
|
import java.util.List; |
||||
|
import java.util.Map; |
||||
|
|
||||
|
/** |
||||
|
* 创建一个监听器 |
||||
|
*/ |
||||
|
@Slf4j |
||||
|
public class TempDynamicEasyExcelListener extends AnalysisEventListener<IndexOrNameData> { |
||||
|
|
||||
|
/** |
||||
|
* 表头数据(存储所有的表头数据) |
||||
|
*/ |
||||
|
private List<Map<Integer, String>> headList = new ArrayList<>(); |
||||
|
|
||||
|
/** |
||||
|
* 数据体 |
||||
|
*/ |
||||
|
private List<IndexOrNameData> dataList = new ArrayList<>(); |
||||
|
|
||||
|
/** |
||||
|
* 这里会一行行的返回头 |
||||
|
* |
||||
|
* @param headMap |
||||
|
* @param context |
||||
|
*/ |
||||
|
//@Override
|
||||
|
//public void invokeHeadMap(IcResiUserController.IndexOrNameData headMap, AnalysisContext context) {
|
||||
|
// log.info("解析到一条头数据:{}", JSON.toJSONString(headMap));
|
||||
|
// //存储全部表头数据
|
||||
|
// headList.add(headMap);
|
||||
|
//}
|
||||
|
|
||||
|
|
||||
|
@Override |
||||
|
public void invokeHeadMap(Map<Integer, String> headMap, AnalysisContext context) { |
||||
|
log.info("解析到一条头数据:{}", JSON.toJSONString(headMap)); |
||||
|
//存储全部表头数据
|
||||
|
headList.add(headMap); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* 这个每一条数据解析都会来调用 |
||||
|
* |
||||
|
* @param data |
||||
|
* one row value. Is is same as {@link AnalysisContext#readRowHolder()} |
||||
|
* @param context |
||||
|
*/ |
||||
|
@Override |
||||
|
public void invoke(IndexOrNameData data, AnalysisContext context) { |
||||
|
//log.info("解析到一条数据:{}", JSON.toJSONString(data));
|
||||
|
if (data.getColumn() != null) { |
||||
|
dataList.add(data); |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* 所有数据解析完成了 都会来调用 |
||||
|
* |
||||
|
* @param context |
||||
|
*/ |
||||
|
@Override |
||||
|
public void doAfterAllAnalysed(AnalysisContext context) { |
||||
|
// 这里也要保存数据,确保最后遗留的数据也存储到数据库
|
||||
|
log.info("所有数据解析完成!"); |
||||
|
} |
||||
|
|
||||
|
public List<Map<Integer, String>> getHeadList() { |
||||
|
return headList; |
||||
|
} |
||||
|
|
||||
|
public List<IndexOrNameData> getDataList() { |
||||
|
return dataList; |
||||
|
} |
||||
|
} |
@ -0,0 +1,21 @@ |
|||||
|
package com.epmet.dto.form.demand; |
||||
|
|
||||
|
import lombok.Data; |
||||
|
|
||||
|
import javax.validation.constraints.NotBlank; |
||||
|
import javax.validation.constraints.NotEmpty; |
||||
|
import java.io.Serializable; |
||||
|
import java.util.Set; |
||||
|
|
||||
|
@Data |
||||
|
public class UserDemandNameQueryFormDTO implements Serializable { |
||||
|
private static final long serialVersionUID = 1562457999313501989L; |
||||
|
|
||||
|
public interface AddUserInternalGroup {} |
||||
|
|
||||
|
@NotBlank(message = "客户idbu不能为空",groups =AddUserInternalGroup.class) |
||||
|
private String customerId; |
||||
|
|
||||
|
@NotEmpty(message = "分类编码不能为空",groups =AddUserInternalGroup.class) |
||||
|
private Set<String> codeSet; |
||||
|
} |
@ -0,0 +1,105 @@ |
|||||
|
/** |
||||
|
* Copyright 2018 人人开源 https://www.renren.io
|
||||
|
* <p> |
||||
|
* This program is free software: you can redistribute it and/or modify |
||||
|
* it under the terms of the GNU General Public License as published by |
||||
|
* the Free Software Foundation, either version 3 of the License, or |
||||
|
* (at your option) any later version. |
||||
|
* <p> |
||||
|
* This program is distributed in the hope that it will be useful, |
||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
||||
|
* GNU General Public License for more details. |
||||
|
* <p> |
||||
|
* You should have received a copy of the GNU General Public License |
||||
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
*/ |
||||
|
|
||||
|
package com.epmet.controller; |
||||
|
|
||||
|
import com.epmet.commons.tools.annotation.LoginUser; |
||||
|
import com.epmet.commons.tools.dto.result.OptionResultDTO; |
||||
|
import com.epmet.commons.tools.page.PageData; |
||||
|
import com.epmet.commons.tools.security.dto.TokenDto; |
||||
|
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.DefaultGroup; |
||||
|
import com.epmet.commons.tools.validator.group.UpdateGroup; |
||||
|
import com.epmet.dto.IcResiDemandDictDTO; |
||||
|
import com.epmet.dto.form.demand.UserDemandNameQueryFormDTO; |
||||
|
import com.epmet.service.IcResiDemandDictService; |
||||
|
import org.springframework.beans.factory.annotation.Autowired; |
||||
|
import org.springframework.web.bind.annotation.*; |
||||
|
|
||||
|
import java.util.List; |
||||
|
import java.util.Map; |
||||
|
|
||||
|
|
||||
|
/** |
||||
|
* 居民需求字典表 |
||||
|
* |
||||
|
* @author generator generator@elink-cn.com |
||||
|
* @since v1.0.0 2021-10-27 |
||||
|
*/ |
||||
|
@RestController |
||||
|
@RequestMapping("icresidemanddict") |
||||
|
public class IcResiDemandDictController { |
||||
|
|
||||
|
@Autowired |
||||
|
private IcResiDemandDictService icResiDemandDictService; |
||||
|
|
||||
|
@GetMapping("page") |
||||
|
public Result<PageData<IcResiDemandDictDTO>> page(@RequestParam Map<String, Object> params){ |
||||
|
PageData<IcResiDemandDictDTO> page = icResiDemandDictService.page(params); |
||||
|
return new Result<PageData<IcResiDemandDictDTO>>().ok(page); |
||||
|
} |
||||
|
|
||||
|
@GetMapping("{id}") |
||||
|
public Result<IcResiDemandDictDTO> get(@PathVariable("id") String id){ |
||||
|
IcResiDemandDictDTO data = icResiDemandDictService.get(id); |
||||
|
return new Result<IcResiDemandDictDTO>().ok(data); |
||||
|
} |
||||
|
|
||||
|
@PostMapping |
||||
|
public Result save(@RequestBody IcResiDemandDictDTO dto){ |
||||
|
//效验数据
|
||||
|
ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class); |
||||
|
icResiDemandDictService.save(dto); |
||||
|
return new Result(); |
||||
|
} |
||||
|
|
||||
|
@PutMapping |
||||
|
public Result update(@RequestBody IcResiDemandDictDTO dto){ |
||||
|
//效验数据
|
||||
|
ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class); |
||||
|
icResiDemandDictService.update(dto); |
||||
|
return new Result(); |
||||
|
} |
||||
|
|
||||
|
@DeleteMapping |
||||
|
public Result delete(@RequestBody String[] ids){ |
||||
|
//效验数据
|
||||
|
AssertUtils.isArrayEmpty(ids, "id"); |
||||
|
icResiDemandDictService.delete(ids); |
||||
|
return new Result(); |
||||
|
} |
||||
|
|
||||
|
@PostMapping("demandoption") |
||||
|
public Result<List<OptionResultDTO>> getDemandOptions(@LoginUser TokenDto tokenDto) { |
||||
|
return new Result<List<OptionResultDTO>>().ok(icResiDemandDictService.getDemandOptions(tokenDto.getCustomerId())); |
||||
|
} |
||||
|
|
||||
|
|
||||
|
/** |
||||
|
* 居民信息列表需要展示分类名称,单独开出来这个接口,供user查询 |
||||
|
* @param formDTO |
||||
|
* @return |
||||
|
*/ |
||||
|
@PostMapping("demangnames") |
||||
|
public Result<String> queryDemandNames(@RequestBody UserDemandNameQueryFormDTO formDTO){ |
||||
|
ValidatorUtils.validateEntity(formDTO,UserDemandNameQueryFormDTO.AddUserInternalGroup.class); |
||||
|
return icResiDemandDictService.queryDemandNames(formDTO); |
||||
|
} |
||||
|
} |
@ -0,0 +1,41 @@ |
|||||
|
/** |
||||
|
* Copyright 2018 人人开源 https://www.renren.io
|
||||
|
* <p> |
||||
|
* This program is free software: you can redistribute it and/or modify |
||||
|
* it under the terms of the GNU General Public License as published by |
||||
|
* the Free Software Foundation, either version 3 of the License, or |
||||
|
* (at your option) any later version. |
||||
|
* <p> |
||||
|
* This program is distributed in the hope that it will be useful, |
||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
||||
|
* GNU General Public License for more details. |
||||
|
* <p> |
||||
|
* You should have received a copy of the GNU General Public License |
||||
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
*/ |
||||
|
|
||||
|
package com.epmet.dao; |
||||
|
|
||||
|
import com.epmet.commons.mybatis.dao.BaseDao; |
||||
|
import com.epmet.commons.tools.dto.result.OptionResultDTO; |
||||
|
import com.epmet.entity.IcResiDemandDictEntity; |
||||
|
import org.apache.ibatis.annotations.Mapper; |
||||
|
import org.apache.ibatis.annotations.Param; |
||||
|
|
||||
|
import java.util.List; |
||||
|
import java.util.Set; |
||||
|
|
||||
|
/** |
||||
|
* 居民需求字典表 |
||||
|
* |
||||
|
* @author generator generator@elink-cn.com |
||||
|
* @since v1.0.0 2021-10-27 |
||||
|
*/ |
||||
|
@Mapper |
||||
|
public interface IcResiDemandDictDao extends BaseDao<IcResiDemandDictEntity> { |
||||
|
List<OptionResultDTO> selectDemandOptions(@Param("customerId") String customerId); |
||||
|
List<OptionResultDTO> selectChildDemands(@Param("customerId")String customerId, @Param("parentCode") String parentCode); |
||||
|
|
||||
|
String selectCategoryNames(@Param("customerId") String customerId,@Param("codeSet") Set<String> codeSet); |
||||
|
} |
@ -0,0 +1,73 @@ |
|||||
|
/** |
||||
|
* Copyright 2018 人人开源 https://www.renren.io
|
||||
|
* <p> |
||||
|
* This program is free software: you can redistribute it and/or modify |
||||
|
* it under the terms of the GNU General Public License as published by |
||||
|
* the Free Software Foundation, either version 3 of the License, or |
||||
|
* (at your option) any later version. |
||||
|
* <p> |
||||
|
* This program is distributed in the hope that it will be useful, |
||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
||||
|
* GNU General Public License for more details. |
||||
|
* <p> |
||||
|
* You should have received a copy of the GNU General Public License |
||||
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
*/ |
||||
|
|
||||
|
package com.epmet.entity; |
||||
|
|
||||
|
import com.baomidou.mybatisplus.annotation.TableName; |
||||
|
import com.epmet.commons.mybatis.entity.BaseEpmetEntity; |
||||
|
import lombok.Data; |
||||
|
import lombok.EqualsAndHashCode; |
||||
|
|
||||
|
/** |
||||
|
* 居民需求字典表 |
||||
|
* |
||||
|
* @author generator generator@elink-cn.com |
||||
|
* @since v1.0.0 2021-10-27 |
||||
|
*/ |
||||
|
@Data |
||||
|
@EqualsAndHashCode(callSuper=false) |
||||
|
@TableName("ic_resi_demand_dict") |
||||
|
public class IcResiDemandDictEntity extends BaseEpmetEntity { |
||||
|
|
||||
|
private static final long serialVersionUID = 1L; |
||||
|
|
||||
|
/** |
||||
|
* 客户Id customer.id |
||||
|
*/ |
||||
|
private String customerId; |
||||
|
|
||||
|
/** |
||||
|
* 父级 |
||||
|
*/ |
||||
|
private String parentCode; |
||||
|
|
||||
|
/** |
||||
|
* 字典值 |
||||
|
*/ |
||||
|
private String categoryCode; |
||||
|
|
||||
|
/** |
||||
|
* 字典描述 |
||||
|
*/ |
||||
|
private String categoryName; |
||||
|
|
||||
|
/** |
||||
|
* 级别 |
||||
|
*/ |
||||
|
private String level; |
||||
|
|
||||
|
/** |
||||
|
* 备注 |
||||
|
*/ |
||||
|
private String remark; |
||||
|
|
||||
|
/** |
||||
|
* 排序 |
||||
|
*/ |
||||
|
private Integer sort; |
||||
|
|
||||
|
} |
@ -0,0 +1,114 @@ |
|||||
|
/** |
||||
|
* Copyright 2018 人人开源 https://www.renren.io
|
||||
|
* <p> |
||||
|
* This program is free software: you can redistribute it and/or modify |
||||
|
* it under the terms of the GNU General Public License as published by |
||||
|
* the Free Software Foundation, either version 3 of the License, or |
||||
|
* (at your option) any later version. |
||||
|
* <p> |
||||
|
* This program is distributed in the hope that it will be useful, |
||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
||||
|
* GNU General Public License for more details. |
||||
|
* <p> |
||||
|
* You should have received a copy of the GNU General Public License |
||||
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
*/ |
||||
|
|
||||
|
package com.epmet.service; |
||||
|
|
||||
|
import com.epmet.commons.mybatis.service.BaseService; |
||||
|
import com.epmet.commons.tools.dto.result.OptionResultDTO; |
||||
|
import com.epmet.commons.tools.page.PageData; |
||||
|
import com.epmet.commons.tools.utils.Result; |
||||
|
import com.epmet.dto.IcResiDemandDictDTO; |
||||
|
import com.epmet.dto.form.demand.UserDemandNameQueryFormDTO; |
||||
|
import com.epmet.entity.IcResiDemandDictEntity; |
||||
|
|
||||
|
import java.util.List; |
||||
|
import java.util.Map; |
||||
|
|
||||
|
/** |
||||
|
* 居民需求字典表 |
||||
|
* |
||||
|
* @author generator generator@elink-cn.com |
||||
|
* @since v1.0.0 2021-10-27 |
||||
|
*/ |
||||
|
public interface IcResiDemandDictService extends BaseService<IcResiDemandDictEntity> { |
||||
|
|
||||
|
/** |
||||
|
* 默认分页 |
||||
|
* |
||||
|
* @param params |
||||
|
* @return PageData<IcResiDemandDictDTO> |
||||
|
* @author generator |
||||
|
* @date 2021-10-27 |
||||
|
*/ |
||||
|
PageData<IcResiDemandDictDTO> page(Map<String, Object> params); |
||||
|
|
||||
|
/** |
||||
|
* 默认查询 |
||||
|
* |
||||
|
* @param params |
||||
|
* @return java.util.List<IcResiDemandDictDTO> |
||||
|
* @author generator |
||||
|
* @date 2021-10-27 |
||||
|
*/ |
||||
|
List<IcResiDemandDictDTO> list(Map<String, Object> params); |
||||
|
|
||||
|
/** |
||||
|
* 单条查询 |
||||
|
* |
||||
|
* @param id |
||||
|
* @return IcResiDemandDictDTO |
||||
|
* @author generator |
||||
|
* @date 2021-10-27 |
||||
|
*/ |
||||
|
IcResiDemandDictDTO get(String id); |
||||
|
|
||||
|
/** |
||||
|
* 默认保存 |
||||
|
* |
||||
|
* @param dto |
||||
|
* @return void |
||||
|
* @author generator |
||||
|
* @date 2021-10-27 |
||||
|
*/ |
||||
|
void save(IcResiDemandDictDTO dto); |
||||
|
|
||||
|
/** |
||||
|
* 默认更新 |
||||
|
* |
||||
|
* @param dto |
||||
|
* @return void |
||||
|
* @author generator |
||||
|
* @date 2021-10-27 |
||||
|
*/ |
||||
|
void update(IcResiDemandDictDTO dto); |
||||
|
|
||||
|
/** |
||||
|
* 批量删除 |
||||
|
* |
||||
|
* @param ids |
||||
|
* @return void |
||||
|
* @author generator |
||||
|
* @date 2021-10-27 |
||||
|
*/ |
||||
|
void delete(String[] ids); |
||||
|
|
||||
|
/** |
||||
|
* @Description 获取居民需求 |
||||
|
* @Param customerId |
||||
|
* @Return {@link List< OptionResultDTO>} |
||||
|
* @Author zhaoqifeng |
||||
|
* @Date 2021/10/27 17:57 |
||||
|
*/ |
||||
|
List<OptionResultDTO> getDemandOptions(String customerId); |
||||
|
|
||||
|
/** |
||||
|
* 居民信息列表需要展示分类名称,单独开出来这个接口,供user查询 |
||||
|
* @param formDTO |
||||
|
* @return |
||||
|
*/ |
||||
|
Result<String> queryDemandNames(UserDemandNameQueryFormDTO formDTO); |
||||
|
} |
@ -0,0 +1,120 @@ |
|||||
|
/** |
||||
|
* Copyright 2018 人人开源 https://www.renren.io
|
||||
|
* <p> |
||||
|
* This program is free software: you can redistribute it and/or modify |
||||
|
* it under the terms of the GNU General Public License as published by |
||||
|
* the Free Software Foundation, either version 3 of the License, or |
||||
|
* (at your option) any later version. |
||||
|
* <p> |
||||
|
* This program is distributed in the hope that it will be useful, |
||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
||||
|
* GNU General Public License for more details. |
||||
|
* <p> |
||||
|
* You should have received a copy of the GNU General Public License |
||||
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
*/ |
||||
|
|
||||
|
package com.epmet.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.constant.FieldConstant; |
||||
|
import com.epmet.commons.tools.dto.result.OptionResultDTO; |
||||
|
import com.epmet.commons.tools.page.PageData; |
||||
|
import com.epmet.commons.tools.utils.ConvertUtils; |
||||
|
import com.epmet.commons.tools.utils.Result; |
||||
|
import com.epmet.dao.IcResiDemandDictDao; |
||||
|
import com.epmet.dto.IcResiDemandDictDTO; |
||||
|
import com.epmet.dto.form.demand.UserDemandNameQueryFormDTO; |
||||
|
import com.epmet.entity.IcResiDemandDictEntity; |
||||
|
import com.epmet.service.IcResiDemandDictService; |
||||
|
import org.apache.commons.lang3.StringUtils; |
||||
|
import org.springframework.stereotype.Service; |
||||
|
import org.springframework.transaction.annotation.Transactional; |
||||
|
|
||||
|
import java.util.Arrays; |
||||
|
import java.util.List; |
||||
|
import java.util.Map; |
||||
|
|
||||
|
/** |
||||
|
* 居民需求字典表 |
||||
|
* |
||||
|
* @author generator generator@elink-cn.com |
||||
|
* @since v1.0.0 2021-10-27 |
||||
|
*/ |
||||
|
@Service |
||||
|
public class IcResiDemandDictServiceImpl extends BaseServiceImpl<IcResiDemandDictDao, IcResiDemandDictEntity> implements IcResiDemandDictService { |
||||
|
|
||||
|
@Override |
||||
|
public PageData<IcResiDemandDictDTO> page(Map<String, Object> params) { |
||||
|
IPage<IcResiDemandDictEntity> page = baseDao.selectPage( |
||||
|
getPage(params, FieldConstant.CREATED_TIME, false), |
||||
|
getWrapper(params) |
||||
|
); |
||||
|
return getPageData(page, IcResiDemandDictDTO.class); |
||||
|
} |
||||
|
|
||||
|
@Override |
||||
|
public List<IcResiDemandDictDTO> list(Map<String, Object> params) { |
||||
|
List<IcResiDemandDictEntity> entityList = baseDao.selectList(getWrapper(params)); |
||||
|
|
||||
|
return ConvertUtils.sourceToTarget(entityList, IcResiDemandDictDTO.class); |
||||
|
} |
||||
|
|
||||
|
private QueryWrapper<IcResiDemandDictEntity> getWrapper(Map<String, Object> params){ |
||||
|
String id = (String)params.get(FieldConstant.ID_HUMP); |
||||
|
|
||||
|
QueryWrapper<IcResiDemandDictEntity> wrapper = new QueryWrapper<>(); |
||||
|
wrapper.eq(StringUtils.isNotBlank(id), FieldConstant.ID, id); |
||||
|
|
||||
|
return wrapper; |
||||
|
} |
||||
|
|
||||
|
@Override |
||||
|
public IcResiDemandDictDTO get(String id) { |
||||
|
IcResiDemandDictEntity entity = baseDao.selectById(id); |
||||
|
return ConvertUtils.sourceToTarget(entity, IcResiDemandDictDTO.class); |
||||
|
} |
||||
|
|
||||
|
@Override |
||||
|
@Transactional(rollbackFor = Exception.class) |
||||
|
public void save(IcResiDemandDictDTO dto) { |
||||
|
IcResiDemandDictEntity entity = ConvertUtils.sourceToTarget(dto, IcResiDemandDictEntity.class); |
||||
|
insert(entity); |
||||
|
} |
||||
|
|
||||
|
@Override |
||||
|
@Transactional(rollbackFor = Exception.class) |
||||
|
public void update(IcResiDemandDictDTO dto) { |
||||
|
IcResiDemandDictEntity entity = ConvertUtils.sourceToTarget(dto, IcResiDemandDictEntity.class); |
||||
|
updateById(entity); |
||||
|
} |
||||
|
|
||||
|
@Override |
||||
|
@Transactional(rollbackFor = Exception.class) |
||||
|
public void delete(String[] ids) { |
||||
|
// 逻辑删除(@TableLogic 注解)
|
||||
|
baseDao.deleteBatchIds(Arrays.asList(ids)); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* @param customerId |
||||
|
* @Description 获取居民需求 |
||||
|
* @Param customerId |
||||
|
* @Return {@link List< OptionResultDTO >} |
||||
|
* @Author zhaoqifeng |
||||
|
* @Date 2021/10/27 17:57 |
||||
|
*/ |
||||
|
@Override |
||||
|
public List<OptionResultDTO> getDemandOptions(String customerId) { |
||||
|
return baseDao.selectDemandOptions(customerId); |
||||
|
} |
||||
|
|
||||
|
@Override |
||||
|
public Result<String> queryDemandNames(UserDemandNameQueryFormDTO formDTO) { |
||||
|
return new Result<String>().ok(baseDao.selectCategoryNames(formDTO.getCustomerId(),formDTO.getCodeSet())); |
||||
|
} |
||||
|
|
||||
|
} |
@ -0,0 +1,77 @@ |
|||||
|
<?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.dao.IcResiDemandDictDao"> |
||||
|
|
||||
|
<resultMap type="com.epmet.entity.IcResiDemandDictEntity" id="icResiDemandDictMap"> |
||||
|
<result property="id" column="ID"/> |
||||
|
<result property="customerId" column="CUSTOMER_ID"/> |
||||
|
<result property="parentCode" column="PARENT_CODE"/> |
||||
|
<result property="categoryCode" column="CATEGORY_CODE"/> |
||||
|
<result property="categoryName" column="CATEGORY_NAME"/> |
||||
|
<result property="level" column="LEVEL"/> |
||||
|
<result property="remark" column="REMARK"/> |
||||
|
<result property="sort" column="SORT"/> |
||||
|
<result property="delFlag" column="DEL_FLAG"/> |
||||
|
<result property="revision" column="REVISION"/> |
||||
|
<result property="createdBy" column="CREATED_BY"/> |
||||
|
<result property="createdTime" column="CREATED_TIME"/> |
||||
|
<result property="updatedBy" column="UPDATED_BY"/> |
||||
|
<result property="updatedTime" column="UPDATED_TIME"/> |
||||
|
</resultMap> |
||||
|
<resultMap id="DemandResult" type="com.epmet.commons.tools.dto.result.OptionResultDTO"> |
||||
|
<result column="customerId"/> |
||||
|
<result column="value" property="value"/> |
||||
|
<result column="label" property="label"/> |
||||
|
<collection property="children" ofType="com.epmet.commons.tools.dto.result.OptionResultDTO" |
||||
|
select="selectChildDemands" column="customerId=customerId,parentCode=value"> |
||||
|
</collection> |
||||
|
</resultMap> |
||||
|
<select id="selectDemandOptions" resultMap="DemandResult"> |
||||
|
SELECT |
||||
|
CUSTOMER_ID AS customerId, |
||||
|
CATEGORY_CODE AS "value", |
||||
|
CATEGORY_NAME AS "label" |
||||
|
FROM |
||||
|
ic_resi_demand_dict |
||||
|
WHERE |
||||
|
DEL_FLAG = 0 |
||||
|
AND LEVEL = 1 |
||||
|
AND CUSTOMER_ID = #{customerId} |
||||
|
ORDER BY |
||||
|
SORT ASC |
||||
|
</select> |
||||
|
<select id="selectChildDemands" resultMap="DemandResult"> |
||||
|
SELECT |
||||
|
CUSTOMER_ID AS customerId, |
||||
|
CATEGORY_CODE AS "value", |
||||
|
CATEGORY_NAME AS "label" |
||||
|
FROM |
||||
|
ic_resi_demand_dict |
||||
|
WHERE |
||||
|
DEL_FLAG = 0 |
||||
|
AND LEVEL = 2 |
||||
|
AND CUSTOMER_ID = #{customerId} |
||||
|
AND PARENT_CODE = #{parentCode} |
||||
|
ORDER BY |
||||
|
SORT ASC |
||||
|
</select> |
||||
|
|
||||
|
|
||||
|
<select id="selectCategoryNames" parameterType="map" resultType="java.lang.String"> |
||||
|
SELECT |
||||
|
GROUP_CONCAT(m.CATEGORY_NAME) |
||||
|
FROM |
||||
|
ic_resi_demand_dict m |
||||
|
WHERE |
||||
|
m.DEL_FLAG = '0' |
||||
|
AND m.CUSTOMER_ID = #{customerId} |
||||
|
<if test="null != codeSet and codeSet.size() > 0"> |
||||
|
AND m.CATEGORY_CODE IN |
||||
|
<foreach item="code" collection="codeSet" open="(" separator="," close=")"> |
||||
|
#{code} |
||||
|
</foreach> |
||||
|
</if> |
||||
|
</select> |
||||
|
|
||||
|
</mapper> |
@ -0,0 +1,15 @@ |
|||||
|
package com.epmet.constant; |
||||
|
|
||||
|
/** |
||||
|
* @Author zxc |
||||
|
* @DateTime 2020/11/10 5:18 下午 |
||||
|
*/ |
||||
|
public interface NeighborhoodConstant { |
||||
|
|
||||
|
String GRID = "grid"; |
||||
|
|
||||
|
String NEIGHBOR_HOOD= "neighbourHood"; |
||||
|
String BUILDING = "building"; |
||||
|
String HOUSE = "house"; |
||||
|
|
||||
|
} |
@ -0,0 +1,55 @@ |
|||||
|
/** |
||||
|
* Copyright 2018 人人开源 https://www.renren.io
|
||||
|
* <p> |
||||
|
* This program is free software: you can redistribute it and/or modify |
||||
|
* it under the terms of the GNU General Public License as published by |
||||
|
* the Free Software Foundation, either version 3 of the License, or |
||||
|
* (at your option) any later version. |
||||
|
* <p> |
||||
|
* This program is distributed in the hope that it will be useful, |
||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
||||
|
* GNU General Public License for more details. |
||||
|
* <p> |
||||
|
* You should have received a copy of the GNU General Public License |
||||
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
*/ |
||||
|
|
||||
|
package com.epmet.dto; |
||||
|
|
||||
|
import lombok.Data; |
||||
|
|
||||
|
import java.io.Serializable; |
||||
|
import java.util.Date; |
||||
|
import java.util.List; |
||||
|
|
||||
|
|
||||
|
/** |
||||
|
* 楼栋信息 |
||||
|
* |
||||
|
* @author generator generator@elink-cn.com |
||||
|
* @since v1.0.0 2021-10-25 |
||||
|
*/ |
||||
|
@Data |
||||
|
public class BuildingTreeLevelDTO implements Serializable { |
||||
|
|
||||
|
private static final long serialVersionUID = 1L; |
||||
|
|
||||
|
|
||||
|
private String id; |
||||
|
|
||||
|
private String pId; |
||||
|
|
||||
|
private String label; |
||||
|
|
||||
|
|
||||
|
private String level; |
||||
|
|
||||
|
private List<BuildingTreeLevelDTO> children; |
||||
|
|
||||
|
private String longitude; |
||||
|
private String latitude; |
||||
|
|
||||
|
|
||||
|
|
||||
|
} |
@ -0,0 +1,133 @@ |
|||||
|
/** |
||||
|
* Copyright 2018 人人开源 https://www.renren.io
|
||||
|
* <p> |
||||
|
* This program is free software: you can redistribute it and/or modify |
||||
|
* it under the terms of the GNU General Public License as published by |
||||
|
* the Free Software Foundation, either version 3 of the License, or |
||||
|
* (at your option) any later version. |
||||
|
* <p> |
||||
|
* This program is distributed in the hope that it will be useful, |
||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
||||
|
* GNU General Public License for more details. |
||||
|
* <p> |
||||
|
* You should have received a copy of the GNU General Public License |
||||
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
*/ |
||||
|
|
||||
|
package com.epmet.dto; |
||||
|
|
||||
|
import lombok.Data; |
||||
|
|
||||
|
import java.io.Serializable; |
||||
|
import java.util.Date; |
||||
|
|
||||
|
|
||||
|
/** |
||||
|
* 楼栋信息 |
||||
|
* |
||||
|
* @author generator generator@elink-cn.com |
||||
|
* @since v1.0.0 2021-10-25 |
||||
|
*/ |
||||
|
@Data |
||||
|
public class IcBuildingDTO implements Serializable { |
||||
|
|
||||
|
private static final long serialVersionUID = 1L; |
||||
|
|
||||
|
/** |
||||
|
* 楼栋主键 |
||||
|
*/ |
||||
|
private String id; |
||||
|
|
||||
|
/** |
||||
|
* 客户id |
||||
|
*/ |
||||
|
private String customerId; |
||||
|
|
||||
|
/** |
||||
|
* 小区id |
||||
|
*/ |
||||
|
private String neighborHoodId; |
||||
|
|
||||
|
/** |
||||
|
* 片区id,neighbor_hood_part.id,可为空。 |
||||
|
*/ |
||||
|
private String partId; |
||||
|
|
||||
|
/** |
||||
|
* 楼栋名称 |
||||
|
*/ |
||||
|
private String buildingName; |
||||
|
|
||||
|
|
||||
|
/** |
||||
|
* 楼栋类型,这里存储字典编码就可以 |
||||
|
*/ |
||||
|
private String type; |
||||
|
|
||||
|
/** |
||||
|
* 排序 |
||||
|
*/ |
||||
|
private Integer sort; |
||||
|
|
||||
|
/** |
||||
|
* 总单元数 |
||||
|
*/ |
||||
|
private Integer totalUnitNum; |
||||
|
|
||||
|
/** |
||||
|
* 总楼层总数 |
||||
|
*/ |
||||
|
private Integer totalFloorNum; |
||||
|
|
||||
|
/** |
||||
|
* 总户数 |
||||
|
*/ |
||||
|
private Integer totalHouseNum; |
||||
|
|
||||
|
/** |
||||
|
* 中心点位:经度 |
||||
|
*/ |
||||
|
private String longitude; |
||||
|
|
||||
|
/** |
||||
|
* 中心点位:纬度 |
||||
|
*/ |
||||
|
private String latitude; |
||||
|
|
||||
|
/** |
||||
|
* 坐标位置 |
||||
|
*/ |
||||
|
private String coordinatePosition; |
||||
|
|
||||
|
/** |
||||
|
* 删除标识 0未删除、1已删除 |
||||
|
*/ |
||||
|
private String delFlag; |
||||
|
|
||||
|
/** |
||||
|
* 乐观锁 |
||||
|
*/ |
||||
|
private Integer revision; |
||||
|
|
||||
|
/** |
||||
|
* 创建人 |
||||
|
*/ |
||||
|
private String createdBy; |
||||
|
|
||||
|
/** |
||||
|
* 创建时间 |
||||
|
*/ |
||||
|
private Date createdTime; |
||||
|
|
||||
|
/** |
||||
|
* 更新人 |
||||
|
*/ |
||||
|
private String updatedBy; |
||||
|
|
||||
|
/** |
||||
|
* 更新时间 |
||||
|
*/ |
||||
|
private Date updatedTime; |
||||
|
|
||||
|
} |
@ -0,0 +1,91 @@ |
|||||
|
/** |
||||
|
* Copyright 2018 人人开源 https://www.renren.io
|
||||
|
* <p> |
||||
|
* This program is free software: you can redistribute it and/or modify |
||||
|
* it under the terms of the GNU General Public License as published by |
||||
|
* the Free Software Foundation, either version 3 of the License, or |
||||
|
* (at your option) any later version. |
||||
|
* <p> |
||||
|
* This program is distributed in the hope that it will be useful, |
||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
||||
|
* GNU General Public License for more details. |
||||
|
* <p> |
||||
|
* You should have received a copy of the GNU General Public License |
||||
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
*/ |
||||
|
|
||||
|
package com.epmet.dto; |
||||
|
|
||||
|
import java.io.Serializable; |
||||
|
import java.util.Date; |
||||
|
import lombok.Data; |
||||
|
|
||||
|
|
||||
|
/** |
||||
|
* 楼栋单元信息 |
||||
|
* |
||||
|
* @author generator generator@elink-cn.com |
||||
|
* @since v1.0.0 2021-10-25 |
||||
|
*/ |
||||
|
@Data |
||||
|
public class IcBuildingUnitDTO implements Serializable { |
||||
|
|
||||
|
private static final long serialVersionUID = 1L; |
||||
|
|
||||
|
/** |
||||
|
* 单元主键 |
||||
|
*/ |
||||
|
private String id; |
||||
|
|
||||
|
/** |
||||
|
* 客户id |
||||
|
*/ |
||||
|
private String customerId; |
||||
|
|
||||
|
/** |
||||
|
* 楼宇id |
||||
|
*/ |
||||
|
private String buildingId; |
||||
|
|
||||
|
/** |
||||
|
* 单元号:1,2,3?? |
||||
|
*/ |
||||
|
private String unitNum; |
||||
|
|
||||
|
/** |
||||
|
* 单元名 |
||||
|
*/ |
||||
|
private String unitName; |
||||
|
|
||||
|
/** |
||||
|
* 删除标识 0未删除、1已删除 |
||||
|
*/ |
||||
|
private String delFlag; |
||||
|
|
||||
|
/** |
||||
|
* 乐观锁 |
||||
|
*/ |
||||
|
private Integer revision; |
||||
|
|
||||
|
/** |
||||
|
* 创建人 |
||||
|
*/ |
||||
|
private String createdBy; |
||||
|
|
||||
|
/** |
||||
|
* 创建时间 |
||||
|
*/ |
||||
|
private Date createdTime; |
||||
|
|
||||
|
/** |
||||
|
* 更新人 |
||||
|
*/ |
||||
|
private String updatedBy; |
||||
|
|
||||
|
/** |
||||
|
* 更新时间 |
||||
|
*/ |
||||
|
private Date updatedTime; |
||||
|
|
||||
|
} |
@ -0,0 +1,136 @@ |
|||||
|
/** |
||||
|
* Copyright 2018 人人开源 https://www.renren.io
|
||||
|
* <p> |
||||
|
* This program is free software: you can redistribute it and/or modify |
||||
|
* it under the terms of the GNU General Public License as published by |
||||
|
* the Free Software Foundation, either version 3 of the License, or |
||||
|
* (at your option) any later version. |
||||
|
* <p> |
||||
|
* This program is distributed in the hope that it will be useful, |
||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
||||
|
* GNU General Public License for more details. |
||||
|
* <p> |
||||
|
* You should have received a copy of the GNU General Public License |
||||
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
*/ |
||||
|
|
||||
|
package com.epmet.dto; |
||||
|
|
||||
|
import java.io.Serializable; |
||||
|
import java.util.Date; |
||||
|
import lombok.Data; |
||||
|
|
||||
|
|
||||
|
/** |
||||
|
* 房屋信息 |
||||
|
* |
||||
|
* @author generator generator@elink-cn.com |
||||
|
* @since v1.0.0 2021-10-25 |
||||
|
*/ |
||||
|
@Data |
||||
|
public class IcHouseDTO implements Serializable { |
||||
|
|
||||
|
private static final long serialVersionUID = 1L; |
||||
|
|
||||
|
/** |
||||
|
* 房屋主键 |
||||
|
*/ |
||||
|
private String id; |
||||
|
|
||||
|
/** |
||||
|
* 客户id |
||||
|
*/ |
||||
|
private String customerId; |
||||
|
|
||||
|
/** |
||||
|
* 小区id |
||||
|
*/ |
||||
|
private String neighborHoodId; |
||||
|
|
||||
|
/** |
||||
|
* 片区id,neighbor_hood_part.id,可为空。 |
||||
|
*/ |
||||
|
private String partId; |
||||
|
|
||||
|
/** |
||||
|
* 所属楼栋id |
||||
|
*/ |
||||
|
private String buildingId; |
||||
|
|
||||
|
/** |
||||
|
* 所属单元id |
||||
|
*/ |
||||
|
private String buildingUnitId; |
||||
|
|
||||
|
/** |
||||
|
* 房屋名字后台插入时生成 |
||||
|
*/ |
||||
|
private String houseName; |
||||
|
|
||||
|
/** |
||||
|
* 门牌号 |
||||
|
*/ |
||||
|
private String doorName; |
||||
|
|
||||
|
/** |
||||
|
* 房屋类型,这里存储字典value就可以 |
||||
|
*/ |
||||
|
private String houseType; |
||||
|
|
||||
|
/** |
||||
|
* 存储字典value |
||||
|
*/ |
||||
|
private String purpose; |
||||
|
|
||||
|
/** |
||||
|
* 1出租;0未出租 |
||||
|
*/ |
||||
|
private Integer rentFlag; |
||||
|
|
||||
|
/** |
||||
|
* 房主姓名 |
||||
|
*/ |
||||
|
private String ownerName; |
||||
|
|
||||
|
/** |
||||
|
* 房主电话 |
||||
|
*/ |
||||
|
private String ownerPhone; |
||||
|
|
||||
|
/** |
||||
|
* 房主身份证号 |
||||
|
*/ |
||||
|
private String ownerIdCard; |
||||
|
|
||||
|
/** |
||||
|
* 删除标识 0未删除、1已删除 |
||||
|
*/ |
||||
|
private String delFlag; |
||||
|
|
||||
|
/** |
||||
|
* 乐观锁 |
||||
|
*/ |
||||
|
private Integer revision; |
||||
|
|
||||
|
/** |
||||
|
* 创建人 |
||||
|
*/ |
||||
|
private String createdBy; |
||||
|
|
||||
|
/** |
||||
|
* 创建时间 |
||||
|
*/ |
||||
|
private Date createdTime; |
||||
|
|
||||
|
/** |
||||
|
* 更新人 |
||||
|
*/ |
||||
|
private String updatedBy; |
||||
|
|
||||
|
/** |
||||
|
* 更新时间 |
||||
|
*/ |
||||
|
private Date updatedTime; |
||||
|
|
||||
|
} |
@ -0,0 +1,131 @@ |
|||||
|
/** |
||||
|
* Copyright 2018 人人开源 https://www.renren.io
|
||||
|
* <p> |
||||
|
* This program is free software: you can redistribute it and/or modify |
||||
|
* it under the terms of the GNU General Public License as published by |
||||
|
* the Free Software Foundation, either version 3 of the License, or |
||||
|
* (at your option) any later version. |
||||
|
* <p> |
||||
|
* This program is distributed in the hope that it will be useful, |
||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
||||
|
* GNU General Public License for more details. |
||||
|
* <p> |
||||
|
* You should have received a copy of the GNU General Public License |
||||
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
*/ |
||||
|
|
||||
|
package com.epmet.dto; |
||||
|
|
||||
|
import java.io.Serializable; |
||||
|
import java.util.Date; |
||||
|
import lombok.Data; |
||||
|
|
||||
|
|
||||
|
/** |
||||
|
* 小区表 |
||||
|
* |
||||
|
* @author generator generator@elink-cn.com |
||||
|
* @since v1.0.0 2021-10-25 |
||||
|
*/ |
||||
|
@Data |
||||
|
public class IcNeighborHoodDTO implements Serializable { |
||||
|
|
||||
|
private static final long serialVersionUID = 1L; |
||||
|
|
||||
|
/** |
||||
|
* 小区主键 |
||||
|
*/ |
||||
|
private String id; |
||||
|
|
||||
|
/** |
||||
|
* 客户id |
||||
|
*/ |
||||
|
private String customerId; |
||||
|
|
||||
|
/** |
||||
|
* 小区名称 |
||||
|
*/ |
||||
|
private String neighborHoodName; |
||||
|
|
||||
|
/** |
||||
|
* 组织id |
||||
|
*/ |
||||
|
private String agencyId; |
||||
|
|
||||
|
/** |
||||
|
* 上级组织id |
||||
|
*/ |
||||
|
private String parentAgencyId; |
||||
|
|
||||
|
/** |
||||
|
* 组织的所有上级组织id |
||||
|
*/ |
||||
|
private String agencyPids; |
||||
|
|
||||
|
/** |
||||
|
* 网格id |
||||
|
*/ |
||||
|
private String gridId; |
||||
|
|
||||
|
/** |
||||
|
* 详细地址 |
||||
|
*/ |
||||
|
private String address; |
||||
|
|
||||
|
/** |
||||
|
* 备注 |
||||
|
*/ |
||||
|
private String remark; |
||||
|
|
||||
|
/** |
||||
|
* 中心点位:经度 |
||||
|
*/ |
||||
|
private String longitude; |
||||
|
|
||||
|
/** |
||||
|
* 中心点位:纬度 |
||||
|
*/ |
||||
|
private String latitude; |
||||
|
|
||||
|
/** |
||||
|
* 坐标区域 |
||||
|
*/ |
||||
|
private String coordinates; |
||||
|
|
||||
|
/** |
||||
|
* 坐标位置 |
||||
|
*/ |
||||
|
private String location; |
||||
|
|
||||
|
/** |
||||
|
* 删除标识 0未删除、1已删除 |
||||
|
*/ |
||||
|
private String delFlag; |
||||
|
|
||||
|
/** |
||||
|
* 乐观锁 |
||||
|
*/ |
||||
|
private Integer revision; |
||||
|
|
||||
|
/** |
||||
|
* 创建人 |
||||
|
*/ |
||||
|
private String createdBy; |
||||
|
|
||||
|
/** |
||||
|
* 创建时间 |
||||
|
*/ |
||||
|
private Date createdTime; |
||||
|
|
||||
|
/** |
||||
|
* 更新人 |
||||
|
*/ |
||||
|
private String updatedBy; |
||||
|
|
||||
|
/** |
||||
|
* 更新时间 |
||||
|
*/ |
||||
|
private Date updatedTime; |
||||
|
|
||||
|
} |
@ -0,0 +1,86 @@ |
|||||
|
/** |
||||
|
* Copyright 2018 人人开源 https://www.renren.io
|
||||
|
* <p> |
||||
|
* This program is free software: you can redistribute it and/or modify |
||||
|
* it under the terms of the GNU General Public License as published by |
||||
|
* the Free Software Foundation, either version 3 of the License, or |
||||
|
* (at your option) any later version. |
||||
|
* <p> |
||||
|
* This program is distributed in the hope that it will be useful, |
||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
||||
|
* GNU General Public License for more details. |
||||
|
* <p> |
||||
|
* You should have received a copy of the GNU General Public License |
||||
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
*/ |
||||
|
|
||||
|
package com.epmet.dto; |
||||
|
|
||||
|
import java.io.Serializable; |
||||
|
import java.util.Date; |
||||
|
import lombok.Data; |
||||
|
|
||||
|
|
||||
|
/** |
||||
|
* 小区-分区表 |
||||
|
* |
||||
|
* @author generator generator@elink-cn.com |
||||
|
* @since v1.0.0 2021-10-25 |
||||
|
*/ |
||||
|
@Data |
||||
|
public class IcNeighborHoodPartDTO implements Serializable { |
||||
|
|
||||
|
private static final long serialVersionUID = 1L; |
||||
|
|
||||
|
/** |
||||
|
* 主键,片区id |
||||
|
*/ |
||||
|
private String id; |
||||
|
|
||||
|
/** |
||||
|
* 客户id |
||||
|
*/ |
||||
|
private String customerId; |
||||
|
|
||||
|
/** |
||||
|
* 小区id |
||||
|
*/ |
||||
|
private String neighborHoodId; |
||||
|
|
||||
|
/** |
||||
|
* 名称,比如北区,南区 |
||||
|
*/ |
||||
|
private String name; |
||||
|
|
||||
|
/** |
||||
|
* 删除标识 0未删除、1已删除 |
||||
|
*/ |
||||
|
private String delFlag; |
||||
|
|
||||
|
/** |
||||
|
* 乐观锁 |
||||
|
*/ |
||||
|
private Integer revision; |
||||
|
|
||||
|
/** |
||||
|
* 创建人 |
||||
|
*/ |
||||
|
private String createdBy; |
||||
|
|
||||
|
/** |
||||
|
* 创建时间 |
||||
|
*/ |
||||
|
private Date createdTime; |
||||
|
|
||||
|
/** |
||||
|
* 更新人 |
||||
|
*/ |
||||
|
private String updatedBy; |
||||
|
|
||||
|
/** |
||||
|
* 更新时间 |
||||
|
*/ |
||||
|
private Date updatedTime; |
||||
|
|
||||
|
} |
@ -0,0 +1,81 @@ |
|||||
|
/** |
||||
|
* Copyright 2018 人人开源 https://www.renren.io
|
||||
|
* <p> |
||||
|
* This program is free software: you can redistribute it and/or modify |
||||
|
* it under the terms of the GNU General Public License as published by |
||||
|
* the Free Software Foundation, either version 3 of the License, or |
||||
|
* (at your option) any later version. |
||||
|
* <p> |
||||
|
* This program is distributed in the hope that it will be useful, |
||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
||||
|
* GNU General Public License for more details. |
||||
|
* <p> |
||||
|
* You should have received a copy of the GNU General Public License |
||||
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
*/ |
||||
|
|
||||
|
package com.epmet.dto; |
||||
|
|
||||
|
import java.io.Serializable; |
||||
|
import java.util.Date; |
||||
|
import lombok.Data; |
||||
|
|
||||
|
|
||||
|
/** |
||||
|
* 小区物业关系表 |
||||
|
* |
||||
|
* @author generator generator@elink-cn.com |
||||
|
* @since v1.0.0 2021-10-25 |
||||
|
*/ |
||||
|
@Data |
||||
|
public class IcNeighborHoodPropertyDTO implements Serializable { |
||||
|
|
||||
|
private static final long serialVersionUID = 1L; |
||||
|
|
||||
|
/** |
||||
|
* 小区物业关系表 |
||||
|
*/ |
||||
|
private String id; |
||||
|
|
||||
|
/** |
||||
|
* 物业id |
||||
|
*/ |
||||
|
private String propertyId; |
||||
|
|
||||
|
/** |
||||
|
* 小区id |
||||
|
*/ |
||||
|
private String neighborHoodId; |
||||
|
|
||||
|
/** |
||||
|
* 删除标识 0未删除、1已删除 |
||||
|
*/ |
||||
|
private String delFlag; |
||||
|
|
||||
|
/** |
||||
|
* 乐观锁 |
||||
|
*/ |
||||
|
private Integer revision; |
||||
|
|
||||
|
/** |
||||
|
* 创建人 |
||||
|
*/ |
||||
|
private String createdBy; |
||||
|
|
||||
|
/** |
||||
|
* 创建时间 |
||||
|
*/ |
||||
|
private Date createdTime; |
||||
|
|
||||
|
/** |
||||
|
* 更新人 |
||||
|
*/ |
||||
|
private String updatedBy; |
||||
|
|
||||
|
/** |
||||
|
* 更新时间 |
||||
|
*/ |
||||
|
private Date updatedTime; |
||||
|
|
||||
|
} |
@ -0,0 +1,76 @@ |
|||||
|
/** |
||||
|
* Copyright 2018 人人开源 https://www.renren.io
|
||||
|
* <p> |
||||
|
* This program is free software: you can redistribute it and/or modify |
||||
|
* it under the terms of the GNU General Public License as published by |
||||
|
* the Free Software Foundation, either version 3 of the License, or |
||||
|
* (at your option) any later version. |
||||
|
* <p> |
||||
|
* This program is distributed in the hope that it will be useful, |
||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
||||
|
* GNU General Public License for more details. |
||||
|
* <p> |
||||
|
* You should have received a copy of the GNU General Public License |
||||
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
*/ |
||||
|
|
||||
|
package com.epmet.dto; |
||||
|
|
||||
|
import java.io.Serializable; |
||||
|
import java.util.Date; |
||||
|
import lombok.Data; |
||||
|
|
||||
|
|
||||
|
/** |
||||
|
* 物业表 |
||||
|
* |
||||
|
* @author generator generator@elink-cn.com |
||||
|
* @since v1.0.0 2021-10-25 |
||||
|
*/ |
||||
|
@Data |
||||
|
public class IcPropertyManagementDTO implements Serializable { |
||||
|
|
||||
|
private static final long serialVersionUID = 1L; |
||||
|
|
||||
|
/** |
||||
|
* 物业id |
||||
|
*/ |
||||
|
private String id; |
||||
|
|
||||
|
/** |
||||
|
* 物业名称 |
||||
|
*/ |
||||
|
private String name; |
||||
|
|
||||
|
/** |
||||
|
* 删除标识 0未删除、1已删除 |
||||
|
*/ |
||||
|
private String delFlag; |
||||
|
|
||||
|
/** |
||||
|
* 乐观锁 |
||||
|
*/ |
||||
|
private Integer revision; |
||||
|
|
||||
|
/** |
||||
|
* 创建人 |
||||
|
*/ |
||||
|
private String createdBy; |
||||
|
|
||||
|
/** |
||||
|
* 创建时间 |
||||
|
*/ |
||||
|
private Date createdTime; |
||||
|
|
||||
|
/** |
||||
|
* 更新人 |
||||
|
*/ |
||||
|
private String updatedBy; |
||||
|
|
||||
|
/** |
||||
|
* 更新时间 |
||||
|
*/ |
||||
|
private Date updatedTime; |
||||
|
|
||||
|
} |
@ -0,0 +1,22 @@ |
|||||
|
package com.epmet.dto.form; |
||||
|
|
||||
|
import lombok.Data; |
||||
|
|
||||
|
import javax.validation.constraints.NotBlank; |
||||
|
import java.io.Serializable; |
||||
|
|
||||
|
/** |
||||
|
* @Author zxc |
||||
|
* @DateTime 2021/11/2 9:13 上午 |
||||
|
* @DESC |
||||
|
*/ |
||||
|
@Data |
||||
|
public class BaseInfoFamilyBuildingFormDTO implements Serializable { |
||||
|
|
||||
|
private static final long serialVersionUID = 2009866136409462441L; |
||||
|
|
||||
|
public interface BaseInfoFamilyBuildingForm{} |
||||
|
|
||||
|
@NotBlank(message = "neighborHoodId不能为空",groups = BaseInfoFamilyBuildingForm.class) |
||||
|
private String neighborHoodId; |
||||
|
} |
@ -0,0 +1,24 @@ |
|||||
|
package com.epmet.dto.form; |
||||
|
|
||||
|
import lombok.Data; |
||||
|
|
||||
|
import javax.validation.constraints.NotBlank; |
||||
|
import java.io.Serializable; |
||||
|
|
||||
|
/** |
||||
|
* @Description /gov/org/customergrid/gridoption |
||||
|
* @Author yinzuomei |
||||
|
* @Date 2021/11/12 10:54 上午 |
||||
|
*/ |
||||
|
@Data |
||||
|
public class GridOptionFormDTO implements Serializable { |
||||
|
/** |
||||
|
* 部门Id |
||||
|
*/ |
||||
|
@NotBlank(message = "组织机构ID不能为空") |
||||
|
private String agencyId; |
||||
|
//等着杨林改完,我再限制必填吧
|
||||
|
//@NotBlank(message = "查询条件和查看居民详情:query;新增或修改居民信息:addorupdate")
|
||||
|
private String purpose; |
||||
|
} |
||||
|
|
@ -0,0 +1,17 @@ |
|||||
|
package com.epmet.dto.form; |
||||
|
|
||||
|
import lombok.Data; |
||||
|
|
||||
|
import java.io.Serializable; |
||||
|
|
||||
|
/** |
||||
|
* @Description |
||||
|
* @Author zhaoqifeng |
||||
|
* @Date 2021/10/25 17:03 |
||||
|
*/ |
||||
|
@Data |
||||
|
public class HouseFormDTO implements Serializable { |
||||
|
private static final long serialVersionUID = 2636608477324780974L; |
||||
|
private String buildingId; |
||||
|
private String unitId; |
||||
|
} |
@ -0,0 +1,129 @@ |
|||||
|
/** |
||||
|
* Copyright 2018 人人开源 https://www.renren.io
|
||||
|
* <p> |
||||
|
* This program is free software: you can redistribute it and/or modify |
||||
|
* it under the terms of the GNU General Public License as published by |
||||
|
* the Free Software Foundation, either version 3 of the License, or |
||||
|
* (at your option) any later version. |
||||
|
* <p> |
||||
|
* This program is distributed in the hope that it will be useful, |
||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
||||
|
* GNU General Public License for more details. |
||||
|
* <p> |
||||
|
* You should have received a copy of the GNU General Public License |
||||
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
*/ |
||||
|
|
||||
|
package com.epmet.dto.form; |
||||
|
|
||||
|
import com.epmet.commons.tools.validator.group.CustomerClientShowGroup; |
||||
|
import lombok.Data; |
||||
|
import org.hibernate.validator.constraints.Length; |
||||
|
|
||||
|
import javax.validation.constraints.NotBlank; |
||||
|
import javax.validation.constraints.NotNull; |
||||
|
import java.io.Serializable; |
||||
|
|
||||
|
|
||||
|
@Data |
||||
|
public class IcBulidingFormDTO implements Serializable { |
||||
|
|
||||
|
private static final long serialVersionUID = 1L; |
||||
|
|
||||
|
public interface DeleteGroup extends CustomerClientShowGroup { |
||||
|
} |
||||
|
|
||||
|
public interface AddShowGroup extends CustomerClientShowGroup { |
||||
|
} |
||||
|
|
||||
|
public interface UpdateShowGroup extends CustomerClientShowGroup { |
||||
|
} |
||||
|
@NotBlank(message = "楼栋ID不能为空", groups = { UpdateShowGroup.class,DeleteGroup.class}) |
||||
|
private String buildingId; |
||||
|
|
||||
|
/** |
||||
|
* 组织id |
||||
|
*/ |
||||
|
@NotBlank(message = "组织id不能为空", groups = {AddShowGroup.class, UpdateShowGroup.class}) |
||||
|
private String agencyId; |
||||
|
|
||||
|
|
||||
|
/** |
||||
|
* 网格id |
||||
|
*/ |
||||
|
@NotBlank(message = "网格不能为空", groups = {AddShowGroup.class, UpdateShowGroup.class}) |
||||
|
private String gridId; |
||||
|
|
||||
|
|
||||
|
/** |
||||
|
* 小区id |
||||
|
*/ |
||||
|
@NotBlank(message = "小区id不能为空", groups = {AddShowGroup.class, UpdateShowGroup.class}) |
||||
|
private String neighborHoodId; |
||||
|
|
||||
|
/** |
||||
|
* 楼栋名称 |
||||
|
*/ |
||||
|
@NotBlank(message = "楼栋名称不能为空", groups = {AddShowGroup.class, UpdateShowGroup.class}) |
||||
|
@Length(max=10,message = "楼栋名称不能超过10个字", groups = {AddShowGroup.class, UpdateShowGroup.class}) |
||||
|
private String buildingName; |
||||
|
|
||||
|
/** |
||||
|
* 楼栋类型 |
||||
|
*/ |
||||
|
@NotBlank(message = "楼栋类型不能为空", groups = {AddShowGroup.class, UpdateShowGroup.class}) |
||||
|
private String type=""; |
||||
|
|
||||
|
/** |
||||
|
* 客户id |
||||
|
*/ |
||||
|
/* @NotBlank(message = "客户id不能为空", groups = {AddShowGroup.class, UpdateShowGroup.class}) |
||||
|
private String customerId;*/ |
||||
|
|
||||
|
/** |
||||
|
* 排序 |
||||
|
*/ |
||||
|
@NotNull(message = "排序不能为空", groups = {AddShowGroup.class, UpdateShowGroup.class}) |
||||
|
private Integer sort = 0; |
||||
|
|
||||
|
/** |
||||
|
* 总单元数 |
||||
|
*/ |
||||
|
@NotNull(message = "总单元数不能为空", groups = {AddShowGroup.class, UpdateShowGroup.class}) |
||||
|
private Integer totalUnitNum=1; |
||||
|
|
||||
|
/** |
||||
|
* 总楼层总数 |
||||
|
*/ |
||||
|
//@NotNull(message = "总楼层总数不能为空", groups = {AddShowGroup.class, UpdateShowGroup.class})
|
||||
|
private Integer totalFloorNum; |
||||
|
|
||||
|
/** |
||||
|
* 总户数 |
||||
|
*/ |
||||
|
//@NotNull(message = "总户数不能为空", groups = {AddShowGroup.class, UpdateShowGroup.class})
|
||||
|
private Integer totalHouseNum; |
||||
|
/** |
||||
|
* 坐标位置 |
||||
|
*/ |
||||
|
|
||||
|
private String location; |
||||
|
|
||||
|
|
||||
|
/** |
||||
|
* 中心点位:经度 |
||||
|
*/ |
||||
|
|
||||
|
private String longitude; |
||||
|
|
||||
|
/** |
||||
|
* 中心点位:纬度 |
||||
|
*/ |
||||
|
|
||||
|
private String latitude; |
||||
|
|
||||
|
|
||||
|
|
||||
|
|
||||
|
} |
@ -0,0 +1,42 @@ |
|||||
|
/** |
||||
|
* Copyright 2018 人人开源 https://www.renren.io
|
||||
|
* <p> |
||||
|
* This program is free software: you can redistribute it and/or modify |
||||
|
* it under the terms of the GNU General Public License as published by |
||||
|
* the Free Software Foundation, either version 3 of the License, or |
||||
|
* (at your option) any later version. |
||||
|
* <p> |
||||
|
* This program is distributed in the hope that it will be useful, |
||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
||||
|
* GNU General Public License for more details. |
||||
|
* <p> |
||||
|
* You should have received a copy of the GNU General Public License |
||||
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
*/ |
||||
|
|
||||
|
package com.epmet.dto.form; |
||||
|
|
||||
|
import com.epmet.commons.tools.validator.group.AddGroup; |
||||
|
import com.epmet.commons.tools.validator.group.CustomerClientShowGroup; |
||||
|
import com.epmet.commons.tools.validator.group.UpdateGroup; |
||||
|
import lombok.Data; |
||||
|
import org.hibernate.validator.constraints.Length; |
||||
|
|
||||
|
import javax.validation.constraints.NotBlank; |
||||
|
import javax.validation.constraints.NotNull; |
||||
|
import java.io.Serializable; |
||||
|
|
||||
|
|
||||
|
@Data |
||||
|
public class IcBulidingUnitFormDTO implements Serializable { |
||||
|
|
||||
|
private static final long serialVersionUID = 1L; |
||||
|
|
||||
|
@NotBlank(message = "楼栋ID不能为空") |
||||
|
private String buildingId; |
||||
|
|
||||
|
|
||||
|
|
||||
|
|
||||
|
} |
@ -0,0 +1,105 @@ |
|||||
|
/** |
||||
|
* Copyright 2018 人人开源 https://www.renren.io
|
||||
|
* <p> |
||||
|
* This program is free software: you can redistribute it and/or modify |
||||
|
* it under the terms of the GNU General Public License as published by |
||||
|
* the Free Software Foundation, either version 3 of the License, or |
||||
|
* (at your option) any later version. |
||||
|
* <p> |
||||
|
* This program is distributed in the hope that it will be useful, |
||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
||||
|
* GNU General Public License for more details. |
||||
|
* <p> |
||||
|
* You should have received a copy of the GNU General Public License |
||||
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
*/ |
||||
|
|
||||
|
package com.epmet.dto.form; |
||||
|
|
||||
|
import com.epmet.commons.tools.validator.group.CustomerClientShowGroup; |
||||
|
import lombok.Data; |
||||
|
|
||||
|
import javax.validation.constraints.NotBlank; |
||||
|
import javax.validation.constraints.NotNull; |
||||
|
import java.io.Serializable; |
||||
|
|
||||
|
|
||||
|
@Data |
||||
|
public class IcHouseFormDTO implements Serializable { |
||||
|
|
||||
|
private static final long serialVersionUID = 1L; |
||||
|
|
||||
|
public interface DeleteGroup extends CustomerClientShowGroup { |
||||
|
} |
||||
|
|
||||
|
public interface AddShowGroup extends CustomerClientShowGroup { |
||||
|
} |
||||
|
|
||||
|
public interface UpdateShowGroup extends CustomerClientShowGroup { |
||||
|
} |
||||
|
|
||||
|
@NotBlank(message = "房屋ID不能为空", groups = { UpdateShowGroup.class,DeleteGroup.class}) |
||||
|
private String houseId; |
||||
|
|
||||
|
|
||||
|
/** |
||||
|
* 小区id |
||||
|
*/ |
||||
|
@NotBlank(message = "小区id不能为空", groups = {AddShowGroup.class, UpdateShowGroup.class}) |
||||
|
private String neighborHoodId; |
||||
|
|
||||
|
@NotBlank(message = "所属楼栋ID不能为空", groups = {AddShowGroup.class, UpdateShowGroup.class}) |
||||
|
private String buildingId; |
||||
|
|
||||
|
/** |
||||
|
* 所属单元id |
||||
|
*/ |
||||
|
@NotBlank(message = "所属单元id不能为空", groups = {AddShowGroup.class, UpdateShowGroup.class}) |
||||
|
private String buildingUnitId; |
||||
|
|
||||
|
|
||||
|
|
||||
|
/** |
||||
|
* 门牌号 |
||||
|
*/ |
||||
|
@NotBlank(message = "门牌号不能为空", groups = {AddShowGroup.class, UpdateShowGroup.class}) |
||||
|
private String doorName; |
||||
|
|
||||
|
/** |
||||
|
* 房屋类型,这里存储字典value就可以 |
||||
|
*/ |
||||
|
@NotBlank(message = "房屋类型不能为空", groups = {AddShowGroup.class, UpdateShowGroup.class}) |
||||
|
private String houseType; |
||||
|
|
||||
|
/** |
||||
|
* 存储字典value |
||||
|
*/ |
||||
|
@NotBlank(message = "房屋用途不能为空", groups = {AddShowGroup.class, UpdateShowGroup.class}) |
||||
|
private String purpose; |
||||
|
|
||||
|
/** |
||||
|
* 1出租;0未出租 |
||||
|
*/ |
||||
|
@NotNull(message = "是否出租不能为空", groups = {AddShowGroup.class, UpdateShowGroup.class}) |
||||
|
private Integer rentFlag; |
||||
|
|
||||
|
/** |
||||
|
* 房主姓名 |
||||
|
*/ |
||||
|
@NotBlank(message = "房主姓名不能为空", groups = {AddShowGroup.class, UpdateShowGroup.class}) |
||||
|
private String ownerName; |
||||
|
|
||||
|
/** |
||||
|
* 房主电话 |
||||
|
*/ |
||||
|
@NotBlank(message = "房主电话不能为空", groups = {AddShowGroup.class, UpdateShowGroup.class}) |
||||
|
private String ownerPhone; |
||||
|
|
||||
|
/** |
||||
|
* 房主身份证号 |
||||
|
*/ |
||||
|
@NotBlank(message = "房主身份证号不能为空", groups = {AddShowGroup.class, UpdateShowGroup.class}) |
||||
|
private String ownerIdCard; |
||||
|
|
||||
|
} |
@ -0,0 +1,105 @@ |
|||||
|
/** |
||||
|
* Copyright 2018 人人开源 https://www.renren.io
|
||||
|
* <p> |
||||
|
* This program is free software: you can redistribute it and/or modify |
||||
|
* it under the terms of the GNU General Public License as published by |
||||
|
* the Free Software Foundation, either version 3 of the License, or |
||||
|
* (at your option) any later version. |
||||
|
* <p> |
||||
|
* This program is distributed in the hope that it will be useful, |
||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
||||
|
* GNU General Public License for more details. |
||||
|
* <p> |
||||
|
* You should have received a copy of the GNU General Public License |
||||
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
*/ |
||||
|
|
||||
|
package com.epmet.dto.form; |
||||
|
|
||||
|
import com.epmet.commons.tools.validator.group.CustomerClientShowGroup; |
||||
|
import lombok.Data; |
||||
|
import org.hibernate.validator.constraints.Length; |
||||
|
|
||||
|
import javax.validation.constraints.NotBlank; |
||||
|
import java.io.Serializable; |
||||
|
|
||||
|
|
||||
|
|
||||
|
@Data |
||||
|
public class IcNeighborHoodFormDTO implements Serializable { |
||||
|
|
||||
|
private static final long serialVersionUID = 1L; |
||||
|
|
||||
|
public interface DeleteGroup extends CustomerClientShowGroup { |
||||
|
} |
||||
|
|
||||
|
public interface AddShowGroup extends CustomerClientShowGroup { |
||||
|
} |
||||
|
public interface UpdateShowGroup extends CustomerClientShowGroup { |
||||
|
} |
||||
|
/** |
||||
|
* 小区id |
||||
|
*/ |
||||
|
@NotBlank(message = "小区id不能为空", groups = {UpdateShowGroup.class,DeleteGroup.class}) |
||||
|
private String neighborHoodId; |
||||
|
|
||||
|
/** |
||||
|
* 小区名称 |
||||
|
*/ |
||||
|
@NotBlank(message = "小区名称不能为空", groups = {AddShowGroup.class, UpdateShowGroup.class}) |
||||
|
@Length(max=50,message = "小区名称不能超过50个字", groups = {AddShowGroup.class, UpdateShowGroup.class}) |
||||
|
private String neighborHoodName; |
||||
|
|
||||
|
/** |
||||
|
* 组织id |
||||
|
*/ |
||||
|
@NotBlank(message = "组织id不能为空", groups = {AddShowGroup.class, UpdateShowGroup.class}) |
||||
|
private String agencyId; |
||||
|
|
||||
|
|
||||
|
/** |
||||
|
* 网格id |
||||
|
*/ |
||||
|
@NotBlank(message = "网格id不能为空", groups = {AddShowGroup.class, UpdateShowGroup.class}) |
||||
|
private String gridId; |
||||
|
/** |
||||
|
* 关联物业id |
||||
|
*/ |
||||
|
//@NotBlank(message = "关联物业ID不能为空", groups = {AddShowGroup.class,UpdateShowGroup.class})
|
||||
|
private String propertyId; |
||||
|
|
||||
|
/** |
||||
|
* 详细地址 |
||||
|
*/ |
||||
|
@NotBlank(message = "详细地址不能为空", groups = {AddShowGroup.class, UpdateShowGroup.class}) |
||||
|
private String address; |
||||
|
|
||||
|
/** |
||||
|
* 备注 |
||||
|
*/ |
||||
|
@Length(max=500,message = "备注不能超过500个字", groups = {AddShowGroup.class, UpdateShowGroup.class}) |
||||
|
private String remark; |
||||
|
/** |
||||
|
* 坐标位置 |
||||
|
*/ |
||||
|
private String location; |
||||
|
|
||||
|
|
||||
|
/** |
||||
|
* 中心点位:经度 |
||||
|
*/ |
||||
|
|
||||
|
private String longitude; |
||||
|
|
||||
|
/** |
||||
|
* 中心点位:纬度 |
||||
|
*/ |
||||
|
|
||||
|
private String latitude; |
||||
|
|
||||
|
|
||||
|
|
||||
|
|
||||
|
|
||||
|
} |
@ -0,0 +1,53 @@ |
|||||
|
/** |
||||
|
* Copyright 2018 人人开源 https://www.renren.io
|
||||
|
* <p> |
||||
|
* This program is free software: you can redistribute it and/or modify |
||||
|
* it under the terms of the GNU General Public License as published by |
||||
|
* the Free Software Foundation, either version 3 of the License, or |
||||
|
* (at your option) any later version. |
||||
|
* <p> |
||||
|
* This program is distributed in the hope that it will be useful, |
||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
||||
|
* GNU General Public License for more details. |
||||
|
* <p> |
||||
|
* You should have received a copy of the GNU General Public License |
||||
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
*/ |
||||
|
|
||||
|
package com.epmet.dto.form; |
||||
|
|
||||
|
import com.epmet.commons.tools.validator.group.CustomerClientShowGroup; |
||||
|
import lombok.Data; |
||||
|
import org.hibernate.validator.constraints.Length; |
||||
|
|
||||
|
import javax.validation.constraints.NotBlank; |
||||
|
import java.io.Serializable; |
||||
|
|
||||
|
|
||||
|
@Data |
||||
|
public class IcPropertyManagementFormDTO implements Serializable { |
||||
|
|
||||
|
private static final long serialVersionUID = 1L; |
||||
|
|
||||
|
public interface DeleteGroup extends CustomerClientShowGroup { |
||||
|
} |
||||
|
|
||||
|
public interface AddShowGroup extends CustomerClientShowGroup { |
||||
|
} |
||||
|
|
||||
|
public interface UpdateShowGroup extends CustomerClientShowGroup { |
||||
|
} |
||||
|
|
||||
|
@NotBlank(message = "物业id不能为空", groups = {DeleteGroup.class, UpdateShowGroup.class}) |
||||
|
private String id; |
||||
|
|
||||
|
/** |
||||
|
* 物业名称 |
||||
|
*/ |
||||
|
@NotBlank(message = "物业名称不能为空", groups = {AddShowGroup.class, UpdateShowGroup.class}) |
||||
|
@Length(max = 50, message = "物业名称不能超过50个字", groups = {AddShowGroup.class}) |
||||
|
private String name; |
||||
|
|
||||
|
|
||||
|
} |
Some files were not shown because too many files changed in this diff
Loading…
Reference in new issue