Commit 5f57b91d by 杨伟程

告警配置

parent 0b62704c
Showing with 907 additions and 40 deletions
...@@ -401,7 +401,7 @@ CREATE TABLE `alarm_config` ( ...@@ -401,7 +401,7 @@ CREATE TABLE `alarm_config` (
`org_id` VARCHAR ( 64 ) NOT NULL COMMENT '所属组织机构id', `org_id` VARCHAR ( 64 ) NOT NULL COMMENT '所属组织机构id',
`role_config` VARCHAR ( 512 ) DEFAULT NULL COMMENT '规则配置', `role_config` VARCHAR ( 512 ) DEFAULT NULL COMMENT '规则配置',
`content` VARCHAR ( 512 ) DEFAULT NULL COMMENT '内容', `content` VARCHAR ( 512 ) DEFAULT NULL COMMENT '内容',
`notify_channel` VARCHAR ( 16 ) DEFAULT NULL COMMENT '通知渠道 1、短信 2、邮件 3、小程序 可多选', `notify_channel` VARCHAR ( 16 ) DEFAULT NULL COMMENT '通知渠道 1、短信 2、邮件 3、语音短信 可多选',
`notify_relation` VARCHAR ( 4 ) DEFAULT NULL COMMENT '通知家属 1、同步通知 2 可选通知 3 不通知', `notify_relation` VARCHAR ( 4 ) DEFAULT NULL COMMENT '通知家属 1、同步通知 2 可选通知 3 不通知',
`notify_way` TINYINT ( 1 ) DEFAULT NULL COMMENT '通知对象 1 全部 2 选择人员', `notify_way` TINYINT ( 1 ) DEFAULT NULL COMMENT '通知对象 1 全部 2 选择人员',
`notify_user` VARCHAR ( 1024 ) DEFAULT NULL COMMENT '通知人员', `notify_user` VARCHAR ( 1024 ) DEFAULT NULL COMMENT '通知人员',
......
INSERT INTO sys_dictionary_category (id, code, name, create_date, update_date, del_flag) INSERT INTO sys_dictionary_category (id, code, name, create_date, update_date, del_flag)
VALUES ('2', 'common.status', '通用状态', '2022-05-16 17:08:33', '2022-05-16 17:08:37', '0');
INSERT INTO sys_dictionary_category (id, code, name, create_date, update_date, del_flag)
VALUES ('3', 'common.status.able', '通用启用状态', '2022-05-16 17:08:33', '2022-05-16 17:08:37', '0');
INSERT INTO sys_dictionary_category (id, code, name, create_date, update_date, del_flag)
VALUES ('5', 'sex', '性别', '2022-05-16 17:08:33', '2022-05-16 17:08:37', '0'); VALUES ('5', 'sex', '性别', '2022-05-16 17:08:33', '2022-05-16 17:08:37', '0');
INSERT INTO sys_dictionary_category (id, code, name, create_date, update_date, del_flag) INSERT INTO sys_dictionary_category (id, code, name, create_date, update_date, del_flag)
...@@ -7,6 +13,31 @@ VALUES ('6', 'elder.medicalInsurance', '老人医疗保险情况', '2022-05-16 1 ...@@ -7,6 +13,31 @@ VALUES ('6', 'elder.medicalInsurance', '老人医疗保险情况', '2022-05-16 1
INSERT INTO sys_dictionary_category (id, code, name, create_date, update_date, del_flag) INSERT INTO sys_dictionary_category (id, code, name, create_date, update_date, del_flag)
VALUES ('100', 'elder.realtime.now.status', '老人实时监测状态', '2022-05-16 17:08:33', '2022-05-16 17:08:37', '0'); VALUES ('100', 'elder.realtime.now.status', '老人实时监测状态', '2022-05-16 17:08:33', '2022-05-16 17:08:37', '0');
INSERT INTO sys_dictionary_category (id, code, name, create_date, update_date, del_flag)
VALUES ('200', 'alarm.alarmType', '告警配置告警类型', '2022-05-16 17:08:33', '2022-05-16 17:08:37', '0');
INSERT INTO sys_dictionary_category (id, code, name, create_date, update_date, del_flag)
VALUES ('201', 'alarm.notifyChannel', '告警配置通知渠道', '2022-05-16 17:08:33', '2022-05-16 17:08:37', '0');
INSERT INTO sys_dictionary_category (id, code, name, create_date, update_date, del_flag)
VALUES ('202', 'alarm.notifyRelation', '告警配置通知家属', '2022-05-16 17:08:33', '2022-05-16 17:08:37', '0');
INSERT INTO sys_dictionary_category (id, code, name, create_date, update_date, del_flag)
VALUES ('203', 'alarm.notifyWay', '告警配置通知对象', '2022-05-16 17:08:33', '2022-05-16 17:08:37', '0');
INSERT INTO sys_dictionary (id, code, name, value, sort, description, category_id, create_date, update_date, del_flag)
VALUES ('1', 'common.status.yes', '是', '1', 1, '', '2', '2022-05-16 17:13:23', '2022-05-16 17:13:27', '0');
INSERT INTO sys_dictionary (id, code, name, value, sort, description, category_id, create_date, update_date, del_flag)
VALUES ('2', 'common.status.no', '否', '0', 0, '', '2', '2022-05-16 17:13:23', '2022-05-16 17:13:27', '0');
INSERT INTO sys_dictionary (id, code, name, value, sort, description, category_id, create_date, update_date, del_flag)
VALUES ('3', 'common.status.able', '启用', '1', 1, '', '3', '2022-05-16 17:13:23', '2022-05-16 17:13:27', '0');
INSERT INTO sys_dictionary (id, code, name, value, sort, description, category_id, create_date, update_date, del_flag)
VALUES ('4', 'common.status.disable', '禁用', '0', 0, '', '3', '2022-05-16 17:13:23', '2022-05-16 17:13:27', '0');
INSERT INTO sys_dictionary (id, code, name, value, sort, description, category_id, create_date, update_date, del_flag) INSERT INTO sys_dictionary (id, code, name, value, sort, description, category_id, create_date, update_date, del_flag)
VALUES ('12', 'sex.man', '男', '1', 1, '', '5', '2022-05-16 17:13:23', '2022-05-16 17:13:27', '0'); VALUES ('12', 'sex.man', '男', '1', 1, '', '5', '2022-05-16 17:13:23', '2022-05-16 17:13:27', '0');
INSERT INTO sys_dictionary (id, code, name, value, sort, description, category_id, create_date, update_date, del_flag) INSERT INTO sys_dictionary (id, code, name, value, sort, description, category_id, create_date, update_date, del_flag)
...@@ -32,6 +63,43 @@ VALUES ('103', 'elder.realtime.now.status.bed', '静息', '40', 40, '', '100', ' ...@@ -32,6 +63,43 @@ VALUES ('103', 'elder.realtime.now.status.bed', '静息', '40', 40, '', '100', '
INSERT INTO sys_dictionary (id, code, name, value, sort, description, category_id, create_date, update_date, del_flag) INSERT INTO sys_dictionary (id, code, name, value, sort, description, category_id, create_date, update_date, del_flag)
VALUES ('104', 'elder.realtime.now.status.sleep', '睡眠', '50', 50, '', '100', '2022-05-16 17:13:23', '2022-05-16 17:13:27', '0'); VALUES ('104', 'elder.realtime.now.status.sleep', '睡眠', '50', 50, '', '100', '2022-05-16 17:13:23', '2022-05-16 17:13:27', '0');
INSERT INTO sys_dictionary (id, code, name, value, sort, description, category_id, create_date, update_date, del_flag)
VALUES ('200', 'alarm.alarmType.fall', '老人跌倒', '1', 1, '', '200', '2022-05-16 17:13:23', '2022-05-16 17:13:27', '0');
INSERT INTO sys_dictionary (id, code, name, value, sort, description, category_id, create_date, update_date, del_flag)
VALUES ('201', 'alarm.alarmType.breathe', '呼吸异常', '2', 2, '', '200', '2022-05-16 17:13:23', '2022-05-16 17:13:27', '0');
INSERT INTO sys_dictionary (id, code, name, value, sort, description, category_id, create_date, update_date, del_flag)
VALUES ('202', 'alarm.alarmType.heart', '心率异常', '3', 3, '', '200', '2022-05-16 17:13:23', '2022-05-16 17:13:27', '0');
INSERT INTO sys_dictionary (id, code, name, value, sort, description, category_id, create_date, update_date, del_flag)
VALUES ('203', 'alarm.alarmType.behavior', '行为异常', '4', 4, '', '200', '2022-05-16 17:13:23', '2022-05-16 17:13:27', '0');
INSERT INTO sys_dictionary (id, code, name, value, sort, description, category_id, create_date, update_date, del_flag)
VALUES ('210', 'alarm.notifyChannel.sms', '短信', '1', 1, '', '201', '2022-05-16 17:13:23', '2022-05-16 17:13:27', '0');
INSERT INTO sys_dictionary (id, code, name, value, sort, description, category_id, create_date, update_date, del_flag)
VALUES ('211', 'alarm.notifyChannel.mail', '邮件', '2', 2, '', '201', '2022-05-16 17:13:23', '2022-05-16 17:13:27', '0');
INSERT INTO sys_dictionary (id, code, name, value, sort, description, category_id, create_date, update_date, del_flag)
VALUES ('212', 'alarm.notifyChannel.voiceMessage', '语音短信', '3', 3, '', '201', '2022-05-16 17:13:23', '2022-05-16 17:13:27', '0');
INSERT INTO sys_dictionary (id, code, name, value, sort, description, category_id, create_date, update_date, del_flag)
VALUES ('220', 'alarm.notifyRelation.sync', '同步通知', '1', 1, '', '202', '2022-05-16 17:13:23', '2022-05-16 17:13:27', '0');
INSERT INTO sys_dictionary (id, code, name, value, sort, description, category_id, create_date, update_date, del_flag)
VALUES ('221', 'alarm.notifyRelation.optional', '可选通知', '2', 2, '', '202', '2022-05-16 17:13:23', '2022-05-16 17:13:27', '0');
INSERT INTO sys_dictionary (id, code, name, value, sort, description, category_id, create_date, update_date, del_flag)
VALUES ('222', 'alarm.notifyRelation.no', '不通知', '3', 3, '', '202', '2022-05-16 17:13:23', '2022-05-16 17:13:27', '0');
INSERT INTO sys_dictionary (id, code, name, value, sort, description, category_id, create_date, update_date, del_flag)
VALUES ('230', 'alarm.notifyWay.all', '全部', '1', 1, '', '203', '2022-05-16 17:13:23', '2022-05-16 17:13:27', '0');
INSERT INTO sys_dictionary (id, code, name, value, sort, description, category_id, create_date, update_date, del_flag)
VALUES ('231', 'alarm.notifyWay.choose', '选择人员', '2', 2, '', '203', '2022-05-16 17:13:23', '2022-05-16 17:13:27', '0');
INSERT INTO sys_config_category (id, tenant_id, code, name, create_date, update_date, del_flag, create_by, update_by, eng_name) VALUES ('1', '0', 'elder.certificateType', '长者证件类型', '2023-07-11 10:55:06', '2023-07-11 10:55:08', '0', null, null, null); INSERT INTO sys_config_category (id, tenant_id, code, name, create_date, update_date, del_flag, create_by, update_by, eng_name) VALUES ('1', '0', 'elder.certificateType', '长者证件类型', '2023-07-11 10:55:06', '2023-07-11 10:55:08', '0', null, null, null);
INSERT INTO sys_config_category (id, tenant_id, code, name, create_date, update_date, del_flag, create_by, update_by, eng_name) VALUES ('2', '0', 'elder.blood', '长者血型', '2023-07-11 10:55:06', '2023-07-11 10:55:08', '0', null, null, null); INSERT INTO sys_config_category (id, tenant_id, code, name, create_date, update_date, del_flag, create_by, update_by, eng_name) VALUES ('2', '0', 'elder.blood', '长者血型', '2023-07-11 10:55:06', '2023-07-11 10:55:08', '0', null, null, null);
INSERT INTO sys_config_category (id, tenant_id, code, name, create_date, update_date, del_flag, create_by, update_by, eng_name) VALUES ('3', '0', 'elder.socialRelation', '长者社会关系', '2023-07-11 10:55:06', '2023-07-11 10:55:08', '0', null, null, null); INSERT INTO sys_config_category (id, tenant_id, code, name, create_date, update_date, del_flag, create_by, update_by, eng_name) VALUES ('3', '0', 'elder.socialRelation', '长者社会关系', '2023-07-11 10:55:06', '2023-07-11 10:55:08', '0', null, null, null);
......
...@@ -106,7 +106,7 @@ public class CodeGenerator { ...@@ -106,7 +106,7 @@ public class CodeGenerator {
// 使用重点 下列字段填写表名 运行方法 // 使用重点 下列字段填写表名 运行方法
// strategy.setInclude("edu_teacher","..."); // 多表-逆向工程 // strategy.setInclude("edu_teacher","..."); // 多表-逆向工程
strategy.setInclude("elder","elder_social_relation","elder_health_info","elder_other_info","elder_medical_examination_info","elder_children_info"); strategy.setInclude("plat_alarm_config");
strategy.setNaming(NamingStrategy.underline_to_camel);//数据库表映射到实体的命名策略 strategy.setNaming(NamingStrategy.underline_to_camel);//数据库表映射到实体的命名策略
strategy.setTablePrefix(pc.getModuleName() + "_"); //生成实体属性时去掉表"_"前缀并且第一个字母大写 如:gmt_create -> gmtCreate strategy.setTablePrefix(pc.getModuleName() + "_"); //生成实体属性时去掉表"_"前缀并且第一个字母大写 如:gmt_create -> gmtCreate
......
package com.makeit.module.controller.alarm;
import com.makeit.common.dto.BaseIdDTO;
import com.makeit.common.dto.StatusDTO;
import com.makeit.common.response.ApiResponseEntity;
import com.makeit.common.response.ApiResponseUtils;
import com.makeit.dto.platform.alarm.PlatAlarmConfigDTOVO;
import com.makeit.dto.platform.alarm.PlatAlarmConfigQueryDTO;
import com.makeit.server.platform.alarm.PlatAlarmConfigService;
import com.makeit.vo.platform.alarm.PlatAlarmConfigListVO;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.validation.annotation.Validated;
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.List;
/**
* <p>
* 告警配置 前端控制器
* </p>
*
* @author eugene young
* @since 2023-09-04
*/
@Api(tags = "告警配置")
@RestController
@RequestMapping("/plat/alarm-config")
public class PlatAlarmConfigController {
@Autowired
private PlatAlarmConfigService platAlarmConfigService;
@ApiOperation("列表")
@PostMapping("list")
public ApiResponseEntity<List<PlatAlarmConfigListVO>> list(@RequestBody PlatAlarmConfigQueryDTO dto) {
return ApiResponseUtils.success(platAlarmConfigService.list(dto));
}
@ApiOperation("新增")
@PostMapping("add")
public ApiResponseEntity<?> add(@Validated @RequestBody PlatAlarmConfigDTOVO dto) {
platAlarmConfigService.add(dto);
return ApiResponseUtils.success();
}
@ApiOperation("编辑")
@PostMapping("edit")
public ApiResponseEntity<?> edit(PlatAlarmConfigDTOVO dto) {
platAlarmConfigService.edit(dto);
return ApiResponseUtils.success();
}
@ApiOperation("详情")
@PostMapping("editView")
public ApiResponseEntity<PlatAlarmConfigDTOVO> editView(@RequestBody BaseIdDTO baseIdDTO) {
return ApiResponseUtils.success(platAlarmConfigService.editView(baseIdDTO.getId()));
}
@ApiOperation("改变状态")
@PostMapping("changeStatus")
public ApiResponseEntity<?> changeStatus(@RequestBody StatusDTO dto) {
platAlarmConfigService.changeStatus(dto);
return ApiResponseUtils.success();
}
}
package com.makeit.module.controller.elder;
import org.springframework.boot.ApplicationArguments;
import org.springframework.boot.ApplicationRunner;
import org.springframework.stereotype.Component;
@Component
public class TestRun implements ApplicationRunner {
@Override
public void run(ApplicationArguments args) throws Exception {
System.out.println("dddddddddddddddddd");
}
}
package com.makeit.module.controller.wechat.elder; package com.makeit.module.controller.wechat.elder;
import com.makeit.common.dto.BaseIdDTO;
import com.makeit.common.page.PageReqDTO;
import com.makeit.common.page.PageVO;
import com.makeit.common.response.ApiResponseEntity; import com.makeit.common.response.ApiResponseEntity;
import com.makeit.common.response.ApiResponseUtils; import com.makeit.common.response.ApiResponseUtils;
import com.makeit.dto.platform.elder.PlatElderChildrenInfoEditVO;
import com.makeit.dto.platform.elder.PlatElderChildrenInfoQueryDTO;
import com.makeit.server.platform.elder.PlatElderChildrenInfoService; import com.makeit.server.platform.elder.PlatElderChildrenInfoService;
import com.makeit.vo.platform.elder.PlatElderChildrenInfoListVO; import com.makeit.vo.wechat.elder.PlatElderChildrenInfoWechatVO;
import io.swagger.annotations.Api; import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation; import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.PostMapping; 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.RequestMapping;
import org.springframework.web.bind.annotation.RestController; import org.springframework.web.bind.annotation.RestController;
import java.util.List;
/** /**
* <p> * <p>
* 长者子女账号 前端控制器 * 长者子女账号 前端控制器
...@@ -29,7 +20,7 @@ import java.util.List; ...@@ -29,7 +20,7 @@ import java.util.List;
* @author eugene young * @author eugene young
* @since 2023-08-29 * @since 2023-08-29
*/ */
@Api(tags = "长者子女账号") @Api(tags = "长者子女账号-子女端小程序")
@RestController @RestController
@RequestMapping("/children/elder/children-info") @RequestMapping("/children/elder/children-info")
public class PlatElderChildrenInfoWechatController { public class PlatElderChildrenInfoWechatController {
...@@ -39,8 +30,8 @@ public class PlatElderChildrenInfoWechatController { ...@@ -39,8 +30,8 @@ public class PlatElderChildrenInfoWechatController {
@ApiOperation("详情") @ApiOperation("详情")
@PostMapping("view") @PostMapping("view")
public ApiResponseEntity<PlatElderChildrenInfoEditVO> view(@RequestBody BaseIdDTO baseIdDTO) { public ApiResponseEntity<PlatElderChildrenInfoWechatVO> view() {
return ApiResponseUtils.success(platElderChildrenInfoService.view(baseIdDTO.getId())); return ApiResponseUtils.success(platElderChildrenInfoService.view());
} }
......
package com.makeit.module.controller.wechat.elder;
import com.makeit.common.dto.BaseIdDTO;
import com.makeit.common.response.ApiResponseEntity;
import com.makeit.common.response.ApiResponseUtils;
import com.makeit.dto.platform.elder.PlatElderDTOVO;
import com.makeit.server.platform.elder.PlatElderService;
import com.makeit.vo.wechat.elder.PlatElderWechatSimpleVO;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
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.List;
/**
* <p>
* 长者基本信息 前端控制器
* </p>
*
* @author eugene young
* @since 2023-08-29
*/
@Api(tags = "长者基本信息")
@RestController
@RequestMapping("/plat/elder")
public class PlatElderWechatController {
@Autowired
private PlatElderService platElderService;
@ApiOperation("我的家庭")
@PostMapping("listMy")
public ApiResponseEntity<List<PlatElderWechatSimpleVO>> listMy() {
return ApiResponseUtils.success(platElderService.listMy());
}
@ApiOperation("详情")
@PostMapping("view")
public ApiResponseEntity<PlatElderDTOVO> view(@RequestBody BaseIdDTO baseIdDTO) {
return ApiResponseUtils.success(platElderService.view(baseIdDTO.getId()));
}
}
package com.makeit.dto.platform.alarm;
import com.makeit.common.dto.BaseTenantDTO;
import com.makeit.common.entity.BaseBusEntity;
import com.makeit.enums.platform.alarm.PlatAlarmConfigEnum;
import com.makeit.global.validator.DictEnum;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import javax.validation.constraints.NotBlank;
/**
* <p>
* 告警配置
* </p>
*
* @author eugene young
* @since 2023-09-04
*/
@Data
@EqualsAndHashCode(callSuper = true)
@ApiModel(value="PlatAlarmConfig对象", description="告警配置")
public class PlatAlarmConfigDTOVO extends BaseTenantDTO {
@NotBlank(message = "告警类型不能为空")
@DictEnum(em = PlatAlarmConfigEnum.AlarmTypeEnum.class,message = "告警类型可选值为{m}")
@ApiModelProperty(value = "告警类型 数据字典 1 长者跌倒 2 呼吸异常 3 心率异常 4 行为异常")
private String alarmType;
@ApiModelProperty(value = "所属组织机构id")
private String orgId;
@ApiModelProperty(value = "城市组织id")
private String cityOrgId;
@ApiModelProperty(value = "区组织id")
private String districtOrgId;
@ApiModelProperty(value = "街道组织id")
private String streetOrgId;
@ApiModelProperty(value = "组织路径")
private String orgPath;
@ApiModelProperty(value = "规则配置")
private String ruleConfig;
@ApiModelProperty(value = "内容")
private String content;
@ApiModelProperty(value = "内容(审核中)")
private String contentAudit;
@NotBlank(message = "通知渠道不能为空")
@ApiModelProperty(value = "通知渠道 数据字典 1、短信 2、邮件 3、语音短信 可多选")
private String notifyChannel;
@NotBlank(message = "通知家属不能为空")
@ApiModelProperty(value = "通知家属 数据字典 1、同步通知 2 可选通知 3 不通知")
private String notifyRelation;
@NotBlank(message = "通知对象不能为空")
@ApiModelProperty(value = "通知对象 数据字典 1 全部 2 选择人员")
private String notifyWay;
@ApiModelProperty(value = "通知人员")
private String notifyUser;
@ApiModelProperty(value = "通知人员名称")
private String notifyUserName;
@ApiModelProperty(value = "说明")
private String description;
}
package com.makeit.dto.platform.alarm;
import com.makeit.common.dto.BaseTenantDTO;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
/**
* <p>
* 告警配置
* </p>
*
* @author eugene young
* @since 2023-09-04
*/
@Data
@EqualsAndHashCode(callSuper = true)
@ApiModel(value="PlatAlarmConfig对象", description="告警配置")
public class PlatAlarmConfigQueryDTO extends BaseTenantDTO {
@ApiModelProperty(value = "所属组织机构id")
private String orgId;
}
...@@ -162,6 +162,9 @@ public class PlatElderDTOVO extends BaseTenantDTO { ...@@ -162,6 +162,9 @@ public class PlatElderDTOVO extends BaseTenantDTO {
@ApiModelProperty(value = "头像文件id") @ApiModelProperty(value = "头像文件id")
private String avatar; private String avatar;
@ApiModelProperty(value = "头像文件路径")
private String avatarPath;
@ApiModelProperty(value = "社会关系列表") @ApiModelProperty(value = "社会关系列表")
private List<PlatElderSocialRelationDTOVO> relationList; private List<PlatElderSocialRelationDTOVO> relationList;
......
package com.makeit.entity.platform.alarm;
import com.baomidou.mybatisplus.annotation.FieldStrategy;
import com.baomidou.mybatisplus.annotation.TableField;
import com.makeit.common.entity.BaseBusEntity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
/**
* <p>
* 告警配置
* </p>
*
* @author eugene young
* @since 2023-09-04
*/
@Data
@EqualsAndHashCode(callSuper = true)
@ApiModel(value = "PlatAlarmConfig对象", description = "告警配置")
public class PlatAlarmConfig extends BaseBusEntity {
private static final long serialVersionUID = 1L;
@ApiModelProperty(value = "告警类型 数据字典 1 长者跌倒 2 呼吸异常 3 心率异常 4 行为异常")
private String alarmType;
@ApiModelProperty(value = "状态 数据字典 1 启用 0 禁用")
private String status;
//@TableField(updateStrategy = FieldStrategy.IGNORED)
@ApiModelProperty(value = "所属组织机构id")
private String orgId;
@ApiModelProperty(value = "城市组织id")
private String cityOrgId;
@ApiModelProperty(value = "区组织id")
private String districtOrgId;
@ApiModelProperty(value = "街道组织id")
private String streetOrgId;
@ApiModelProperty(value = "组织路径")
private String orgPath;
@ApiModelProperty(value = "规则配置")
private String ruleConfig;
@ApiModelProperty(value = "内容")
private String content;
@TableField(updateStrategy = FieldStrategy.IGNORED)
@ApiModelProperty(value = "内容(审核中)")
private String contentAudit;
@ApiModelProperty(value = "通知渠道 数据字典 1、短信 2、邮件 3、语音短信 可多选")
private String notifyChannel;
@ApiModelProperty(value = "通知家属 数据字典 1、同步通知 2 可选通知 3 不通知")
private String notifyRelation;
@ApiModelProperty(value = "通知对象 数据字典 1 全部 2 选择人员")
private String notifyWay;
@TableField(updateStrategy = FieldStrategy.IGNORED)
@ApiModelProperty(value = "通知人员")
private String notifyUser;
@TableField(updateStrategy = FieldStrategy.IGNORED)
@ApiModelProperty(value = "说明")
private String description;
}
package com.makeit.entity.platform.elder; package com.makeit.entity.platform.elder;
import com.baomidou.mybatisplus.annotation.IdType;
import java.time.LocalDateTime;
import com.baomidou.mybatisplus.annotation.TableId;
import com.makeit.common.entity.BaseBusEntity; import com.makeit.common.entity.BaseBusEntity;
import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty; import io.swagger.annotations.ApiModelProperty;
...@@ -51,4 +48,8 @@ public class PlatElderChildrenInfo extends BaseBusEntity { ...@@ -51,4 +48,8 @@ public class PlatElderChildrenInfo extends BaseBusEntity {
@ApiModelProperty(value = "组织路径") @ApiModelProperty(value = "组织路径")
private String orgPath; private String orgPath;
@ApiModelProperty(value = "微信头像路径")
private String avatar;
} }
package com.makeit.enums.platform.alarm;
import com.makeit.enums.BaseEnum;
import com.makeit.utils.sys.SysDictUtil;
public class PlatAlarmConfigEnum {
public enum AlarmTypeEnum implements BaseEnum {
FALL("alarm.alarmType.fall"),
BREATHE("alarm.alarmType.breathe"),
HEART("alarm.alarmType.heart"),
BEHAVIOR("alarm.alarmType.behavior");
private String code;
AlarmTypeEnum(String code) {
this.code = code;
}
public String getValue() {
return SysDictUtil.getValue(code);
}
}
public enum NotifyChannelEnum implements BaseEnum {
SMS("alarm.notifyChannel.sms"),
MAIL("alarm.notifyChannel.mail"),
VOICE_MESSAGE("alarm.notifyChannel.voiceMessage");
private String code;
NotifyChannelEnum(String code) {
this.code = code;
}
public String getValue() {
return SysDictUtil.getValue(code);
}
}
public enum NotifyRelationEnum implements BaseEnum {
SYNC("alarm.notifyRelation.sync"),
OPTIONAL("alarm.notifyRelation.optional"),
NO("alarm.notifyRelation.no");
private String code;
NotifyRelationEnum(String code) {
this.code = code;
}
public String getValue() {
return SysDictUtil.getValue(code);
}
}
public enum NotifyWayEnum implements BaseEnum {
ALL("alarm.notifyWay.all"),
CHOOSE("alarm.notifyWay.choose");
private String code;
NotifyWayEnum(String code) {
this.code = code;
}
public String getValue() {
return SysDictUtil.getValue(code);
}
}
}
package com.makeit.mapper.platform.alarm;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.makeit.entity.platform.alarm.PlatAlarmConfig;
/**
* <p>
* 告警配置 Mapper 接口
* </p>
*
* @author eugene young
* @since 2023-09-04
*/
public interface PlatAlarmConfigMapper extends BaseMapper<PlatAlarmConfig> {
}
package com.makeit.server.platform.alarm;
import com.baomidou.mybatisplus.extension.service.IService;
import com.makeit.common.dto.StatusDTO;
import com.makeit.dto.platform.alarm.PlatAlarmConfigDTOVO;
import com.makeit.dto.platform.alarm.PlatAlarmConfigQueryDTO;
import com.makeit.entity.platform.alarm.PlatAlarmConfig;
import com.makeit.vo.platform.alarm.PlatAlarmConfigListVO;
import java.util.List;
/**
* <p>
* 告警配置 服务类
* </p>
*
* @author eugene young
* @since 2023-09-04
*/
public interface PlatAlarmConfigService extends IService<PlatAlarmConfig> {
List<PlatAlarmConfigListVO> list(PlatAlarmConfigQueryDTO dto);
void add(PlatAlarmConfigDTOVO dto);
void edit(PlatAlarmConfigDTOVO dto);
PlatAlarmConfigDTOVO editView(String id);
void changeStatus(StatusDTO dto);
void audit(StatusDTO dto);
}
package com.makeit.server.platform.alarm.impl;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.makeit.common.dto.StatusDTO;
import com.makeit.dto.platform.alarm.PlatAlarmConfigDTOVO;
import com.makeit.dto.platform.alarm.PlatAlarmConfigQueryDTO;
import com.makeit.entity.platform.alarm.PlatAlarmConfig;
import com.makeit.entity.platform.auth.PlatUser;
import com.makeit.enums.CodeMessageEnum;
import com.makeit.enums.CommonEnum;
import com.makeit.exception.BusinessException;
import com.makeit.mapper.platform.alarm.PlatAlarmConfigMapper;
import com.makeit.server.platform.alarm.PlatAlarmConfigService;
import com.makeit.server.platform.auth.PlatUserService;
import com.makeit.utils.data.convert.BeanDtoVoUtils;
import com.makeit.utils.data.convert.StreamUtil;
import com.makeit.utils.old.StringUtils;
import com.makeit.utils.sql.join.JoinUtil;
import com.makeit.vo.platform.alarm.PlatAlarmConfigListVO;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import java.util.Arrays;
import java.util.List;
/**
* <p>
* 告警配置 服务实现类
* </p>
*
* @author eugene young
* @since 2023-09-04
*/
@Service
public class PlatAlarmConfigServiceImpl extends ServiceImpl<PlatAlarmConfigMapper, PlatAlarmConfig> implements PlatAlarmConfigService {
@Autowired
private PlatUserService platUserService;
@Override
public List<PlatAlarmConfigListVO> list(PlatAlarmConfigQueryDTO dto) {
List<PlatAlarmConfig> configList = list(new QueryWrapper<PlatAlarmConfig>().lambda()
.apply(StringUtils.isNotBlank(dto.getOrgId()), "find_in_set('" + dto.getOrgId() + "',org_path)")
.orderByAsc(PlatAlarmConfig::getAlarmType)
);
List<PlatAlarmConfigListVO> voList = BeanDtoVoUtils.listVo(configList, PlatAlarmConfigListVO.class);
JoinUtil.joinSplit(voList, platUserService, PlatAlarmConfigListVO::getNotifyUser, PlatUser::getId, (c, u) -> {
c.setNotifyUserName(StreamUtil.join(u, PlatUser::getUsername));
});
return voList;
}
@Override
@Transactional
public void add(PlatAlarmConfigDTOVO dto) {
PlatAlarmConfig alarmConfig = BeanDtoVoUtils.convert(dto, PlatAlarmConfig.class);
save(alarmConfig);
}
@Override
@Transactional
public void edit(PlatAlarmConfigDTOVO dto) {
PlatAlarmConfig db = getById(dto.getId());
if (StringUtils.isNotBlank(db.getContentAudit())) {
throw new RuntimeException();
}
PlatAlarmConfig alarmConfig = BeanDtoVoUtils.convert(dto, PlatAlarmConfig.class);
alarmConfig.setContent(db.getContent());
updateById(alarmConfig);
}
@Override
public PlatAlarmConfigDTOVO editView(String id) {
PlatAlarmConfig alarmConfig = getById(id);
PlatAlarmConfigDTOVO vo = BeanDtoVoUtils.convert(alarmConfig, PlatAlarmConfigDTOVO.class);
if (StringUtils.isNotBlank(vo.getContentAudit())) {
vo.setContent(vo.getContentAudit());
}
JoinUtil.joinSplit(Arrays.asList(vo), platUserService, PlatAlarmConfigDTOVO::getNotifyUser, PlatUser::getId, (c, u) -> {
c.setNotifyUserName(StreamUtil.join(u, PlatUser::getUsername));
});
return vo;
}
@Transactional
@Override
public void changeStatus(StatusDTO dto) {
if (Arrays.stream(CommonEnum.values()).noneMatch(e -> e.getValue().equals(dto.getStatus()))) {
throw new BusinessException(CodeMessageEnum.SYSTEM_ERROR);
}
PlatAlarmConfig alarmConfig = getById(dto.getId());
if (alarmConfig.getStatus().equals(dto.getStatus())) {
throw new BusinessException(CodeMessageEnum.SYSTEM_ERROR);
}
alarmConfig.setStatus(dto.getStatus());
updateById(alarmConfig);
}
@Override
@Transactional
public void audit(StatusDTO dto) {
PlatAlarmConfig alarmConfig = getById(dto.getId());
if (StringUtils.isBlank(alarmConfig.getContentAudit())) {
return;
}
if (CommonEnum.YES.getValue().equals(alarmConfig.getStatus())) {
alarmConfig.setContent(alarmConfig.getContentAudit());
}
alarmConfig.setContentAudit(null);
updateById(alarmConfig);
}
}
...@@ -7,6 +7,7 @@ import com.makeit.dto.platform.elder.PlatElderChildrenInfoEditVO; ...@@ -7,6 +7,7 @@ import com.makeit.dto.platform.elder.PlatElderChildrenInfoEditVO;
import com.makeit.dto.platform.elder.PlatElderChildrenInfoQueryDTO; import com.makeit.dto.platform.elder.PlatElderChildrenInfoQueryDTO;
import com.makeit.entity.platform.elder.PlatElderChildrenInfo; import com.makeit.entity.platform.elder.PlatElderChildrenInfo;
import com.makeit.vo.platform.elder.PlatElderChildrenInfoListVO; import com.makeit.vo.platform.elder.PlatElderChildrenInfoListVO;
import com.makeit.vo.wechat.elder.PlatElderChildrenInfoWechatVO;
import java.util.List; import java.util.List;
...@@ -29,4 +30,10 @@ public interface PlatElderChildrenInfoService extends IService<PlatElderChildren ...@@ -29,4 +30,10 @@ public interface PlatElderChildrenInfoService extends IService<PlatElderChildren
PlatElderChildrenInfoEditVO view(String id); PlatElderChildrenInfoEditVO view(String id);
void del(String id); void del(String id);
PlatElderChildrenInfoWechatVO view();
void bind(String elderId);
void unbind(String elderId);
} }
...@@ -6,6 +6,7 @@ import com.makeit.common.page.PageVO; ...@@ -6,6 +6,7 @@ import com.makeit.common.page.PageVO;
import com.makeit.dto.platform.elder.*; import com.makeit.dto.platform.elder.*;
import com.makeit.entity.platform.elder.PlatElder; import com.makeit.entity.platform.elder.PlatElder;
import com.makeit.vo.platform.elder.PlatElderListVO; import com.makeit.vo.platform.elder.PlatElderListVO;
import com.makeit.vo.wechat.elder.PlatElderWechatSimpleVO;
import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpServletResponse;
import java.util.List; import java.util.List;
...@@ -40,4 +41,8 @@ public interface PlatElderService extends IService<PlatElder> { ...@@ -40,4 +41,8 @@ public interface PlatElderService extends IService<PlatElder> {
void delBatch(List<String> idList); void delBatch(List<String> idList);
/*小程序*/
List<PlatElderWechatSimpleVO> listMy();
/*小程序*/
} }
...@@ -20,13 +20,15 @@ import com.makeit.utils.data.convert.PageUtil; ...@@ -20,13 +20,15 @@ import com.makeit.utils.data.convert.PageUtil;
import com.makeit.utils.data.convert.StreamUtil; import com.makeit.utils.data.convert.StreamUtil;
import com.makeit.utils.old.StringUtils; import com.makeit.utils.old.StringUtils;
import com.makeit.utils.sql.join.JoinUtil; import com.makeit.utils.sql.join.JoinUtil;
import com.makeit.utils.user.wechat.WechatUserUtil;
import com.makeit.vo.platform.elder.PlatElderChildrenInfoListVO; import com.makeit.vo.platform.elder.PlatElderChildrenInfoListVO;
import com.makeit.vo.wechat.elder.PlatElderChildrenInfoWechatVO;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional; import org.springframework.transaction.annotation.Transactional;
import java.util.Arrays; import java.util.*;
import java.util.List; import java.util.function.Function;
/** /**
* <p> * <p>
...@@ -132,9 +134,50 @@ public class PlatElderChildrenInfoServiceImpl extends ServiceImpl<PlatElderChild ...@@ -132,9 +134,50 @@ public class PlatElderChildrenInfoServiceImpl extends ServiceImpl<PlatElderChild
/*子女端小程序*/ /*子女端小程序*/
@Override
public PlatElderChildrenInfoWechatVO view() {
return BeanDtoVoUtils.convert(getById(WechatUserUtil.getUserId()), PlatElderChildrenInfoWechatVO.class);
}
/*子女端小程序*/ /*子女端小程序*/
@Override
public void bind(String elderId) {
PlatElderChildrenInfo childrenInfo = getById(WechatUserUtil.getUserId());
List<String> list = new ArrayList<>(10);
if (StringUtils.isNotBlank(childrenInfo.getElderId())) {
list = Arrays.asList(childrenInfo.getElderId().split(","));
}
LinkedHashSet<String> linkedHashSet = new LinkedHashSet<>(list);
linkedHashSet.add(elderId);
childrenInfo.setElderId(StreamUtil.join(new ArrayList<>(list), Function.identity()));
updateById(childrenInfo);
}
@Override
public void unbind(String elderId) {
PlatElderChildrenInfo childrenInfo = getById(WechatUserUtil.getUserId());
List<String> list = new ArrayList<>(10);
if (StringUtils.isNotBlank(childrenInfo.getElderId())) {
list = Arrays.asList(childrenInfo.getElderId().split(","));
}
LinkedHashSet<String> linkedHashSet = new LinkedHashSet<>(list);
linkedHashSet.remove(elderId);
childrenInfo.setElderId(StreamUtil.join(new ArrayList<>(list), Function.identity()));
if (linkedHashSet.isEmpty()) {
childrenInfo.setElderId(null);
}
updateById(childrenInfo);
}
} }
//TODO ywc 组织还没填充 //TODO ywc 组织还没填充
\ No newline at end of file
...@@ -15,25 +15,25 @@ import com.makeit.enums.CodeMessageEnum; ...@@ -15,25 +15,25 @@ import com.makeit.enums.CodeMessageEnum;
import com.makeit.enums.FileSuffixEnum; import com.makeit.enums.FileSuffixEnum;
import com.makeit.exception.BusinessException; import com.makeit.exception.BusinessException;
import com.makeit.mapper.platform.elder.PlatElderMapper; import com.makeit.mapper.platform.elder.PlatElderMapper;
import com.makeit.server.platform.elder.PlatElderHealthInfoService; import com.makeit.server.platform.elder.*;
import com.makeit.server.platform.elder.PlatElderOtherInfoService;
import com.makeit.server.platform.elder.PlatElderService;
import com.makeit.server.platform.elder.PlatElderSocialRelationService;
import com.makeit.utils.data.convert.BeanDtoVoUtils; import com.makeit.utils.data.convert.BeanDtoVoUtils;
import com.makeit.utils.data.convert.PageUtil; import com.makeit.utils.data.convert.PageUtil;
import com.makeit.utils.data.convert.StreamUtil; import com.makeit.utils.data.convert.StreamUtil;
import com.makeit.utils.data.excel.ExcelUtil; import com.makeit.utils.data.excel.ExcelUtil;
import com.makeit.utils.old.StringUtils; import com.makeit.utils.old.StringUtils;
import com.makeit.utils.sys.FileUtil;
import com.makeit.vo.platform.elder.PlatElderExportVO; import com.makeit.vo.platform.elder.PlatElderExportVO;
import com.makeit.vo.platform.elder.PlatElderListVO; import com.makeit.vo.platform.elder.PlatElderListVO;
import com.makeit.vo.wechat.elder.PlatElderChildrenInfoWechatVO;
import com.makeit.vo.wechat.elder.PlatElderWechatSimpleVO;
import org.springframework.beans.BeanUtils; import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional; import org.springframework.transaction.annotation.Transactional;
import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpServletResponse;
import java.util.List; import java.util.*;
import java.util.Map; import java.util.stream.Collectors;
/** /**
* <p> * <p>
...@@ -55,6 +55,9 @@ public class PlatElderServiceImpl extends ServiceImpl<PlatElderMapper, PlatElder ...@@ -55,6 +55,9 @@ public class PlatElderServiceImpl extends ServiceImpl<PlatElderMapper, PlatElder
@Autowired @Autowired
private PlatElderOtherInfoService platElderOtherInfoService; private PlatElderOtherInfoService platElderOtherInfoService;
@Autowired
private PlatElderChildrenInfoService platElderChildrenInfoService;
private LambdaQueryWrapper<PlatElder> lambdaQueryWrapper(PlatElderQueryDTO dto) { private LambdaQueryWrapper<PlatElder> lambdaQueryWrapper(PlatElderQueryDTO dto) {
return new QueryWrapper<PlatElder>().lambda() return new QueryWrapper<PlatElder>().lambda()
.like(StringUtils.isNotBlank(dto.getName()), PlatElder::getName, dto.getName()) .like(StringUtils.isNotBlank(dto.getName()), PlatElder::getName, dto.getName())
...@@ -183,6 +186,10 @@ public class PlatElderServiceImpl extends ServiceImpl<PlatElderMapper, PlatElder ...@@ -183,6 +186,10 @@ public class PlatElderServiceImpl extends ServiceImpl<PlatElderMapper, PlatElder
PlatElder platElder = getById(id); PlatElder platElder = getById(id);
PlatElderDTOVO vo = BeanDtoVoUtils.convert(platElder, PlatElderDTOVO.class); PlatElderDTOVO vo = BeanDtoVoUtils.convert(platElder, PlatElderDTOVO.class);
FileUtil.convert(Arrays.asList(vo), PlatElderDTOVO::getAvatar, (e, f) -> {
e.setAvatar(f.getFullUrl());
});
List<PlatElderSocialRelation> dbSocialRelationList = platElderSocialRelationService.list(new QueryWrapper<PlatElderSocialRelation>().lambda() List<PlatElderSocialRelation> dbSocialRelationList = platElderSocialRelationService.list(new QueryWrapper<PlatElderSocialRelation>().lambda()
.eq(PlatElderSocialRelation::getElderId, id)); .eq(PlatElderSocialRelation::getElderId, id));
List<PlatElderSocialRelationDTOVO> socialRelationList = BeanDtoVoUtils.listVo(dbSocialRelationList, PlatElderSocialRelationDTOVO.class); List<PlatElderSocialRelationDTOVO> socialRelationList = BeanDtoVoUtils.listVo(dbSocialRelationList, PlatElderSocialRelationDTOVO.class);
...@@ -263,6 +270,34 @@ public class PlatElderServiceImpl extends ServiceImpl<PlatElderMapper, PlatElder ...@@ -263,6 +270,34 @@ public class PlatElderServiceImpl extends ServiceImpl<PlatElderMapper, PlatElder
removeByIds(idList); removeByIds(idList);
} }
@Override
public List<PlatElderWechatSimpleVO> listMy() {
PlatElderChildrenInfoWechatVO childrenInfo = platElderChildrenInfoService.view();
List<String> idList = new ArrayList<>(10);
idList.add(-1 + "");
if (StringUtils.isBlank(childrenInfo.getElderId())) {
return new ArrayList<>(10);
}
idList.addAll(Arrays.asList(childrenInfo.getElderId().split(",")));
List<PlatElder> elderList = listByIds(idList);
List<PlatElderWechatSimpleVO> voList = BeanDtoVoUtils.listVo(elderList, PlatElderWechatSimpleVO.class);
FileUtil.convert(voList, PlatElderWechatSimpleVO::getAvatar, (e, f) -> {
e.setAvatarPath(f.getFullUrl());
});
Map<String, PlatElderWechatSimpleVO> map = StreamUtil.toMap(voList, PlatElderWechatSimpleVO::getId);
voList = Arrays.stream(childrenInfo.getElderId().split(",")).map(map::get).filter(Objects::nonNull).collect(Collectors.toList());
return voList;
}
} }
//TODO ywc 数据字典 //TODO ywc 数据字典
//还有空间相关的没有 列表 详情 导入 导出 //还有空间相关的没有 列表 详情 导入 导出
......
package com.makeit.vo.platform.alarm;
import com.makeit.common.dto.BaseTenantDTO;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
/**
* <p>
* 告警配置
* </p>
*
* @author eugene young
* @since 2023-09-04
*/
@Data
@EqualsAndHashCode(callSuper = true)
@ApiModel(value="PlatAlarmConfig对象", description="告警配置")
public class PlatAlarmConfigListVO extends BaseTenantDTO {
@ApiModelProperty(value = "告警类型 数据字典 1 长者跌倒 2 呼吸异常 3 心率异常 4 行为异常")
private String alarmType;
@ApiModelProperty(value = "状态 数据字典 1 启用 0 禁用")
private String status;
@ApiModelProperty(value = "内容")
private String content;
@ApiModelProperty(value = "内容(审核中)")
private String contentAudit;
@ApiModelProperty(value = "通知渠道 数据字典 1、短信 2、邮件 3、语音短信 可多选")
private String notifyChannel;
@ApiModelProperty(value = "通知对象 数据字典 1 全部 2 选择人员")
private String notifyWay;
@ApiModelProperty(value = "通知人员")
private String notifyUser;
@ApiModelProperty(value = "通知人员名称")
private String notifyUserName;
@ApiModelProperty(value = "说明")
private String description;
}
package com.makeit.vo.wechat.elder;
import com.makeit.common.dto.BaseTenantDTO;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
/**
* <p>
* 长者子女账号
* </p>
*
* @author eugene young
* @since 2023-08-29
*/
@Data
@EqualsAndHashCode(callSuper = true)
@ApiModel(value="ElderChildrenInfo对象", description="长者子女账号")
public class PlatElderChildrenInfoWechatVO extends BaseTenantDTO {
@ApiModelProperty(value = "长者id")
private String elderId;
@ApiModelProperty(value = "姓名")
private String name;
@ApiModelProperty(value = "手机号码")
private String phone;
@ApiModelProperty(value = "微信头像路径")
private String avatar;
}
package com.makeit.vo.wechat.elder;
import com.makeit.common.dto.BaseTenantDTO;
import com.makeit.enums.platform.elder.PlatElderEnum;
import com.makeit.global.validator.DictEnum;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
/**
* <p>
* 长者基本信息
* </p>
*
* @author eugene young
* @since 2023-08-29
*/
@Data
@EqualsAndHashCode(callSuper = true)
@ApiModel(value = "Elder对象", description = "长者基本信息")
public class PlatElderWechatSimpleVO extends BaseTenantDTO {
@ApiModelProperty(value = "姓名")
private String name;
@ApiModelProperty(value = "年龄")
private Integer age;
@DictEnum(em = PlatElderEnum.SexEnum.class, message = "性别可选值为{m}")
@ApiModelProperty(value = "性别 数据字典 1 男 2 女")
private String sex;
@ApiModelProperty(value = "证件类型")
private String certificateType;
@ApiModelProperty(value = "证件号码")
private String certificateNumber;
@ApiModelProperty(value = "手机号码")
private String phone;
@ApiModelProperty(value = "家庭地址")
private String homeAddress;
@ApiModelProperty(value = "家庭省code")
private String homeProvinceCode;
@ApiModelProperty(value = "家庭省名称")
private String homeProvinceName;
@ApiModelProperty(value = "家庭市code")
private String homeCityCode;
@ApiModelProperty(value = "家庭市名称")
private String homeCityName;
@ApiModelProperty(value = "家庭区code")
private String homeDistrictCode;
@ApiModelProperty(value = "家庭区名称")
private String homeDistrictName;
@ApiModelProperty(value = "头像文件id")
private String avatar;
@ApiModelProperty(value = "头像文件路径")
private String avatarPath;
@ApiModelProperty(value = "家庭地址详细")
private String homeAddressDetail;
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment