新疆后端项目
This commit is contained in:
@@ -0,0 +1,51 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xmlns="http://maven.apache.org/POM/4.0.0"
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<parent>
|
||||
<artifactId>jeecg-system-api</artifactId>
|
||||
<groupId>org.jeecgframework.boot</groupId>
|
||||
<version>2.0.0</version>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<artifactId>jeecg-system-cloud-api</artifactId>
|
||||
|
||||
<dependencies>
|
||||
<!-- feign -->
|
||||
<dependency>
|
||||
<groupId>org.springframework.cloud</groupId>
|
||||
<artifactId>spring-cloud-starter-openfeign</artifactId>
|
||||
</dependency>
|
||||
<!-- 控制openfeign中bcpkix依赖的版本 -->
|
||||
<dependency>
|
||||
<groupId>org.bouncycastle</groupId>
|
||||
<artifactId>bcpkix-jdk18on</artifactId>
|
||||
</dependency>
|
||||
<!-- 阿里语音 -->
|
||||
<!-- async-http-client -->
|
||||
<dependency>
|
||||
<groupId>org.asynchttpclient</groupId>
|
||||
<artifactId>async-http-client</artifactId>
|
||||
<version>2.12.3</version>
|
||||
</dependency>
|
||||
<!-- nls-sdk-common -->
|
||||
<dependency>
|
||||
<groupId>com.alibaba.nls</groupId>
|
||||
<artifactId>nls-sdk-common</artifactId>
|
||||
<version>2.2.10</version>
|
||||
</dependency>
|
||||
<!-- jsoup替换文字含html标签 -->
|
||||
<dependency>
|
||||
<groupId>org.jsoup</groupId>
|
||||
<artifactId>jsoup</artifactId>
|
||||
<version>1.16.2</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>io.swagger.core.v3</groupId>
|
||||
<artifactId>swagger-annotations</artifactId>
|
||||
<version>2.2.9</version>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
|
||||
</dependencies>
|
||||
</project>
|
||||
+88
@@ -0,0 +1,88 @@
|
||||
package org.jeecg.bean.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
import org.jeecg.bean.enums.UserDataSourceEnum;
|
||||
import org.jeecg.common.aspect.annotation.Dict;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* @author feng
|
||||
* @Date: 2025-01-09
|
||||
* @Description: 用户三围记录表
|
||||
*/
|
||||
@Schema(description = "用户数据记录表三围记录")
|
||||
@Data
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
@TableName(value = "user_data_record_bwh")
|
||||
public class UserDataRecordBWH implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 主键ID
|
||||
*/
|
||||
@TableId(value = "id", type = IdType.ASSIGN_ID)
|
||||
@Schema(description = "主键ID")
|
||||
private String id;
|
||||
/**
|
||||
* 用户ID
|
||||
*/
|
||||
@Schema(description = "用户ID")
|
||||
private String userId;
|
||||
/**
|
||||
* 胸围(cm)
|
||||
*/
|
||||
@Schema(description = "胸围")
|
||||
private Double bust;
|
||||
/**
|
||||
* 腰围(cm)
|
||||
*/
|
||||
@Schema(description = "腰围(cm)")
|
||||
private Double waist;
|
||||
/**
|
||||
* 臀围(cm)
|
||||
*/
|
||||
@Schema(description = "臀围(cm)")
|
||||
private Double hip;
|
||||
/**
|
||||
* 腰臀比
|
||||
*/
|
||||
@Schema(description = "腰臀比")
|
||||
private Double waistHipRatio;
|
||||
/**
|
||||
* 数据来源(字典 data_source_dict)
|
||||
* @see UserDataSourceEnum 同枚举类
|
||||
*/
|
||||
@TableField(value = "data_source")
|
||||
@Schema(description = "数据来源(字典 data_source_dict)")
|
||||
@Dict(dicCode = "data_source_dict")
|
||||
private String dataSource;
|
||||
/**
|
||||
*创建人
|
||||
*/
|
||||
@Schema(title = "创建人")
|
||||
private String createBy;
|
||||
/**
|
||||
*创建时间
|
||||
*/
|
||||
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@Schema(title = "创建时间")
|
||||
private Date createTime;
|
||||
|
||||
|
||||
@TableField(exist = false)
|
||||
private long secondDiffer;
|
||||
|
||||
}
|
||||
+116
@@ -0,0 +1,116 @@
|
||||
package org.jeecg.bean.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.*;
|
||||
import lombok.experimental.Accessors;
|
||||
import org.jeecg.bean.enums.UserDataSourceEnum;
|
||||
import org.jeecg.common.aspect.annotation.Dict;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author Jiang Shunzhi
|
||||
* 用户数据记录表BMI
|
||||
*/
|
||||
@Schema(description = "用户数据记录表BMI")
|
||||
@Getter
|
||||
@Setter
|
||||
@Accessors(chain = true)
|
||||
@ToString
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
@TableName(value = "user_data_record_bmi")
|
||||
public class UserDataRecordBmi implements Serializable {
|
||||
public static final String COL_ID = "id";
|
||||
public static final String COL_USER_ID = "user_id";
|
||||
public static final String COL_HEIGHT = "height";
|
||||
public static final String COL_WEIGHT = "weight";
|
||||
public static final String COL_BMI = "bmi";
|
||||
public static final String COL_DATA_SOURCE = "data_source";
|
||||
public static final String COL_DATA_DATE = "data_date";
|
||||
public static final String COL_CREATE_TIME = "create_time";
|
||||
private static final long serialVersionUID = 1L;
|
||||
/**
|
||||
* 主键ID
|
||||
*/
|
||||
@TableId(value = "id", type = IdType.ASSIGN_ID)
|
||||
@Schema(description = "主键ID")
|
||||
private String id;
|
||||
/**
|
||||
* 用户ID
|
||||
*/
|
||||
@TableField(value = "user_id")
|
||||
@Schema(description = "用户ID")
|
||||
private String userId;
|
||||
/**
|
||||
* 身高(cm)
|
||||
*/
|
||||
@TableField(value = "height")
|
||||
@Schema(description = "身高(cm)")
|
||||
private BigDecimal height;
|
||||
/**
|
||||
* 体重(kg)
|
||||
*/
|
||||
@TableField(value = "weight")
|
||||
@Schema(description = "体重(kg)")
|
||||
private BigDecimal weight;
|
||||
/**
|
||||
* BMI
|
||||
*/
|
||||
@TableField(value = "bmi")
|
||||
@Schema(description = "BMI")
|
||||
private BigDecimal bmi;
|
||||
/**
|
||||
* 体脂肪率(%)
|
||||
*/
|
||||
@TableField(value = "fat_rate")
|
||||
@Schema(description = "体脂肪率(%)")
|
||||
private BigDecimal fatRate;
|
||||
/**
|
||||
* 数据来源(字典 data_source_dict)
|
||||
* @see UserDataSourceEnum 同枚举类
|
||||
*/
|
||||
@TableField(value = "data_source")
|
||||
@Schema(description = "数据来源(字典 data_source_dict)")
|
||||
@Dict(dicCode = "data_source_dict")
|
||||
private String dataSource;
|
||||
/**
|
||||
* 数据日期
|
||||
*/
|
||||
@TableField(value = "data_date")
|
||||
@Schema(description = "数据日期")
|
||||
private Date dataDate;
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
@TableField(value = "create_time")
|
||||
@Schema(description = "创建时间")
|
||||
private Date createTime;
|
||||
|
||||
@TableField(exist = false)
|
||||
private List<String> dataChannels;
|
||||
|
||||
@TableField(exist = false)
|
||||
private Double waist;
|
||||
|
||||
public UserDataRecordBmi(String userId, UserDataSourceEnum sourceEnum) {
|
||||
this.userId = userId;
|
||||
this.dataSource = sourceEnum.source;
|
||||
this.createTime = new Date();
|
||||
}
|
||||
|
||||
public UserDataRecordBmi(String userId, Double height, Double weight, UserDataSourceEnum sourceEnum) {
|
||||
this.userId = userId;
|
||||
this.height = BigDecimal.valueOf(height);
|
||||
this.weight = BigDecimal.valueOf(weight);
|
||||
this.dataSource = sourceEnum.source;
|
||||
this.createTime = new Date();
|
||||
}
|
||||
}
|
||||
+28
@@ -0,0 +1,28 @@
|
||||
package org.jeecg.bean.enums;
|
||||
|
||||
/**
|
||||
* 用户体征数据来源枚举类
|
||||
*/
|
||||
public enum UserDataSourceEnum {
|
||||
MEDICAL("1", "体检报告"),
|
||||
SELF_MANUAL("2", "员工自行维护"),
|
||||
ADMIN_MANUAL("3", "管理员后台维护"),
|
||||
WEIGHING("4", "体重秤测量结果"),
|
||||
WATCH("5", "手表监测数据"),
|
||||
BLUETOOTH("6", "蓝牙秤测量结果"),
|
||||
BODY_FAT_ANALYZER("7", "体脂仪");
|
||||
|
||||
/**
|
||||
*数据来源
|
||||
*/
|
||||
public String source;
|
||||
/**
|
||||
* 描述
|
||||
*/
|
||||
public String desc;
|
||||
|
||||
UserDataSourceEnum(String source, String desc) {
|
||||
this.source = source;
|
||||
this.desc = desc;
|
||||
}
|
||||
}
|
||||
+23
@@ -0,0 +1,23 @@
|
||||
package org.jeecg.bean.request;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import javax.validation.constraints.NotBlank;
|
||||
import javax.validation.constraints.NotEmpty;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author Junqiang Zhu
|
||||
* @date 2023-06-02 14:57
|
||||
*/
|
||||
@Data
|
||||
public class ChangeDepartBatch {
|
||||
@NotEmpty(message = "数据为空")
|
||||
private List<String> ids;
|
||||
@NotBlank(message = "审核状态为空")
|
||||
private String status;
|
||||
/**
|
||||
* 审核批文
|
||||
*/
|
||||
private String reason;
|
||||
}
|
||||
+68
@@ -0,0 +1,68 @@
|
||||
package org.jeecg.bean.request;
|
||||
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import lombok.Data;
|
||||
import lombok.ToString;
|
||||
import org.jeecgframework.poi.excel.annotation.Excel;
|
||||
|
||||
/**
|
||||
* @author lianlonggang
|
||||
* @date 2021/5/19 15:40
|
||||
*/
|
||||
@Data
|
||||
@ToString
|
||||
public class EmpExcelVo {
|
||||
/**
|
||||
* 员工主键
|
||||
*/
|
||||
@Excel(name = "序号")
|
||||
private String rowIndex;
|
||||
@Excel(name = "姓名")
|
||||
private String name;
|
||||
@Excel(name = "工号")
|
||||
private String empSysNo;
|
||||
@Excel(name = "身份证号")
|
||||
private String idCard;
|
||||
@Excel(name = "手机号")
|
||||
private String mobile;
|
||||
@Excel(name = "二级单位")
|
||||
private String secondDepart;
|
||||
@Excel(name = "三级单位")
|
||||
private String thirdDepart;
|
||||
@Excel(name = "民族", dicCode = "nation")
|
||||
private String nation;
|
||||
@Excel(name = "合同类型", width = 15, dicCode = "contract")
|
||||
private String empType;
|
||||
@Excel(name = "职务级别", dicCode = "e_job")
|
||||
private String empJob;
|
||||
@Excel(name = "职业工种", dicCode = "work_type")
|
||||
private String getEmpWorkType;
|
||||
@Excel(name = "婚姻状况", width = 15, dicCode = "mr_state")
|
||||
private String empMarriage;
|
||||
@Excel(name = "家庭住址")
|
||||
private String liveSpace;
|
||||
@Excel(name = "邮箱")
|
||||
private String email;
|
||||
@Excel(name = "入职日期")
|
||||
private String empWorkTime;
|
||||
@Excel(name = "学历", width = 15, dicCode = "emp_education")
|
||||
private String empDegree;
|
||||
@Excel(name = "职称", width = 15, dicCode = "e_title")
|
||||
private String empTitle;
|
||||
@Excel(name = "test", width = 15)
|
||||
private String test;
|
||||
|
||||
public boolean check() {
|
||||
return StrUtil.isBlank(name)
|
||||
|| StrUtil.isBlank(empSysNo)
|
||||
|| StrUtil.isBlank(idCard)
|
||||
|| StrUtil.isBlank(mobile)
|
||||
|| StrUtil.isBlank(secondDepart)
|
||||
|| StrUtil.isBlank(thirdDepart)
|
||||
|| StrUtil.isBlank(nation)
|
||||
|| StrUtil.isBlank(empType)
|
||||
|| StrUtil.isBlank(empJob)
|
||||
|| StrUtil.isBlank(getEmpWorkType)
|
||||
|| StrUtil.isBlank(empMarriage);
|
||||
}
|
||||
}
|
||||
+124
@@ -0,0 +1,124 @@
|
||||
package org.jeecg.bean.request;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
import org.springframework.web.bind.annotation.RequestParam;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Data
|
||||
public class HealthMealsWeightQueryVO {
|
||||
/**
|
||||
* 姓名
|
||||
*/
|
||||
@Schema(description = "姓名")
|
||||
private String realName;
|
||||
/**
|
||||
* 工号
|
||||
*/
|
||||
@Schema(description = "工号")
|
||||
private String workNo;
|
||||
/**
|
||||
* 性别
|
||||
*/
|
||||
@Schema(description = "性别")
|
||||
private Integer sex;
|
||||
/**
|
||||
* 单位部门
|
||||
*/
|
||||
@Schema(description = "单位部门")
|
||||
private String orgCode;
|
||||
/**
|
||||
* 身份证号
|
||||
*/
|
||||
@Schema(description = "身份证号")
|
||||
private String idCard;
|
||||
/**
|
||||
* 年龄
|
||||
*/
|
||||
@Schema(description = "年龄")
|
||||
private Integer age;
|
||||
private Integer currentYear;
|
||||
private Integer targetYear;
|
||||
/**
|
||||
* 年龄范围条件:'>', '<', '>=', '<=', '<>', '=', '!='
|
||||
*/
|
||||
@Schema(description = "年龄范围条件:'>', '<', '>=', '<=', '<>', '=', '!='")
|
||||
private String ageCondition;
|
||||
/**
|
||||
* 年龄范围参数b (当选择范围时使用)
|
||||
*/
|
||||
@Schema(description = "年龄范围参数b (当选择范围时使用)")
|
||||
private Integer ageB;
|
||||
/**
|
||||
* 体重
|
||||
*/
|
||||
@Schema(description = "体重")
|
||||
private Double weight;
|
||||
/**
|
||||
* 体重范围条件:'>', '<', '>=', '<=', '<>', '=', '!='
|
||||
*/
|
||||
@Schema(description = "体重范围条件:'>', '<', '>=', '<=', '<>', '=', '!='")
|
||||
private String weightCondition;
|
||||
/**
|
||||
* 体重范围参数b (当选择范围时使用)
|
||||
*/
|
||||
@Schema(description = "体重范围参数b (当选择范围时使用)")
|
||||
private Double weightB;
|
||||
/**
|
||||
* 身高
|
||||
*/
|
||||
@Schema(description = "身高")
|
||||
private Double height;
|
||||
/**
|
||||
* 身高范围条件:'>', '<', '>=', '<=', '<>', '=', '!='
|
||||
*/
|
||||
@Schema(description = "身高范围条件:'>', '<', '>=', '<=', '<>', '=', '!='")
|
||||
private String heightCondition;
|
||||
/**
|
||||
* 身高范围参数b (当选择范围时使用)
|
||||
*/
|
||||
@Schema(description = "身高范围参数b (当选择范围时使用)")
|
||||
private Double heightB;
|
||||
/**
|
||||
* bmi
|
||||
*/
|
||||
@Schema(description = "bmi")
|
||||
private Double bmi;
|
||||
/**
|
||||
* bmi范围条件:'>', '<', '>=', '<=', '<>', '=', '!='
|
||||
*/
|
||||
@Schema(description = "bmi范围条件:'>', '<', '>=', '<=', '<>', '=', '!='")
|
||||
private String bmiCondition;
|
||||
/**
|
||||
* bmi范围参数b (当选择范围时使用)
|
||||
*/
|
||||
@Schema(description = "bmi范围参数b (当选择范围时使用)")
|
||||
private Double bmiB;
|
||||
/**
|
||||
* 系统评价
|
||||
*/
|
||||
@Schema(title = "系统评价(0.偏瘦1.正常2.偏胖3.肥胖)")
|
||||
private Integer systemId;
|
||||
|
||||
|
||||
/**
|
||||
* 部门范围
|
||||
*/
|
||||
private List<String> orgCodeList;
|
||||
/**
|
||||
* 用户范围
|
||||
*/
|
||||
private List<String> userIdList;
|
||||
/**
|
||||
* 排除用户
|
||||
*/
|
||||
private List<String> excludedUserList;
|
||||
|
||||
private Integer pageNo;
|
||||
private Integer pageSize;
|
||||
|
||||
private Boolean isNotJoin=false;
|
||||
// 是否查询员工 默认查询员工
|
||||
private Boolean isSelectPersonType=true;
|
||||
}
|
||||
+20
@@ -0,0 +1,20 @@
|
||||
package org.jeecg.bean.request;
|
||||
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author Junqiang Zhu
|
||||
* @date 2023-04-27 09:46
|
||||
*/
|
||||
@Data
|
||||
@NoArgsConstructor
|
||||
public class ListUser {
|
||||
private List<String> userIds;
|
||||
|
||||
public ListUser(List<String> userIds) {
|
||||
this.userIds = userIds;
|
||||
}
|
||||
}
|
||||
+46
@@ -0,0 +1,46 @@
|
||||
package org.jeecg.bean.request;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @Description: 心理评估 人员管理 请求参数
|
||||
*/
|
||||
@Data
|
||||
public class PeoplePsyAssessPlanVO {
|
||||
/**
|
||||
* 部门范围
|
||||
*/
|
||||
private List<String> orgCodeList;
|
||||
/**
|
||||
* 用户范围
|
||||
*/
|
||||
private List<String> userIdList;
|
||||
/**
|
||||
* 排除用户
|
||||
*/
|
||||
private List<String> excludedUserList;
|
||||
/**
|
||||
* 姓名
|
||||
*/
|
||||
private String realName;
|
||||
/**
|
||||
* 单位部门code
|
||||
*/
|
||||
private String orgCode;
|
||||
/**
|
||||
* 工号
|
||||
*/
|
||||
private String workNo;
|
||||
/**
|
||||
* 页码
|
||||
*/
|
||||
private Integer pageNo;
|
||||
/**
|
||||
* 每页条数
|
||||
*/
|
||||
private Integer pageSize;
|
||||
|
||||
|
||||
}
|
||||
+67
@@ -0,0 +1,67 @@
|
||||
package org.jeecg.bean.request;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Objects;
|
||||
|
||||
/**
|
||||
* @author feng
|
||||
* @date 2024-06-26
|
||||
* @Description: 活动人数统计请求参数
|
||||
*/
|
||||
@Data
|
||||
@Builder
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
public class PeopleStatisticVO {
|
||||
/**
|
||||
* 活动ID 必传参数
|
||||
*/
|
||||
private Long activityId;
|
||||
|
||||
/**
|
||||
* 活动限制的单位或部门code 可选参数 (单位下全员可参与需传当前单位的code)
|
||||
*
|
||||
* ps: orgCodeList 和 userIdList 不能同时为空
|
||||
*/
|
||||
private List<String> orgCodeList;
|
||||
|
||||
/**
|
||||
* 活动限制的用户ID 可选参数
|
||||
*
|
||||
* ps: orgCodeList 和 userIdList 不能同时为空
|
||||
*/
|
||||
private List<String> userIdList;
|
||||
|
||||
public List<String> getOrgCodeList() {
|
||||
if(null == orgCodeList){
|
||||
orgCodeList = new ArrayList<>();
|
||||
}
|
||||
return orgCodeList;
|
||||
}
|
||||
|
||||
public List<String> getUserIdList() {
|
||||
if(null == userIdList){
|
||||
userIdList = new ArrayList<>();
|
||||
}
|
||||
return userIdList;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(Object o) {
|
||||
if (this == o) return true;
|
||||
if (o == null || getClass() != o.getClass()) return false;
|
||||
PeopleStatisticVO that = (PeopleStatisticVO) o;
|
||||
return Objects.equals(activityId, that.activityId);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return Objects.hash(activityId);
|
||||
}
|
||||
}
|
||||
+36
@@ -0,0 +1,36 @@
|
||||
package org.jeecg.bean.request;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.Set;
|
||||
|
||||
/**
|
||||
* @author feng
|
||||
* @date 2025-02-26
|
||||
* @Description: 查询用户当日打卡信息请求参数
|
||||
*/
|
||||
@Data
|
||||
@Schema(title = "查询用户当日打卡信息请求参数")
|
||||
public class QueryWeightSignUserParam {
|
||||
/**
|
||||
* PS: 传参建议 -- 若需查询的员工数量在 5000以下 可直接传参查指定用户,5000以上查所有然后在业务中筛选
|
||||
*/
|
||||
@Schema(title = "用户ID(不传则查近七天所有打卡用户)")
|
||||
private Set<String> userIds;
|
||||
|
||||
@Schema(title = "查询日期(yyyy-mm-dd),不传默认当天")
|
||||
private String dateStr;
|
||||
|
||||
@Schema(title = "是否需要查询最新身高体重数据")
|
||||
@Deprecated
|
||||
private boolean needLatestData;
|
||||
|
||||
public QueryWeightSignUserParam(Set<String> userIds, String dateStr, boolean needLatestData) {
|
||||
this.userIds = userIds;
|
||||
this.dateStr = dateStr;
|
||||
this.needLatestData = needLatestData;
|
||||
}
|
||||
|
||||
public QueryWeightSignUserParam(){}
|
||||
}
|
||||
+35
@@ -0,0 +1,35 @@
|
||||
package org.jeecg.bean.request;
|
||||
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
|
||||
/**
|
||||
* @author stan
|
||||
*/
|
||||
|
||||
@Getter
|
||||
@Setter
|
||||
public class UserBodyInfoDto {
|
||||
// 用户id
|
||||
private String userId;
|
||||
// 身高 (cm)
|
||||
private BigDecimal height;
|
||||
// 体重 (kg)
|
||||
private BigDecimal weight;
|
||||
// 腰围 (cm)
|
||||
private Double waist;
|
||||
// 臀围 (cm)
|
||||
private Double hip;
|
||||
// 胸围 (cm)
|
||||
private Double bust;
|
||||
// 体脂
|
||||
private BigDecimal fatRate;
|
||||
//还应减 仅适用于蚁熊版本的体重打卡业务
|
||||
private Double needLossValue;
|
||||
//已减 仅适用于蚁熊版本的体重打卡业务
|
||||
private Double lostValue;
|
||||
//业务类型 1-移动端档案 ,2-后台档案,3-体重打卡,4-体脂打卡,5-腰围打卡
|
||||
private Integer type = 3;
|
||||
}
|
||||
+15
@@ -0,0 +1,15 @@
|
||||
package org.jeecg.bean.request;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* @author Junqiang Zhu
|
||||
* @since 2024-05-23 14:48
|
||||
*/
|
||||
@Data
|
||||
public class UserClient {
|
||||
// 用户id
|
||||
private String userId;
|
||||
// 是否青海员工
|
||||
private boolean qh;
|
||||
}
|
||||
+64
@@ -0,0 +1,64 @@
|
||||
package org.jeecg.bean.request;
|
||||
|
||||
import cn.hutool.core.util.ObjectUtil;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
|
||||
/**
|
||||
* @author Shunzhi Jiang
|
||||
* @since 2023/5/22
|
||||
*/
|
||||
@Data
|
||||
public class UserFilter {
|
||||
|
||||
private String username;
|
||||
|
||||
private String realname;
|
||||
|
||||
private String empNo;
|
||||
|
||||
private String idCord;
|
||||
|
||||
private String orgCode;
|
||||
|
||||
private String threeOrgCode;
|
||||
|
||||
private List<String> idList;
|
||||
|
||||
private String phone;
|
||||
|
||||
private String workNo;
|
||||
|
||||
private Boolean selectFamily;
|
||||
|
||||
private List<String> orgCodes;
|
||||
|
||||
private List<String> workNoList;
|
||||
|
||||
/**
|
||||
* 需要过滤掉的userId集合
|
||||
*
|
||||
* PS: 部分业务需要加载员工列表,但同时需要排除掉部分的用户
|
||||
*/
|
||||
private List<String> excludeUserIds;
|
||||
|
||||
private Integer pageNo;
|
||||
|
||||
private Integer pageSize;
|
||||
|
||||
public Integer getPageNo() {
|
||||
if(ObjectUtil.isEmpty(pageNo)){
|
||||
return 1;
|
||||
}
|
||||
return pageNo;
|
||||
}
|
||||
|
||||
public Integer getPageSize() {
|
||||
if(ObjectUtil.isEmpty(pageSize)){
|
||||
return 10;
|
||||
}
|
||||
return pageSize;
|
||||
}
|
||||
}
|
||||
+18
@@ -0,0 +1,18 @@
|
||||
package org.jeecg.bean.request;
|
||||
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
/**
|
||||
* @author TianZi
|
||||
* @date 2023/11/22 13:48
|
||||
*/
|
||||
@Data
|
||||
@NoArgsConstructor
|
||||
public class WatchUser {
|
||||
private String secondOrgCode;
|
||||
private String thirdOrgCode;
|
||||
private String orgCode;
|
||||
private String workNo;
|
||||
private String realName;
|
||||
}
|
||||
+99
@@ -0,0 +1,99 @@
|
||||
package org.jeecg.bean.response;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
import org.jeecg.common.aspect.annotation.Dict;
|
||||
import org.jeecg.common.desensitization.annotation.SensitiveField;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
|
||||
@Data
|
||||
@Schema(title = "员工基本信息", description = "员工基本信息(供其他业务服务补全员工信息使用)")
|
||||
public class BaseEmployeeInfo {
|
||||
@Schema(title = "员工ID")
|
||||
private String userId;
|
||||
|
||||
@Schema(title = "用户名")
|
||||
private String userName;
|
||||
|
||||
@Schema(title = "员工姓名")
|
||||
private String realName;
|
||||
|
||||
@Schema(title = "员工编号")
|
||||
private String workNo;
|
||||
|
||||
@Schema(title = "身份证号")
|
||||
private String idCard;
|
||||
|
||||
@Schema(title = "头像")
|
||||
private String avatar;
|
||||
|
||||
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd")
|
||||
@Schema(title = "生日")
|
||||
private Date birthday;
|
||||
|
||||
@SensitiveField
|
||||
@Schema(title = "邮箱")
|
||||
private String email;
|
||||
|
||||
@Schema(title = "电话")
|
||||
private String phone;
|
||||
|
||||
@Schema(title = "年龄")
|
||||
private Integer age;
|
||||
|
||||
@Schema(title = "性别")
|
||||
@Dict(dicCode = "sex2")
|
||||
private Integer sex;
|
||||
|
||||
@Schema(title = "身高")
|
||||
private String height;
|
||||
|
||||
@Schema(title = "体重")
|
||||
private String weight;
|
||||
|
||||
@Schema(title = "BMI")
|
||||
private Double bmi;
|
||||
|
||||
@Schema(title = "员工民族")
|
||||
private String empNation;
|
||||
|
||||
@Schema(title = "员工政治面貌")
|
||||
private String empPolitical;
|
||||
|
||||
@Schema(title = "岗位层级")
|
||||
private String jobLevel;
|
||||
|
||||
@Schema(title = "婚姻状况")
|
||||
private String empMarriage;
|
||||
|
||||
@Schema(title = "用户人群分类")
|
||||
private String userGroup;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
*以下6个部门信息都有值, 业务中根据需要自取
|
||||
*/
|
||||
@Schema(title = "二级部门Code(单位)")
|
||||
private String secondDeptCode;
|
||||
|
||||
@Schema(title = "二级部门名称(单位)")
|
||||
private String secondDeptName;
|
||||
|
||||
@Schema(title = "三级部门Code(部门)")
|
||||
private String thirdDeptCode;
|
||||
|
||||
@Schema(title = "三级部门名称(部门)")
|
||||
private String thirdDeptName;
|
||||
|
||||
@Schema(title = "当前部门Code(用户所属部门)")
|
||||
private String thisDeptCode;
|
||||
|
||||
@Schema(title = "当前部门名称(用户所属部门)")
|
||||
private String thisDeptName;
|
||||
}
|
||||
+57
@@ -0,0 +1,57 @@
|
||||
package org.jeecg.bean.response;
|
||||
|
||||
import cn.hutool.core.util.IdcardUtil;
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import lombok.Data;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.math.RoundingMode;
|
||||
|
||||
/**
|
||||
* @author Junqiang Zhu
|
||||
* @date 2023-07-12 10:40
|
||||
*/
|
||||
@Data
|
||||
public class BaseUser {
|
||||
private String userId;
|
||||
private String userName;
|
||||
private String realName;
|
||||
private String workNo;
|
||||
private String idCard;
|
||||
private String personType;
|
||||
private String secondDepart;
|
||||
private String orgCode;
|
||||
private String orgName;
|
||||
private String departId;
|
||||
private String departCode;
|
||||
private String departName;
|
||||
private String depart;
|
||||
private String status;
|
||||
private Integer age;
|
||||
private void setIdCard(String idCard) {
|
||||
if (StrUtil.isEmpty(idCard)) {
|
||||
return;
|
||||
}
|
||||
// 去除身份证号中的空格
|
||||
idCard = idCard.replace(" ", "");
|
||||
this.idCard = idCard;
|
||||
this.age = IdcardUtil.getAgeByIdCard(idCard);
|
||||
}
|
||||
private Integer sex;
|
||||
private String height;
|
||||
private String weight;
|
||||
private Double bmi;
|
||||
|
||||
public void calculateBmi(Double bmi) {
|
||||
if (bmi == null) {
|
||||
if (StrUtil.isBlank(this.height) || StrUtil.isBlank(this.weight)){
|
||||
return;
|
||||
}
|
||||
// 将身高从厘米转换为米
|
||||
double height = Double.parseDouble(this.height) / 100.0;
|
||||
double weight = Double.parseDouble(this.weight);
|
||||
bmi = weight / (height * height);
|
||||
}
|
||||
this.bmi = new BigDecimal(bmi).setScale(2, RoundingMode.HALF_UP).doubleValue();
|
||||
}
|
||||
}
|
||||
+13
@@ -0,0 +1,13 @@
|
||||
package org.jeecg.bean.response;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* @author Junqiang Zhu
|
||||
* @date 2024-03-01 13:47
|
||||
*/
|
||||
@Data
|
||||
public class CheckExistUserRes {
|
||||
private String account;
|
||||
private Integer count;
|
||||
}
|
||||
+66
@@ -0,0 +1,66 @@
|
||||
package org.jeecg.bean.response;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
import org.jeecg.common.aspect.annotation.Dict;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
@Data
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
@Schema(title = "员工身高体重(前期只同步体重, 后期又加了其他的体征信息,不要在意类名的定义)")
|
||||
public class EmployeeHeightWeight {
|
||||
@Schema(title = "用户标识(ID或身份证号)")
|
||||
private String userFlag;
|
||||
|
||||
@Schema(title = "身高")
|
||||
private String height;
|
||||
|
||||
@Schema(title = "体重")
|
||||
private String weight;
|
||||
|
||||
@Schema(title = "体脂率")
|
||||
private String fatRate;
|
||||
|
||||
@Schema(description = "最新体重的数据来源(字典 data_source_dict)")
|
||||
@Dict(dicCode = "data_source_dict")
|
||||
private String dataSource;
|
||||
|
||||
@Schema(title = "最新体检体重")
|
||||
private String weightCheckLatest;
|
||||
|
||||
/**
|
||||
* 该字段只在部分查询接口使用, 若要使用自行赋值
|
||||
*/
|
||||
@Schema(title = "BMI")
|
||||
private String bmi;
|
||||
|
||||
@Schema(description = "舒张压")
|
||||
private String dbp;
|
||||
|
||||
@Schema(description = "收缩压")
|
||||
private String sbp;
|
||||
|
||||
@Schema(description = "血型")
|
||||
private String blood;
|
||||
|
||||
@Schema(description = "腰围(cm)")
|
||||
private String waist;
|
||||
|
||||
@Schema(description = "臀围(cm)")
|
||||
private String hip;
|
||||
|
||||
@Schema(description = "日期")
|
||||
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date dataDate;
|
||||
|
||||
public EmployeeHeightWeight(String userFlag) {
|
||||
this.userFlag = userFlag;
|
||||
}
|
||||
}
|
||||
+90
@@ -0,0 +1,90 @@
|
||||
package org.jeecg.bean.response;
|
||||
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
import org.jeecg.common.aspect.annotation.Dict;
|
||||
import org.jeecg.global.GlobalUtils;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
@Data
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
@Schema(title="用户家庭成员", description="用户家庭成员")
|
||||
public class FamilyMembersVO {
|
||||
@Schema(title = "主键")
|
||||
private String id;
|
||||
|
||||
@Schema(title = "用户ID")
|
||||
private String userId;
|
||||
|
||||
@Schema(title = "是否为本单位员工(0-否,1-是)")
|
||||
private Integer orgUserFlag;
|
||||
|
||||
@Schema(title = "家庭成员用户ID")
|
||||
private String familyMembersId;
|
||||
|
||||
@Schema(title = "成员关系")
|
||||
private String relation;
|
||||
|
||||
@Schema(title = "姓名")
|
||||
private String realName;
|
||||
|
||||
@Schema(title = "头像")
|
||||
private String avatar;
|
||||
|
||||
@Schema(title = "身份证号")
|
||||
private String idCard;
|
||||
|
||||
@Schema(title = "年龄")
|
||||
private Integer age = 0;
|
||||
|
||||
@Dict(dicCode = "sex2")
|
||||
@Schema(title = "性别")
|
||||
private Integer sex;
|
||||
|
||||
@Schema(title = "电话")
|
||||
private String phone;
|
||||
|
||||
@Schema(title = "工号")
|
||||
private String workNo;
|
||||
|
||||
@Schema(title = "员工账号")
|
||||
private String userName;
|
||||
|
||||
@Schema(title = "所属单位")
|
||||
private String orgCode;
|
||||
|
||||
@Schema(title = "所属单位code")
|
||||
private String orgName;
|
||||
|
||||
@Schema(title = "所属部门code")
|
||||
private String deptCode;
|
||||
|
||||
@Schema(title = "所属部门")
|
||||
private String deptName;
|
||||
|
||||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
|
||||
@Schema(title = "创建时间")
|
||||
private Date createDate;
|
||||
|
||||
@Schema(title = "家庭成员数量")
|
||||
private Integer familyMembersNum = 1;
|
||||
|
||||
@Schema(title = "是否本人")
|
||||
private Boolean isSelf = false;
|
||||
|
||||
public Integer getAge() {
|
||||
if(StrUtil.isNotEmpty(idCard)){
|
||||
return GlobalUtils.getAgeByIdCard(idCard);
|
||||
}
|
||||
return age;
|
||||
}
|
||||
}
|
||||
+15
@@ -0,0 +1,15 @@
|
||||
package org.jeecg.bean.response;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author Junqiang Zhu
|
||||
* @date 2023-04-24 16:50
|
||||
*/
|
||||
@Data
|
||||
public class KeyList<T, R> {
|
||||
private T key;
|
||||
private List<R> list;
|
||||
}
|
||||
+13
@@ -0,0 +1,13 @@
|
||||
package org.jeecg.bean.response;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.InputStream;
|
||||
|
||||
@Data
|
||||
public class ResponseVo {
|
||||
|
||||
private Integer stateCode;
|
||||
|
||||
private InputStream in;
|
||||
}
|
||||
+94
@@ -0,0 +1,94 @@
|
||||
package org.jeecg.bean.response;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
import org.jeecg.common.aspect.annotation.Dict;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
/**
|
||||
* @Description: 职务表VO(结构完全等同于于 sys_position表对应的实体类SysPosition) 只为迁移23年干预中的接口至四合一
|
||||
*/
|
||||
@Data
|
||||
@Schema(title = "SysPositionVO", description = "职务表VO")
|
||||
public class SysPositionVO {
|
||||
|
||||
/**
|
||||
* id
|
||||
*/
|
||||
@Schema(title = "id")
|
||||
@JsonFormat(shape = JsonFormat.Shape.STRING)
|
||||
private Long id;
|
||||
/**
|
||||
* 职务编码
|
||||
*/
|
||||
@Schema(title = "职务编码")
|
||||
private String code;
|
||||
/**
|
||||
* 职务名称
|
||||
*/
|
||||
@Schema(title = "职务名称")
|
||||
private String name;
|
||||
/**
|
||||
* 职级
|
||||
*/
|
||||
@Schema(title = "职级")
|
||||
@Dict(dicCode = "position_rank")
|
||||
private String postRank;
|
||||
/**
|
||||
* 公司id
|
||||
*/
|
||||
@Schema(title = "公司id")
|
||||
private String companyId;
|
||||
/**
|
||||
* 创建人
|
||||
*/
|
||||
@Schema(title = "创建人")
|
||||
private String createBy;
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@Schema(title = "创建时间")
|
||||
private java.util.Date createTime;
|
||||
/**
|
||||
* 修改人
|
||||
*/
|
||||
@Schema(title = "修改人")
|
||||
private String updateBy;
|
||||
/**
|
||||
* 修改时间
|
||||
*/
|
||||
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@Schema(title = "修改时间")
|
||||
private java.util.Date updateTime;
|
||||
/**
|
||||
* 组织机构编码
|
||||
*/
|
||||
@Schema(title = "组织机构编码")
|
||||
private String sysOrgCode;
|
||||
|
||||
/**
|
||||
* 租户ID
|
||||
*/
|
||||
@Schema(title = "租户ID")
|
||||
private Integer tenantId;
|
||||
/**
|
||||
* 岗位类别
|
||||
*/
|
||||
@Dict(dicCode = "post_type")
|
||||
private Integer postType;
|
||||
|
||||
/**
|
||||
* 单位类别
|
||||
*/
|
||||
@Dict(dicCode = "org_type")
|
||||
private Integer orgType;
|
||||
|
||||
/**
|
||||
* 岗位简介
|
||||
*/
|
||||
private String remark;
|
||||
}
|
||||
+62
@@ -0,0 +1,62 @@
|
||||
package org.jeecg.bean.response;
|
||||
|
||||
import cn.hutool.core.date.DateUtil;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
import org.jeecg.bean.entity.UserDataRecordBmi;
|
||||
import org.jeecg.common.aspect.annotation.Dict;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author feng
|
||||
* @date 2025-03-05
|
||||
* @Description: 用户每天的最新体重
|
||||
*/
|
||||
@Data
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
@Schema(title = "用户每天的最新体重")
|
||||
public class WeightHeightDayVO {
|
||||
@Schema(title = "用户ID")
|
||||
private String userId;
|
||||
|
||||
@Schema(description = "日期(yyyy-MM-dd)")
|
||||
private String dateStr;
|
||||
|
||||
@Schema(title = "当天最新体重")
|
||||
private BigDecimal weight;
|
||||
|
||||
@Schema(title = "当天最新身高")
|
||||
private BigDecimal height;
|
||||
|
||||
@Schema(title = "当天最新BMI")
|
||||
private BigDecimal bmi;
|
||||
|
||||
@Schema(title = "体脂率")
|
||||
private BigDecimal fatRate;
|
||||
|
||||
@Schema(title = "腰围")
|
||||
private Double waist;
|
||||
|
||||
@Schema(title = "体重数据来源")
|
||||
@Dict(dicCode = "data_source_dict")
|
||||
private String dataSource;
|
||||
|
||||
@Schema(title = "当天体重数据所有来源")
|
||||
private List<String> dataChannels;
|
||||
|
||||
public WeightHeightDayVO(UserDataRecordBmi userDataRecordBmi) {
|
||||
this.userId = userDataRecordBmi.getUserId();
|
||||
this.dateStr = DateUtil.formatDate(userDataRecordBmi.getDataDate());
|
||||
this.weight = userDataRecordBmi.getWeight();
|
||||
this.height = userDataRecordBmi.getHeight();
|
||||
this.bmi = userDataRecordBmi.getBmi();
|
||||
this.fatRate = userDataRecordBmi.getFatRate();
|
||||
this.dataChannels = userDataRecordBmi.getDataChannels();
|
||||
this.dataSource = userDataRecordBmi.getDataSource();
|
||||
}
|
||||
}
|
||||
+152
@@ -0,0 +1,152 @@
|
||||
package org.jeecg.bean.response;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
import org.jeecg.bean.entity.UserDataRecordBmi;
|
||||
import org.jeecg.common.aspect.annotation.Dict;
|
||||
import org.jeecg.common.util.HealthUtil;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Comparator;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
/**
|
||||
* @author feng
|
||||
* @date 2025-02-26
|
||||
* @Description: 用户当日打卡信息
|
||||
*/
|
||||
@Data
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
@Schema(title = "用户当日打卡信息")
|
||||
public class WeightSignUserVO {
|
||||
@Schema(title = "用户ID")
|
||||
private String userId;
|
||||
|
||||
/**
|
||||
* PS: 判断是否体重打卡以改字段为准
|
||||
*/
|
||||
@Schema(title = "是否体重打卡(七天内有打卡数据则认为是当日已打卡)")
|
||||
private Boolean signFlag = false;
|
||||
|
||||
/** 以下四个字段 当signFlag=true时有值 代表传入日期当天最新的打卡数据 */
|
||||
@Schema(description = "最新打卡时间")
|
||||
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date dataDate;
|
||||
|
||||
@Schema(title = "最新体重")
|
||||
private String weight;
|
||||
|
||||
@Schema(title = "最新身高")
|
||||
private String height;
|
||||
|
||||
@Schema(title = "最新BMI")
|
||||
private String bmi;
|
||||
|
||||
@Schema(title = "体脂率")
|
||||
private String fatRate;
|
||||
|
||||
@Schema(title = "腰围")
|
||||
private String waist;
|
||||
|
||||
@Schema(title = "最新体重的数据来源")
|
||||
@Dict(dicCode = "data_source_dict")
|
||||
private String dataSource;
|
||||
/**
|
||||
* 当天存在的所有体重的数据来源
|
||||
*/
|
||||
@Schema(title = "当天所有的数据来源(字典data_source_dict值使用,分割)")
|
||||
private String weightDataSource;
|
||||
|
||||
private Long signCount = 0L;
|
||||
|
||||
public Boolean getSignFlag() {
|
||||
return signCount > 0;
|
||||
}
|
||||
|
||||
public Boolean isSignFlag() {
|
||||
return signCount > 0;
|
||||
}
|
||||
|
||||
public WeightSignUserVO(String userId) {
|
||||
this.userId = userId;
|
||||
}
|
||||
|
||||
public void completionWeightInfo(UserDataRecordBmi userDataRecordBmi) {
|
||||
if(null != userDataRecordBmi){
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
public WeightSignUserVO(List<UserDataRecordBmi> bmiList,EmployeeHeightWeight bwh) {
|
||||
bmiList.sort(Comparator.comparing(UserDataRecordBmi::getDataDate).reversed());
|
||||
UserDataRecordBmi userDataRecordBmi = bmiList.get(0);
|
||||
if(null != userDataRecordBmi.getWeight()){
|
||||
this.weight = String.valueOf(userDataRecordBmi.getWeight());
|
||||
}
|
||||
if(null != userDataRecordBmi.getHeight()){
|
||||
this.height = String.valueOf(userDataRecordBmi.getHeight());
|
||||
}
|
||||
if(null != userDataRecordBmi.getBmi()){
|
||||
this.bmi = String.valueOf(userDataRecordBmi.getBmi());
|
||||
}
|
||||
bmiList.stream()
|
||||
.filter(bmi -> null != bmi.getFatRate())
|
||||
.findFirst()
|
||||
.ifPresent(bmi -> this.fatRate = String.valueOf(bmi.getFatRate()));
|
||||
this.dataSource = userDataRecordBmi.getDataSource();
|
||||
this.dataDate = userDataRecordBmi.getDataDate();
|
||||
this.userId = userDataRecordBmi.getUserId();
|
||||
this.weightDataSource = bmiList.stream().map(UserDataRecordBmi::getDataSource).distinct().collect(Collectors.joining(","));
|
||||
this.signCount = (long) bmiList.size();
|
||||
if(null != bwh){
|
||||
this.waist = bwh.getWaist();
|
||||
}
|
||||
}
|
||||
|
||||
public WeightSignUserVO(List<UserDataRecordBmi> bmiList, String waist) {
|
||||
UserDataRecordBmi weightRecord = bmiList.stream()
|
||||
.filter(f -> f.getWeight() != null)
|
||||
.sorted(Comparator.comparing(UserDataRecordBmi::getWeight))
|
||||
.limit(1)
|
||||
.findFirst()
|
||||
.orElse(new UserDataRecordBmi());
|
||||
this.weight = String.valueOf(weightRecord.getWeight());
|
||||
|
||||
UserDataRecordBmi heightRecord = bmiList.stream()
|
||||
.filter(f -> f.getHeight() != null)
|
||||
.sorted(Comparator.comparing(UserDataRecordBmi::getHeight))
|
||||
.limit(1)
|
||||
.findFirst()
|
||||
.orElse(new UserDataRecordBmi());
|
||||
this.height = String.valueOf(heightRecord.getHeight());
|
||||
|
||||
UserDataRecordBmi fatRecord = bmiList.stream()
|
||||
.filter(f -> f.getFatRate() != null)
|
||||
.sorted(Comparator.comparing(UserDataRecordBmi::getFatRate))
|
||||
.limit(1)
|
||||
.findFirst()
|
||||
.orElse(new UserDataRecordBmi());
|
||||
this.fatRate = String.valueOf(fatRecord.getFatRate());
|
||||
|
||||
if (weightRecord.getWeight() != null && heightRecord.getHeight() != null) {
|
||||
Double result = HealthUtil.computeBmi(new BigDecimal(height), new BigDecimal(weight));
|
||||
if (result != null) {
|
||||
this.bmi = result.toString();
|
||||
}
|
||||
}
|
||||
this.dataSource = weightRecord.getDataSource();
|
||||
this.dataDate = weightRecord.getDataDate();
|
||||
this.userId = weightRecord.getUserId();
|
||||
this.weightDataSource = bmiList.stream().map(UserDataRecordBmi::getDataSource).distinct().collect(Collectors.joining(","));
|
||||
this.signCount = (long) bmiList.size();
|
||||
this.waist = waist;
|
||||
}
|
||||
}
|
||||
+52
@@ -0,0 +1,52 @@
|
||||
package org.jeecg.bean.response;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
public class WeightStatisticsVO {
|
||||
@Schema(title = "姓名")
|
||||
private String realName;
|
||||
|
||||
@Schema(title = "性别")
|
||||
private String sex;
|
||||
|
||||
@Schema(title = "女性数量")
|
||||
private Integer womanCount;
|
||||
|
||||
@Schema(title = "男性性数量")
|
||||
private Integer manCount;
|
||||
|
||||
@Schema(title = "年龄")
|
||||
private Double age;
|
||||
|
||||
@Schema(title = "工号")
|
||||
private String workNo;
|
||||
|
||||
@Schema(title = "人均bmi")
|
||||
private Double bmiAvg;
|
||||
|
||||
@Schema(title = "所属单位")
|
||||
private String departName;
|
||||
|
||||
@Schema(title = "所属部门")
|
||||
private String orgName;
|
||||
|
||||
@Schema(title = "身高(cm)")
|
||||
private Double height;
|
||||
public void setHeight(Double height) {
|
||||
this.height = height == null? null : Math.round(height * 100) / 100.0;
|
||||
}
|
||||
|
||||
@Schema(title = "体重(kg)")
|
||||
private Double weight;
|
||||
public void setWeight(Double weight) {
|
||||
this.weight = weight == null? null : Math.round(weight * 100) / 100.0;
|
||||
}
|
||||
|
||||
@Schema(title = "bmi")
|
||||
private Double bmi;
|
||||
public void setBmi(Double bmi) {
|
||||
this.bmi = bmi == null? null : Math.round(bmi * 100) / 100.0;
|
||||
}
|
||||
}
|
||||
+1346
File diff suppressed because it is too large
Load Diff
+21
@@ -0,0 +1,21 @@
|
||||
package org.jeecg.common.system.api.factory;
|
||||
|
||||
import org.jeecg.common.system.api.ISysBaseAPI;
|
||||
import org.jeecg.common.system.api.fallback.SysBaseAPIFallback;
|
||||
import org.springframework.cloud.openfeign.FallbackFactory;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
/**
|
||||
* @Description: SysBaseAPIFallbackFactory
|
||||
* @author: jeecg-boot
|
||||
*/
|
||||
@Component
|
||||
public class SysBaseAPIFallbackFactory implements FallbackFactory<ISysBaseAPI> {
|
||||
|
||||
@Override
|
||||
public ISysBaseAPI create(Throwable throwable) {
|
||||
SysBaseAPIFallback fallback = new SysBaseAPIFallback();
|
||||
fallback.setCause(throwable);
|
||||
return fallback;
|
||||
}
|
||||
}
|
||||
+45
@@ -0,0 +1,45 @@
|
||||
package org.jeecg.common.system.api.fallback;
|
||||
|
||||
import org.apache.commons.collections4.CollectionUtils;
|
||||
import org.jeecg.common.system.api.ISysBaseAPI;
|
||||
import org.jeecg.modules.imports.entity.CommonImports;
|
||||
import org.jeecg.modules.imports.entity.CommonImportsDetail;
|
||||
import org.jeecg.modules.imports.service.CommonImportsOption;
|
||||
import org.jeecg.modules.imports.service.ICommonImportsDetailService;
|
||||
import org.jeecg.modules.imports.service.ICommonImportsService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.context.annotation.Primary;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Service("commonImportsOptionCloud")
|
||||
@Primary
|
||||
public class CommonImportsOptionImpl implements CommonImportsOption {
|
||||
@Autowired
|
||||
private ISysBaseAPI sysBaseAPI;
|
||||
@Override
|
||||
public void save(CommonImports commonImports) {
|
||||
CommonImports comm = sysBaseAPI.updateImportsInfo(commonImports);
|
||||
commonImports.setId(comm.getId());
|
||||
}
|
||||
|
||||
@Override
|
||||
public void update(CommonImports commonImports) {
|
||||
sysBaseAPI.updateImportsInfo(commonImports);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void saveDetailBatch(List<CommonImportsDetail> detailList) {
|
||||
if(!CollectionUtils.isEmpty(detailList)){
|
||||
for(CommonImportsDetail detail:detailList){
|
||||
sysBaseAPI.editImportsDetail(detail);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void saveDetail(CommonImportsDetail detail) {
|
||||
sysBaseAPI.editImportsDetail(detail);
|
||||
}
|
||||
}
|
||||
+895
@@ -0,0 +1,895 @@
|
||||
package org.jeecg.common.system.api.fallback;
|
||||
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import lombok.Setter;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.jeecg.bean.entity.UserDataRecordBmi;
|
||||
import org.jeecg.bean.request.*;
|
||||
import org.jeecg.bean.response.*;
|
||||
import org.jeecg.common.api.dto.DataLogDTO;
|
||||
import org.jeecg.common.api.dto.OnlineAuthDTO;
|
||||
import org.jeecg.common.api.dto.message.*;
|
||||
import org.jeecg.common.api.vo.Result;
|
||||
import org.jeecg.common.bean.request.SendSmsReq;
|
||||
import org.jeecg.common.bean.response.BaseUserGroup;
|
||||
import org.jeecg.common.bean.response.NotSignType;
|
||||
import org.jeecg.common.bean.transfer.GroupCount;
|
||||
import org.jeecg.common.bean.transfer.UserWeightSign;
|
||||
import org.jeecg.common.system.api.ISysBaseAPI;
|
||||
import org.jeecg.common.system.vo.*;
|
||||
import org.jeecg.modules.exports.entity.CommonExportsInfo;
|
||||
import org.jeecg.modules.imports.entity.CommonImports;
|
||||
import org.jeecg.modules.imports.entity.CommonImportsDetail;
|
||||
import org.jeecg.modules.imports.entity.CommonImportsInfo;
|
||||
import org.jeecg.modules.system.bean.UserEmployee;
|
||||
import org.jeecg.modules.system.entity.HealthUserEmployeeEx;
|
||||
import org.jeecg.modules.system.entity.SysDepart;
|
||||
import org.jeecg.modules.system.entity.SysUser;
|
||||
import org.jeecg.modules.system.entity.SysUserEmergencyContact;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestParam;
|
||||
|
||||
import java.util.*;
|
||||
|
||||
/**
|
||||
* 进入fallback的方法 检查是否token未设置
|
||||
*
|
||||
* @author: jeecg-boot
|
||||
*/
|
||||
@Slf4j
|
||||
public class SysBaseAPIFallback implements ISysBaseAPI {
|
||||
|
||||
@Setter
|
||||
private Throwable cause;
|
||||
|
||||
//@Override
|
||||
//public List<SysDepartModel> listDepart(List<String> stringList,String type) {
|
||||
// return Collections.emptyList();
|
||||
//}
|
||||
|
||||
@Override
|
||||
public Boolean saveInfoList(List<CommonImportsInfo> list) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<String> getRoleIdsByUserId(String userId) {
|
||||
return Collections.emptyList();
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<String> findSysUserIds(SysUser user) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@PostMapping("/sys/common/commonExportsInfo/editInfo")
|
||||
@Override
|
||||
public CommonExportsInfo updateExportsInfo(CommonExportsInfo info) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public CommonExportsInfo getExportsInfoById(String id) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Boolean getFinishFlagByCode(String code, String exportStatus) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Boolean getFinishFlagByCodeInAll(String code, String exportStatus) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public CommonImports updateImportsInfo(CommonImports info) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public CommonImports getImportsInfoById(String id) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Boolean getImportsFinishFlagByCode(String code, String importStatus) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void editImportsDetail(CommonImportsDetail detail) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void saveImportsDetailList(List<CommonImportsDetail> detailList) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public CommonImportsDetail getImportsDetailById(String id) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<CommonImportsDetail> getImportsDetailListByInfoId(String infoId) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<LoginUserNew> listUserByIds(ListUser listUser) {
|
||||
return new ArrayList<>();
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<LoginUser> listUserByIdsNew(List<String> userIds) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<BaseEmployeeInfo> queryBaseEmployeeInfo(Set<String> ids) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<BaseEmployeeInfo> queryBaseEmployeeInfoByCondition(HealthUserEmployeeEx healthUserEmployeeEx) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<BaseEmployeeInfo> queryBaseEmployeeInfoSimple(Set<String> ids) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<LoginUserNew> listUserByIdsClient(List<UserClient> list) {
|
||||
return Collections.emptyList();
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<LoginUser> listUserByIdCards(List<String> idCards) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<LoginUser> listUserByIdCardsPost(List<String> idCards) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<HealthUserEmployeeEx> listEmployeeUserByIds(ListUser listUser) {
|
||||
return new ArrayList<>();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isHoliday(Integer year, Integer month, Integer day) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<KeyList<Integer, Integer>> holidayList(Integer year, Integer month) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void sendSysAnnouncement(MessageDTO message) {
|
||||
log.error("发送消息失败 {}", cause);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void sendBusAnnouncement(BusMessageDTO message) {
|
||||
log.error("发送消息失败 {}", cause);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void sendTemplateAnnouncement(TemplateMessageDTO message) {
|
||||
log.error("发送消息失败 {}", cause);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void sendBusTemplateAnnouncement(BusTemplateMessageDTO message) {
|
||||
log.error("发送消息失败 {}", cause);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String parseTemplateByCode(TemplateDTO templateDTO) {
|
||||
log.error("通过模板获取消息内容失败 {}", cause);
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public LoginUser getUserById(String id) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<String> getRolesByUsername(String username) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<String> getDepartIdsByUsername(String username) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<String> getDepartNamesByUsername(String username) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<DictModel> queryDictItemsByCode(String code) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<DictModel> queryEnableDictItemsByCode(String code) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<DictModel> queryAllDict() {
|
||||
log.error("fegin接口queryAllDict失败:" + cause.getMessage(), cause);
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<SysCategoryModel> queryAllSysCategory() {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<DictModel> queryTableDictItemsByCode(String table, String text, String code) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<DictModel> queryAllDepartBackDictModel() {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void updateSysAnnounReadFlag(String busType, String busId) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<DictModel> queryFilterTableDictInfo(String table, String text, String code, String filterSql) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<String> queryTableDictByKeys(String table, String text, String code, String[] keyArray) {
|
||||
log.error("queryTableDictByKeys查询失败 {}", cause);
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<ComboModel> queryAllUserBackCombo() {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public JSONObject queryAllUser(String userIds, Integer pageNo, int pageSize) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<ComboModel> queryAllRole(String[] roleIds) {
|
||||
log.error("获取角色信息失败 {}", cause);
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<String> getRoleIdsByUsername(String username) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getDepartIdsByOrgCode(String orgCode) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<SysDepartModel> getAllSysDepart() {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public DictModel getParentDepartId(String departId) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<String> getDeptHeadByDepId(String deptId) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void sendWebSocketMsg(String[] userIds, String cmd) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<LoginUser> queryAllUserByIds(String[] userIds) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void meetingSignWebsocket(String userId) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<LoginUser> queryUserByNames(String[] userNames) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Set<String> getUserRoleSet(String username) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Set<String> getUserPermissionSet(String username) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean hasOnlineAuth(OnlineAuthDTO onlineAuthDTO) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public SysDepartModel selectAllById(String id) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<String> queryDeptUsersByUserId(String userId) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Set<String> queryUserRoles(String userId) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Set<String> queryUserAuths(String userId) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public DynamicDataSourceModel getDynamicDbSourceById(String dbSourceId) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public DynamicDataSourceModel getDynamicDbSourceByCode(String dbSourceCode) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public LoginUser getUserByName(String username) {
|
||||
log.error("jeecg-system服务节点不通,导致获取登录用户信息失败: " + cause.getMessage(), cause);
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String translateDictFromTable(String table, String text, String code, String key) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String translateDict(String code, String key) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<SysPermissionDataRuleModel> queryPermissionDataRule(String component, String requestPath, String username) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public SysUserCacheInfo getCacheUser(String id) {
|
||||
log.error("获取用户信息失败 {}", cause);
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<JSONObject> queryUsersByUsernames(String usernames) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<JSONObject> queryUsersByIds(String ids) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<JSONObject> queryDepartsByOrgcodes(String orgCodes) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Map<String, String> queryDepartNameByOrgCodes(Set<String> orgCodeSet) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<JSONObject> queryDepartsByIds(String ids) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Map<String, List<DictModel>> translateManyDict(String dictCodes, String keys) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<DictModel> translateDictFromTableByKeys(String table, String text, String code, String keys) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void sendTemplateMessage(MessageDTO message) {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void sendBusSms(BusTemplateMessageDTO message) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getTemplateContent(String code) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void saveDataLog(DataLogDTO dataLogDto) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void sendEmailMsg(String email, String title, String content) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<Map> getDeptUserByOrgCode(String orgCode) {
|
||||
return null;
|
||||
}
|
||||
|
||||
// @Override
|
||||
// public List<JSONObject> queryDepartsByOrgIds(String ids) {
|
||||
// return null;
|
||||
// }
|
||||
|
||||
@Override
|
||||
public List<String> loadCategoryDictItem(String ids) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<String> loadDictItem(String dictCode, String keys) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<DictModel> getDictItems(String dictCode) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Map<String, List<DictModel>> getManyDictItems(List<String> dictCodeList) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<DictModel> loadDictItemByKeyword(String dictCode, String keyword, Integer pageSize) {
|
||||
return null;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void addSysFiles(SysFilesModel sysFilesModel) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getFileUrl(String fileId) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void updateAvatar(LoginUser loginUser) {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void sendAppChatSocket(String userId) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public Result<?> updatePassword(JSONObject json) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Result<JSONObject> loginDoctor(JSONObject json) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@GetMapping("/sys/api/selectEmergencyContactByUserId")
|
||||
@Override
|
||||
public List<SysUserEmergencyContact> selectEmergencyContactByUserId(String userId) {
|
||||
return new ArrayList<>();
|
||||
}
|
||||
|
||||
@GetMapping(value = "/sys/api/station/selectStationHospitalList")
|
||||
@Override
|
||||
public List<String> selectStationHospitalList() {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public UserEmployee selectEmployeeUser(String userId) {
|
||||
return new UserEmployee();
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<SysUser> userListByPhone(String phone) {
|
||||
return new ArrayList<>();
|
||||
}
|
||||
|
||||
@Override
|
||||
public SysUser queryUserByCardId(String cardId) {
|
||||
return new SysUser();
|
||||
}
|
||||
|
||||
@Override
|
||||
public SysUser addMedicalStaff(SysUserModel sysUser) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean updateUserInfo(SysUserModel user) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean delUser(List<String> userIds) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Integer chageUserPersonType(String userId) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<String> getUserIdsByDepartAndUsername(String departCode, String username, String idCard, String workNo) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Result<Object> getUserNumByOrgCode(String orgCode) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Result<Map<String, Integer>> getUserNumByOrgCodeList(List<String> orgCodeList) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Map<Long, Long> activityPeopleNumber(Set<PeopleStatisticVO> peopleStatisticVOS) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Result<List<String>> getUserIdsByOrgCodeList(List<String> orgCodeList) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<SysUser> getUserByIdCardList(ListUser listUser) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Result<List<SysDepartTreeModel>> queryDepartTreeSync(String parentId, String ids, String primaryKey) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Map<String, String> selectOrgCodeById(String userIds) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Result<List<SysDepartModel>> allSecondaryDeparts() {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Result<List<SysDepartModel>> getThirdDepartListBySecondDepartId(String secondDepartId) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<SysDepartModel> selectSecondThirdDepart() {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<SysDepart> selectDepartByDepartIds(String departId) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String selectUserTotal() {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<String> checkExistUser(String existUserId, String userName, String mobile, String idCard) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Page<SysUser> pageUser(SysUser user, Integer pageNo, Integer pageSize, List<String> managerCodes) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Result<Page<UserEmployee>> feignQueryPageList(String realname, String idCord, String orgCode, String threeOrgCode, Integer sex, String workNo, Integer pageNo, Integer pageSize) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Result<Page<UserEmployee>> getUserListByOrgCodeList(String realname,String orgCode,String workNo,List<String> orgCodeList,List<String> userIdList, Integer pageNo, Integer pageSize) {
|
||||
return null;
|
||||
}
|
||||
@Override
|
||||
public Map<String, String> queryUserIdByCardNo(Set<String> cardNoSet) {
|
||||
return null;
|
||||
}
|
||||
@Override
|
||||
public Map<String,String> queryCardNoByUserIds(@RequestBody Set<String> userIds){
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String selectUserExistByUserName(String id, String userName) {
|
||||
return null;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public List<String> userIdsByGroup(List<String> groups) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<String> allThirdDepartCodes() {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
@PostMapping("/sys/api/addUserToEx")
|
||||
public String addUserToEx(SysUserModel sysUserModel) {
|
||||
return new String();
|
||||
}
|
||||
|
||||
@Override
|
||||
@PostMapping("/sys/api/updateUserToEx")
|
||||
public String updateUserToEx(SysUserModel sysUserModel) {
|
||||
return new String();
|
||||
}
|
||||
|
||||
@Override
|
||||
public Integer deleteUserById(String userId) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String selectUserIdNoById(String userId) {
|
||||
return null;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public SysDepartGps selectDepartGpsByDepartId(String departId) {
|
||||
return null;
|
||||
}
|
||||
@Override
|
||||
public Result<List<SysPositionVO>> queryPositionList(List<Long> ids) {
|
||||
return new Result<>();
|
||||
}
|
||||
@Override
|
||||
public List<SysPositionVO> getAllPosition(){
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Result<String> addUserTogether(SysUserModel sysUserModel) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Result<String> updateUserInfoTogether(SysUserModel sysUserModel) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Result<List<SysUser>> selectUserByRoleCode(String roleCode) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public SysUser queryById(String id) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public SysPositionVO getPositionByUserId(String userId) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<SysPositionVO> getPositionByUnitsId(Integer unitsId, Integer postId, String postName) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Result<List<BaseUser>> queryAdminByOrgCode(String orgCode) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Result<Page<UserEmployee>> listUserBackByFeign(UserFilter userFilter) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Result<Page<BaseUser>> peoplePsyAssessPlanUser(PeoplePsyAssessPlanVO vo) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Result<Long> peoplePsyAssessPlanUserNum(PeoplePsyAssessPlanVO vo) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Result<List<SysUser>> getUserByPhoneList(List<String> phoneList) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Result<List<String>> getPhonesByNameOrOrgCode(String realName, String orgCode) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Result<List<String>> getPhonesByNameOrOrgCodeOrSex(String realName, String orgCode,Integer sex) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Result<Map<String, Long>> getGroupByOrgCodeList(List<String> orgCodeList) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Result<Void> updateUserHeightWeight(List<EmployeeHeightWeight> employeeHeightWeights) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Result<Map<String, Double>> getBmiByUserList(List<String> userIds) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Result<Page<BaseUser>> getUsersByMealsWeight(HealthMealsWeightQueryVO queryVO) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Result<WeightStatisticsVO> getStatisticsByMealsWeight(HealthMealsWeightQueryVO queryVO) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Result<Boolean> updateUserGroup(SysUserModel model) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Result<List<GroupCount>> specificGroupUser() {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Result<BaseUserGroup> userGroupInfo(String userId) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Result<EmployeeHeightWeight> appUserFindUserHeightWeight(String userFlag) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Result<List<WeightSignUserVO>> queryWeightSignUser(QueryWeightSignUserParam signUserParam) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Result<String> updateUserBodyInfo(UserBodyInfoDto data) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Result<String> updateEx(UserDataRecordBmi recordBmi) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Result<List<EmployeeHeightWeight>> userBodyInfo(List<String> userIds) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Result<List<WeightHeightDayVO>> weightByDay(String userId, String startTime, String endTime) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Result<String> sendSmsByUserIds(SendSmsReq req) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void sendSmsNotSign(List<NotSignType> notSignTypes) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public Result<List<WeightHeightDayVO>> userBodyInfoLatest(SendSmsReq req) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void sendSmsNotSignV2(List<UserWeightSign> usersSign) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public Result<List<Object>> weightRecord(String userId, Date startTime, Date endTime, Integer pageNo, Integer pageSize) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setRoleByIdList(String roleCode, List<String> userIdList) {
|
||||
return;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Result<String> addHouseManager(LoginUser loginUser) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Result<List<FamilyMembersVO>> userFamilyMembersList(@RequestParam(name = "userId", required = false) String userId){
|
||||
return null;
|
||||
}
|
||||
}
|
||||
+290
@@ -0,0 +1,290 @@
|
||||
package org.jeecg.untils;
|
||||
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.alibaba.nls.client.AccessToken;
|
||||
import io.netty.handler.codec.http.HttpHeaders;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.commons.io.output.ByteArrayOutputStream;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.apache.http.HttpStatus;
|
||||
import org.asynchttpclient.*;
|
||||
import org.jeecg.bean.response.ResponseVo;
|
||||
import org.jeecg.common.util.MyUploadUtil;
|
||||
import org.jeecg.common.util.RedisUtil;
|
||||
import org.jeecg.common.util.UUIDGenerator;
|
||||
import org.jsoup.Jsoup;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
import java.io.*;
|
||||
import java.net.URLEncoder;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.concurrent.CountDownLatch;
|
||||
|
||||
@Slf4j
|
||||
@Component
|
||||
public class SpeechUntil {
|
||||
|
||||
@Value("${speech.domain:}")
|
||||
private String domain;
|
||||
@Value("${speech.path:}")
|
||||
private String path;
|
||||
@Value("${speech.appKey:}")
|
||||
private String appKey;
|
||||
@Value("${speech.accessKeyId:}")
|
||||
private String accessKeyId;
|
||||
@Value("${speech.accessKeySecret:}")
|
||||
private String accessKeySecret;
|
||||
@Value("${speech.format:}")
|
||||
private String format;
|
||||
@Value("${speech.sampleRate:}")
|
||||
private String sampleRate;
|
||||
@Value("${speech.voice:}")
|
||||
private String voice;
|
||||
@Value("${speech.pitchRate:}")
|
||||
private String pitchRate;
|
||||
@Value("${speech.speechRate:}")
|
||||
private String speechRate;
|
||||
@Value("${speech.volume:}")
|
||||
private String volume;
|
||||
@Value("${speech.chunked:}")
|
||||
private String chunked;
|
||||
@Value("${speech.splitNumber:}")
|
||||
private Integer splitNumber;
|
||||
@Value("${speech.redis.effectiveTime:}")
|
||||
private Integer effectiveTime;
|
||||
@Autowired
|
||||
private RedisUtil redisUtil;
|
||||
private static final String REDIS_ALI_TTS_TOKEN = "REDIS_ALI_TTS_TOKEN";
|
||||
private String getToken() {
|
||||
String token = null;
|
||||
try {
|
||||
AccessToken accessToken = new AccessToken( accessKeyId, accessKeySecret,
|
||||
domain, "cn-shanghai", "2019-02-28");
|
||||
accessToken.apply();
|
||||
token = accessToken.getToken();
|
||||
log.info(token);
|
||||
}catch (IOException e){
|
||||
log.error(e.getMessage());
|
||||
}
|
||||
return token;
|
||||
}
|
||||
|
||||
private ResponseVo processGETRequest(String text, ByteArrayOutputStream out, String token) {
|
||||
ResponseVo vo = new ResponseVo();
|
||||
String url = path;
|
||||
url = url + "?appkey=" + appKey;
|
||||
url = url + "&token=" + token;
|
||||
url = url + "&text=" + text;
|
||||
url = url + "&format=" + format;
|
||||
url = url + "&voice=" + voice;
|
||||
url = url + "&sample_rate=" + sampleRate;
|
||||
url = url + "&volume=" + volume;
|
||||
url = url + "&speech_rate=" + speechRate;
|
||||
url = url + "&pitch_rate=" + pitchRate;
|
||||
url = url + "&chunk=" + chunked;
|
||||
try {
|
||||
AsyncHttpClientConfig config = new DefaultAsyncHttpClientConfig.Builder()
|
||||
// 链接超时和请求超时等跟官方例子保持一致,最好不要修改
|
||||
.setConnectTimeout(5000)
|
||||
.setKeepAlive(true)
|
||||
.setReadTimeout(10000)
|
||||
.setRequestTimeout(50000)
|
||||
.setMaxConnections(1000)
|
||||
.setMaxConnectionsPerHost(200)
|
||||
.setPooledConnectionIdleTimeout(-1)
|
||||
.build();
|
||||
AsyncHttpClient httpClient = new DefaultAsyncHttpClient(config);
|
||||
final CountDownLatch latch = new CountDownLatch(1);
|
||||
AsyncHandler<Response> handler = new AsyncHandler<org.asynchttpclient.Response>() {
|
||||
boolean firstRevBinary = true;
|
||||
int httpCode = 200;
|
||||
@Override
|
||||
public State onStatusReceived(HttpResponseStatus httpResponseStatus) {
|
||||
log.info("onStatusReceived status {}", httpResponseStatus);
|
||||
httpCode = httpResponseStatus.getStatusCode();
|
||||
if (httpResponseStatus.getStatusCode() != 200) {
|
||||
vo.setStateCode(httpResponseStatus.getStatusCode());
|
||||
log.error("request error " + httpResponseStatus.toString());
|
||||
}
|
||||
return null;
|
||||
}
|
||||
@Override
|
||||
public State onHeadersReceived(HttpHeaders httpHeaders){
|
||||
return null;
|
||||
}
|
||||
@Override
|
||||
public State onBodyPartReceived(HttpResponseBodyPart httpResponseBodyPart) throws Exception {
|
||||
//重要提示:此处一旦接收到数据流,即可向用户播放或者用于其他处理,以提升响应速度
|
||||
//重要提示:请不要在此回调接口中执行耗时操作,可以以异步或者队列形式将二进制TTS语音流推送到另一线程中
|
||||
if(httpCode != 200) {
|
||||
vo.setStateCode(httpCode);
|
||||
out.write((httpResponseBodyPart.getBodyPartBytes()));
|
||||
return State.ABORT;
|
||||
}
|
||||
|
||||
if (firstRevBinary) {
|
||||
firstRevBinary = false;
|
||||
//统计第一包数据的接收延迟,实际上接收到第一包数据后就可以进行业务处理了,比如播放或者发送给调用方,注意:这里的首包延迟也包括了网络建立链接的时间
|
||||
}
|
||||
//重要提示:此处仅为举例,将语音流保存到文件中
|
||||
out.write(httpResponseBodyPart.getBodyPartBytes());
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onThrowable(Throwable throwable) {
|
||||
log.error("throwable:" + throwable);
|
||||
latch.countDown();
|
||||
}
|
||||
@Override
|
||||
public org.asynchttpclient.Response onCompleted() {
|
||||
latch.countDown();
|
||||
return null;
|
||||
}
|
||||
};
|
||||
|
||||
httpClient.prepareGet(url).execute(handler);
|
||||
// 等待合成完成
|
||||
latch.await();
|
||||
httpClient.close();
|
||||
vo.setIn(new ByteArrayInputStream(out.toByteArray()));
|
||||
}catch (Exception e) {
|
||||
log.error(e.getMessage());
|
||||
}
|
||||
return vo;
|
||||
}
|
||||
|
||||
/**
|
||||
* 将长文本切分为每句字数不大于size数目的短句
|
||||
* @param text
|
||||
* @param size
|
||||
* @return
|
||||
*/
|
||||
private List<String> splitText(String text, int size) {
|
||||
//先按标点符号切分
|
||||
String[] texts = text.split("[、,。;?!,!\\?]");
|
||||
StringBuilder textPart = new StringBuilder();
|
||||
List<String> result = new ArrayList<String>();
|
||||
int len = 0;
|
||||
//再按size merge,避免标点符号切分出来的太短
|
||||
for (String s : texts) {
|
||||
if (textPart.length() + s.length() + 1 > size) {
|
||||
result.add(textPart.toString());
|
||||
textPart.delete(0, textPart.length());
|
||||
|
||||
}
|
||||
textPart.append(s);
|
||||
len += s.length();
|
||||
if (len < text.length()) {
|
||||
textPart.append(text.charAt(len));
|
||||
len += 1;
|
||||
}
|
||||
}
|
||||
if (textPart.length() > 0) {
|
||||
result.add(textPart.toString());
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
private ResponseVo process(String longText, String token) {
|
||||
ResponseVo vo = new ResponseVo();
|
||||
ByteArrayOutputStream out = new ByteArrayOutputStream();
|
||||
List<String> textArr = splitText(longText, splitNumber);
|
||||
try {
|
||||
for (String textUrlEncode : textArr) {
|
||||
//设置用于语音合成的文本
|
||||
// 采用RFC 3986规范进行urlEncode编码
|
||||
try {
|
||||
textUrlEncode = URLEncoder.encode(textUrlEncode, "UTF-8")
|
||||
.replace("+", "%20")
|
||||
.replace("*", "%2A")
|
||||
.replace("%7E", "~");
|
||||
} catch (UnsupportedEncodingException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
vo = processGETRequest(textUrlEncode, out, token);
|
||||
if (vo.getStateCode() == null) {
|
||||
vo.setStateCode(200);
|
||||
}
|
||||
}
|
||||
} catch (Exception e) {
|
||||
log.error(e.getMessage());
|
||||
}
|
||||
return vo;
|
||||
}
|
||||
|
||||
/**
|
||||
* 生成语音并且上传至文件服务器(对外暴露)
|
||||
* @param text
|
||||
* @return
|
||||
*/
|
||||
public String generateVoice(String text){
|
||||
String url = null;
|
||||
//将文字所有html标签删除
|
||||
String substance = Jsoup.parse(text).text();
|
||||
//将文字符号转换成汉语(常用,后面继续补充)
|
||||
String content =
|
||||
substance.replace("<", "小于").replace("=", "等于")
|
||||
.replace(">", "大于") .replace("/", "分之")
|
||||
.replace("%", "百分比").replace("+", "加");
|
||||
//阿里语音设置有效23小时
|
||||
//设置redisKey
|
||||
// String token = (String) redisUtil.get(REDIS_ALI_TTS_TOKEN);
|
||||
// //若token不存在,则生成token,设置有效期为23小时
|
||||
// if (StringUtils.isEmpty(token)){
|
||||
String token = getToken();
|
||||
System.out.println(token);
|
||||
redisUtil.set(REDIS_ALI_TTS_TOKEN, token, effectiveTime);
|
||||
// }
|
||||
ResponseVo vo = process(content,token);
|
||||
//判断语音是否生成成功
|
||||
if (HttpStatus.SC_OK != vo.getStateCode()){
|
||||
String read = readInputStream(vo.getIn());
|
||||
//input stream是否有参数
|
||||
if (read != null){
|
||||
log.info(read);
|
||||
int startIndex = read.indexOf("{");
|
||||
int endIndex = read.indexOf("}", startIndex) + 1;
|
||||
String arr = read.substring(startIndex, endIndex);
|
||||
JSONObject jsonObject = JSON.parseObject(arr);
|
||||
//token失效
|
||||
if("40000001".equals(jsonObject.getString("status"))){
|
||||
//token失效,重新生成语音,先删除key
|
||||
redisUtil.del(REDIS_ALI_TTS_TOKEN);
|
||||
url = generateVoice(text);
|
||||
}
|
||||
}
|
||||
}else {
|
||||
//上送服务器
|
||||
String suffix = "." + format;
|
||||
String fileName = UUIDGenerator.generate()+suffix;
|
||||
String bizType = "ttsVoice";
|
||||
try {
|
||||
url = MyUploadUtil.upload(vo.getIn(), bizType, fileName);
|
||||
}catch (Exception e){
|
||||
log.error(e.getMessage(), e);
|
||||
}
|
||||
}
|
||||
return url;
|
||||
}
|
||||
|
||||
//读取input stream
|
||||
private String readInputStream(InputStream inputStream) {
|
||||
try {
|
||||
StringBuilder content = new StringBuilder();
|
||||
try (BufferedReader reader = new BufferedReader(new InputStreamReader(inputStream))) {
|
||||
String line;
|
||||
while ((line = reader.readLine()) != null) {
|
||||
content.append(line);
|
||||
}
|
||||
}
|
||||
return content.toString();
|
||||
} catch (IOException e) {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,21 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xmlns="http://maven.apache.org/POM/4.0.0"
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<parent>
|
||||
<artifactId>jeecg-system-api</artifactId>
|
||||
<groupId>org.jeecgframework.boot</groupId>
|
||||
<version>2.0.0</version>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
<artifactId>jeecg-system-local-api</artifactId>
|
||||
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>org.jeecgframework.boot</groupId>
|
||||
<artifactId>jeecg-system-cloud-api</artifactId>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
</project>
|
||||
+559
@@ -0,0 +1,559 @@
|
||||
package org.jeecg.common.system.api;
|
||||
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import org.jeecg.bean.request.ListUser;
|
||||
import org.jeecg.bean.request.UserClient;
|
||||
import org.jeecg.bean.response.EmployeeHeightWeight;
|
||||
import org.jeecg.bean.response.SysPositionVO;
|
||||
import org.jeecg.bean.response.WeightHeightDayVO;
|
||||
import org.jeecg.common.api.CommonAPI;
|
||||
import org.jeecg.common.api.dto.DataLogDTO;
|
||||
import org.jeecg.common.api.dto.OnlineAuthDTO;
|
||||
import org.jeecg.common.api.dto.message.*;
|
||||
import org.jeecg.common.api.vo.Result;
|
||||
import org.jeecg.common.bean.request.SendSmsReq;
|
||||
import org.jeecg.common.bean.response.BaseUserGroup;
|
||||
import org.jeecg.common.bean.response.NotSignType;
|
||||
import org.jeecg.common.bean.transfer.GroupCount;
|
||||
import org.jeecg.common.bean.transfer.UserWeightSign;
|
||||
import org.jeecg.common.system.vo.*;
|
||||
import org.jeecg.modules.system.bean.UserEmployee;
|
||||
import org.jeecg.modules.system.entity.HealthUserEmployeeEx;
|
||||
import org.jeecg.modules.system.entity.SysUser;
|
||||
import org.jeecg.modules.system.entity.SysUserEmergencyContact;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestParam;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
|
||||
/**
|
||||
* @Description 底层共通业务API,提供其他独立模块调用
|
||||
* @Author scott
|
||||
* @Date 2019-4-20
|
||||
* @Version V1.0
|
||||
*/
|
||||
public interface ISysBaseAPI extends CommonAPI {
|
||||
|
||||
String addHouseManager(@RequestBody LoginUser loginUser);
|
||||
List<String> getUserIdsByDepartAndUsername(String departCode, String username, String idCard, String workNo);
|
||||
|
||||
// 添加医护人员
|
||||
SysUser addMedicalStaff(SysUserModel sysUser);
|
||||
/**
|
||||
* 获取用户扩展信息
|
||||
* @param userIds 用户ids
|
||||
* @return list
|
||||
*/
|
||||
List<HealthUserEmployeeEx> listEmployeeUserByIds(ListUser userIds);
|
||||
|
||||
|
||||
/**
|
||||
* 获取用户信息,部门信息以及部门父级部门树(至多只查询到二级部门)
|
||||
*
|
||||
* @param userIds 用户id
|
||||
* @return 登录用户信息
|
||||
*/
|
||||
List<LoginUserNew> listUserByIds(ListUser userIds);
|
||||
|
||||
List<LoginUser> listUserByIdsNew(List<String> userIds);
|
||||
|
||||
/**
|
||||
* @param list 用户id
|
||||
* @return 用户信息
|
||||
*/
|
||||
List<LoginUserNew> listUserByIdsClient(List<UserClient> list);
|
||||
|
||||
|
||||
/**
|
||||
* 1发送系统消息
|
||||
*
|
||||
* @param message 使用构造器赋值参数 如果不设置category(消息类型)则默认为2 发送系统消息
|
||||
*/
|
||||
void sendSysAnnouncement(MessageDTO message);
|
||||
|
||||
/**
|
||||
* 2发送消息 附带业务参数
|
||||
*
|
||||
* @param message 使用构造器赋值参数
|
||||
*/
|
||||
void sendBusAnnouncement(BusMessageDTO message);
|
||||
|
||||
/**
|
||||
* 3通过模板发送消息
|
||||
*
|
||||
* @param message 使用构造器赋值参数
|
||||
*/
|
||||
void sendTemplateAnnouncement(TemplateMessageDTO message);
|
||||
|
||||
/**
|
||||
* 4通过模板发送消息 附带业务参数
|
||||
*
|
||||
* @param message 使用构造器赋值参数
|
||||
*/
|
||||
void sendBusTemplateAnnouncement(BusTemplateMessageDTO message);
|
||||
|
||||
/**
|
||||
* 5通过消息中心模板,生成推送内容
|
||||
*
|
||||
* @param templateDTO 使用构造器赋值参数
|
||||
* @return
|
||||
*/
|
||||
String parseTemplateByCode(TemplateDTO templateDTO);
|
||||
|
||||
//update-begin---author:taoyan ---date:20220705 for:支持自定义推送类型,邮件、钉钉、企业微信、系统消息-----------
|
||||
|
||||
/**
|
||||
* 发送模板消息【新,支持自定义推送类型】
|
||||
*
|
||||
* @param message
|
||||
*/
|
||||
void sendTemplateMessage(MessageDTO message);
|
||||
|
||||
/**
|
||||
* 根据模板编码获取模板内容【新,支持自定义推送类型】
|
||||
*
|
||||
* @param templateCode
|
||||
* @return
|
||||
*/
|
||||
String getTemplateContent(String templateCode);
|
||||
//update-begin---author:taoyan ---date:20220705 for:支持自定义推送类型,邮件、钉钉、企业微信、系统消息-----------
|
||||
|
||||
/**
|
||||
* 6根据用户id查询用户信息
|
||||
*
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
LoginUser getUserById(String id);
|
||||
|
||||
/**
|
||||
* 7通过用户账号查询角色集合
|
||||
*
|
||||
* @param userId
|
||||
* @return
|
||||
*/
|
||||
List<String> getRolesByUserId(String userId);
|
||||
|
||||
/**
|
||||
* 8通过用户账号查询部门集合
|
||||
*
|
||||
* @param userId
|
||||
* @return 部门 id
|
||||
*/
|
||||
List<String> getDepartIdsByUserId(String userId);
|
||||
|
||||
/**
|
||||
* 9通过用户账号查询部门 name
|
||||
*
|
||||
* @param userId
|
||||
* @return 部门 name
|
||||
*/
|
||||
List<String> getDepartNamesByUserId(String userId);
|
||||
|
||||
|
||||
/**
|
||||
* 11查询所有的父级字典,按照create_time排序
|
||||
*
|
||||
* @return List<DictModel> 字典集合
|
||||
*/
|
||||
public List<DictModel> queryAllDict();
|
||||
|
||||
/**
|
||||
* 12查询所有分类字典
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
public List<SysCategoryModel> queryAllSysCategory();
|
||||
|
||||
|
||||
/**
|
||||
* 14查询所有部门 作为字典信息 id -->value,departName -->text
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
public List<DictModel> queryAllDepartBackDictModel();
|
||||
|
||||
/**
|
||||
* 15根据业务类型及业务id修改消息已读
|
||||
*
|
||||
* @param busType
|
||||
* @param busId
|
||||
*/
|
||||
public void updateSysAnnounReadFlag(String busType, String busId);
|
||||
|
||||
/**
|
||||
* 16查询表字典 支持过滤数据
|
||||
*
|
||||
* @param table
|
||||
* @param text
|
||||
* @param code
|
||||
* @param filterSql
|
||||
* @return
|
||||
*/
|
||||
public List<DictModel> queryFilterTableDictInfo(String table, String text, String code, String filterSql);
|
||||
|
||||
/**
|
||||
* 17查询指定table的 text code 获取字典,包含text和value
|
||||
*
|
||||
* @param table
|
||||
* @param text
|
||||
* @param code
|
||||
* @param keyArray
|
||||
* @return
|
||||
*/
|
||||
@Deprecated
|
||||
public List<String> queryTableDictByKeys(String table, String text, String code, String[] keyArray);
|
||||
|
||||
/**
|
||||
* 18查询所有用户 返回ComboModel
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
public List<ComboModel> queryAllUserBackCombo();
|
||||
|
||||
/**
|
||||
* 19分页查询用户 返回JSONObject
|
||||
*
|
||||
* @param userIds 多个用户id
|
||||
* @param pageNo 当前页数
|
||||
* @param pageSize 每页显示条数
|
||||
* @return
|
||||
*/
|
||||
public JSONObject queryAllUser(String userIds, Integer pageNo, Integer pageSize);
|
||||
|
||||
/**
|
||||
* 20获取所有角色
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
public List<ComboModel> queryAllRole();
|
||||
|
||||
/**
|
||||
* 21获取所有角色 带参
|
||||
*
|
||||
* @param roleIds 默认选中角色
|
||||
* @return
|
||||
*/
|
||||
public List<ComboModel> queryAllRole(String[] roleIds);
|
||||
|
||||
/**
|
||||
* 22通过用户账号查询角色Id集合
|
||||
*
|
||||
* @param userId
|
||||
* @return
|
||||
*/
|
||||
public List<String> getRoleIdsByUserId(String userId);
|
||||
|
||||
/**
|
||||
* 23通过部门编号查询部门id
|
||||
*
|
||||
* @param orgCode
|
||||
* @return
|
||||
*/
|
||||
public String getDepartIdsByOrgCode(String orgCode);
|
||||
|
||||
/**
|
||||
* 24查询所有部门
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
public List<SysDepartModel> getAllSysDepart();
|
||||
|
||||
/**
|
||||
* 25查找父级部门
|
||||
*
|
||||
* @param departId
|
||||
* @return
|
||||
*/
|
||||
DictModel getParentDepartId(String departId);
|
||||
|
||||
/**
|
||||
* 26根据部门Id获取部门负责人
|
||||
*
|
||||
* @param deptId
|
||||
* @return
|
||||
*/
|
||||
public List<String> getDeptHeadByDepId(String deptId);
|
||||
|
||||
/**
|
||||
* 27给指定用户发消息
|
||||
*
|
||||
* @param userIds
|
||||
* @param cmd
|
||||
*/
|
||||
public void sendWebSocketMsg(String[] userIds, String cmd);
|
||||
|
||||
/**
|
||||
* 28根据id获取所有参与用户
|
||||
*
|
||||
* @param userIds 多个用户id
|
||||
* @return
|
||||
*/
|
||||
public List<LoginUser> queryAllUserByIds(String[] userIds);
|
||||
|
||||
/**
|
||||
* 29将会议签到信息推动到预览
|
||||
* userIds
|
||||
*
|
||||
* @param userId
|
||||
* @return
|
||||
*/
|
||||
void meetingSignWebsocket(String userId);
|
||||
|
||||
/**
|
||||
* 30根据name获取所有参与用户
|
||||
*
|
||||
* @param userNames 多个用户账户
|
||||
* @return
|
||||
*/
|
||||
List<LoginUser> queryUserByNames(String[] userNames);
|
||||
|
||||
|
||||
/**
|
||||
* 31获取用户的角色集合
|
||||
*
|
||||
* @param userId
|
||||
* @return
|
||||
*/
|
||||
Set<String> getUserRoleSet(String userId);
|
||||
|
||||
/**
|
||||
* 32获取用户的权限集合
|
||||
*
|
||||
* @param userId
|
||||
* @return
|
||||
*/
|
||||
Set<String> getUserPermissionSet(String userId);
|
||||
|
||||
/**
|
||||
* 33判断是否有online访问的权限
|
||||
*
|
||||
* @param onlineAuthDTO
|
||||
* @return
|
||||
*/
|
||||
boolean hasOnlineAuth(OnlineAuthDTO onlineAuthDTO);
|
||||
|
||||
/**
|
||||
* 34通过部门id获取部门全部信息
|
||||
*
|
||||
* @param id 部门id
|
||||
* @return SysDepartModel对象
|
||||
*/
|
||||
SysDepartModel selectAllById(String id);
|
||||
|
||||
/**
|
||||
* 35根据用户id查询用户所属公司下所有用户ids
|
||||
*
|
||||
* @param userId
|
||||
* @return
|
||||
*/
|
||||
List<String> queryDeptUsersByUserId(String userId);
|
||||
|
||||
/**
|
||||
* 36根据多个用户账号(逗号分隔),查询返回多个用户信息
|
||||
*
|
||||
* @param usernames
|
||||
* @return
|
||||
*/
|
||||
List<JSONObject> queryUsersByUsernames(String usernames);
|
||||
|
||||
/**
|
||||
* 37根据多个用户ID(逗号分隔),查询返回多个用户信息
|
||||
*
|
||||
* @param ids
|
||||
* @return
|
||||
*/
|
||||
List<JSONObject> queryUsersByIds(String ids);
|
||||
|
||||
/**
|
||||
* 38根据多个部门编码(逗号分隔),查询返回多个部门信息
|
||||
*
|
||||
* @param orgCodes
|
||||
* @return
|
||||
*/
|
||||
List<JSONObject> queryDepartsByOrgcodes(String orgCodes);
|
||||
|
||||
/**
|
||||
* 39根据多个部门id(逗号分隔),查询返回多个部门信息
|
||||
*
|
||||
* @param ids
|
||||
* @return
|
||||
*/
|
||||
List<JSONObject> queryDepartsByIds(String ids);
|
||||
|
||||
/**
|
||||
* 40发送邮件消息
|
||||
*
|
||||
* @param email
|
||||
* @param title
|
||||
* @param content
|
||||
*/
|
||||
void sendEmailMsg(String email, String title, String content);
|
||||
|
||||
/**
|
||||
* 41 获取公司下级部门和公司下所有用户信息
|
||||
*
|
||||
* @param orgCode
|
||||
* @return List<Map>
|
||||
*/
|
||||
List<Map> getDeptUserByOrgCode(String orgCode);
|
||||
|
||||
/**
|
||||
* 查询分类字典翻译
|
||||
*
|
||||
* @param ids 多个分类字典id
|
||||
* @return List<String>
|
||||
*/
|
||||
List<String> loadCategoryDictItem(String ids);
|
||||
|
||||
/**
|
||||
* 根据字典code加载字典text
|
||||
*
|
||||
* @param dictCode 顺序:tableName,text,code
|
||||
* @param keys 要查询的key
|
||||
* @return
|
||||
*/
|
||||
List<String> loadDictItem(String dictCode, String keys);
|
||||
|
||||
/**
|
||||
* 根据字典code查询字典项
|
||||
*
|
||||
* @param dictCode 顺序:tableName,text,code
|
||||
* @param dictCode 要查询的key
|
||||
* @return
|
||||
*/
|
||||
List<DictModel> getDictItems(String dictCode);
|
||||
|
||||
/**
|
||||
* 根据多个字典code查询多个字典项
|
||||
*
|
||||
* @param dictCodeList
|
||||
* @return key = dictCode ; value=对应的字典项
|
||||
*/
|
||||
Map<String, List<DictModel>> getManyDictItems(List<String> dictCodeList);
|
||||
|
||||
/**
|
||||
* 【JSearchSelectTag下拉搜索组件专用接口】
|
||||
* 大数据量的字典表 走异步加载 即前端输入内容过滤数据
|
||||
*
|
||||
* @param dictCode 字典code格式:table,text,code
|
||||
* @param keyword 过滤关键字
|
||||
* @param pageSize 分页条数
|
||||
* @return
|
||||
*/
|
||||
List<DictModel> loadDictItemByKeyword(String dictCode, String keyword, Integer pageSize);
|
||||
|
||||
/**
|
||||
* 新增数据日志
|
||||
*
|
||||
* @param dataLogDto
|
||||
*/
|
||||
void saveDataLog(DataLogDTO dataLogDto);
|
||||
|
||||
/**
|
||||
* 添加文件到知识库
|
||||
*
|
||||
* @param sysFilesModel
|
||||
*/
|
||||
void addSysFiles(SysFilesModel sysFilesModel);
|
||||
|
||||
/**
|
||||
* 通过文件路径获取文件id
|
||||
*
|
||||
* @param fileId
|
||||
*/
|
||||
String getFileUrl(String fileId);
|
||||
|
||||
/**
|
||||
* 更新头像
|
||||
*
|
||||
* @param loginUser
|
||||
*/
|
||||
void updateAvatar(LoginUser loginUser);
|
||||
|
||||
/**
|
||||
* 向app端 websocket推送聊天刷新消息
|
||||
*
|
||||
* @param userId
|
||||
*/
|
||||
void sendAppChatSocket(String userId);
|
||||
|
||||
String addUserToEx(SysUserModel sysUserModel);
|
||||
|
||||
|
||||
String updateUserToEx(SysUserModel sysUserModel);
|
||||
|
||||
Integer deleteUserById(String userId);
|
||||
|
||||
String selectUserIdNoById(String userId);
|
||||
|
||||
List<SysUserEmergencyContact> selectEmergencyContactByUserId(String userId);
|
||||
|
||||
UserEmployee selectEmployeeUser(String userId);
|
||||
|
||||
List<SysUser> userListByPhone(@RequestParam String phone);
|
||||
|
||||
boolean updateUserInfo(SysUserModel sysUser);
|
||||
|
||||
boolean delUser(List<String> ids);
|
||||
|
||||
Integer chageUserPersonType(String userId);
|
||||
|
||||
List<SysUser> getUserByIdCardList(ListUser listUser);
|
||||
|
||||
Result<Object> getUserNumByOrgCode(String orgCode);
|
||||
|
||||
Result<Map<String, Integer>> getUserNumByOrgCodeList(List<String> orgCodeList);
|
||||
|
||||
void sendBusSms(BusTemplateMessageDTO message);
|
||||
|
||||
List<LoginUser> listUserByIdCards(List<String> idCards);
|
||||
|
||||
List<String> userIdsByGroup(List<String> groups);
|
||||
|
||||
List<String> allThirdDepartCodes();
|
||||
|
||||
void updateUserGroup(SysUserModel model);
|
||||
|
||||
List<String> checkExistUser(String existUserId, String userName, String mobile, String idCard);
|
||||
|
||||
Page<SysUser> pageUser(SysUser user, Integer pageNo, Integer pageSize, List<String> managerCodes);
|
||||
// List<String> checkExistUser(String existUserId,String userName, String mobile, String idCard);
|
||||
|
||||
Result<List<String>> getUserIdsByOrgCodeList(List<String> orgCodeList);
|
||||
|
||||
String selectUserExistByUserName(String id, String userName);
|
||||
/**根据用户id获取所在部门信息*/
|
||||
SysPositionVO getPositionByUserId(String userId);
|
||||
|
||||
/**根据单位字典id获取岗位列表*/
|
||||
List<SysPositionVO> getPositionByUnitsId(Integer unitsId, Integer postNum, String postName);
|
||||
|
||||
/**
|
||||
* 查询所有岗位信息
|
||||
* @return
|
||||
*/
|
||||
List<SysPositionVO> getAllPosition();
|
||||
|
||||
List<String> findSysUserIds(SysUser user);
|
||||
|
||||
List<GroupCount> specificGroupUser();
|
||||
|
||||
BaseUserGroup userGroupInfo(String userId);
|
||||
|
||||
List<EmployeeHeightWeight> userBodyInfo(List<String> userIds);
|
||||
|
||||
/**
|
||||
* 发送超重管理短信提醒数据
|
||||
*/
|
||||
void sendSmsByUserIds(SendSmsReq req);
|
||||
|
||||
void sendSmsNotSign(List<NotSignType> notSignTypes);
|
||||
|
||||
void sendSmsNotSignV2(List<UserWeightSign> usersSign);
|
||||
|
||||
List<WeightHeightDayVO> userBodyInfoLatest(SendSmsReq req);
|
||||
}
|
||||
+16
@@ -0,0 +1,16 @@
|
||||
package org.jeecg.common.system.bean.request;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import javax.validation.constraints.NotBlank;
|
||||
|
||||
/**
|
||||
* @author Junqiang Zhu
|
||||
* @date 2023-07-11 14:50
|
||||
*/
|
||||
@Data
|
||||
public class NoticeRead {
|
||||
@NotBlank(message = "公告id为空")
|
||||
private String noticeId;
|
||||
private String agree;
|
||||
}
|
||||
+45
@@ -0,0 +1,45 @@
|
||||
package org.jeecg.common.system.bean.request;
|
||||
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
import javax.validation.constraints.NotBlank;
|
||||
|
||||
/**
|
||||
* @author Junqiang Zhu
|
||||
* @date 2023-05-30 14:56
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
public class ResetPassword extends SimpleUser {
|
||||
/**
|
||||
* 旧密码
|
||||
*/
|
||||
private String password;
|
||||
/**
|
||||
* 新密码
|
||||
*/
|
||||
@NotBlank(message = "新密码为空")
|
||||
private String newPassword;
|
||||
/**
|
||||
* 确认密码
|
||||
*/
|
||||
@NotBlank(message = "确认密码为空")
|
||||
private String newPasswordConfirm;
|
||||
|
||||
/**
|
||||
* 手机号码
|
||||
*/
|
||||
private String phone;
|
||||
/**
|
||||
* 验证码
|
||||
*/
|
||||
private String randCode;
|
||||
/**
|
||||
* 验证码rediskey
|
||||
*/
|
||||
private String randCodeKey;
|
||||
|
||||
// 用户检验code
|
||||
private String resetCode;
|
||||
}
|
||||
+24
@@ -0,0 +1,24 @@
|
||||
package org.jeecg.common.system.bean.request;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import javax.validation.constraints.NotBlank;
|
||||
|
||||
/**
|
||||
* @author Junqiang Zhu
|
||||
* @date 2023-05-30 14:57
|
||||
*/
|
||||
@Data
|
||||
public class SimpleUser {
|
||||
@NotBlank(message = "用户id为空")
|
||||
private String userId;
|
||||
private String userName;
|
||||
/**
|
||||
* 部门
|
||||
*/
|
||||
private String depart;
|
||||
/**
|
||||
* 状态(1-正常,2-冻结)
|
||||
*/
|
||||
private String status;
|
||||
}
|
||||
+29
@@ -0,0 +1,29 @@
|
||||
package org.jeecg.common.system.bean.request;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
@Data
|
||||
public class SysMessageRemindDO implements Serializable {
|
||||
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@Schema(title = "主键id")
|
||||
private String id;
|
||||
|
||||
@Schema(title = "标题")
|
||||
private String title;
|
||||
|
||||
@Schema(title = "内容")
|
||||
private String content;
|
||||
|
||||
@Schema(title = "类型 1用户消息 2消息公告")
|
||||
private String type;
|
||||
|
||||
@Schema(title = "0未读 1已读")
|
||||
private String state;
|
||||
|
||||
}
|
||||
+26
@@ -0,0 +1,26 @@
|
||||
package org.jeecg.common.system.bean.request;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Map;
|
||||
|
||||
@Data
|
||||
public class SysMessageRemindSendDO implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@Schema(title = "标题")
|
||||
private String title;
|
||||
|
||||
@Schema(title = "内容")
|
||||
private String content;
|
||||
|
||||
@Schema(title = "类型")
|
||||
private String userId;
|
||||
|
||||
@Schema(title = "透传消息参数")
|
||||
private Map<String, String> param;
|
||||
|
||||
}
|
||||
+41
@@ -0,0 +1,41 @@
|
||||
package org.jeecg.common.system.bean.request;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
import org.jeecg.common.aspect.annotation.Dict;
|
||||
|
||||
import javax.validation.constraints.NotBlank;
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* @Description: sys_user_emergency_contact
|
||||
* @Author: jeecg-boot
|
||||
* @Date: 2023-07-03
|
||||
* @Version: V1.0
|
||||
*/
|
||||
@Data
|
||||
public class SysUserEmergencyContactDO implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@Schema(title = "主键id")
|
||||
private String id;
|
||||
|
||||
@NotBlank(message = "不能为空")
|
||||
@Schema(title = "紧急联系人姓名")
|
||||
private java.lang.String name;
|
||||
|
||||
@NotBlank(message = "不能为空")
|
||||
@Schema(title = "紧急联系人电话")
|
||||
private java.lang.String phone;
|
||||
|
||||
|
||||
@Schema(title = "紧急联系人身份证号")
|
||||
private java.lang.String idCard;
|
||||
|
||||
@NotBlank(message = "不能为空")
|
||||
@Schema(title = "家庭关系")
|
||||
@Dict(dicCode = "family_member_relation")
|
||||
private java.lang.String familyRelation;
|
||||
|
||||
}
|
||||
+68
@@ -0,0 +1,68 @@
|
||||
package org.jeecg.common.system.bean.request;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
import org.jeecg.common.aspect.annotation.Dict;
|
||||
|
||||
@Data
|
||||
public class SysUserInfoDO {
|
||||
|
||||
|
||||
/**
|
||||
* 姓名
|
||||
*/
|
||||
@Schema(title = "姓名")
|
||||
private String realname;
|
||||
|
||||
/**
|
||||
* 工号
|
||||
*/
|
||||
@Schema(title = "工号")
|
||||
private String workNo;
|
||||
|
||||
/**
|
||||
* 手机号
|
||||
*/
|
||||
@Schema(title = "手机号")
|
||||
private String phone;
|
||||
|
||||
/**
|
||||
* 身份证
|
||||
*/
|
||||
@Schema(title = "身份证")
|
||||
private String idCard;
|
||||
|
||||
/**
|
||||
* 性别 翻译好是带Value那个
|
||||
*/
|
||||
@Schema(title = "性别")
|
||||
@Dict(dicCode = "sex2")
|
||||
private Integer sex;
|
||||
|
||||
/**
|
||||
* 人员类型 翻译好是带Value那个
|
||||
*/
|
||||
@Schema(title = "人员类型")
|
||||
@Dict(dicCode = "p_type")
|
||||
private String personType;
|
||||
|
||||
/**
|
||||
* 部门
|
||||
*/
|
||||
@Schema(title = "部门")
|
||||
private String orgCode;
|
||||
|
||||
/**
|
||||
* 头像
|
||||
*/
|
||||
@Schema(title = "头像")
|
||||
private String avatar;
|
||||
|
||||
@Dict(dicCode = "blood_type")
|
||||
@Schema(title = "血型")
|
||||
private String bloodType;
|
||||
|
||||
@Dict(dicCode = "health_type")
|
||||
@Schema(title = "健康类型")
|
||||
private String healthType;
|
||||
}
|
||||
+30
@@ -0,0 +1,30 @@
|
||||
package org.jeecg.common.system.bean.response;
|
||||
|
||||
import lombok.Data;
|
||||
import org.jeecg.common.aspect.annotation.Dict;
|
||||
import org.jeecgframework.poi.excel.annotation.Excel;
|
||||
|
||||
/**
|
||||
* @author Junqiang Zhu
|
||||
* @date 2023-07-12 10:40
|
||||
*/
|
||||
@Data
|
||||
public class BaseUser {
|
||||
private String userId;
|
||||
private String userName;
|
||||
@Excel(name = "姓名",orderNum = "2")
|
||||
private String realName;
|
||||
private String workNo;
|
||||
@Excel(name = "身份证号",orderNum = "3",width = 30)
|
||||
private String idCard;
|
||||
@Dict(dicCode = "p_type")
|
||||
private String personType;
|
||||
@Excel(name = "单位",orderNum = "0",width = 30)
|
||||
private String secondDepart;
|
||||
private String orgCode;
|
||||
private String departId;
|
||||
@Excel(name = "部门",orderNum = "1",width = 30)
|
||||
private String depart;
|
||||
@Dict(dicCode = "user_status")
|
||||
private String status;
|
||||
}
|
||||
+26
@@ -0,0 +1,26 @@
|
||||
package org.jeecg.common.system.bean.response;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import org.jeecg.common.aspect.annotation.Dict;
|
||||
import org.jeecgframework.poi.excel.annotation.Excel;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* @author Junqiang Zhu
|
||||
* @date 2024-01-02 16:41
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
public class GroupUser extends BaseUser{
|
||||
@Dict(dicCode = "user_group")
|
||||
@Excel(name = "健康分类",dicCode = "user_group",orderNum = "4")
|
||||
private String userGroup;
|
||||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
|
||||
@Excel(name = "更新时间",format = "yyyy-MM-dd HH:mm:ss",width = 30,orderNum = "5")
|
||||
private Date userGroupUpdateTime;
|
||||
}
|
||||
@@ -0,0 +1,25 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xmlns="http://maven.apache.org/POM/4.0.0"
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<parent>
|
||||
<artifactId>jeecg-system</artifactId>
|
||||
<groupId>org.jeecgframework.boot</groupId>
|
||||
<version>2.0.0</version>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<artifactId>jeecg-system-api</artifactId>
|
||||
<packaging>pom</packaging>
|
||||
|
||||
<modules>
|
||||
<module>jeecg-system-local-api</module>
|
||||
<module>jeecg-system-cloud-api</module>
|
||||
</modules>
|
||||
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>org.jeecgframework.boot</groupId>
|
||||
<artifactId>jeecg-boot-base-core</artifactId>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
</project>
|
||||
Reference in New Issue
Block a user