Commit 0b6f034d authored by 赵啸非's avatar 赵啸非

添加关怀配置控制

parent 90054b56
...@@ -69,19 +69,30 @@ CREATE TABLE mortals_xhx_care_records( ...@@ -69,19 +69,30 @@ CREATE TABLE mortals_xhx_care_records(
`name` varchar(50) COMMENT '姓名', `name` varchar(50) COMMENT '姓名',
`contact` varchar(50) COMMENT '联系方式', `contact` varchar(50) COMMENT '联系方式',
`idCard` varchar(18) COMMENT '身份证号码', `idCard` varchar(18) COMMENT '身份证号码',
`bussinessId` bigint(20) COMMENT '业务Id',
`bussinessName` varchar(255) COMMENT '预约业务',
`service` varchar(50) COMMENT '办理业务', `service` varchar(50) COMMENT '办理业务',
`queueNo` varchar(20) COMMENT '排队编号', `queueNo` varchar(20) COMMENT '排队编号',
`takeTime` datetime COMMENT '排队开始时间',
`callTime` datetime COMMENT '排队结束时间',
`monitorTime` datetime COMMENT '监测时间', `monitorTime` datetime COMMENT '监测时间',
`monitorDeviceId` bigint(20) COMMENT '监测设备id', `monitorDeviceIds` varchar(128) COMMENT '监测设备ids',
`monitorDevice` varchar(50) COMMENT '监测设备', `monitorDevice` varchar(50) COMMENT '监测设备',
`waitTime` int(11) COMMENT '最终等待时长,秒', `waitTime` int(4) COMMENT '最终等待时长,秒',
`processStatus` varchar(20) COMMENT '办理状态(排队中.排队中,办理中.办理中,接件结束.接件结束)', `processStatus` varchar(20) DEFAULT '排队中' COMMENT '办理状态(排队中,办理中,接件结束)',
`careCount` int(4) DEFAULT '0' COMMENT '关怀次数',
`assessment` varchar(255) COMMENT '评价',
`createTime` datetime COMMENT '创建时间', `createTime` datetime COMMENT '创建时间',
`createUserId` bigint(20) COMMENT '创建人ID', `createUserId` bigint(20) COMMENT '创建人ID',
`updateTime` datetime COMMENT '更新时间', `updateTime` datetime COMMENT '更新时间',
`updateUserId` bigint(20) COMMENT '更新人ID', `updateUserId` bigint(20) COMMENT '更新人ID',
`smsCount` int(4) DEFAULT '0' COMMENT '短信发送次数',
PRIMARY KEY (`id`) PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='预约关怀记录'; ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='预约关怀记录';
-- ---------------------------- -- ----------------------------
-- 预约自动签到配置表 -- 预约自动签到配置表
-- ---------------------------- -- ----------------------------
......
...@@ -32,9 +32,8 @@ ...@@ -32,9 +32,8 @@
<profiles.log.level>info</profiles.log.level> <profiles.log.level>info</profiles.log.level>
<profiles.publish.path>/home/publish</profiles.publish.path> <profiles.publish.path>/home/publish</profiles.publish.path>
<profiles.php.host>http://192.168.0.98:8090</profiles.php.host> <profiles.php.host>http://192.168.0.98:8090</profiles.php.host>
<profiles.sms.smsSendUrl>http://127.0.0.1:8089/api/index/index</profiles.sms.smsSendUrl> <profiles.sms.smsSendUrl>http://sms.wx3.com.cn</profiles.sms.smsSendUrl>
<profiles.sms.apiId>k6BVS1PEbyzcJAE4</profiles.sms.apiId> <profiles.sms.apiId>ADsUXLrS81vZDU95</profiles.sms.apiId>
<profiles.sms.type>3</profiles.sms.type>
<profiles.hik.host>8.136.255.30:8001</profiles.hik.host> <profiles.hik.host>8.136.255.30:8001</profiles.hik.host>
<profiles.hik.appKey>25128371</profiles.hik.appKey> <profiles.hik.appKey>25128371</profiles.hik.appKey>
<profiles.hik.appSecret>2m9RcPJOKq5j2QPQM4v5</profiles.hik.appSecret> <profiles.hik.appSecret>2m9RcPJOKq5j2QPQM4v5</profiles.hik.appSecret>
...@@ -57,9 +56,8 @@ ...@@ -57,9 +56,8 @@
<profiles.log.path>/home/mortals/app/logs</profiles.log.path> <profiles.log.path>/home/mortals/app/logs</profiles.log.path>
<profiles.log.level>INFO</profiles.log.level> <profiles.log.level>INFO</profiles.log.level>
<profiles.php.host>http://192.168.0.98:8090</profiles.php.host> <profiles.php.host>http://192.168.0.98:8090</profiles.php.host>
<profiles.sms.smsSendUrl>http://127.0.0.1:8089/api/index/index</profiles.sms.smsSendUrl> <profiles.sms.smsSendUrl>http://sms.wx3.com.cn</profiles.sms.smsSendUrl>
<profiles.sms.apiId>k6BVS1PEbyzcJAE4</profiles.sms.apiId> <profiles.sms.apiId>ADsUXLrS81vZDU95</profiles.sms.apiId>
<profiles.sms.type>3</profiles.sms.type>
<profiles.hik.host>8.136.255.30:8001</profiles.hik.host> <profiles.hik.host>8.136.255.30:8001</profiles.hik.host>
<profiles.hik.appKey>25128371</profiles.hik.appKey> <profiles.hik.appKey>25128371</profiles.hik.appKey>
<profiles.hik.appSecret>2m9RcPJOKq5j2QPQM4v5</profiles.hik.appSecret> <profiles.hik.appSecret>2m9RcPJOKq5j2QPQM4v5</profiles.hik.appSecret>
......
package com.mortals.xhx.busiz.req;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.annotation.JSONField;
import lombok.Data;
/**
* 短信发送类
*
* @author:
* @date: 2022/9/7 14:35
*/
@Data
public class SmsThirdPartyReq {
/**
*
*/
@JSONField(serialize=false)
private Long alarmSmsSendId;
/**
* appid
*/
private String appid;
/**
* 手机号码
*/
private String phone;
/**
* 模板号
*/
private String type;
/**
* 内容
*/
private String json;
public static void main(String[] args) {
SmsThirdPartyReq smsThirdPartyReq = new SmsThirdPartyReq();
smsThirdPartyReq.setAlarmSmsSendId(0L);
smsThirdPartyReq.setAppid("12");
smsThirdPartyReq.setPhone("31");
smsThirdPartyReq.setType("123");
smsThirdPartyReq.setJson("13213");
System.out.println(JSON.toJSONString(smsThirdPartyReq));
}
}
package com.mortals.xhx.busiz.rsp;
import lombok.Data;
/**
* @author karlhoo
*/
@Data
public class ApiSmsResp<T> {
/**
* 结果编码
*/
private int code;
/**
* 结果描述
*/
private String message;
/**
* 响应数据
*/
private T data;
}
package com.mortals.xhx.busiz.rsp.wait;
import com.alibaba.fastjson.annotation.JSONField;
import lombok.Data;
import java.util.Date;
@Data
public class FinPersonInfo {
@JSONField(name = "id")
private Long waitId;
@JSONField(name = "calltime", format = "yyyy-MM-dd HH:mm:ss")
private Date calltime;
}
\ No newline at end of file
package com.mortals.xhx.busiz.rsp.wait;
import com.alibaba.fastjson.annotation.JSONField;
import lombok.Data;
import java.util.Date;
@Data
public class WaitPersonInfo {
@JSONField(name = "birthday")
private int birthday;
@JSONField(name = "business_name")
private String businessName;
@JSONField(name = "flownum")
private String flowNum;
@JSONField(name = "idcard_IDCardNo")
private String idcardIDCardNo;
@JSONField(name = "businessid")
private Long businessId;
@JSONField(name = "count")
private String count;
@JSONField(name = "idcard_Name")
private String idcardName;
@JSONField(name = "idcard_Address")
private String idcardAddress;
@JSONField(name = "idcard_Sex")
private String idcardSex;
@JSONField(name = "peopleid")
private String peopleId;
@JSONField(name = "phone")
private String phone;
@JSONField(name = "id")
private Long waitId;
@JSONField(name = "idcardData_PhotoFileName")
private String idcardDataPhotoFileName;
@JSONField(name = "taketime",format = "yyyy-MM-dd HH:mm:ss")
private Date takeTime;
}
\ No newline at end of file
package com.mortals.xhx.common.code;
import java.util.LinkedHashMap;
import java.util.Map;
public enum WeekDayEnum {
星期一(1, "monday"),
星期二(2, "tuesday"),
星期三(3, "wednesday"),
星期四(4, "thursday"),
星期五(5, "friday"),
星期六(6, "saturday"),
星期日(7, "sunday");
private int value;
private String desc;
private WeekDayEnum(int value, String desc) {
this.value = value;
this.desc = desc;
}
public int getValue() {
return this.value;
}
public String getDesc() {
return this.desc;
}
public static WeekDayEnum getByValue(int value) {
WeekDayEnum[] var1 = values();
int var2 = var1.length;
for (int var3 = 0; var3 < var2; ++var3) {
WeekDayEnum examStatus = var1[var3];
if (examStatus.getValue() == value) {
return examStatus;
}
}
return null;
}
public static Map<String, String> getEnumMap(int... eItem) {
Map<String, String> resultMap = new LinkedHashMap();
WeekDayEnum[] var2 = values();
int var3 = var2.length;
for (int var4 = 0; var4 < var3; ++var4) {
WeekDayEnum item = var2[var4];
try {
boolean hasE = false;
int[] var7 = eItem;
int var8 = eItem.length;
for (int var9 = 0; var9 < var8; ++var9) {
int e = var7[var9];
if (item.getValue() == e) {
hasE = true;
break;
}
}
if (!hasE) {
resultMap.put(item.getValue() + "", item.getDesc());
}
} catch (Exception var11) {
}
}
return resultMap;
}
}
\ No newline at end of file
...@@ -33,6 +33,6 @@ public class ParamKey { ...@@ -33,6 +33,6 @@ public class ParamKey {
public static String SYS_PARAM_LOG_TIME = "log_time"; public static String SYS_PARAM_LOG_TIME = "log_time";
public static String SYS_PARAM_USER_URL = "user_url"; public static String SYS_PARAM_SMS_PERSON_CARE_TYPE = "25";
} }
...@@ -15,8 +15,14 @@ public class RedisKey { ...@@ -15,8 +15,14 @@ public class RedisKey {
public static final String KEY_DEVICE_ONLINE_CACHE = "device:online:"; public static final String KEY_DEVICE_ONLINE_CACHE = "device:online:";
/**
public static final String KEY_SITE_CACHE = "siteDict"; * 排队等待人群
*/
public static final String KEY_WAITNUM_LIST_CACHE = "takeData";
/**
* 完成业务人群
*/
public static final String KEY_FIN_LIST_CACHE = "callData";
public static final String KEY_PLATFORM_CACHE = "platformDict"; public static final String KEY_PLATFORM_CACHE = "platformDict";
......
...@@ -98,11 +98,11 @@ public class SyncAppointmentPersonTaskImpl implements ITaskExcuteService { ...@@ -98,11 +98,11 @@ public class SyncAppointmentPersonTaskImpl implements ITaskExcuteService {
if (!ObjectUtils.isEmpty(appointUserList)) { if (!ObjectUtils.isEmpty(appointUserList)) {
//查询今天添加的预约 并删除 //查询今天添加的预约 并删除
AppointmentPersonQuery appointmentPersonQuery = new AppointmentPersonQuery(); AppointmentPersonQuery appointmentPersonQuery = new AppointmentPersonQuery();
appointmentPersonQuery.setCreateTimeStart(DateUtil.format(new Date(),"yyyy-MM-dd")); appointmentPersonQuery.setCreateTimeStart(DateUtil.format(new Date(), "yyyy-MM-dd"));
appointmentPersonQuery.setCreateTimeEnd(DateUtil.format(new Date(),"yyyy-MM-dd")); appointmentPersonQuery.setCreateTimeEnd(DateUtil.format(new Date(), "yyyy-MM-dd"));
Long[] ids = appointmentPersonService.find(appointmentPersonQuery).stream().map(i -> i.getId()).toArray(Long[]::new); Long[] ids = appointmentPersonService.find(appointmentPersonQuery).stream().map(i -> i.getId()).toArray(Long[]::new);
if(!ObjectUtils.isEmpty(ids)){ if (!ObjectUtils.isEmpty(ids)) {
appointmentPersonService.remove(ids,null); appointmentPersonService.remove(ids, null);
} }
List<AppointmentPersonEntity> newUserList = appointUserList.stream().map(user -> { List<AppointmentPersonEntity> newUserList = appointUserList.stream().map(user -> {
AppointmentPersonEntity appointmentPersonEntity = new AppointmentPersonEntity(); AppointmentPersonEntity appointmentPersonEntity = new AppointmentPersonEntity();
...@@ -141,65 +141,6 @@ public class SyncAppointmentPersonTaskImpl implements ITaskExcuteService { ...@@ -141,65 +141,6 @@ public class SyncAppointmentPersonTaskImpl implements ITaskExcuteService {
} }
/**
* 获取封装得MultipartFile
*
* @param inputStream inputStream
* @param fileName fileName
* @return MultipartFile
*/
public MultipartFile getMultipartFile(InputStream inputStream, String fileName) {
FileItem fileItem = createFileItem(inputStream, fileName);
//CommonsMultipartFile是feign对multipartFile的封装,但是要FileItem类对象
return new CommonsMultipartFile(fileItem);
}
/**
* FileItem类对象创建
*
* @param inputStream inputStream
* @param fileName fileName
* @return FileItem
*/
public FileItem createFileItem(InputStream inputStream, String fileName) {
FileItemFactory factory = new DiskFileItemFactory(16, null);
String textFieldName = "file";
FileItem item = factory.createItem(textFieldName, MediaType.MULTIPART_FORM_DATA_VALUE, true, fileName);
int bytesRead = 0;
byte[] buffer = new byte[10 * 1024 * 1024];
OutputStream os = null;
//使用输出流输出输入流的字节
try {
os = item.getOutputStream();
while ((bytesRead = inputStream.read(buffer, 0, 8192)) != -1) {
os.write(buffer, 0, bytesRead);
}
inputStream.close();
} catch (IOException e) {
log.error("Stream copy exception", e);
throw new IllegalArgumentException("文件上传失败");
} finally {
if (os != null) {
try {
os.close();
} catch (IOException e) {
log.error("Stream close exception", e);
}
}
if (inputStream != null) {
try {
inputStream.close();
} catch (IOException e) {
log.error("Stream close exception", e);
}
}
}
return item;
}
public static void main(String[] args) { public static void main(String[] args) {
......
...@@ -92,7 +92,6 @@ public class SyncRegisterUserTaskImpl implements ITaskExcuteService { ...@@ -92,7 +92,6 @@ public class SyncRegisterUserTaskImpl implements ITaskExcuteService {
//根据数量查询 //根据数量查询
String registerPath = "/inter/Actuary/peopleList"; String registerPath = "/inter/Actuary/peopleList";
String url = host + registerPath; String url = host + registerPath;
Map<String, Object> params = new HashMap<>(); Map<String, Object> params = new HashMap<>();
params.put("page", 1); params.put("page", 1);
params.put("size", 1); params.put("size", 1);
...@@ -116,6 +115,10 @@ public class SyncRegisterUserTaskImpl implements ITaskExcuteService { ...@@ -116,6 +115,10 @@ public class SyncRegisterUserTaskImpl implements ITaskExcuteService {
log.info("注册用户总数量:{}", userList.size()); log.info("注册用户总数量:{}", userList.size());
if (!ObjectUtils.isEmpty(userList)) { if (!ObjectUtils.isEmpty(userList)) {
List<PersonEntity> newUserList = userList.stream().map(user -> { List<PersonEntity> newUserList = userList.stream().map(user -> {
if (ObjectUtils.isEmpty(user.getIdcardIDCardNo())) {
return null;
}
PersonEntity personEntity = new PersonEntity(); PersonEntity personEntity = new PersonEntity();
personEntity.initAttrValue(); personEntity.initAttrValue();
personEntity.setName(user.getIdcardName()); personEntity.setName(user.getIdcardName());
...@@ -125,13 +128,13 @@ public class SyncRegisterUserTaskImpl implements ITaskExcuteService { ...@@ -125,13 +128,13 @@ public class SyncRegisterUserTaskImpl implements ITaskExcuteService {
personEntity.setAddress(user.getIdcardAddress()); personEntity.setAddress(user.getIdcardAddress());
try { try {
personEntity.setBirthday(DateUtil.parse(IdcardUtil.getBirth(user.getIdcardIDCardNo()), "yyyyMMdd")); personEntity.setBirthday(DateUtil.parse(IdcardUtil.getBirth(user.getIdcardIDCardNo()), "yyyyMMdd"));
}catch (Exception e){ } catch (Exception e) {
} }
personEntity.setSourceId(user.getId()); personEntity.setSourceId(user.getId());
personEntity.setSource(SourceEnum.排队叫号系统.getValue()); personEntity.setSource(SourceEnum.排队叫号系统.getValue());
personEntity.setSourcePhotoUri(user.getIdcardDataPhotoFileName()); personEntity.setSourcePhotoUri(user.getIdcardDataPhotoFileName());
return personEntity; return personEntity;
}).collect(Collectors.toList()); }).filter(f -> f != null).collect(Collectors.toList());
List<PersonEntity> oldUserList = personService.find(new PersonQuery()); List<PersonEntity> oldUserList = personService.find(new PersonQuery());
Map<String, PersonEntity> oldUserMap = oldUserList.stream().collect(Collectors.toMap(x -> x.getIdCard(), y -> y, (o, n) -> n)); Map<String, PersonEntity> oldUserMap = oldUserList.stream().collect(Collectors.toMap(x -> x.getIdCard(), y -> y, (o, n) -> n));
...@@ -212,13 +215,13 @@ public class SyncRegisterUserTaskImpl implements ITaskExcuteService { ...@@ -212,13 +215,13 @@ public class SyncRegisterUserTaskImpl implements ITaskExcuteService {
for (PersonEntity personEntity : collect) { for (PersonEntity personEntity : collect) {
//下载图片到本地保存并更新 //下载图片到本地保存并更新
String downUrl = url + personEntity.getSourcePhotoUri(); String downUrl = url + personEntity.getSourcePhotoUri();
// String downUrl = "http://192.168.0.98:11078/file/fileupload/1679215657433.jpg"; // String downUrl = "http://192.168.0.98:11078/file/fileupload/1679215657433.jpg";
log.info("downUrl:{}",downUrl); log.info("downUrl:{}", downUrl);
byte[] bytes = HttpUtil.downloadBytes(downUrl); byte[] bytes = HttpUtil.downloadBytes(downUrl);
if(bytes.length>0){ if (bytes.length > 0) {
InputStream inputStream = new ByteArrayInputStream(bytes); InputStream inputStream = new ByteArrayInputStream(bytes);
MultipartFile file = getMultipartFile(inputStream, "photo.jpg"); MultipartFile file = getMultipartFile(inputStream, "photo.jpg");
String filePath = uploadService.saveFileUpload(file, "file/fileupload",null); String filePath = uploadService.saveFileUpload(file, "file/fileupload", null);
personEntity.setPhoto(filePath); personEntity.setPhoto(filePath);
personService.update(personEntity); personService.update(personEntity);
} }
......
定时任务,实现接口:com.mortals.framework.service.ITaskExcuteService
\ No newline at end of file
...@@ -73,7 +73,6 @@ public class CareConfigEntity extends CareConfigVo { ...@@ -73,7 +73,6 @@ public class CareConfigEntity extends CareConfigVo {
/** /**
* 消息发送对象(办事群众.办事群众,管理员.管理员) * 消息发送对象(办事群众.办事群众,管理员.管理员)
*/ */
@Excel(name = "消息发送对象", readConverterExp = "办事群众=办事群众,管理员.管理员")
private String msgRecipients; private String msgRecipients;
/** /**
* 备注 * 备注
......
package com.mortals.xhx.module.care.model; package com.mortals.xhx.module.care.model;
import java.util.Date; import java.util.Date;
import java.util.List; import java.util.List;
import java.util.ArrayList; import java.util.ArrayList;
...@@ -7,272 +6,100 @@ import com.fasterxml.jackson.annotation.JsonFormat; ...@@ -7,272 +6,100 @@ import com.fasterxml.jackson.annotation.JsonFormat;
import com.mortals.framework.annotation.Excel; import com.mortals.framework.annotation.Excel;
import com.mortals.framework.model.BaseEntityLong; import com.mortals.framework.model.BaseEntityLong;
import com.mortals.xhx.module.care.model.vo.CareRecordsVo; import com.mortals.xhx.module.care.model.vo.CareRecordsVo;
import lombok.Data;
/** /**
* 预约关怀记录实体对象 * 预约关怀记录实体对象
* *
* @author zxfei * @author zxfei
* @date 2023-04-09 * @date 2023-04-18
*/ */
@Data
public class CareRecordsEntity extends CareRecordsVo { public class CareRecordsEntity extends CareRecordsVo {
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
/** /**
* 站点Id * 站点Id
*/ */
private Long siteId; private Long siteId;
/** /**
* 站点名称 * 站点名称
*/ */
private String siteName; private String siteName;
/** /**
* 个人信息ID * 个人信息ID
*/ */
@Excel(name = "个人信息ID")
private Long personId; private Long personId;
/** /**
* 姓名 * 姓名
*/ */
@Excel(name = "姓名")
private String name; private String name;
/** /**
* 联系方式 * 联系方式
*/ */
@Excel(name = "联系方式")
private String contact; private String contact;
/** /**
* 身份证号码 * 身份证号码
*/ */
@Excel(name = "身份证号码")
private String idCard; private String idCard;
/** /**
* 办理业务 * 业务Id
*/ */
@Excel(name = "办理业务") private Long bussinessId;
/**
* 预约业务
*/
private String bussinessName;
/**
* 办理业务
*/
private String service; private String service;
/** /**
* 排队编号 * 排队编号
*/ */
@Excel(name = "排队编号")
private String queueNo; private String queueNo;
/** /**
* 监测时间 * 排队开始时间
*/ */
@Excel(name = "监测时间", width = 30, dateFormat = "yyyy-MM-dd") private Date takeTime;
/**
* 排队结束时间
*/
private Date callTime;
/**
* 监测时间
*/
private Date monitorTime; private Date monitorTime;
/** /**
* 监测设备id * 监测设备ids
*/ */
@Excel(name = "监测设备id") private String monitorDeviceIds;
private Long monitorDeviceId;
/** /**
* 监测设备 * 监测设备
*/ */
@Excel(name = "监测设备")
private String monitorDevice; private String monitorDevice;
/** /**
* 最终等待时长,秒 * 最终等待时长,秒
*/ */
@Excel(name = "最终等待时长,秒") private Integer waitTime;
private Long waitTime;
/** /**
* 办理状态(排队中.排队中,办理中.办理中,接件结束.接件结束) * 办理状态(排队中,办理中,接件结束)
*/ */
@Excel(name = "办理状态", readConverterExp = "排队中=排队中,办理中.办理中,接件结束.接件结束")
private String processStatus; private String processStatus;
public CareRecordsEntity(){}
/**
* 获取 站点Id
* @return Long
*/
public Long getSiteId(){
return siteId;
}
/**
* 设置 站点Id
* @param siteId
*/
public void setSiteId(Long siteId){
this.siteId = siteId;
}
/**
* 获取 站点名称
* @return String
*/
public String getSiteName(){
return siteName;
}
/**
* 设置 站点名称
* @param siteName
*/
public void setSiteName(String siteName){
this.siteName = siteName;
}
/**
* 获取 个人信息ID
* @return Long
*/
public Long getPersonId(){
return personId;
}
/**
* 设置 个人信息ID
* @param personId
*/
public void setPersonId(Long personId){
this.personId = personId;
}
/**
* 获取 姓名
* @return String
*/
public String getName(){
return name;
}
/**
* 设置 姓名
* @param name
*/
public void setName(String name){
this.name = name;
}
/**
* 获取 联系方式
* @return String
*/
public String getContact(){
return contact;
}
/** /**
* 设置 联系方式 * 关怀次数
* @param contact */
*/ private Integer careCount;
public void setContact(String contact){
this.contact = contact;
}
/** /**
* 获取 身份证号码 * 评价
* @return String */
*/ private String assessment;
public String getIdCard(){
return idCard;
}
/** /**
* 设置 身份证号码 * 短信发送次数
* @param idCard */
*/ private Integer smsCount;
public void setIdCard(String idCard){
this.idCard = idCard;
}
/**
* 获取 办理业务
* @return String
*/
public String getService(){
return service;
}
/**
* 设置 办理业务
* @param service
*/
public void setService(String service){
this.service = service;
}
/**
* 获取 排队编号
* @return String
*/
public String getQueueNo(){
return queueNo;
}
/**
* 设置 排队编号
* @param queueNo
*/
public void setQueueNo(String queueNo){
this.queueNo = queueNo;
}
/**
* 获取 监测时间
* @return Date
*/
public Date getMonitorTime(){
return monitorTime;
}
/**
* 设置 监测时间
* @param monitorTime
*/
public void setMonitorTime(Date monitorTime){
this.monitorTime = monitorTime;
}
/**
* 获取 监测设备id
* @return Long
*/
public Long getMonitorDeviceId(){
return monitorDeviceId;
}
/**
* 设置 监测设备id
* @param monitorDeviceId
*/
public void setMonitorDeviceId(Long monitorDeviceId){
this.monitorDeviceId = monitorDeviceId;
}
/**
* 获取 监测设备
* @return String
*/
public String getMonitorDevice(){
return monitorDevice;
}
/**
* 设置 监测设备
* @param monitorDevice
*/
public void setMonitorDevice(String monitorDevice){
this.monitorDevice = monitorDevice;
}
/**
* 获取 最终等待时长,秒
* @return Long
*/
public Long getWaitTime(){
return waitTime;
}
/**
* 设置 最终等待时长,秒
* @param waitTime
*/
public void setWaitTime(Long waitTime){
this.waitTime = waitTime;
}
/**
* 获取 办理状态(排队中.排队中,办理中.办理中,接件结束.接件结束)
* @return String
*/
public String getProcessStatus(){
return processStatus;
}
/**
* 设置 办理状态(排队中.排队中,办理中.办理中,接件结束.接件结束)
* @param processStatus
*/
public void setProcessStatus(String processStatus){
this.processStatus = processStatus;
}
@Override @Override
public int hashCode() { public int hashCode() {
return this.getId().hashCode(); return this.getId().hashCode();
} }
@Override @Override
public boolean equals(Object obj) { public boolean equals(Object obj) {
...@@ -280,56 +107,52 @@ public class CareRecordsEntity extends CareRecordsVo { ...@@ -280,56 +107,52 @@ public class CareRecordsEntity extends CareRecordsVo {
if (obj instanceof CareRecordsEntity) { if (obj instanceof CareRecordsEntity) {
CareRecordsEntity tmp = (CareRecordsEntity) obj; CareRecordsEntity tmp = (CareRecordsEntity) obj;
if (this.getId() == tmp.getId()) { if (this.getId() == tmp.getId()) {
return true; return true;
} }
} }
return false; return false;
} }
public String toString(){
StringBuilder sb = new StringBuilder("");
sb.append(",siteId:").append(getSiteId());
sb.append(",siteName:").append(getSiteName());
sb.append(",personId:").append(getPersonId());
sb.append(",name:").append(getName());
sb.append(",contact:").append(getContact());
sb.append(",idCard:").append(getIdCard());
sb.append(",service:").append(getService());
sb.append(",queueNo:").append(getQueueNo());
sb.append(",monitorTime:").append(getMonitorTime());
sb.append(",monitorDeviceId:").append(getMonitorDeviceId());
sb.append(",monitorDevice:").append(getMonitorDevice());
sb.append(",waitTime:").append(getWaitTime());
sb.append(",processStatus:").append(getProcessStatus());
return sb.toString();
}
public void initAttrValue(){ public void initAttrValue(){
this.siteId = null; this.siteId = null;
this.siteName = "";
this.personId = null;
this.name = "";
this.contact = "";
this.idCard = "";
this.bussinessId = null;
this.bussinessName = "";
this.siteName = ""; this.service = "";
this.personId = null; this.queueNo = "";
this.name = ""; this.takeTime = null;
this.contact = ""; this.callTime = null;
this.idCard = ""; this.monitorTime = null;
this.service = ""; this.monitorDeviceIds = "";
this.queueNo = ""; this.monitorDevice = "";
this.monitorTime = null; this.waitTime = null;
this.monitorDeviceId = null; this.processStatus = "排队中";
this.monitorDevice = ""; this.careCount = 0;
this.waitTime = null; this.assessment = "";
this.processStatus = ""; this.smsCount = 0;
} }
} }
\ No newline at end of file
package com.mortals.xhx.module.care.model.vo; package com.mortals.xhx.module.care.model.vo;
import com.mortals.framework.annotation.Excel;
import com.mortals.framework.model.BaseEntityLong; import com.mortals.framework.model.BaseEntityLong;
import com.mortals.xhx.module.care.model.CareRecordsEntity; import com.mortals.xhx.module.care.model.CareRecordsEntity;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.Date;
import java.util.List; import java.util.List;
import lombok.Data; import lombok.Data;
/** /**
* 预约关怀记录视图对象 * 预约关怀记录视图对象
* *
* @author zxfei * @author zxfei
* @date 2023-04-09 * @date 2023-04-18
*/ */
@Data @Data
public class CareRecordsVo extends BaseEntityLong { public class CareRecordsVo extends BaseEntityLong {
/**
* 个人信息ID
*/
@Excel(name = "个人信息ID")
private Long personId;
/**
* 姓名
*/
@Excel(name = "姓名")
private String name;
/**
* 联系方式
*/
@Excel(name = "联系方式")
private String contact;
/**
* 身份证号码
*/
@Excel(name = "身份证号码")
private String idCard;
/**
* 预约业务
*/
@Excel(name = "预约业务")
private String bussinessName;
/**
* 办理业务
*/
@Excel(name = "办理业务")
private String service;
/**
* 排队编号
*/
@Excel(name = "排队编号")
private String queueNo;
/**
* 排队开始时间
*/
@Excel(name = "排队开始时间", width = 30, dateFormat = "yyyy-MM-dd")
private Date takeTime;
/**
* 监测时间
*/
@Excel(name = "监测时间", width = 30, dateFormat = "yyyy-MM-dd")
private Date monitorTime;
/**
* 监测设备ids
*/
@Excel(name = "监测设备ids")
private String monitorDeviceIds;
/**
* 监测设备
*/
@Excel(name = "监测设备")
private String monitorDevice;
/**
* 最终等待时长,秒
*/
@Excel(name = "最终等待时长,秒")
private Integer waitTime;
/**
* 办理状态(排队中,办理中,接件结束)
*/
@Excel(name = "办理状态", readConverterExp = "办理状态(排队中,办理中,接件结束)")
private String processStatus;
} }
\ No newline at end of file
package com.mortals.xhx.module.care.service; package com.mortals.xhx.module.care.service;
import com.mortals.framework.common.Rest; import com.mortals.framework.common.Rest;
import com.mortals.framework.model.Context; import com.mortals.framework.model.Context;
import com.mortals.framework.service.ICRUDService; import com.mortals.framework.service.ICRUDService;
import com.mortals.xhx.base.system.user.model.UserEntity;
import com.mortals.xhx.module.care.model.CareRecordsEntity; import com.mortals.xhx.module.care.model.CareRecordsEntity;
import org.springframework.web.bind.annotation.RequestBody; import org.springframework.web.bind.annotation.RequestBody;
/** /**
* CareRecordsService * CareRecordsService
* * <p>
* 预约关怀记录 service接口 * 预约关怀记录 service接口
* *
* @author zxfei * @author zxfei
* @date 2023-04-09 * @date 2023-04-09
*/ */
public interface CareRecordsService extends ICRUDService<CareRecordsEntity,Long>{ public interface CareRecordsService extends ICRUDService<CareRecordsEntity, Long> {
Rest<String> notice(CareRecordsEntity careRecordsEntity, Context context); Rest<String> notice(CareRecordsEntity careRecordsEntity, Context context);
......
package com.mortals.xhx.module.care.service.impl; package com.mortals.xhx.module.care.service.impl;
import cn.hutool.core.bean.BeanUtil;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.TypeReference;
import com.mortals.framework.common.Rest; import com.mortals.framework.common.Rest;
import org.springframework.stereotype.Service;
import com.mortals.framework.service.impl.AbstractCRUDServiceImpl;
import com.mortals.framework.exception.AppException; import com.mortals.framework.exception.AppException;
import com.mortals.framework.model.Context; import com.mortals.framework.model.Context;
import com.mortals.framework.service.impl.AbstractCRUDServiceImpl;
import com.mortals.framework.util.EntityUtil;
import com.mortals.framework.util.HttpUtil;
import com.mortals.xhx.base.system.user.model.UserEntity;
import com.mortals.xhx.base.system.user.service.UserService;
import com.mortals.xhx.busiz.req.SmsThirdPartyReq;
import com.mortals.xhx.busiz.rsp.ApiSmsResp;
import com.mortals.xhx.common.code.UserType;
import com.mortals.xhx.common.code.YesNoEnum;
import com.mortals.xhx.common.key.ParamKey;
import com.mortals.xhx.module.care.dao.CareRecordsDao; import com.mortals.xhx.module.care.dao.CareRecordsDao;
import com.mortals.xhx.module.care.model.CareRecordsEntity; import com.mortals.xhx.module.care.model.CareRecordsEntity;
import com.mortals.xhx.module.care.model.CareRecordsQuery;
import com.mortals.xhx.module.care.service.CareRecordsService; import com.mortals.xhx.module.care.service.CareRecordsService;
import com.mortals.xhx.module.notice.model.NoticeEntity;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang3.time.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Service;
import org.springframework.util.ObjectUtils;
import java.util.Date;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.stream.Collectors;
/** /**
* CareRecordsService * CareRecordsService
* 预约关怀记录 service实现 * 预约关怀记录 service实现
* *
* @author zxfei * @author zxfei
* @date 2023-04-09 * @date 2023-04-09
*/ */
@Service("careRecordsService") @Service("careRecordsService")
@Slf4j
public class CareRecordsServiceImpl extends AbstractCRUDServiceImpl<CareRecordsDao, CareRecordsEntity, Long> implements CareRecordsService { public class CareRecordsServiceImpl extends AbstractCRUDServiceImpl<CareRecordsDao, CareRecordsEntity, Long> implements CareRecordsService {
@Autowired
private UserService userService;
@Value("${sms.smsSendUrl:http://192.168.0.98:8089/api/index/index}")
private String smsSendUrl;
@Value("${sms.apiId:''}")
private String apiId;
@Override @Override
public Rest<String> notice(CareRecordsEntity careRecordsEntity, Context context) { public Rest<String> notice(CareRecordsEntity careRecordsEntity, Context context) {
//todo 通知负责人 //todo 通知负责人
UserEntity userEntity = new UserEntity();
userEntity.setUserType(UserType.SYSTEM.getValue());
List<UserEntity> userEntities = userService.find(userEntity);
List<NoticeEntity> noticeList = userEntities.stream().map(user -> {
NoticeEntity noticeEntity = new NoticeEntity();
noticeEntity.initAttrValue();
noticeEntity.setTitle("群众关怀信息");
noticeEntity.setExpireTime(DateUtils.addHours(new Date(), 1));
noticeEntity.setUserId(user.getId());
String content = "";
noticeEntity.setContent(content);
noticeEntity.setCreateTime(new Date());
noticeEntity.setCreateUserId(1L);
noticeEntity.setCreateUserName("system");
return noticeEntity;
}).collect(Collectors.toList());
if (ObjectUtils.isEmpty(noticeList)) {
//noticeService.save(noticeList);
}
return Rest.ok("通知负责人成功"); return Rest.ok("通知负责人成功");
} }
@Override @Override
public Rest<String> toCare(CareRecordsEntity careRecordsEntity, Context context) { public Rest<String> toCare(CareRecordsEntity careRecordsEntity, Context context) {
//todo 短信通知群众 if (ObjectUtils.isEmpty(careRecordsEntity.getContact())) {
return Rest.ok("通知群众成功"); return Rest.fail("手机号码不存在");
}
String resp = null;
try {
SmsThirdPartyReq smsThirdPartyReq = new SmsThirdPartyReq();
smsThirdPartyReq.setAppid(apiId);
smsThirdPartyReq.setPhone(careRecordsEntity.getContact());
smsThirdPartyReq.setType(ParamKey.SYS_PARAM_SMS_PERSON_CARE_TYPE);
Map<String, String> form = new HashMap<>();
EntityUtil.entityToMap(smsThirdPartyReq, form);
resp = HttpUtil.doPost(smsSendUrl, form);
ApiSmsResp<Void> apiSmsResp = JSON.parseObject(resp, new TypeReference<ApiSmsResp<Void>>() {
});
if (apiSmsResp.getCode() == YesNoEnum.YES.getValue()) {
//更新发送数量
CareRecordsQuery condition = new CareRecordsQuery();
condition.setId(careRecordsEntity.getId());
condition.setSmsCountIncrement(1);
this.update(condition, context);
return Rest.ok();
} else {
throw new AppException(apiSmsResp.getMessage());
}
} catch (Exception e) {
log.error("发送短信异常:", e);
return Rest.fail(e.getMessage());
}
} }
} }
\ No newline at end of file
...@@ -60,7 +60,7 @@ public class CareRecordsController extends BaseCRUDJsonBodyMappingController<Car ...@@ -60,7 +60,7 @@ public class CareRecordsController extends BaseCRUDJsonBodyMappingController<Car
Map<String, Object> model = new HashMap<>(); Map<String, Object> model = new HashMap<>();
String busiDesc = this.getModuleDesc() + "通知负责人"; String busiDesc = this.getModuleDesc() + "通知负责人";
try { try {
Rest<String> rest = this.service.notice(careRecordsEntity, getContext()); /* Rest<String> rest = this.service.notice(careRecordsEntity, getContext());
if(YesNoEnum.YES.getValue()==rest.getCode()){ if(YesNoEnum.YES.getValue()==rest.getCode()){
recordSysLog(request, busiDesc + " 【成功】"); recordSysLog(request, busiDesc + " 【成功】");
jsonObject.put(KEY_RESULT_DATA, model); jsonObject.put(KEY_RESULT_DATA, model);
...@@ -68,7 +68,7 @@ public class CareRecordsController extends BaseCRUDJsonBodyMappingController<Car ...@@ -68,7 +68,7 @@ public class CareRecordsController extends BaseCRUDJsonBodyMappingController<Car
jsonObject.put(KEY_RESULT_MSG, rest.getMsg()); jsonObject.put(KEY_RESULT_MSG, rest.getMsg());
}else { }else {
throw new AppException(rest.getMsg()); throw new AppException(rest.getMsg());
} }*/
} catch (Exception e) { } catch (Exception e) {
log.error(busiDesc, e); log.error(busiDesc, e);
jsonObject.put(KEY_RESULT_CODE, VALUE_RESULT_FAILURE); jsonObject.put(KEY_RESULT_CODE, VALUE_RESULT_FAILURE);
...@@ -87,7 +87,7 @@ public class CareRecordsController extends BaseCRUDJsonBodyMappingController<Car ...@@ -87,7 +87,7 @@ public class CareRecordsController extends BaseCRUDJsonBodyMappingController<Car
Map<String, Object> model = new HashMap<>(); Map<String, Object> model = new HashMap<>();
String busiDesc = this.getModuleDesc() + "toCare"; String busiDesc = this.getModuleDesc() + "toCare";
try { try {
Rest<String> rest = this.service.notice(careRecordsEntity, getContext()); /* Rest<String> rest = this.service.notice(careRecordsEntity, getContext());
if(YesNoEnum.YES.getValue()==rest.getCode()){ if(YesNoEnum.YES.getValue()==rest.getCode()){
recordSysLog(request, busiDesc + " 【成功】"); recordSysLog(request, busiDesc + " 【成功】");
jsonObject.put(KEY_RESULT_DATA, model); jsonObject.put(KEY_RESULT_DATA, model);
...@@ -95,7 +95,7 @@ public class CareRecordsController extends BaseCRUDJsonBodyMappingController<Car ...@@ -95,7 +95,7 @@ public class CareRecordsController extends BaseCRUDJsonBodyMappingController<Car
jsonObject.put(KEY_RESULT_MSG, rest.getMsg()); jsonObject.put(KEY_RESULT_MSG, rest.getMsg());
}else { }else {
throw new AppException(rest.getMsg()); throw new AppException(rest.getMsg());
} }*/
} catch (Exception e) { } catch (Exception e) {
log.error(busiDesc, e); log.error(busiDesc, e);
jsonObject.put(KEY_RESULT_CODE, VALUE_RESULT_FAILURE); jsonObject.put(KEY_RESULT_CODE, VALUE_RESULT_FAILURE);
......
package com.mortals.xhx.module.notice.web; package com.mortals.xhx.module.notice.web;
import com.mortals.framework.exception.AppException;
import com.mortals.framework.model.OrderCol;
import com.mortals.framework.web.BaseCRUDJsonBodyMappingController; import com.mortals.framework.web.BaseCRUDJsonBodyMappingController;
import com.mortals.xhx.base.system.param.service.ParamService; import com.mortals.xhx.base.system.param.service.ParamService;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
...@@ -6,45 +9,58 @@ import org.springframework.web.bind.annotation.RequestMapping; ...@@ -6,45 +9,58 @@ import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController; import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.bind.annotation.*; import org.springframework.web.bind.annotation.*;
import com.mortals.framework.model.Context; import com.mortals.framework.model.Context;
import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpServletResponse;
import com.mortals.framework.web.BaseCRUDJsonBodyMappingController; import com.mortals.framework.web.BaseCRUDJsonBodyMappingController;
import com.mortals.xhx.module.notice.model.NoticeEntity; import com.mortals.xhx.module.notice.model.NoticeEntity;
import com.mortals.xhx.module.notice.service.NoticeService; import com.mortals.xhx.module.notice.service.NoticeService;
import org.apache.commons.lang3.ArrayUtils; import org.apache.commons.lang3.ArrayUtils;
import com.mortals.framework.util.StringUtils; import com.mortals.framework.util.StringUtils;
import java.util.HashMap; import java.util.HashMap;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
import java.util.stream.Collectors; import java.util.stream.Collectors;
import com.alibaba.fastjson.JSONObject; import com.alibaba.fastjson.JSONObject;
import java.util.Arrays; import java.util.Arrays;
import org.springframework.web.bind.annotation.*; import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.MultipartFile; import org.springframework.web.multipart.MultipartFile;
import static com.mortals.framework.ap.SysConstains.*; import static com.mortals.framework.ap.SysConstains.*;
/** /**
* * 用户消息
* 用户消息 *
* * @author zxfei
* @author zxfei * @date 2023-04-15
* @date 2023-04-15 */
*/
@RestController @RestController
@RequestMapping("notice") @RequestMapping("notice")
public class NoticeController extends BaseCRUDJsonBodyMappingController<NoticeService,NoticeEntity,Long> { public class NoticeController extends BaseCRUDJsonBodyMappingController<NoticeService, NoticeEntity, Long> {
@Autowired @Autowired
private ParamService paramService; private ParamService paramService;
public NoticeController(){ public NoticeController() {
super.setModuleDesc( "用户消息"); super.setModuleDesc("用户消息");
} }
@Override @Override
protected void init(Map<String, Object> model, Context context) { protected void init(Map<String, Object> model, Context context) {
this.addDict(model, "read", paramService.getParamBySecondOrganize("Notice","read")); this.addDict(model, "read", paramService.getParamBySecondOrganize("Notice", "read"));
super.init(model, context); super.init(model, context);
} }
@Override
protected void doListBefore(NoticeEntity query, Map<String, Object> model, Context context) throws AppException {
query.setUserId(this.getContextUserId(context));
query.setOrderField("read");
query.setOrderKind(OrderCol.DESCENDING);
super.doListBefore(query, model, context);
}
} }
\ No newline at end of file
package com.mortals.xhx.module.person.model; package com.mortals.xhx.module.person.model;
import java.util.Date;
import java.util.List;
import java.util.ArrayList;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.mortals.framework.annotation.Excel; import com.mortals.framework.annotation.Excel;
import com.mortals.framework.model.BaseEntityLong;
import com.mortals.xhx.module.person.model.vo.PersonVo; import com.mortals.xhx.module.person.model.vo.PersonVo;
import lombok.Data;
import java.util.Date;
/** /**
* 注册人员实体对象 * 注册人员实体对象
* *
* @author zxfei * @author zxfei
* @date 2023-04-16 * @date 2023-04-16
*/ */
@Data
public class PersonEntity extends PersonVo { public class PersonEntity extends PersonVo {
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
...@@ -36,7 +35,6 @@ public class PersonEntity extends PersonVo { ...@@ -36,7 +35,6 @@ public class PersonEntity extends PersonVo {
/** /**
* 性别(0.男,1.女) * 性别(0.男,1.女)
*/ */
@Excel(name = "性别", readConverterExp = "0=男,1.女")
private Integer gender; private Integer gender;
/** /**
* 手机号码 * 手机号码
...@@ -85,241 +83,11 @@ public class PersonEntity extends PersonVo { ...@@ -85,241 +83,11 @@ public class PersonEntity extends PersonVo {
*/ */
private String ifaceGroupIndexCode; private String ifaceGroupIndexCode;
public PersonEntity(){}
/**
* 获取 站点Id
* @return Long
*/
public Long getSiteId(){
return siteId;
}
/**
* 设置 站点Id
* @param siteId
*/
public void setSiteId(Long siteId){
this.siteId = siteId;
}
/**
* 获取 站点名称
* @return String
*/
public String getSiteName(){
return siteName;
}
/**
* 设置 站点名称
* @param siteName
*/
public void setSiteName(String siteName){
this.siteName = siteName;
}
/**
* 获取 用户名称
* @return String
*/
public String getName(){
return name;
}
/**
* 设置 用户名称
* @param name
*/
public void setName(String name){
this.name = name;
}
/**
* 获取 身份证号码
* @return String
*/
public String getIdCard(){
return idCard;
}
/**
* 设置 身份证号码
* @param idCard
*/
public void setIdCard(String idCard){
this.idCard = idCard;
}
/**
* 获取 性别(0.男,1.女)
* @return Integer
*/
public Integer getGender(){
return gender;
}
/**
* 设置 性别(0.男,1.女)
* @param gender
*/
public void setGender(Integer gender){
this.gender = gender;
}
/**
* 获取 手机号码
* @return String
*/
public String getPhone(){
return phone;
}
/**
* 设置 手机号码
* @param phone
*/
public void setPhone(String phone){
this.phone = phone;
}
/**
* 获取 出生日期
* @return Date
*/
public Date getBirthday(){
return birthday;
}
/**
* 设置 出生日期
* @param birthday
*/
public void setBirthday(Date birthday){
this.birthday = birthday;
}
/**
* 获取 家庭住址
* @return String
*/
public String getAddress(){
return address;
}
/**
* 设置 家庭住址
* @param address
*/
public void setAddress(String address){
this.address = address;
}
/**
* 获取 本地照片路径
* @return String
*/
public String getPhoto(){
return photo;
}
/**
* 设置 本地照片路径
* @param photo
*/
public void setPhoto(String photo){
this.photo = photo;
}
/**
* 获取 原始照片路径
* @return String
*/
public String getSourcePhotoUri(){
return sourcePhotoUri;
}
/**
* 设置 原始照片路径
* @param sourcePhotoUri
*/
public void setSourcePhotoUri(String sourcePhotoUri){
this.sourcePhotoUri = sourcePhotoUri;
}
/**
* 获取 Php原始注册用户id
* @return Long
*/
public Long getSourceId(){
return sourceId;
}
/**
* 设置 Php原始注册用户id
* @param sourceId
*/
public void setSourceId(Long sourceId){
this.sourceId = sourceId;
}
/**
* 获取 备注
* @return String
*/
public String getRemark(){
return remark;
}
/**
* 设置 备注
* @param remark
*/
public void setRemark(String remark){
this.remark = remark;
}
/**
* 获取 注册人员来源(0.预约系统,1.排队叫号系统,2.自助服务系统,99.其它)
* @return Integer
*/
public Integer getSource(){
return source;
}
/**
* 设置 注册人员来源(0.预约系统,1.排队叫号系统,2.自助服务系统,99.其它)
* @param source
*/
public void setSource(Integer source){
this.source = source;
}
/**
* 获取 是否添加到海康人脸库(0.否,1.是)
* @return Integer
*/
public Integer getInFaceHk(){
return inFaceHk;
}
/**
* 设置 是否添加到海康人脸库(0.否,1.是)
* @param inFaceHk
*/
public void setInFaceHk(Integer inFaceHk){
this.inFaceHk = inFaceHk;
}
/**
* 获取 人脸的唯一标识
* @return String
*/
public String getIndexCode(){
return indexCode;
}
/**
* 设置 人脸的唯一标识
* @param indexCode
*/
public void setIndexCode(String indexCode){
this.indexCode = indexCode;
}
/**
* 获取 人脸所属的人脸分组的唯一标识
* @return String
*/
public String getIfaceGroupIndexCode(){
return ifaceGroupIndexCode;
}
/**
* 设置 人脸所属的人脸分组的唯一标识
* @param ifaceGroupIndexCode
*/
public void setIfaceGroupIndexCode(String ifaceGroupIndexCode){
this.ifaceGroupIndexCode = ifaceGroupIndexCode;
}
@Override @Override
public int hashCode() { public int hashCode() {
return this.getId().hashCode(); return this.getId().hashCode();
} }
@Override @Override
public boolean equals(Object obj) { public boolean equals(Object obj) {
if (obj == null) return false; if (obj == null) return false;
...@@ -332,28 +100,8 @@ public class PersonEntity extends PersonVo { ...@@ -332,28 +100,8 @@ public class PersonEntity extends PersonVo {
return false; return false;
} }
public String toString(){
StringBuilder sb = new StringBuilder("");
sb.append(",siteId:").append(getSiteId());
sb.append(",siteName:").append(getSiteName());
sb.append(",name:").append(getName());
sb.append(",idCard:").append(getIdCard());
sb.append(",gender:").append(getGender());
sb.append(",phone:").append(getPhone());
sb.append(",birthday:").append(getBirthday());
sb.append(",address:").append(getAddress());
sb.append(",photo:").append(getPhoto());
sb.append(",sourcePhotoUri:").append(getSourcePhotoUri());
sb.append(",sourceId:").append(getSourceId());
sb.append(",remark:").append(getRemark());
sb.append(",source:").append(getSource());
sb.append(",inFaceHk:").append(getInFaceHk());
sb.append(",indexCode:").append(getIndexCode());
sb.append(",ifaceGroupIndexCode:").append(getIfaceGroupIndexCode());
return sb.toString();
}
public void initAttrValue(){ public void initAttrValue() {
this.siteId = null; this.siteId = null;
......
package com.mortals.xhx.module.person.model.vo; package com.mortals.xhx.module.person.model.vo;
import com.mortals.framework.annotation.Excel;
import com.mortals.framework.model.BaseEntityLong; import com.mortals.framework.model.BaseEntityLong;
import com.mortals.xhx.module.person.model.PersonEntity; import com.mortals.xhx.module.person.model.PersonEntity;
import java.util.ArrayList; import java.util.ArrayList;
...@@ -13,4 +14,6 @@ import lombok.Data; ...@@ -13,4 +14,6 @@ import lombok.Data;
@Data @Data
public class PersonVo extends BaseEntityLong { public class PersonVo extends BaseEntityLong {
@Excel(name = "性别", readConverterExp = "0=男,1.女")
private Integer gender;
} }
\ No newline at end of file
...@@ -57,10 +57,9 @@ public class PersonController extends BaseCRUDJsonBodyMappingController<PersonSe ...@@ -57,10 +57,9 @@ public class PersonController extends BaseCRUDJsonBodyMappingController<PersonSe
} }
@Override @Override
public void doExportFileAfter(byte[] data, Context context) throws AppException { public void doExportBefore(Context context, PersonEntity query, List<String> properties) throws AppException {
InputStream inputStream = new ByteArrayInputStream(data); properties.add("性别");
MultipartFile file = ServletUtils.getMultipartFile(inputStream, "photo.jpg"); // super.doExportBefore(context, query, properties);
String filePath = uploadService.saveFileUpload(file, "file/fileupload",null);
} }
@Override @Override
......
...@@ -60,9 +60,9 @@ hystrix: ...@@ -60,9 +60,9 @@ hystrix:
sms: sms:
smsSendUrl: @profiles.sms.smsSendUrl@ smsSendUrl: @profiles.sms.smsSendUrl@
apiId: @profiles.sms.apiId@ apiId: @profiles.sms.apiId@
type: @profiles.sms.type@
php: php:
host: @profiles.php.host@ host: @profiles.php.host@
redisDb: 5
hik: hik:
host: @profiles.hik.host@ host: @profiles.hik.host@
appKey: @profiles.hik.appKey@ appKey: @profiles.hik.appKey@
......
package com.mortals.httpclient; package com.mortals.httpclient;
import cn.hutool.core.codec.Base64;
import cn.hutool.core.io.FileUtil;
import cn.hutool.http.HttpUtil;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;
import java.security.NoSuchAlgorithmException; import java.security.NoSuchAlgorithmException;
/** /**
...@@ -18,5 +25,22 @@ public class Test { ...@@ -18,5 +25,22 @@ public class Test {
// byte[] result = clipher.doFinal(plainText.getBytes()); // byte[] result = clipher.doFinal(plainText.getBytes());
// System.out.println(Base64.encodeBase64URLSafeString(result)); // System.out.println(Base64.encodeBase64URLSafeString(result));
String encode = Base64.encode(FileUtil.readBytes("F:\\pics\\background.jpg"));
JSONObject jsonObject = new JSONObject();
JSONArray jsonArray = new JSONArray();
JSONObject jsonObj = new JSONObject();
jsonObj.put("imageBase64",encode);
jsonArray.add(jsonObj);
jsonObject.put("userMatterDetails",jsonArray);
System.out.println(JSON.toJSONString(jsonObject));
String post = HttpUtil.post("http://192.168.0.98:11078/sst/user/matter/apply/save", JSON.toJSONString(jsonObject));
//String post = HttpUtil.post("http://192.168.0.98:11059/basics_api/sst/user/matter/apply/save", JSON.toJSONString(jsonObject));
System.out.println(post);
} }
} }
...@@ -67,5 +67,14 @@ Authorization: {{authToken}} ...@@ -67,5 +67,14 @@ Authorization: {{authToken}}
Accept: application/json Accept: application/json
###注册人员列表导出
POST {{baseUrl}}/person/exportExcel
Authorization: {{authToken}}
Content-Type: application/json
{
"page":1,
"size":10
}
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 to comment