yang_shj
11 months ago
138 changed files with 6899 additions and 636 deletions
@ -0,0 +1,13 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?> |
||||
<project xmlns="http://maven.apache.org/POM/4.0.0" |
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" |
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> |
||||
<parent> |
||||
<artifactId>hzims-service-api</artifactId> |
||||
<groupId>com.hnac.hzims</groupId> |
||||
<version>4.0.0-SNAPSHOT</version> |
||||
</parent> |
||||
<modelVersion>4.0.0</modelVersion> |
||||
<artifactId>basic-api</artifactId> |
||||
<packaging>jar</packaging> |
||||
</project> |
@ -0,0 +1,11 @@
|
||||
package com.hnac.hzims.basic.constants; |
||||
|
||||
/** |
||||
* @author ysj |
||||
*/ |
||||
public interface BasicConstants { |
||||
|
||||
String APP_NAME = "hzims-basic"; |
||||
|
||||
|
||||
} |
@ -0,0 +1,65 @@
|
||||
package com.hnac.hzims.basic.entity; |
||||
|
||||
import com.baomidou.mybatisplus.annotation.SqlCondition; |
||||
import com.baomidou.mybatisplus.annotation.TableField; |
||||
import com.baomidou.mybatisplus.annotation.TableName; |
||||
import com.fasterxml.jackson.annotation.JsonFormat; |
||||
import io.swagger.annotations.ApiModel; |
||||
import io.swagger.annotations.ApiModelProperty; |
||||
import lombok.Data; |
||||
import lombok.EqualsAndHashCode; |
||||
import org.springblade.core.mp.support.QueryField; |
||||
import org.springblade.core.tenant.mp.TenantEntity; |
||||
import org.springframework.format.annotation.DateTimeFormat; |
||||
|
||||
import java.util.Date; |
||||
|
||||
|
||||
/** |
||||
* 实体类 |
||||
* @author Chill |
||||
*/ |
||||
@Data |
||||
@TableName("hzims_certificatet") |
||||
@EqualsAndHashCode(callSuper = true) |
||||
@ApiModel(value = "证书管理表", description = "证书管理表") |
||||
public class CertificatetEntity extends TenantEntity { |
||||
|
||||
private static final long serialVersionUID = 1L; |
||||
|
||||
/** |
||||
* 用户ID |
||||
*/ |
||||
@ApiModelProperty(value = "用户ID") |
||||
@QueryField(condition = SqlCondition.EQUAL) |
||||
private String personId; |
||||
/** |
||||
* 档案类型 |
||||
*/ |
||||
@ApiModelProperty(value = "证书类型") |
||||
@QueryField(condition = SqlCondition.LIKE) |
||||
private String type; |
||||
/** |
||||
* 到期时间 |
||||
*/ |
||||
@DateTimeFormat( |
||||
pattern = "yyyy-MM-dd HH:mm:ss" |
||||
) |
||||
@JsonFormat( |
||||
pattern = "yyyy-MM-dd HH:mm:ss" |
||||
) |
||||
@ApiModelProperty(value = "到期时间") |
||||
private Date deadTime; |
||||
/** |
||||
* 图片地址 |
||||
*/ |
||||
@ApiModelProperty(value = "图片地址") |
||||
private String pic; |
||||
/** |
||||
* 是否过期 |
||||
*/ |
||||
@TableField(exist = false) |
||||
@ApiModelProperty(value = "是否过期") |
||||
private String isDead; |
||||
|
||||
} |
@ -0,0 +1,44 @@
|
||||
package com.hnac.hzims.basic.entity; |
||||
|
||||
import com.baomidou.mybatisplus.annotation.SqlCondition; |
||||
import com.baomidou.mybatisplus.annotation.TableName; |
||||
import io.swagger.annotations.ApiModel; |
||||
import io.swagger.annotations.ApiModelProperty; |
||||
import lombok.Data; |
||||
import lombok.EqualsAndHashCode; |
||||
import org.springblade.core.mp.support.QueryField; |
||||
import org.springblade.core.tenant.mp.TenantEntity; |
||||
|
||||
|
||||
|
||||
/** |
||||
* 实体类 |
||||
* @author Chill |
||||
*/ |
||||
@Data |
||||
@TableName("hzims_certificatet_notice") |
||||
@EqualsAndHashCode(callSuper = true) |
||||
@ApiModel(value = "证书通知配置表", description = "证书通知配置表") |
||||
public class CertificatetNoticeEntity extends TenantEntity { |
||||
|
||||
private static final long serialVersionUID = 1L; |
||||
|
||||
/** |
||||
* 通知类型 |
||||
*/ |
||||
@ApiModelProperty(value = "通知类型") |
||||
@QueryField(condition = SqlCondition.EQUAL) |
||||
private String sendType; |
||||
/** |
||||
* 距离过期前几天通知 |
||||
*/ |
||||
@ApiModelProperty(value = "距离过期前几天通知") |
||||
@QueryField(condition = SqlCondition.EQUAL) |
||||
private Integer safeTime; |
||||
/** |
||||
* 通知用户 |
||||
*/ |
||||
@ApiModelProperty(value = "通知用户") |
||||
@QueryField(condition = SqlCondition.LIKE) |
||||
private String noticeUsers; |
||||
} |
@ -0,0 +1,68 @@
|
||||
package com.hnac.hzims.basic.entity; |
||||
|
||||
import com.baomidou.mybatisplus.annotation.SqlCondition; |
||||
import com.baomidou.mybatisplus.annotation.TableName; |
||||
import io.swagger.annotations.ApiModel; |
||||
import io.swagger.annotations.ApiModelProperty; |
||||
import lombok.Data; |
||||
import lombok.EqualsAndHashCode; |
||||
import org.springblade.core.mp.support.QueryField; |
||||
import org.springblade.core.tenant.mp.TenantEntity; |
||||
|
||||
|
||||
/** |
||||
* 实体类 |
||||
* @author Chill |
||||
*/ |
||||
@Data |
||||
@TableName("hzims_person_managemet") |
||||
@EqualsAndHashCode(callSuper = true) |
||||
@ApiModel(value = "人员管理表", description = "人员管理表") |
||||
public class PersonManagemetEntity extends TenantEntity { |
||||
|
||||
private static final long serialVersionUID = 1L; |
||||
|
||||
/** |
||||
* 用户ID |
||||
*/ |
||||
@ApiModelProperty(value = "用户ID") |
||||
@QueryField(condition = SqlCondition.EQUAL) |
||||
private String userId; |
||||
/** |
||||
* 用户名称 |
||||
*/ |
||||
@ApiModelProperty(value = "用户名称") |
||||
@QueryField(condition = SqlCondition.LIKE) |
||||
private String name; |
||||
/** |
||||
* 单位名称 |
||||
*/ |
||||
@ApiModelProperty(value = "单位名称") |
||||
@QueryField(condition = SqlCondition.LIKE) |
||||
private String unitName; |
||||
/** |
||||
* 性别 |
||||
*/ |
||||
@ApiModelProperty(value = "性别") |
||||
@QueryField(condition = SqlCondition.EQUAL) |
||||
private String sex; |
||||
/** |
||||
* 性别 |
||||
*/ |
||||
@ApiModelProperty(value = "职位") |
||||
@QueryField(condition = SqlCondition.EQUAL) |
||||
private String job; |
||||
/** |
||||
* 职称 |
||||
*/ |
||||
@ApiModelProperty(value = "职称") |
||||
@QueryField(condition = SqlCondition.EQUAL) |
||||
private String academicTitle; |
||||
/** |
||||
* 电话号码 |
||||
*/ |
||||
@ApiModelProperty(value = "电话号码") |
||||
@QueryField(condition = SqlCondition.EQUAL) |
||||
private String phone; |
||||
|
||||
} |
@ -0,0 +1,82 @@
|
||||
package com.hnac.hzims.basic.vo; |
||||
|
||||
import com.baomidou.mybatisplus.annotation.SqlCondition; |
||||
import com.baomidou.mybatisplus.annotation.TableName; |
||||
import com.fasterxml.jackson.annotation.JsonFormat; |
||||
import com.hnac.hzims.basic.entity.CertificatetEntity; |
||||
import com.hnac.hzims.basic.entity.PersonManagemetEntity; |
||||
import io.swagger.annotations.ApiModel; |
||||
import io.swagger.annotations.ApiModelProperty; |
||||
import lombok.Data; |
||||
import lombok.EqualsAndHashCode; |
||||
import org.springblade.core.mp.support.QueryField; |
||||
import org.springblade.core.tenant.mp.TenantEntity; |
||||
import org.springframework.format.annotation.DateTimeFormat; |
||||
|
||||
import java.io.Serializable; |
||||
import java.time.LocalDateTime; |
||||
import java.util.Date; |
||||
import java.util.List; |
||||
|
||||
|
||||
/** |
||||
* 实体类 |
||||
* @author Chill |
||||
*/ |
||||
@Data |
||||
@ApiModel(value = "档案管理实体类",description = "档案管理实体类") |
||||
public class PersonManagemetVo extends PersonManagemetEntity { |
||||
|
||||
private static final long serialVersionUID = 1L; |
||||
/** |
||||
* 用户ID |
||||
*/ |
||||
@ApiModelProperty(value = "用户ID") |
||||
@QueryField(condition = SqlCondition.EQUAL) |
||||
private String personId; |
||||
/** |
||||
* 档案类型 |
||||
*/ |
||||
@ApiModelProperty(value = "档案类型") |
||||
@QueryField(condition = SqlCondition.LIKE) |
||||
private String type; |
||||
/** |
||||
* 到期开始时间 |
||||
*/ |
||||
@DateTimeFormat( |
||||
pattern = "yyyy-MM-dd HH:mm:ss" |
||||
) |
||||
@JsonFormat( |
||||
pattern = "yyyy-MM-dd HH:mm:ss" |
||||
) |
||||
@ApiModelProperty(value = "到期开始时间") |
||||
private Date deadStartTime; |
||||
/** |
||||
* 到期时间 |
||||
*/ |
||||
@DateTimeFormat( |
||||
pattern = "yyyy-MM-dd HH:mm:ss" |
||||
) |
||||
@JsonFormat( |
||||
pattern = "yyyy-MM-dd HH:mm:ss" |
||||
) |
||||
@ApiModelProperty(value = "到期时间") |
||||
private Date deadTime; |
||||
|
||||
/** |
||||
* 档案编号 |
||||
*/ |
||||
@ApiModelProperty(value = "档案编号") |
||||
private List<String> certificatetIds; |
||||
/** |
||||
* 用户ID |
||||
*/ |
||||
@ApiModelProperty(value = "用户IDs") |
||||
private List<String> personIds; |
||||
/** |
||||
* 档案 |
||||
*/ |
||||
@ApiModelProperty(value = "档案") |
||||
private List<CertificatetEntity> certificatetEntityList; |
||||
|
||||
} |
@ -0,0 +1,18 @@
|
||||
package com.hnac.hzims.safeproduct.constants; |
||||
|
||||
/** |
||||
* safeproduct 常量类 |
||||
* |
||||
* @author liwen |
||||
* @date 2023-12-25 |
||||
*/ |
||||
public interface SafeProductConstant { |
||||
|
||||
String TENANT_ID = "200000"; |
||||
|
||||
int SUCCESS = 1; |
||||
int FAILURE = 0; |
||||
|
||||
int TRAIN_PLAN_HAS_TEST = 1; |
||||
int TRAIN_PLAN_HAS_NO_TEST = 0; |
||||
} |
@ -0,0 +1,59 @@
|
||||
package com.hnac.hzims.safeproduct.dto; |
||||
|
||||
import com.alibaba.excel.annotation.ExcelIgnoreUnannotated; |
||||
import com.alibaba.excel.annotation.ExcelProperty; |
||||
import io.swagger.annotations.ApiModel; |
||||
import io.swagger.annotations.ApiModelProperty; |
||||
import lombok.Data; |
||||
|
||||
import java.util.Date; |
||||
|
||||
/** |
||||
* @author liwen |
||||
* @date 2023-12-27 |
||||
*/ |
||||
@Data |
||||
@ExcelIgnoreUnannotated |
||||
@ApiModel(value = "会议数据导出DTO类") |
||||
public class ConferenceExportDTO { |
||||
|
||||
@ApiModelProperty("单位") |
||||
@ExcelProperty(value = "单位", index = 0) |
||||
private String unit; |
||||
|
||||
@ApiModelProperty("会议计划开始时间") |
||||
@ExcelProperty(value = "会议计划开始时间", index = 1) |
||||
private Date scheduledStartTime; |
||||
|
||||
@ApiModelProperty("会议计划结束时间") |
||||
@ExcelProperty(value = "会议计划结束时间", index = 2) |
||||
private Date scheduledEndTime; |
||||
|
||||
@ApiModelProperty("会议主题") |
||||
@ExcelProperty(value = "会议主题", index = 3) |
||||
private String theme; |
||||
|
||||
@ApiModelProperty("会议地点") |
||||
@ExcelProperty(value = "会议地点", index = 4) |
||||
private String location; |
||||
|
||||
@ApiModelProperty("会议方式") |
||||
@ExcelProperty(value = "会议方式", index = 5) |
||||
private String conferenceMethod; |
||||
|
||||
@ApiModelProperty("主持人") |
||||
@ExcelProperty(value = "主持人", index = 6) |
||||
private String host; |
||||
|
||||
@ApiModelProperty("会议实际开始时间") |
||||
@ExcelProperty(value = "会议实际开始时间", index = 7) |
||||
private Date actualStartTime; |
||||
|
||||
@ApiModelProperty("会议实际结束时间") |
||||
@ExcelProperty(value = "会议实际结束时间", index = 8) |
||||
private Date actualEndTime; |
||||
|
||||
@ApiModelProperty("会议状态") |
||||
@ExcelProperty(value = "会议状态", index = 9) |
||||
private String conferenceStatus; |
||||
} |
@ -0,0 +1,21 @@
|
||||
package com.hnac.hzims.safeproduct.dto; |
||||
|
||||
import com.alibaba.excel.annotation.ExcelIgnoreUnannotated; |
||||
import com.alibaba.excel.annotation.ExcelProperty; |
||||
import io.swagger.annotations.ApiModel; |
||||
import io.swagger.annotations.ApiModelProperty; |
||||
import lombok.Data; |
||||
|
||||
/** |
||||
* @author liwen |
||||
* @date 2023-12-27 |
||||
*/ |
||||
@Data |
||||
@ExcelIgnoreUnannotated |
||||
@ApiModel(value = "卫生自查数据导出DTO类") |
||||
public class HygieneExportDTO { |
||||
|
||||
@ApiModelProperty("卫生自查状态") |
||||
@ExcelProperty(value = "卫生自查状态", index = 8) |
||||
private String hygieneStatus; |
||||
} |
@ -0,0 +1,55 @@
|
||||
package com.hnac.hzims.safeproduct.dto; |
||||
|
||||
import com.alibaba.excel.annotation.ExcelIgnoreUnannotated; |
||||
import com.alibaba.excel.annotation.ExcelProperty; |
||||
import io.swagger.annotations.ApiModel; |
||||
import io.swagger.annotations.ApiModelProperty; |
||||
import lombok.Data; |
||||
|
||||
import java.util.Date; |
||||
|
||||
/** |
||||
* @author liwen |
||||
* @date 2023-12-27 |
||||
*/ |
||||
@Data |
||||
@ExcelIgnoreUnannotated |
||||
@ApiModel(value = "演练数据导出DTO类") |
||||
public class RehearsalExportDTO { |
||||
|
||||
@ApiModelProperty("单位") |
||||
@ExcelProperty(value = "单位", index = 0) |
||||
private String unit; |
||||
|
||||
@ApiModelProperty("演练科目") |
||||
@ExcelProperty(value = "演练科目", index = 1) |
||||
private String subject; |
||||
|
||||
@ApiModelProperty("演练计划开始时间") |
||||
@ExcelProperty(value = "演练计划开始时间", index = 2) |
||||
private Date scheduledStartTime; |
||||
|
||||
@ApiModelProperty("演练计划结束时间") |
||||
@ExcelProperty(value = "演练计划结束时间", index = 3) |
||||
private Date scheduledEndTime; |
||||
|
||||
@ApiModelProperty("演练地点") |
||||
@ExcelProperty(value = "演练地点", index = 4) |
||||
private String location; |
||||
|
||||
@ApiModelProperty("参演人数") |
||||
@ExcelProperty(value = "参演人数", index = 5) |
||||
private Integer peopleNum; |
||||
|
||||
@ApiModelProperty("演练实际开始时间") |
||||
@ExcelProperty(value = "演练实际开始时间", index = 6) |
||||
private Date actualStartTime; |
||||
|
||||
@ApiModelProperty("演练实际结束时间") |
||||
@ExcelProperty(value = "演练实际结束时间", index = 7) |
||||
private Date actualEndTime; |
||||
|
||||
@ApiModelProperty("演练状态") |
||||
@ExcelProperty(value = "演练状态", index = 8) |
||||
private String rehearsalStatus; |
||||
} |
@ -0,0 +1,20 @@
|
||||
package com.hnac.hzims.safeproduct.dto; |
||||
|
||||
import io.swagger.annotations.ApiModel; |
||||
import io.swagger.annotations.ApiModelProperty; |
||||
import lombok.Data; |
||||
|
||||
/** |
||||
* @author liwen |
||||
* @date 2023-12-25 |
||||
*/ |
||||
@Data |
||||
@ApiModel(value = "考试记录DTO类") |
||||
public class TestDTO { |
||||
|
||||
@ApiModelProperty("考试记录id") |
||||
private Long id; |
||||
|
||||
@ApiModelProperty("考试记录名称") |
||||
private String testName; |
||||
} |
@ -0,0 +1,23 @@
|
||||
package com.hnac.hzims.safeproduct.dto; |
||||
|
||||
import com.hnac.hzims.safeproduct.vo.TestScoreVO; |
||||
import io.swagger.annotations.ApiModel; |
||||
import io.swagger.annotations.ApiModelProperty; |
||||
import lombok.Data; |
||||
|
||||
import java.util.List; |
||||
|
||||
/** |
||||
* @author liwen |
||||
* @date 2023-12-25 |
||||
*/ |
||||
@Data |
||||
@ApiModel(value = "考试成绩DTO类") |
||||
public class TestScoreDTO { |
||||
|
||||
@ApiModelProperty("考试记录id") |
||||
private Long testId; |
||||
|
||||
@ApiModelProperty("考试成绩列表") |
||||
private List<TestScoreVO> scoreList; |
||||
} |
@ -0,0 +1,20 @@
|
||||
package com.hnac.hzims.safeproduct.dto; |
||||
|
||||
import io.swagger.annotations.ApiModel; |
||||
import io.swagger.annotations.ApiModelProperty; |
||||
import lombok.Data; |
||||
|
||||
/** |
||||
* @author liwen |
||||
* @date 2023-12-25 |
||||
*/ |
||||
@Data |
||||
@ApiModel(value = "培训记录DTO类") |
||||
public class TrainRecordDTO { |
||||
|
||||
@ApiModelProperty("培训记录id") |
||||
private Long id; |
||||
|
||||
@ApiModelProperty("培训记录名称") |
||||
private String trainRecordName; |
||||
} |
@ -0,0 +1,60 @@
|
||||
package com.hnac.hzims.safeproduct.entity; |
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableName; |
||||
import io.swagger.annotations.ApiModel; |
||||
import io.swagger.annotations.ApiModelProperty; |
||||
import lombok.Data; |
||||
import lombok.EqualsAndHashCode; |
||||
import org.springblade.core.mp.base.BaseEntity; |
||||
|
||||
import javax.validation.constraints.NotNull; |
||||
import javax.validation.constraints.Size; |
||||
import java.util.Date; |
||||
|
||||
/** |
||||
* @author liwen |
||||
* @date 2023-12-27 |
||||
*/ |
||||
@Data |
||||
@EqualsAndHashCode(callSuper = true) |
||||
@TableName("hzims_conference_plan") |
||||
@ApiModel(value = "会议计划实体类") |
||||
public class ConferencePlanEntity extends BaseEntity { |
||||
|
||||
@NotNull |
||||
@Size(max = 50, message = "单位字段长度不能超过50") |
||||
@ApiModelProperty("单位") |
||||
private String unit; |
||||
|
||||
@NotNull |
||||
@Size(max = 50, message = "会议主题字段长度不能超过50") |
||||
@ApiModelProperty("会议主题") |
||||
private String theme; |
||||
|
||||
@NotNull |
||||
@ApiModelProperty("会议计划开始时间") |
||||
private Date scheduledStartTime; |
||||
|
||||
@NotNull |
||||
@ApiModelProperty("会议计划结束时间") |
||||
private Date scheduledEndTime; |
||||
|
||||
@NotNull |
||||
@Size(max = 255, message = "演练地点字段长度不能超过255") |
||||
@ApiModelProperty("会议地点") |
||||
private String location; |
||||
|
||||
@NotNull |
||||
@Size(max = 10, message = "总指挥字段长度不能超过10") |
||||
@ApiModelProperty("主持人") |
||||
private String host; |
||||
|
||||
@Size(max = 20, message = "会议方式字段长度不能超过20") |
||||
@ApiModelProperty("会议方式") |
||||
private String conferenceMethod; |
||||
|
||||
@NotNull |
||||
@Size(max = 20, message = "会议状态字段长度不能超过20") |
||||
@ApiModelProperty("会议状态") |
||||
private String conferenceStatus; |
||||
} |
@ -0,0 +1,55 @@
|
||||
package com.hnac.hzims.safeproduct.entity; |
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableName; |
||||
import io.swagger.annotations.ApiModel; |
||||
import io.swagger.annotations.ApiModelProperty; |
||||
import lombok.Data; |
||||
import lombok.EqualsAndHashCode; |
||||
import org.springblade.core.mp.base.BaseEntity; |
||||
|
||||
import javax.validation.constraints.Size; |
||||
import java.util.Date; |
||||
|
||||
/** |
||||
* @author liwen |
||||
* @date 2023-12-27 |
||||
*/ |
||||
@Data |
||||
@EqualsAndHashCode(callSuper = true) |
||||
@TableName("hzims_conference_record") |
||||
@ApiModel(value = "会议记录实体类") |
||||
public class ConferenceRecordEntity extends BaseEntity { |
||||
|
||||
@ApiModelProperty("会议计划id") |
||||
private Long conferencePlanId; |
||||
|
||||
@Size(max = 50, message = "编码字段长度不能超过50") |
||||
@ApiModelProperty("编码") |
||||
private String code; |
||||
|
||||
@Size(max = 5000, message = "参会人员字段长度超出限制范围") |
||||
@ApiModelProperty("参会人员") |
||||
private String peopleName; |
||||
|
||||
@ApiModelProperty("会议实际开始时间") |
||||
private Date actualStartTime; |
||||
|
||||
@ApiModelProperty("会议实际结束时间") |
||||
private Date actualEndTime; |
||||
|
||||
@Size(max = 20, message = "记录人字段长度不能超过20") |
||||
@ApiModelProperty("记录人") |
||||
private String recorder; |
||||
|
||||
@Size(max = 250, message = "会议内容字段长度不能超过250") |
||||
@ApiModelProperty("会议内容") |
||||
private String content; |
||||
|
||||
@Size(max = 1000, message = "会议图片字段长度不能超过1000") |
||||
@ApiModelProperty("会议图片") |
||||
private String imgPath; |
||||
|
||||
@Size(max = 1000, message = "会议附件字段长度不能超过1000") |
||||
@ApiModelProperty("会议附件") |
||||
private String filePath; |
||||
} |
@ -0,0 +1,59 @@
|
||||
package com.hnac.hzims.safeproduct.entity; |
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableName; |
||||
import com.fasterxml.jackson.annotation.JsonFormat; |
||||
import io.swagger.annotations.ApiModel; |
||||
import io.swagger.annotations.ApiModelProperty; |
||||
import lombok.Data; |
||||
import lombok.EqualsAndHashCode; |
||||
import org.springblade.core.mp.base.BaseEntity; |
||||
|
||||
import javax.validation.constraints.NotNull; |
||||
import javax.validation.constraints.Size; |
||||
import java.util.Date; |
||||
|
||||
/** |
||||
* @author liwen |
||||
* @date 2023-12-28 |
||||
*/ |
||||
@Data |
||||
@EqualsAndHashCode(callSuper = true) |
||||
@TableName("hzims_hygiene_plan") |
||||
@ApiModel(value = "卫生自查计划实体类") |
||||
public class HygienePlanEntity extends BaseEntity { |
||||
|
||||
@NotNull |
||||
@Size(max = 50, message = "单位字段长度不能超过50") |
||||
@ApiModelProperty("单位") |
||||
private String unit; |
||||
|
||||
@ApiModelProperty("责任区") |
||||
private String zone; |
||||
|
||||
@ApiModelProperty("责任人") |
||||
private String principal; |
||||
|
||||
@ApiModelProperty("检查项") |
||||
private String checkItem; |
||||
|
||||
@ApiModelProperty("检查项分值") |
||||
private String checkItemScore; |
||||
|
||||
@ApiModelProperty("标准总分值") |
||||
private Integer standardScore; |
||||
|
||||
@NotNull |
||||
@JsonFormat(pattern = "yyyy-MM-dd") |
||||
@ApiModelProperty("计划开始时间") |
||||
private Date scheduledStartTime; |
||||
|
||||
@NotNull |
||||
@JsonFormat(pattern = "yyyy-MM-dd") |
||||
@ApiModelProperty("计划结束时间") |
||||
private Date scheduledEndTime; |
||||
|
||||
@NotNull |
||||
@Size(max = 20, message = "卫生自查状态字段长度不能超过20") |
||||
@ApiModelProperty("卫生自查状态") |
||||
private String hygieneStatus; |
||||
} |
@ -0,0 +1,51 @@
|
||||
package com.hnac.hzims.safeproduct.entity; |
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableName; |
||||
import io.swagger.annotations.ApiModel; |
||||
import io.swagger.annotations.ApiModelProperty; |
||||
import lombok.Data; |
||||
import lombok.EqualsAndHashCode; |
||||
import org.springblade.core.mp.base.BaseEntity; |
||||
|
||||
import javax.validation.constraints.Size; |
||||
import java.util.Date; |
||||
|
||||
/** |
||||
* @author liwen |
||||
* @date 2023-12-28 |
||||
*/ |
||||
@Data |
||||
@EqualsAndHashCode(callSuper = true) |
||||
@TableName("hzims_hygiene_record") |
||||
@ApiModel(value = "卫生自查记录实体类") |
||||
public class HygieneRecordEntity extends BaseEntity { |
||||
|
||||
@ApiModelProperty("卫生自查计划id") |
||||
private Long hygienePlanId; |
||||
|
||||
@Size(max = 50, message = "编码字段长度不能超过50") |
||||
@ApiModelProperty("编码") |
||||
private String code; |
||||
|
||||
@ApiModelProperty("实际开始时间") |
||||
private Date actualStartTime; |
||||
|
||||
@ApiModelProperty("实际结束时间") |
||||
private Date actualEndTime; |
||||
|
||||
@ApiModelProperty("检查人") |
||||
private String checkUser; |
||||
|
||||
@ApiModelProperty("检查结果") |
||||
private String checkResult; |
||||
|
||||
@ApiModelProperty("综合评分") |
||||
private Integer comprehensiveScore; |
||||
|
||||
@ApiModelProperty("周数") |
||||
private Integer weekNum; |
||||
|
||||
@Size(max = 1000, message = "检查图片字段长度不能超过1000") |
||||
@ApiModelProperty("检查图片") |
||||
private String imgPath; |
||||
} |
@ -0,0 +1,77 @@
|
||||
package com.hnac.hzims.safeproduct.entity; |
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableName; |
||||
import io.swagger.annotations.ApiModel; |
||||
import io.swagger.annotations.ApiModelProperty; |
||||
import lombok.Data; |
||||
import lombok.EqualsAndHashCode; |
||||
import org.springblade.core.mp.base.BaseEntity; |
||||
|
||||
import javax.validation.constraints.NotNull; |
||||
import javax.validation.constraints.Size; |
||||
import java.util.Date; |
||||
|
||||
/** |
||||
* @author liwen |
||||
* @date 2023-12-25 |
||||
*/ |
||||
@Data |
||||
@EqualsAndHashCode(callSuper = true) |
||||
@TableName("hzims_test") |
||||
@ApiModel(value = "考试记录实体类") |
||||
public class TestEntity extends BaseEntity { |
||||
|
||||
@ApiModelProperty("培训计划id") |
||||
private Long trainPlanId; |
||||
|
||||
@ApiModelProperty("培训记录id") |
||||
private Long trainRecordId; |
||||
|
||||
@Size(max = 50, message = "名称字段长度不能超过50") |
||||
@ApiModelProperty("考试记录名称") |
||||
private String testName; |
||||
|
||||
@Size(max = 50, message = "编码字段长度不能超过50") |
||||
@ApiModelProperty("编码") |
||||
private String code; |
||||
|
||||
@NotNull |
||||
@Size(max = 50, message = "单位字段长度不能超过50") |
||||
@ApiModelProperty("单位") |
||||
private String unit; |
||||
|
||||
@NotNull |
||||
@ApiModelProperty("考试开始时间") |
||||
private Date testStartTime; |
||||
|
||||
@NotNull |
||||
@ApiModelProperty("考试结束时间") |
||||
private Date testEndTime; |
||||
|
||||
@NotNull |
||||
@Size(max = 255, message = "考试地点字段长度不能超过255") |
||||
@ApiModelProperty("考试地点") |
||||
private String location; |
||||
|
||||
@NotNull |
||||
@Size(max = 50, message = "考试科目字段长度不能超过50") |
||||
@ApiModelProperty("考试科目") |
||||
private String subject; |
||||
|
||||
@NotNull |
||||
@Size(max = 20, message = "监考人字段长度不能超过20") |
||||
@ApiModelProperty("监考人") |
||||
private String proctor; |
||||
|
||||
@Size(max = 1000, message = "参考人员字段长度超出限制范围") |
||||
@ApiModelProperty("参考人员") |
||||
private String peopleName; |
||||
|
||||
@Size(max = 1000, message = "考试图片字段长度不能超过1000") |
||||
@ApiModelProperty("考试图片") |
||||
private String imgPath; |
||||
|
||||
@Size(max = 1000, message = "考试附件字段长度不能超过1000") |
||||
@ApiModelProperty("考试附件") |
||||
private String filePath; |
||||
} |
@ -0,0 +1,37 @@
|
||||
package com.hnac.hzims.safeproduct.entity; |
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableName; |
||||
import io.swagger.annotations.ApiModel; |
||||
import io.swagger.annotations.ApiModelProperty; |
||||
import lombok.Data; |
||||
import lombok.EqualsAndHashCode; |
||||
import org.springblade.core.mp.base.BaseEntity; |
||||
|
||||
import javax.validation.constraints.Max; |
||||
import javax.validation.constraints.Min; |
||||
import javax.validation.constraints.NotNull; |
||||
import javax.validation.constraints.Size; |
||||
|
||||
/** |
||||
* @author liwen |
||||
* @date 2023-12-25 |
||||
*/ |
||||
@Data |
||||
@EqualsAndHashCode(callSuper = true) |
||||
@TableName("hzims_test_score") |
||||
@ApiModel(value = "考试记录实体类") |
||||
public class TestScoreEntity extends BaseEntity { |
||||
|
||||
@ApiModelProperty("考试记录id") |
||||
private Long testId; |
||||
|
||||
@Size(max = 50, message = "姓名字段长度不能超过50") |
||||
@ApiModelProperty("姓名") |
||||
private String name; |
||||
|
||||
@NotNull |
||||
@Min(value = 0, message = "成绩必须大于等于0") |
||||
@Max(value = 100, message = "成绩必须小于等于100") |
||||
@ApiModelProperty("成绩") |
||||
private Integer score; |
||||
} |
@ -0,0 +1,80 @@
|
||||
package com.hnac.hzims.safeproduct.entity; |
||||
|
||||
import com.alibaba.excel.annotation.ExcelIgnoreUnannotated; |
||||
import com.alibaba.excel.annotation.ExcelProperty; |
||||
import com.baomidou.mybatisplus.annotation.TableField; |
||||
import com.baomidou.mybatisplus.annotation.TableName; |
||||
import io.swagger.annotations.ApiModel; |
||||
import io.swagger.annotations.ApiModelProperty; |
||||
import lombok.Data; |
||||
import lombok.EqualsAndHashCode; |
||||
import org.springblade.core.mp.base.BaseEntity; |
||||
|
||||
import javax.validation.constraints.NotNull; |
||||
import javax.validation.constraints.Size; |
||||
import java.util.Date; |
||||
|
||||
/** |
||||
* @author liwen |
||||
* @date 2023-12-25 |
||||
*/ |
||||
@Data |
||||
@EqualsAndHashCode(callSuper = true) |
||||
@ExcelIgnoreUnannotated |
||||
@TableName("hzims_train_plan") |
||||
@ApiModel(value = "培训计划实体类") |
||||
public class TrainPlanEntity extends BaseEntity { |
||||
|
||||
@NotNull |
||||
@Size(max = 50, message = "单位字段长度不能超过50") |
||||
@ApiModelProperty("单位") |
||||
@ExcelProperty(value = "单位", index = 0) |
||||
private String unit; |
||||
|
||||
@NotNull |
||||
@ApiModelProperty("计划培训开始时间") |
||||
@ExcelProperty(value = "计划开始时间", index = 6) |
||||
private Date scheduledStartTime; |
||||
|
||||
@NotNull |
||||
@ApiModelProperty("计划培训结束时间") |
||||
@ExcelProperty(value = "计划结束时间", index = 7) |
||||
private Date scheduledEndTime; |
||||
|
||||
@NotNull |
||||
@Size(max = 255, message = "单位字段长度不能超过255") |
||||
@ApiModelProperty("培训课程") |
||||
@ExcelProperty(value = "培训课程", index = 1) |
||||
private String lesson; |
||||
|
||||
@NotNull |
||||
@Size(max = 255, message = "培训地点字段长度不能超过255") |
||||
@ApiModelProperty("培训地点") |
||||
@ExcelProperty(value = "培训地点", index = 2) |
||||
private String location; |
||||
|
||||
@Size(max = 20, message = "培训方式字段长度不能超过20") |
||||
@ApiModelProperty("培训方式") |
||||
private String trainMethod; |
||||
|
||||
@NotNull |
||||
@Size(max = 20, message = "培训讲师字段长度不能超过20") |
||||
@ApiModelProperty("培训讲师") |
||||
@ExcelProperty(value = "培训讲师", index = 4) |
||||
private String teacher; |
||||
|
||||
@NotNull |
||||
@Size(max = 20, message = "培训状态字段长度不能超过20") |
||||
@ApiModelProperty("培训状态") |
||||
@ExcelProperty(value = "培训状态", index = 3) |
||||
private String trainStatus; |
||||
|
||||
@NotNull |
||||
@ApiModelProperty("关联考试:0-否,1-是") |
||||
private Integer isTest; |
||||
|
||||
@TableField(exist = false) |
||||
@ApiModelProperty("是否考试") |
||||
@ExcelProperty(value = "是否考试", index = 5) |
||||
private String hasTest; |
||||
} |
@ -0,0 +1,69 @@
|
||||
package com.hnac.hzims.safeproduct.entity; |
||||
|
||||
import com.alibaba.excel.annotation.ExcelIgnoreUnannotated; |
||||
import com.alibaba.excel.annotation.ExcelProperty; |
||||
import com.baomidou.mybatisplus.annotation.TableName; |
||||
import io.swagger.annotations.ApiModel; |
||||
import io.swagger.annotations.ApiModelProperty; |
||||
import lombok.Data; |
||||
import lombok.EqualsAndHashCode; |
||||
import org.springblade.core.mp.base.BaseEntity; |
||||
|
||||
import javax.validation.constraints.Size; |
||||
import java.util.Date; |
||||
|
||||
/** |
||||
* @author liwen |
||||
* @date 2023-12-25 |
||||
*/ |
||||
@Data |
||||
@EqualsAndHashCode(callSuper = true) |
||||
@ExcelIgnoreUnannotated |
||||
@TableName("hzims_train_record") |
||||
@ApiModel(value = "培训记录实体类") |
||||
public class TrainRecordEntity extends BaseEntity { |
||||
|
||||
@ApiModelProperty("培训计划id") |
||||
private Long trainPlanId; |
||||
|
||||
@Size(max = 50, message = "名称字段长度不能超过50") |
||||
@ApiModelProperty("培训记录名称") |
||||
@ExcelProperty(value = "培训记录名称", index = 1) |
||||
private String trainRecordName; |
||||
|
||||
@Size(max = 50, message = "编码字段长度不能超过50") |
||||
@ApiModelProperty("编码") |
||||
@ExcelProperty(value = "编码", index = 0) |
||||
private String code; |
||||
|
||||
@Size(max = 5000, message = "培训学员字段长度超出限制范围") |
||||
@ApiModelProperty("培训学员") |
||||
@ExcelProperty(value = "培训学员", index = 3) |
||||
private String peopleName; |
||||
|
||||
@Size(max = 5000, message = "培训内容字段长度超出限制范围") |
||||
@ApiModelProperty("培训内容") |
||||
@ExcelProperty(value = "培训内容", index = 2) |
||||
private String content; |
||||
|
||||
@ApiModelProperty("实际培训开始时间") |
||||
@ExcelProperty(value = "实际开始时间", index = 5) |
||||
private Date actualStartTime; |
||||
|
||||
@ApiModelProperty("实际培训结束时间") |
||||
@ExcelProperty(value = "实际结束时间", index = 6) |
||||
private Date actualEndTime; |
||||
|
||||
@Size(max = 250, message = "培训评价字段长度不能超过250") |
||||
@ApiModelProperty("培训评价") |
||||
@ExcelProperty(value = "培训评价", index = 4) |
||||
private String command; |
||||
|
||||
@Size(max = 1000, message = "培训图片字段长度不能超过1000") |
||||
@ApiModelProperty("培训图片") |
||||
private String imgPath; |
||||
|
||||
@Size(max = 1000, message = "培训附件字段长度不能超过1000") |
||||
@ApiModelProperty("培训附件") |
||||
private String filePath; |
||||
} |
@ -0,0 +1,31 @@
|
||||
package com.hnac.hzims.safeproduct.enums; |
||||
|
||||
/** |
||||
* 会议方式枚举类 |
||||
* |
||||
* @author liwen |
||||
* @date 2023-12-27 |
||||
*/ |
||||
public enum ConferenceMethodEnum { |
||||
|
||||
ONLINE("ONLINE", "线上"), |
||||
OFFLINE("OFFLINE", "线下"), |
||||
MIXED("MIXED", "线上+线下"); |
||||
|
||||
private final String value; |
||||
|
||||
private final String desc; |
||||
|
||||
ConferenceMethodEnum(String value, String desc) { |
||||
this.value = value; |
||||
this.desc = desc; |
||||
} |
||||
|
||||
public String getValue() { |
||||
return value; |
||||
} |
||||
|
||||
public String getDesc() { |
||||
return desc; |
||||
} |
||||
} |
@ -0,0 +1,31 @@
|
||||
package com.hnac.hzims.safeproduct.enums; |
||||
|
||||
/** |
||||
* 会议状态枚举类 |
||||
* |
||||
* @author liwen |
||||
* @date 2023-12-27 |
||||
*/ |
||||
public enum ConferenceStatusEnum { |
||||
|
||||
WAITING("WAITING", "未开始"), |
||||
UNFINISHED("UNFINISHED", "未完成"), |
||||
FINISHED("FINISHED", "已完成"); |
||||
|
||||
private final String value; |
||||
|
||||
private final String desc; |
||||
|
||||
ConferenceStatusEnum(String value, String desc) { |
||||
this.value = value; |
||||
this.desc = desc; |
||||
} |
||||
|
||||
public String getValue() { |
||||
return value; |
||||
} |
||||
|
||||
public String getDesc() { |
||||
return desc; |
||||
} |
||||
} |
@ -0,0 +1,31 @@
|
||||
package com.hnac.hzims.safeproduct.enums; |
||||
|
||||
/** |
||||
* 卫生自查状态枚举类 |
||||
* |
||||
* @author liwen |
||||
* @date 2023-12-29 |
||||
*/ |
||||
public enum HygieneStatusEnum { |
||||
|
||||
WAITING("WAITING", "未开始"), |
||||
UNFINISHED("UNFINISHED", "未完成"), |
||||
FINISHED("FINISHED", "已完成"); |
||||
|
||||
private final String value; |
||||
|
||||
private final String desc; |
||||
|
||||
HygieneStatusEnum(String value, String desc) { |
||||
this.value = value; |
||||
this.desc = desc; |
||||
} |
||||
|
||||
public String getValue() { |
||||
return value; |
||||
} |
||||
|
||||
public String getDesc() { |
||||
return desc; |
||||
} |
||||
} |
@ -0,0 +1,31 @@
|
||||
package com.hnac.hzims.safeproduct.enums; |
||||
|
||||
/** |
||||
* 培训计划状态枚举类 |
||||
* |
||||
* @author liwen |
||||
* @date 2023-12-27 |
||||
*/ |
||||
public enum TrainStatusEnum { |
||||
|
||||
WAITING("WAITING", "未开始"), |
||||
UNFINISHED("UNFINISHED", "未完成"), |
||||
FINISHED("FINISHED", "已完成"); |
||||
|
||||
private final String value; |
||||
|
||||
private final String desc; |
||||
|
||||
TrainStatusEnum(String value, String desc) { |
||||
this.value = value; |
||||
this.desc = desc; |
||||
} |
||||
|
||||
public String getValue() { |
||||
return value; |
||||
} |
||||
|
||||
public String getDesc() { |
||||
return desc; |
||||
} |
||||
} |
@ -0,0 +1,31 @@
|
||||
package com.hnac.hzims.safeproduct.vo; |
||||
|
||||
import io.swagger.annotations.ApiModel; |
||||
import io.swagger.annotations.ApiModelProperty; |
||||
import lombok.Data; |
||||
|
||||
import java.math.BigDecimal; |
||||
|
||||
/** |
||||
* @author liwen |
||||
* @date 2023-12-27 |
||||
*/ |
||||
@Data |
||||
@ApiModel(value = "卫生自查月度统计VO类") |
||||
public class HygieneMonthVO { |
||||
|
||||
@ApiModelProperty("单位") |
||||
private String unit; |
||||
|
||||
@ApiModelProperty("应检查次数") |
||||
private Long scheduledCheckNum; |
||||
|
||||
@ApiModelProperty("已检查次数") |
||||
private Long finishedCheckNum; |
||||
|
||||
@ApiModelProperty("未检查次数") |
||||
private Long unfinishedCheckNum; |
||||
|
||||
@ApiModelProperty("完成率") |
||||
private BigDecimal completionRate; |
||||
} |
@ -0,0 +1,46 @@
|
||||
package com.hnac.hzims.safeproduct.vo; |
||||
|
||||
import io.swagger.annotations.ApiModel; |
||||
import io.swagger.annotations.ApiModelProperty; |
||||
import lombok.Data; |
||||
|
||||
import java.util.Date; |
||||
|
||||
/** |
||||
* @author liwen |
||||
* @date 2023-12-29 |
||||
*/ |
||||
@Data |
||||
@ApiModel(value = "卫生自查记录详情VO类") |
||||
public class HygieneRecordDetailVO { |
||||
|
||||
@ApiModelProperty("责任区") |
||||
private String zone; |
||||
|
||||
@ApiModelProperty("责任人") |
||||
private String principal; |
||||
|
||||
@ApiModelProperty("检查项") |
||||
private String checkItem; |
||||
|
||||
@ApiModelProperty("检查项分值") |
||||
private String checkItemScore; |
||||
|
||||
@ApiModelProperty("编码") |
||||
private String code; |
||||
|
||||
@ApiModelProperty("检查时间") |
||||
private Date checkTime; |
||||
|
||||
@ApiModelProperty("检查人") |
||||
private String checkUser; |
||||
|
||||
@ApiModelProperty("检查结果") |
||||
private String checkResult; |
||||
|
||||
@ApiModelProperty("综合评分") |
||||
private Integer comprehensiveScore; |
||||
|
||||
@ApiModelProperty("周数") |
||||
private Integer weekNum; |
||||
} |
@ -0,0 +1,23 @@
|
||||
package com.hnac.hzims.safeproduct.vo; |
||||
|
||||
import io.swagger.annotations.ApiModel; |
||||
import io.swagger.annotations.ApiModelProperty; |
||||
import lombok.Data; |
||||
|
||||
/** |
||||
* @author liwen |
||||
* @date 2023-12-25 |
||||
*/ |
||||
@Data |
||||
@ApiModel(value = "考试成绩VO类") |
||||
public class TestScoreVO { |
||||
|
||||
@ApiModelProperty("考试成绩id") |
||||
private Long id; |
||||
|
||||
@ApiModelProperty("姓名") |
||||
private String name; |
||||
|
||||
@ApiModelProperty("成绩") |
||||
private Integer score; |
||||
} |
@ -0,0 +1,31 @@
|
||||
package com.hnac.hzims.safeproduct.vo; |
||||
|
||||
import io.swagger.annotations.ApiModel; |
||||
import io.swagger.annotations.ApiModelProperty; |
||||
import lombok.Data; |
||||
|
||||
import java.math.BigDecimal; |
||||
|
||||
/** |
||||
* @author liwen |
||||
* @date 2023-12-25 |
||||
*/ |
||||
@Data |
||||
@ApiModel(value = "培训月度统计VO类") |
||||
public class TrainMonthVO { |
||||
|
||||
@ApiModelProperty("单位") |
||||
private String unit; |
||||
|
||||
@ApiModelProperty("应完成次数") |
||||
private Long scheduledTrainNum; |
||||
|
||||
@ApiModelProperty("已完成次数") |
||||
private Long finishedTrainNum; |
||||
|
||||
@ApiModelProperty("未完成次数") |
||||
private Long unfinishedTrainNum; |
||||
|
||||
@ApiModelProperty("完成率") |
||||
private BigDecimal completionRate; |
||||
} |
@ -0,0 +1,53 @@
|
||||
package com.hnac.hzims.safeproduct.vo; |
||||
|
||||
import io.swagger.annotations.ApiModel; |
||||
import io.swagger.annotations.ApiModelProperty; |
||||
import lombok.Data; |
||||
|
||||
/** |
||||
* @author liwen |
||||
* @date 2023-12-25 |
||||
*/ |
||||
@Data |
||||
@ApiModel(value = "培训年度统计VO类") |
||||
public class TrainYearVO { |
||||
|
||||
@ApiModelProperty("单位") |
||||
private String unit; |
||||
|
||||
@ApiModelProperty("1月完成数") |
||||
private Long januaryNum; |
||||
|
||||
@ApiModelProperty("2月完成数") |
||||
private Long februaryNum; |
||||
|
||||
@ApiModelProperty("3月完成数") |
||||
private Long marchNum; |
||||
|
||||
@ApiModelProperty("4月完成数") |
||||
private Long aprilNum; |
||||
|
||||
@ApiModelProperty("5月完成数") |
||||
private Long mayNum; |
||||
|
||||
@ApiModelProperty("6月完成数") |
||||
private Long juneNum; |
||||
|
||||
@ApiModelProperty("7月完成数") |
||||
private Long julyNum; |
||||
|
||||
@ApiModelProperty("8月完成数") |
||||
private Long augustNum; |
||||
|
||||
@ApiModelProperty("9月完成数") |
||||
private Long septemberNum; |
||||
|
||||
@ApiModelProperty("10月完成数") |
||||
private Long octoberNum; |
||||
|
||||
@ApiModelProperty("11月完成数") |
||||
private Long novemberNum; |
||||
|
||||
@ApiModelProperty("12月完成数") |
||||
private Long decemberNum; |
||||
} |
@ -0,0 +1,24 @@
|
||||
package com.hnac.hzims.ticket.ticketprocess.feign; |
||||
|
||||
import com.hnac.hzims.middle.process.to.ProcessWorkFlowResponse; |
||||
import com.hnac.hzims.ticket.constants.TicketConstants; |
||||
import org.springblade.core.tool.api.R; |
||||
import org.springframework.cloud.openfeign.FeignClient; |
||||
import org.springframework.web.bind.annotation.PostMapping; |
||||
import org.springframework.web.bind.annotation.RequestBody; |
||||
|
||||
@FeignClient(value = TicketConstants.APP_NAME,fallback = OfflineTicketProcessClientFallback.class) |
||||
public interface IOfflineTicketProcessClient { |
||||
|
||||
String API = "/offlineTicket"; |
||||
String FIND_PENDING = API + "/findPending"; |
||||
|
||||
/** |
||||
* 线下工作票处理 |
||||
* @param response 流程信息 |
||||
* @return 处理结果 |
||||
*/ |
||||
@PostMapping(FIND_PENDING) |
||||
R findPending(@RequestBody ProcessWorkFlowResponse response); |
||||
|
||||
} |
@ -0,0 +1,15 @@
|
||||
package com.hnac.hzims.ticket.ticketprocess.feign; |
||||
|
||||
import com.hnac.hzims.middle.process.to.ProcessWorkFlowResponse; |
||||
import org.springblade.core.tool.api.R; |
||||
import org.springframework.stereotype.Component; |
||||
|
||||
@Component |
||||
public class OfflineTicketProcessClientFallback implements IOfflineTicketProcessClient { |
||||
|
||||
@Override |
||||
public R findPending(ProcessWorkFlowResponse response) { |
||||
return R.fail("工作票处理流程失败!"); |
||||
} |
||||
|
||||
} |
@ -0,0 +1,173 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?> |
||||
<project xmlns="http://maven.apache.org/POM/4.0.0" |
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" |
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> |
||||
<parent> |
||||
<groupId>com.hnac.hzims</groupId> |
||||
<artifactId>hzims-service</artifactId> |
||||
<version>4.0.0-SNAPSHOT</version> |
||||
</parent> |
||||
<modelVersion>4.0.0</modelVersion> |
||||
<artifactId>hzims-basic</artifactId> |
||||
<packaging>jar</packaging> |
||||
|
||||
<properties> |
||||
<java.version>1.8</java.version> |
||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> |
||||
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding> |
||||
<spring-boot.version>2.6.13</spring-boot.version> |
||||
<swagger-bootstrap-ui.version>1.9.6</swagger-bootstrap-ui.version> |
||||
</properties> |
||||
|
||||
<dependencies> |
||||
<dependency> |
||||
<groupId>org.springblade</groupId> |
||||
<artifactId>blade-common</artifactId> |
||||
</dependency> |
||||
|
||||
<dependency> |
||||
<groupId>org.springblade</groupId> |
||||
<artifactId>blade-core-boot</artifactId> |
||||
<exclusions> |
||||
<exclusion> |
||||
<groupId>org.springblade</groupId> |
||||
<artifactId>blade-starter-redis</artifactId> |
||||
</exclusion> |
||||
</exclusions> |
||||
</dependency> |
||||
|
||||
|
||||
<dependency> |
||||
<groupId>org.springblade</groupId> |
||||
<artifactId>blade-starter-redis</artifactId> |
||||
<exclusions> |
||||
<exclusion> |
||||
<groupId>org.springframework.boot</groupId> |
||||
<artifactId>spring-boot-starter-data-redis</artifactId> |
||||
</exclusion> |
||||
</exclusions> |
||||
</dependency> |
||||
|
||||
|
||||
<dependency> |
||||
<groupId>org.springframework.boot</groupId> |
||||
<artifactId>spring-boot-starter-data-redis</artifactId> |
||||
<exclusions> |
||||
<exclusion> |
||||
<groupId>io.lettuce</groupId> |
||||
<artifactId>lettuce-core</artifactId> |
||||
</exclusion> |
||||
</exclusions> |
||||
</dependency> |
||||
|
||||
|
||||
<dependency> |
||||
<groupId>redis.clients</groupId> |
||||
<artifactId>jedis</artifactId> |
||||
</dependency> |
||||
|
||||
<dependency> |
||||
<groupId>org.springblade</groupId> |
||||
<artifactId>blade-starter-swagger</artifactId> |
||||
</dependency> |
||||
<dependency> |
||||
<groupId>org.springblade</groupId> |
||||
<artifactId>blade-core-test</artifactId> |
||||
<scope>test</scope> |
||||
</dependency> |
||||
<dependency> |
||||
<groupId>org.springblade</groupId> |
||||
<artifactId>blade-core-auto</artifactId> |
||||
<scope>provided</scope> |
||||
</dependency> |
||||
<!-- spring-boot-websocket start --> |
||||
<dependency> |
||||
<groupId>org.springframework.boot</groupId> |
||||
<artifactId>spring-boot-starter-websocket</artifactId> |
||||
<exclusions> |
||||
<exclusion> |
||||
<groupId>org.springframework.boot</groupId> |
||||
<artifactId>spring-boot-starter-tomcat</artifactId> |
||||
</exclusion> |
||||
</exclusions> |
||||
</dependency> |
||||
<!--WebSocket核心依赖包--> |
||||
<dependency> |
||||
<groupId>org.java-websocket</groupId> |
||||
<artifactId>Java-WebSocket</artifactId> |
||||
</dependency> |
||||
<!--生成代码--> |
||||
<dependency> |
||||
<groupId>com.baomidou</groupId> |
||||
<artifactId>mybatis-plus-generator</artifactId> |
||||
</dependency> |
||||
|
||||
<!-- velocity 模板引擎, Mybatis Plus 代码生成器需要--> |
||||
<dependency> |
||||
<groupId>org.apache.velocity</groupId> |
||||
<artifactId>velocity-engine-core</artifactId> |
||||
<version>2.2</version> |
||||
</dependency> |
||||
|
||||
|
||||
<!--swagger-bootstrap-ui--> |
||||
<dependency> |
||||
<groupId>com.github.xiaoymin</groupId> |
||||
<artifactId>swagger-bootstrap-ui</artifactId> |
||||
<version>${swagger-bootstrap-ui.version}</version> |
||||
</dependency> |
||||
<dependency> |
||||
<groupId>com.hnac.hzims</groupId> |
||||
<artifactId>alarm-api</artifactId> |
||||
<version>4.0.0-SNAPSHOT</version> |
||||
<scope>compile</scope> |
||||
</dependency> |
||||
<dependency> |
||||
<groupId>com.hnac.hzims</groupId> |
||||
<artifactId>basic-api</artifactId> |
||||
<version>4.0.0-SNAPSHOT</version> |
||||
<scope>compile</scope> |
||||
</dependency> |
||||
<dependency> |
||||
<groupId>com.hnac.hzims</groupId> |
||||
<artifactId>equipment-api</artifactId> |
||||
</dependency> |
||||
<dependency> |
||||
<groupId>com.hnac.hzims</groupId> |
||||
<artifactId>hzims-operational-api</artifactId> |
||||
</dependency> |
||||
<dependency> |
||||
<groupId>com.hnac.hzims</groupId> |
||||
<artifactId>message-api</artifactId> |
||||
</dependency> |
||||
<dependency> |
||||
<groupId>com.xuxueli</groupId> |
||||
<artifactId>xxl-job-core</artifactId> |
||||
</dependency> |
||||
<dependency> |
||||
<groupId>org.eclipse.paho</groupId> |
||||
<artifactId>org.eclipse.paho.client.mqttv3</artifactId> |
||||
</dependency> |
||||
</dependencies> |
||||
|
||||
<build> |
||||
<finalName>${project.name}-${project.version}</finalName> |
||||
<plugins> |
||||
<plugin> |
||||
<groupId>com.spotify</groupId> |
||||
<artifactId>dockerfile-maven-plugin</artifactId> |
||||
<configuration> |
||||
<username>${docker.username}</username> |
||||
<password>${docker.password}</password> |
||||
<repository>${docker.registry.url}/${docker.namespace}/${project.artifactId}</repository> |
||||
<tag>${project.version}</tag> |
||||
<useMavenSettingsForAuth>true</useMavenSettingsForAuth> |
||||
<buildArgs> |
||||
<JAR_FILE>target/${project.build.finalName}.jar</JAR_FILE> |
||||
</buildArgs> |
||||
<skip>false</skip> |
||||
</configuration> |
||||
</plugin> |
||||
</plugins> |
||||
</build> |
||||
</project> |
@ -0,0 +1,32 @@
|
||||
package com.hnac.hzims.basic; |
||||
|
||||
import com.hnac.hzims.basic.constants.BasicConstants; |
||||
import org.mybatis.spring.annotation.MapperScan; |
||||
import org.springblade.core.cloud.feign.EnableBladeFeign; |
||||
import org.springblade.core.launch.BladeApplication; |
||||
import org.springframework.boot.builder.SpringApplicationBuilder; |
||||
import org.springframework.boot.web.servlet.support.SpringBootServletInitializer; |
||||
import org.springframework.cloud.client.SpringCloudApplication; |
||||
import org.springframework.context.annotation.ComponentScan; |
||||
|
||||
import javax.annotation.Resource; |
||||
|
||||
/** |
||||
* @author ty |
||||
*/ |
||||
@EnableBladeFeign |
||||
@SpringCloudApplication |
||||
@MapperScan("com.hnac.hzims.**.mapper.**") |
||||
@ComponentScan(basePackages = {"com.hnac.hzims.basic.*"}) |
||||
@Resource |
||||
public class BasicApplication extends SpringBootServletInitializer { |
||||
public static void main(String[] args) { |
||||
BladeApplication.run(BasicConstants.APP_NAME, BasicApplication.class, args); |
||||
} |
||||
|
||||
@Override |
||||
protected SpringApplicationBuilder configure(SpringApplicationBuilder builder) { |
||||
return BladeApplication.createSpringApplicationBuilder(builder, BasicConstants.APP_NAME, BasicApplication.class); |
||||
} |
||||
|
||||
} |
@ -0,0 +1,63 @@
|
||||
package com.hnac.hzims.basic.controller; |
||||
|
||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
||||
import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport; |
||||
import com.hnac.hzims.basic.entity.CertificatetNoticeEntity; |
||||
import com.hnac.hzims.basic.service.IImsCertificatetNoticeService; |
||||
import io.swagger.annotations.Api; |
||||
import io.swagger.annotations.ApiOperation; |
||||
import lombok.AllArgsConstructor; |
||||
import org.springblade.core.boot.ctrl.BladeController; |
||||
import org.springblade.core.tool.api.R; |
||||
import org.springblade.core.tool.utils.ObjectUtil; |
||||
import org.springframework.web.bind.annotation.*; |
||||
|
||||
|
||||
/** |
||||
* 控制器 |
||||
* |
||||
* @author Chill |
||||
*/ |
||||
@RestController |
||||
@AllArgsConstructor |
||||
@RequestMapping("/certificatetNotice") |
||||
@Api(value = "档案通知配置页面", tags = "档案通知配置页面") |
||||
public class CertificatetNoticeController extends BladeController { |
||||
|
||||
|
||||
private final IImsCertificatetNoticeService iImsCertificatetNoticeService; |
||||
|
||||
|
||||
/** |
||||
* 新增或修改 |
||||
*/ |
||||
@PostMapping("/submit") |
||||
@ApiOperationSupport(order = 1) |
||||
@ApiOperation(value = "增加", notes = "传入imsDutyClass") |
||||
public R submit(@RequestBody CertificatetNoticeEntity certificatetNoticeEntity) { |
||||
Boolean submit = iImsCertificatetNoticeService.saveOrUpdate(certificatetNoticeEntity); |
||||
if (submit) { |
||||
return R.success("保存成功"); |
||||
} |
||||
return R.fail("保存失败"); |
||||
|
||||
} |
||||
|
||||
/** |
||||
* 新增或修改 |
||||
*/ |
||||
@PostMapping("/getCertificatetNotice") |
||||
@ApiOperationSupport(order = 1) |
||||
@ApiOperation(value = "增加", notes = "传入imsDutyClass") |
||||
public R getCertificatetNotice() { |
||||
CertificatetNoticeEntity res = iImsCertificatetNoticeService.getOne(Wrappers.<CertificatetNoticeEntity>lambdaQuery() |
||||
.eq(CertificatetNoticeEntity::getIsDeleted, 0) |
||||
.last("limit 1;")); |
||||
if (ObjectUtil.isNotEmpty(res)) { |
||||
return R.data(res); |
||||
} |
||||
return R.data(""); |
||||
|
||||
} |
||||
|
||||
} |
@ -0,0 +1,87 @@
|
||||
package com.hnac.hzims.basic.controller; |
||||
|
||||
import com.alibaba.spring.util.BeanUtils; |
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
||||
import com.baomidou.mybatisplus.core.metadata.IPage; |
||||
import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport; |
||||
import com.hnac.hzims.basic.entity.PersonManagemetEntity; |
||||
import com.hnac.hzims.basic.service.IImsPresonManagementService; |
||||
import com.hnac.hzims.basic.vo.PersonManagemetVo; |
||||
import com.hnac.hzims.common.logs.annotation.OperationAnnotation; |
||||
import com.hnac.hzims.common.logs.enums.BusinessType; |
||||
import com.hnac.hzims.common.logs.enums.OperatorType; |
||||
import com.hnac.hzims.operational.duty.entity.ImsDutyClassEntity; |
||||
import io.swagger.annotations.Api; |
||||
import io.swagger.annotations.ApiOperation; |
||||
import io.swagger.annotations.ApiParam; |
||||
import lombok.AllArgsConstructor; |
||||
import org.springblade.core.boot.ctrl.BladeController; |
||||
import org.springblade.core.mp.support.Condition; |
||||
import org.springblade.core.mp.support.Query; |
||||
import org.springblade.core.tool.api.R; |
||||
import org.springblade.core.tool.utils.BeanUtil; |
||||
import org.springblade.core.tool.utils.CollectionUtil; |
||||
import org.springblade.core.tool.utils.Func; |
||||
import org.springframework.web.bind.annotation.*; |
||||
|
||||
import javax.validation.Valid; |
||||
import java.util.List; |
||||
|
||||
|
||||
/** |
||||
* 控制器 |
||||
* |
||||
* @author Chill |
||||
*/ |
||||
@RestController |
||||
@AllArgsConstructor |
||||
@RequestMapping("/presonManagement") |
||||
@Api(value = "人员档案", tags = "人员档案页面") |
||||
public class PresonManagementController extends BladeController { |
||||
|
||||
private final IImsPresonManagementService iImsPresonManagementService; |
||||
|
||||
/** |
||||
* 分页 代码自定义代号 |
||||
*/ |
||||
@GetMapping("/list") |
||||
@ApiOperationSupport(order = 2) |
||||
@ApiOperation(value = "分页", notes = "传入imsDutyClass") |
||||
@OperationAnnotation(moduleName = "档案管理",title = "档案管理",operatorType = OperatorType.MOBILE,businessType = |
||||
BusinessType.GENCODE,action |
||||
= "档案管理") |
||||
public R<IPage<PersonManagemetVo>> list(PersonManagemetVo personManagemetVo, Query query) { |
||||
IPage<PersonManagemetVo> page=iImsPresonManagementService.getPersonManagemetEntity(personManagemetVo,query); |
||||
return R.data(page); |
||||
} |
||||
|
||||
/** |
||||
* 新增或修改 |
||||
*/ |
||||
@PostMapping ("/submit") |
||||
@ApiOperationSupport(order = 1) |
||||
@ApiOperation(value = "增加", notes = "传入imsDutyClass") |
||||
public R submit(@RequestBody PersonManagemetVo personManagemetVo) { |
||||
Boolean submit = iImsPresonManagementService.submit(personManagemetVo); |
||||
if (submit){ |
||||
return R.success("保存成功"); |
||||
} |
||||
return R.fail("保存失败"); |
||||
} |
||||
|
||||
/** |
||||
* 删除 |
||||
*/ |
||||
@PostMapping("/remove") |
||||
@ApiOperationSupport(order = 2) |
||||
@ApiOperation(value = "删除", notes = "传入imsDutyClass") |
||||
public R remove(@RequestBody PersonManagemetVo personManagemetVo) { |
||||
Boolean flag = iImsPresonManagementService.removeByPersonManagemetVo(personManagemetVo); |
||||
if (flag){ |
||||
return R.success("删除成功"); |
||||
} |
||||
return R.fail("删除失败"); |
||||
} |
||||
|
||||
|
||||
} |
@ -0,0 +1,15 @@
|
||||
package com.hnac.hzims.basic.mapper; |
||||
|
||||
import com.hnac.hzims.basic.entity.CertificatetEntity; |
||||
import org.apache.ibatis.annotations.Mapper; |
||||
import org.springblade.core.datascope.mapper.UserDataScopeBaseMapper; |
||||
|
||||
/** |
||||
* Mapper 接口 |
||||
* |
||||
* @author Chill |
||||
*/ |
||||
@Mapper |
||||
public interface CertificatetMapper extends UserDataScopeBaseMapper<CertificatetEntity> { |
||||
|
||||
} |
@ -0,0 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?> |
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" > |
||||
<mapper namespace="com.hnac.hzims.basic.mapper.CertificatetMapper"> |
||||
|
||||
|
||||
</mapper> |
@ -0,0 +1,15 @@
|
||||
package com.hnac.hzims.basic.mapper; |
||||
|
||||
import com.hnac.hzims.basic.entity.CertificatetNoticeEntity; |
||||
import org.apache.ibatis.annotations.Mapper; |
||||
import org.springblade.core.datascope.mapper.UserDataScopeBaseMapper; |
||||
|
||||
/** |
||||
* Mapper 接口 |
||||
* |
||||
* @author Chill |
||||
*/ |
||||
@Mapper |
||||
public interface CertificatetNoticeMapper extends UserDataScopeBaseMapper<CertificatetNoticeEntity> { |
||||
|
||||
} |
@ -0,0 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?> |
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" > |
||||
<mapper namespace="com.hnac.hzims.basic.mapper.CertificatetNoticeMapper"> |
||||
|
||||
|
||||
</mapper> |
@ -0,0 +1,30 @@
|
||||
package com.hnac.hzims.basic.mapper; |
||||
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage; |
||||
import com.hnac.hzims.basic.entity.PersonManagemetEntity; |
||||
import com.hnac.hzims.basic.vo.PersonManagemetVo; |
||||
import org.apache.ibatis.annotations.Mapper; |
||||
import org.apache.ibatis.annotations.Param; |
||||
import org.springblade.core.datascope.mapper.UserDataScopeBaseMapper; |
||||
|
||||
import java.util.Date; |
||||
import java.util.List; |
||||
|
||||
/** |
||||
* Mapper 接口 |
||||
* |
||||
* @author Chill |
||||
*/ |
||||
@Mapper |
||||
public interface PersonManagemetMapper extends UserDataScopeBaseMapper<PersonManagemetEntity> { |
||||
|
||||
List<PersonManagemetVo> getPersonManagemetEntity( |
||||
@Param(value = "type")String type, @Param(value = "deadStartTime") Date deadStartTime, @Param(value = "deadTime")Date deadTime, |
||||
@Param(value = "name")String name, @Param(value = "unitName")String unitName, @Param(value = "sex")String sex, @Param(value = "job")String job, |
||||
@Param(value = "academicTitle")String academicTitle, @Param(value = "status")Integer status, @Param(value = "current")Integer current, @Param(value = "size")Integer size) ; |
||||
Integer getCountByPersonManagemetEntity( |
||||
@Param(value = "type")String type, @Param(value = "deadStartTime") Date deadStartTime, @Param(value = "deadTime")Date deadTime, |
||||
@Param(value = "name")String name, @Param(value = "unitName")String unitName, @Param(value = "sex")String sex, @Param(value = "job")String job, |
||||
@Param(value = "academicTitle")String academicTitle, @Param(value = "status")Integer status, @Param(value = "current")Integer current, @Param(value = "size")Integer size) ; |
||||
|
||||
} |
@ -0,0 +1,99 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?> |
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" > |
||||
<mapper namespace="com.hnac.hzims.basic.mapper.PersonManagemetMapper"> |
||||
|
||||
<!--嵌套结果的 resultMap--> |
||||
<resultMap id="PersonManagemetMap" type="com.hnac.hzims.basic.vo.PersonManagemetVo"> |
||||
<id property="id" column="id" jdbcType="VARCHAR" /> |
||||
<result property="name" column="name" jdbcType="VARCHAR" /> |
||||
<result property="unitName" column="unit_name" jdbcType="VARCHAR" /> |
||||
<result property="sex" column="sex" jdbcType="VARCHAR" /> |
||||
<result property="job" column="job" jdbcType="VARCHAR" /> |
||||
<result property="academicTitle" column="academic_title" jdbcType="VARCHAR"/> |
||||
<result property="phone" column="phone" jdbcType="VARCHAR"/> |
||||
<result property="createTime" column="create_time" jdbcType="TIMESTAMP"/> |
||||
<collection property="certificatetEntityList" ofType="com.hnac.hzims.basic.entity.CertificatetEntity"> |
||||
<id property="id" column="certificatetId" /> |
||||
<result property="personId" column="person_id" /> |
||||
<result property="type" column="type" /> |
||||
<result property="deadTime" column="dead_time" /> |
||||
<result property="pic" column="pic" /> |
||||
<result property="status" column="status" /> |
||||
<result property="createTime" column="CREATE_TIME" /> |
||||
<result property="isDead" column="isDead" /> |
||||
</collection> |
||||
</resultMap> |
||||
|
||||
<!--嵌套查询--> |
||||
<select id="getPersonManagemetEntity" resultMap="PersonManagemetMap"> |
||||
select a.id ,a.name,a.unit_name ,a.sex,a.job ,a.academic_title,a.phone ,a.CREATE_TIME, |
||||
b.id as certificatetId,b.person_id,b.type,b.dead_time,b.pic,b.CREATE_TIME,b.status,b.create_dept, |
||||
case when b.dead_time is null then "" |
||||
when b.dead_time < NOW() then "过期" else "未过期" end as isDead |
||||
from hzims_person_managemet as a |
||||
left join hzims_certificatet as b |
||||
on a.id=b.person_id and b.is_deleted = 0 |
||||
where a.is_deleted = 0 |
||||
<if test="type != null and type != ''"> |
||||
and b.type = #{type} |
||||
</if> |
||||
<if test="deadStartTime != null and type != ''"> |
||||
and b.dead_time >= #{deadStartTime} |
||||
</if> |
||||
<if test="deadTime != null and type != ''"> |
||||
and b.dead_time <= #{deadTime} |
||||
</if> |
||||
<if test="name != null and name != ''"> |
||||
and a.name like CONCAT('%',#{name},'%') |
||||
</if> |
||||
<if test="unitName != null and unitName != ''"> |
||||
and a.unit_name like CONCAT('%',#{unitName},'%') |
||||
</if> |
||||
<if test="sex != null and sex != ''"> |
||||
and a.sex = #{sex} |
||||
</if> |
||||
<if test="job != null and job != ''"> |
||||
and a.job like CONCAT('%',#{job},'%') |
||||
</if> |
||||
<if test="academicTitle != null and academicTitle != ''"> |
||||
and a.academic_title like CONCAT('%',#{academic_title},'%') |
||||
</if> |
||||
LIMIT #{current}, #{size} |
||||
</select> |
||||
<!--嵌套查询--> |
||||
<select id="getCountByPersonManagemetEntity" resultType="Integer"> |
||||
select count(*) |
||||
from hzims_person_managemet as a |
||||
left join hzims_certificatet as b |
||||
on a.id=b.person_id and b.is_deleted = 0 |
||||
where a.is_deleted = 0 |
||||
<if test="type != null and type != ''"> |
||||
and b.type = #{type} |
||||
</if> |
||||
<if test="deadStartTime != null and type != ''"> |
||||
and b.dead_time >= #{deadStartTime} |
||||
</if> |
||||
<if test="deadTime != null and type != ''"> |
||||
and b.dead_time <= #{deadTime} |
||||
</if> |
||||
<if test="name != null and name != ''"> |
||||
and a.name like CONCAT('%',#{name},'%') |
||||
</if> |
||||
<if test="unitName != null and unitName != ''"> |
||||
and a.unit_name like CONCAT('%',#{unitName},'%') |
||||
</if> |
||||
<if test="sex != null and sex != ''"> |
||||
and a.sex = #{sex} |
||||
</if> |
||||
<if test="job != null and job != ''"> |
||||
and a.job like CONCAT('%',#{job},'%') |
||||
</if> |
||||
<if test="academicTitle != null and academicTitle != ''"> |
||||
and a.academic_title like CONCAT('%',#{academic_title},'%') |
||||
</if> |
||||
<if test="status != null and status != ''"> |
||||
and b.status =#{status} |
||||
</if> |
||||
</select> |
||||
</mapper> |
||||
|
@ -0,0 +1,13 @@
|
||||
package com.hnac.hzims.basic.service; |
||||
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService; |
||||
import com.hnac.hzims.basic.entity.CertificatetNoticeEntity; |
||||
|
||||
/** |
||||
* 服务类 |
||||
* |
||||
* @author Chill |
||||
*/ |
||||
public interface IImsCertificatetNoticeService extends IService<CertificatetNoticeEntity> { |
||||
} |
@ -0,0 +1,13 @@
|
||||
package com.hnac.hzims.basic.service; |
||||
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService; |
||||
import com.hnac.hzims.basic.entity.CertificatetEntity; |
||||
|
||||
/** |
||||
* 服务类 |
||||
* |
||||
* @author Chill |
||||
*/ |
||||
public interface IImsCertificatetService extends IService<CertificatetEntity> { |
||||
} |
@ -0,0 +1,21 @@
|
||||
package com.hnac.hzims.basic.service; |
||||
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage; |
||||
import com.baomidou.mybatisplus.extension.service.IService; |
||||
import com.hnac.hzims.basic.entity.PersonManagemetEntity; |
||||
import com.hnac.hzims.basic.vo.PersonManagemetVo; |
||||
import org.springblade.core.mp.support.Query; |
||||
|
||||
/** |
||||
* 服务类 |
||||
* |
||||
* @author Chill |
||||
*/ |
||||
public interface IImsPresonManagementService extends IService<PersonManagemetEntity> { |
||||
|
||||
IPage<PersonManagemetVo> getPersonManagemetEntity(PersonManagemetVo personManagemetVo, Query query); |
||||
|
||||
Boolean submit(PersonManagemetVo personManagemetVo); |
||||
|
||||
Boolean removeByPersonManagemetVo(PersonManagemetVo personManagemetVo); |
||||
} |
@ -0,0 +1,20 @@
|
||||
package com.hnac.hzims.basic.service.impl; |
||||
|
||||
import com.hnac.hzims.basic.entity.CertificatetNoticeEntity; |
||||
import com.hnac.hzims.basic.mapper.CertificatetNoticeMapper; |
||||
import com.hnac.hzims.basic.service.IImsCertificatetNoticeService; |
||||
import lombok.RequiredArgsConstructor; |
||||
import lombok.extern.slf4j.Slf4j; |
||||
import org.springblade.core.mp.base.BaseServiceImpl; |
||||
import org.springframework.stereotype.Service; |
||||
|
||||
|
||||
/** |
||||
* 证书实现类 |
||||
* @author ty |
||||
*/ |
||||
@Service |
||||
@Slf4j |
||||
@RequiredArgsConstructor |
||||
public class CertificatetNoticeServiceImpl extends BaseServiceImpl<CertificatetNoticeMapper, CertificatetNoticeEntity> implements IImsCertificatetNoticeService { |
||||
} |
@ -0,0 +1,21 @@
|
||||
package com.hnac.hzims.basic.service.impl; |
||||
|
||||
import com.hnac.hzims.basic.entity.CertificatetEntity; |
||||
import com.hnac.hzims.basic.mapper.CertificatetMapper; |
||||
import com.hnac.hzims.basic.service.IImsCertificatetService; |
||||
import lombok.RequiredArgsConstructor; |
||||
import lombok.extern.slf4j.Slf4j; |
||||
import org.springblade.core.mp.base.BaseServiceImpl; |
||||
import org.springframework.stereotype.Service; |
||||
|
||||
|
||||
|
||||
/** |
||||
* 证书实现类 |
||||
* @author ty |
||||
*/ |
||||
@Service |
||||
@Slf4j |
||||
@RequiredArgsConstructor |
||||
public class CertificatetServiceImpl extends BaseServiceImpl<CertificatetMapper, CertificatetEntity> implements IImsCertificatetService { |
||||
} |
@ -0,0 +1,124 @@
|
||||
package com.hnac.hzims.basic.service.impl; |
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
||||
import com.baomidou.mybatisplus.core.metadata.IPage; |
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
||||
import com.hnac.hzims.basic.entity.CertificatetEntity; |
||||
import com.hnac.hzims.basic.entity.PersonManagemetEntity; |
||||
import com.hnac.hzims.basic.mapper.PersonManagemetMapper; |
||||
import com.hnac.hzims.basic.service.IImsCertificatetService; |
||||
import com.hnac.hzims.basic.service.IImsPresonManagementService; |
||||
import com.hnac.hzims.basic.vo.PersonManagemetVo; |
||||
import com.hnac.hzims.common.logs.utils.StringUtils; |
||||
import lombok.RequiredArgsConstructor; |
||||
import lombok.extern.slf4j.Slf4j; |
||||
import org.springblade.core.mp.base.BaseServiceImpl; |
||||
import org.springblade.core.mp.support.Query; |
||||
import org.springblade.core.secure.utils.AuthUtil; |
||||
import org.springblade.core.tool.api.R; |
||||
import org.springblade.core.tool.utils.BeanUtil; |
||||
import org.springblade.core.tool.utils.CollectionUtil; |
||||
import org.springblade.core.tool.utils.ObjectUtil; |
||||
import org.springblade.system.feign.ISysClient; |
||||
import org.springframework.stereotype.Service; |
||||
import org.springframework.transaction.annotation.Transactional; |
||||
import java.util.List; |
||||
import java.util.stream.Collectors; |
||||
|
||||
|
||||
/** |
||||
* 人员信息实现类 |
||||
* |
||||
* @author ty |
||||
*/ |
||||
@Service |
||||
@Slf4j |
||||
@RequiredArgsConstructor |
||||
public class PresonManagementServiceImpl extends BaseServiceImpl<PersonManagemetMapper, PersonManagemetEntity> implements IImsPresonManagementService { |
||||
|
||||
|
||||
private ISysClient sysClient; |
||||
private final IImsCertificatetService certificatetService; |
||||
|
||||
|
||||
@Override |
||||
public IPage<PersonManagemetVo> getPersonManagemetEntity(PersonManagemetVo personManagemetVo, Query query) { |
||||
List<PersonManagemetVo> personManagemetEntity = baseMapper.getPersonManagemetEntity(personManagemetVo.getType(), personManagemetVo.getDeadStartTime(), personManagemetVo.getDeadTime(), |
||||
personManagemetVo.getName(), personManagemetVo.getUnitName(), personManagemetVo.getSex(), personManagemetVo.getJob(), |
||||
personManagemetVo.getAcademicTitle(), personManagemetVo.getStatus(), (query.getCurrent()-1)*query.getSize(), query.getSize()); |
||||
Integer count = baseMapper.getCountByPersonManagemetEntity(personManagemetVo.getType(), personManagemetVo.getDeadStartTime(), personManagemetVo.getDeadTime(), |
||||
personManagemetVo.getName(), personManagemetVo.getUnitName(), personManagemetVo.getSex(), personManagemetVo.getJob(), |
||||
personManagemetVo.getAcademicTitle(), personManagemetVo.getStatus(), (query.getCurrent()-1)*query.getSize(), query.getSize()); |
||||
IPage<PersonManagemetVo> res = new Page<>(); |
||||
res.setCurrent(query.getCurrent()); |
||||
res.setSize(query.getSize()); |
||||
res.setTotal(Long.valueOf(count)); |
||||
res.setRecords(personManagemetEntity); |
||||
return res; |
||||
} |
||||
|
||||
@Override |
||||
@Transactional(rollbackFor = Exception.class) |
||||
public Boolean submit(PersonManagemetVo personManagemetVo) { |
||||
try { |
||||
if (ObjectUtil.isNotEmpty(personManagemetVo)) { |
||||
PersonManagemetEntity personManagemetEntity = new PersonManagemetEntity(); |
||||
BeanUtil.copy(personManagemetVo, personManagemetEntity); |
||||
if (StringUtils.isBlank(personManagemetEntity.getUnitName())){ |
||||
String deptId = AuthUtil.getDeptId(); |
||||
R<String> deptName = sysClient.getDeptName(Long.valueOf(deptId)); |
||||
if (deptName.isSuccess()&&StringUtils.isBlank(deptName.getData())){ |
||||
personManagemetEntity.setUnitName(deptName.getData()); |
||||
} |
||||
} |
||||
if (ObjectUtil.isNotEmpty(personManagemetEntity)) { |
||||
this.saveOrUpdate(personManagemetEntity); |
||||
} |
||||
if (CollectionUtil.isNotEmpty(personManagemetVo.getCertificatetEntityList())) { |
||||
List<CertificatetEntity> certificatetList = personManagemetVo.getCertificatetEntityList().stream().map( |
||||
s -> { |
||||
s.setPersonId(personManagemetEntity.getId().toString()); |
||||
if (System.currentTimeMillis() > s.getDeadTime().getTime()){ |
||||
s.setStatus(2); |
||||
}else { |
||||
s.setStatus(1); |
||||
} |
||||
return s; |
||||
} |
||||
).collect(Collectors.toList()); |
||||
certificatetService.saveOrUpdateBatch(certificatetList); |
||||
} |
||||
return true; |
||||
} |
||||
return false; |
||||
} catch (Exception e) { |
||||
log.error("入参 personManagemetVo" + personManagemetVo + ":" + e); |
||||
return false; |
||||
} |
||||
} |
||||
|
||||
@Override |
||||
@Transactional(rollbackFor = Exception.class) |
||||
public Boolean removeByPersonManagemetVo(PersonManagemetVo personManagemetVo) { |
||||
try { |
||||
if (ObjectUtil.isNotEmpty(personManagemetVo)) { |
||||
if (ObjectUtil.isNotEmpty(personManagemetVo.getPersonIds())) { |
||||
this.removeByIds(personManagemetVo.getPersonIds()); |
||||
certificatetService.remove(new LambdaQueryWrapper<CertificatetEntity>() {{ |
||||
in(CertificatetEntity::getPersonId, personManagemetVo.getPersonIds()); |
||||
}}); |
||||
} |
||||
if (CollectionUtil.isNotEmpty(personManagemetVo.getCertificatetIds())) { |
||||
certificatetService.removeByIds(personManagemetVo.getCertificatetIds()); |
||||
} |
||||
return true; |
||||
} |
||||
return false; |
||||
} catch (Exception e) { |
||||
log.error("removeByPersonManagemetVo 入参 personManagemetVo" + personManagemetVo + ":" + e); |
||||
return false; |
||||
} |
||||
} |
||||
|
||||
|
||||
} |
@ -0,0 +1,41 @@
|
||||
#服务器端口 |
||||
server: |
||||
port: 8430 |
||||
|
||||
|
||||
#数据源配置 |
||||
spring: |
||||
main: |
||||
allow-bean-definition-overriding: true |
||||
#排除DruidDataSourceAutoConfigure |
||||
autoconfigure: |
||||
exclude: com.alibaba.druid.spring.boot.autoconfigure.DruidDataSourceAutoConfigure |
||||
datasource: |
||||
url: jdbc:mysql://192.168.60.34:3576/hzims_basic?useSSL=false&useUnicode=true&characterEncoding=utf-8&zeroDateTimeBehavior=convertToNull&transformedBitIsBoolean=true&tinyInt1isBit=false&allowMultiQueries=true&serverTimezone=GMT%2B8&nullCatalogMeansCurrent=true&allowPublicKeyRetrieval=true |
||||
username: hzinfo |
||||
password: 1qaz2WSX! |
||||
|
||||
|
||||
#mybatis-plus配置 |
||||
mybatis-plus: |
||||
mapper-locations: classpath:com/hnac/hzims/**/mapper/*Mapper.xml |
||||
#实体扫描,多个package用逗号或者分号分隔 |
||||
typeAliasesPackage: com.hnac.hzims.**.entity |
||||
configuration: |
||||
log-impl: org.apache.ibatis.logging.stdout.StdOutImpl |
||||
|
||||
#swagger扫描路径配置 |
||||
swagger: |
||||
base-packages: |
||||
- org.springbalde |
||||
- com.hnac |
||||
|
||||
blade: |
||||
data-scope: |
||||
enabled: false |
||||
lock: |
||||
enabled: true |
||||
address: redis://192.168.1.20:3577 |
||||
password: 1qaz2WSX@redis |
||||
database: 0 |
||||
ssl: false |
@ -0,0 +1,7 @@
|
||||
spring: |
||||
cloud: |
||||
nacos: |
||||
discovery: |
||||
server-addr: 175.6.40.67:10042 |
||||
|
||||
|
@ -0,0 +1,15 @@
|
||||
package com.hnac.hzims.basic; |
||||
|
||||
import org.junit.jupiter.api.Test; |
||||
import org.springframework.boot.test.context.SpringBootTest; |
||||
|
||||
@SpringBootTest(classes = BasicApplication.class) |
||||
class BasicApplicationTests { |
||||
|
||||
@Test |
||||
void contextLoads() { |
||||
|
||||
System.out.println("1"); |
||||
} |
||||
|
||||
} |
@ -0,0 +1,41 @@
|
||||
package com.hnac.hzims.middle.processflow.strategy.serviceimpl; |
||||
|
||||
|
||||
import com.hnac.hzims.middle.process.to.ProcessWorkFlowResponse; |
||||
import com.hnac.hzims.middle.processflow.service.ProcessDictService; |
||||
import com.hnac.hzims.middle.processflow.strategy.abstracts.ProcessAbstractService; |
||||
import com.hnac.hzims.middle.processflow.strategy.entity.WorkflowQueue; |
||||
import com.hnac.hzims.ticket.ticketprocess.feign.IOfflineTicketProcessClient; |
||||
import lombok.AllArgsConstructor; |
||||
import lombok.extern.slf4j.Slf4j; |
||||
import org.springblade.core.log.exception.ServiceException; |
||||
import org.springblade.core.tool.api.R; |
||||
import org.springframework.stereotype.Service; |
||||
import org.springframework.util.Assert; |
||||
|
||||
import static com.hnac.hzims.middle.process.constant.TicketProcessConstant.OFFLINE_WORK_TICKET; |
||||
|
||||
@Slf4j |
||||
@Service |
||||
@AllArgsConstructor |
||||
public class OfflineTicketProcessImpl extends ProcessAbstractService { |
||||
|
||||
private final ProcessDictService processDictService; |
||||
private final IOfflineTicketProcessClient offlineTicketProcessClient; |
||||
|
||||
@Override |
||||
public Boolean isWorkflowProcess(WorkflowQueue flowQueue) { |
||||
String dictValue = processDictService.selectDictValueByKey(OFFLINE_WORK_TICKET); |
||||
return dictValue.equals(flowQueue.getProcessDefinitionKey()); |
||||
} |
||||
|
||||
@Override |
||||
public void calculate(ProcessWorkFlowResponse response) { |
||||
log.info("线下工作票调用fein接口消费开始---param",response); |
||||
R result = offlineTicketProcessClient.findPending(response); |
||||
Assert.isTrue(result.isSuccess(),() -> { |
||||
throw new ServiceException("线下工作票处理失败!"); |
||||
}); |
||||
log.info("线下工作票调用fein接口消费结束---"); |
||||
} |
||||
} |
@ -0,0 +1 @@
|
||||
INSERT INTO `process_dict` (`dict_code`, `dict_sort`, `dict_key`, `dict_value`, `dict_label`, `dict_type`, `is_default`, `status`, `create_dept`, `create_time`, `update_time`, `remark`) VALUES (9, 9, 'offlineWorkTicket', 'offlineWorkTicket', '线下工作票', '线下工作票', 'Y', 0, NULL, '2023-12-28 16:35:10', '2023-12-28 16:35:14', '线下工作票流程'); |
@ -0,0 +1,15 @@
|
||||
package com.hnac.hzims.scheduled.mapper.basic; |
||||
|
||||
import com.hnac.hzims.basic.entity.CertificatetEntity; |
||||
import org.apache.ibatis.annotations.Mapper; |
||||
import org.springblade.core.datascope.mapper.UserDataScopeBaseMapper; |
||||
|
||||
/** |
||||
* Mapper 接口 |
||||
* |
||||
* @author Chill |
||||
*/ |
||||
@Mapper |
||||
public interface CertificatetMapper extends UserDataScopeBaseMapper<CertificatetEntity> { |
||||
|
||||
} |
@ -0,0 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?> |
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" > |
||||
<mapper namespace="com.hnac.hzims.scheduled.mapper.basic.CertificatetMapper"> |
||||
|
||||
|
||||
</mapper> |
@ -0,0 +1,15 @@
|
||||
package com.hnac.hzims.scheduled.mapper.basic; |
||||
|
||||
import com.hnac.hzims.basic.entity.CertificatetNoticeEntity; |
||||
import org.apache.ibatis.annotations.Mapper; |
||||
import org.springblade.core.datascope.mapper.UserDataScopeBaseMapper; |
||||
|
||||
/** |
||||
* Mapper 接口 |
||||
* |
||||
* @author Chill |
||||
*/ |
||||
@Mapper |
||||
public interface CertificatetNoticeMapper extends UserDataScopeBaseMapper<CertificatetNoticeEntity> { |
||||
|
||||
} |
@ -0,0 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?> |
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" > |
||||
<mapper namespace="com.hnac.hzims.scheduled.mapper.basic.CertificatetNoticeMapper"> |
||||
|
||||
|
||||
</mapper> |
@ -0,0 +1,29 @@
|
||||
package com.hnac.hzims.scheduled.mapper.basic; |
||||
|
||||
import com.hnac.hzims.basic.entity.PersonManagemetEntity; |
||||
import com.hnac.hzims.basic.vo.PersonManagemetVo; |
||||
import org.apache.ibatis.annotations.Mapper; |
||||
import org.apache.ibatis.annotations.Param; |
||||
import org.springblade.core.datascope.mapper.UserDataScopeBaseMapper; |
||||
|
||||
import java.util.Date; |
||||
import java.util.List; |
||||
|
||||
/** |
||||
* Mapper 接口 |
||||
* |
||||
* @author Chill |
||||
*/ |
||||
@Mapper |
||||
public interface PersonManagemetMapper extends UserDataScopeBaseMapper<PersonManagemetEntity> { |
||||
|
||||
List<PersonManagemetVo> getPersonManagemetEntity( |
||||
@Param(value = "type")String type, @Param(value = "deadStartTime") Date deadStartTime, @Param(value = "deadTime")Date deadTime, |
||||
@Param(value = "name")String name, @Param(value = "unitName")String unitName, @Param(value = "sex")String sex, @Param(value = "job")String job, |
||||
@Param(value = "academicTitle")String academicTitle, @Param(value = "status")Integer status, @Param(value = "current")Integer current, @Param(value = "size")Integer size) ; |
||||
Integer getCountByPersonManagemetEntity( |
||||
@Param(value = "type")String type, @Param(value = "deadStartTime") Date deadStartTime, @Param(value = "deadTime")Date deadTime, |
||||
@Param(value = "name")String name, @Param(value = "unitName")String unitName, @Param(value = "sex")String sex, @Param(value = "job")String job, |
||||
@Param(value = "academicTitle")String academicTitle, @Param(value = "status")Integer status, @Param(value = "current")Integer current, @Param(value = "size")Integer size) ; |
||||
|
||||
} |
@ -0,0 +1,97 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?> |
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" > |
||||
<mapper namespace="com.hnac.hzims.scheduled.mapper.basic.PersonManagemetMapper"> |
||||
|
||||
<!--嵌套结果的 resultMap--> |
||||
<resultMap id="PersonManagemetMap" type="com.hnac.hzims.basic.vo.PersonManagemetVo"> |
||||
<id property="id" column="id" jdbcType="VARCHAR" /> |
||||
<result property="name" column="name" jdbcType="VARCHAR" /> |
||||
<result property="unitName" column="unitName" jdbcType="VARCHAR" /> |
||||
<result property="sex" column="sex" jdbcType="VARCHAR" /> |
||||
<result property="job" column="job" jdbcType="VARCHAR" /> |
||||
<result property="academicTitle" column="academic_title" jdbcType="VARCHAR"/> |
||||
<result property="phone" column="phone" jdbcType="VARCHAR"/> |
||||
<result property="createTime" column="create_time" jdbcType="TIMESTAMP"/> |
||||
<collection property="certificatetEntityList" ofType="com.hnac.hzims.basic.entity.CertificatetEntity"> |
||||
<id property="id" column="certificatetId" /> |
||||
<result property="personId" column="person_id" /> |
||||
<result property="type" column="type" /> |
||||
<result property="deadTime" column="dead_time" /> |
||||
<result property="pic" column="pic" /> |
||||
<result property="status" column="status" /> |
||||
<result property="isDead" column="isDead" /> |
||||
</collection> |
||||
</resultMap> |
||||
|
||||
<!--嵌套查询--> |
||||
<select id="getPersonManagemetEntity" resultMap="PersonManagemetMap"> |
||||
select a.id ,a.name,a.unit_name ,a.sex,a.job ,a.academic_title,a.phone ,a.CREATE_TIME, |
||||
b.id as certificatetId,b.person_id,b.type,b.dead_time,b.pic,b.CREATE_TIME,b.status,b.create_dept, |
||||
case when b.dead_time < NOW() then "过期" else "未过期" end as isDead |
||||
from hzims_person_managemet as a |
||||
left join hzims_certificatet as b |
||||
on a.id=b.person_id |
||||
where a.is_deleted = 0 and b.is_deleted = 0 |
||||
<if test="type != null and type != ''"> |
||||
and b.type = #{type} |
||||
</if> |
||||
<if test="deadStartTime != null and type != ''"> |
||||
and b.dead_time >= #{deadStartTime} |
||||
</if> |
||||
<if test="deadTime != null and type != ''"> |
||||
and b.dead_time <= #{deadTime} |
||||
</if> |
||||
<if test="name != null and name != ''"> |
||||
and a.name like CONCAT('%',#{name},'%') |
||||
</if> |
||||
<if test="unitName != null and unitName != ''"> |
||||
and a.unit_name like CONCAT('%',#{unitName},'%') |
||||
</if> |
||||
<if test="sex != null and sex != ''"> |
||||
and a.sex = #{sex} |
||||
</if> |
||||
<if test="job != null and job != ''"> |
||||
and a.job like CONCAT('%',#{job},'%') |
||||
</if> |
||||
<if test="academicTitle != null and academicTitle != ''"> |
||||
and a.academic_title like CONCAT('%',#{academic_title},'%') |
||||
</if> |
||||
LIMIT #{current}, #{size} |
||||
</select> |
||||
<!--嵌套查询--> |
||||
<select id="getCountByPersonManagemetEntity" resultType="Integer"> |
||||
select count(*) |
||||
from hzims_person_managemet as a |
||||
left join hzims_certificatet as b |
||||
on a.id=b.person_id |
||||
where a.is_deleted = 0 and b.is_deleted = 0 |
||||
<if test="type != null and type != ''"> |
||||
and b.type = #{type} |
||||
</if> |
||||
<if test="deadStartTime != null and type != ''"> |
||||
and b.dead_time >= #{deadStartTime} |
||||
</if> |
||||
<if test="deadTime != null and type != ''"> |
||||
and b.dead_time <= #{deadTime} |
||||
</if> |
||||
<if test="name != null and name != ''"> |
||||
and a.name like CONCAT('%',#{name},'%') |
||||
</if> |
||||
<if test="unitName != null and unitName != ''"> |
||||
and a.unit_name like CONCAT('%',#{unitName},'%') |
||||
</if> |
||||
<if test="sex != null and sex != ''"> |
||||
and a.sex = #{sex} |
||||
</if> |
||||
<if test="job != null and job != ''"> |
||||
and a.job like CONCAT('%',#{job},'%') |
||||
</if> |
||||
<if test="academicTitle != null and academicTitle != ''"> |
||||
and a.academic_title like CONCAT('%',#{academic_title},'%') |
||||
</if> |
||||
<if test="status != null and status != ''"> |
||||
and b.status =#{status} |
||||
</if> |
||||
</select> |
||||
</mapper> |
||||
|
@ -0,0 +1,141 @@
|
||||
package com.hnac.hzims.scheduled.scheduled; |
||||
|
||||
import com.alibaba.fastjson.JSONObject; |
||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
||||
import com.hnac.hzims.basic.entity.CertificatetEntity; |
||||
import com.hnac.hzims.basic.entity.CertificatetNoticeEntity; |
||||
import com.hnac.hzims.basic.entity.PersonManagemetEntity; |
||||
import com.hnac.hzims.message.MessageConstants; |
||||
import com.hnac.hzims.message.dto.BusinessMessageDTO; |
||||
import com.hnac.hzims.message.entity.config.SmsConfigEntity; |
||||
import com.hnac.hzims.message.fegin.IMessageClient; |
||||
import com.hnac.hzims.message.fegin.IMessageConfigClient; |
||||
import com.hnac.hzims.scheduled.mapper.basic.PersonManagemetMapper; |
||||
import com.hnac.hzims.scheduled.service.basic.IImsCertificatetNoticeService; |
||||
import com.hnac.hzims.scheduled.service.basic.IImsCertificatetService; |
||||
import com.xxl.job.core.biz.model.ReturnT; |
||||
import com.xxl.job.core.handler.annotation.XxlJob; |
||||
import lombok.extern.slf4j.Slf4j; |
||||
import org.springblade.core.tool.api.R; |
||||
import org.springblade.core.tool.utils.CollectionUtil; |
||||
import org.springblade.core.tool.utils.DateUtil; |
||||
import org.springblade.core.tool.utils.Func; |
||||
import org.springblade.core.tool.utils.ObjectUtil; |
||||
import org.springblade.system.feign.ISysClient; |
||||
import org.springblade.system.user.cache.UserCache; |
||||
import org.springblade.system.user.entity.User; |
||||
import org.springblade.system.user.feign.IUserClient; |
||||
import org.springframework.beans.factory.annotation.Autowired; |
||||
import org.springframework.stereotype.Component; |
||||
|
||||
import java.text.ParseException; |
||||
import java.text.SimpleDateFormat; |
||||
import java.util.*; |
||||
import java.util.stream.Collectors; |
||||
|
||||
import static com.hnac.hzims.operational.main.constant.MainConstants.*; |
||||
|
||||
|
||||
/** |
||||
* 排班到期定时任务通知 |
||||
* |
||||
* @author ty |
||||
*/ |
||||
@Slf4j |
||||
@Component |
||||
public class basicScheduledTask { |
||||
|
||||
@Autowired |
||||
private IImsCertificatetService iImsCertificatetService; |
||||
@Autowired |
||||
private IImsCertificatetNoticeService iImsCertificatetNoticeService; |
||||
@Autowired |
||||
private ISysClient sysClient; |
||||
@Autowired |
||||
private IUserClient userClient; |
||||
@Autowired |
||||
private IMessageClient messageClient; |
||||
@Autowired |
||||
private PersonManagemetMapper personManagemetMapper; |
||||
@Autowired |
||||
private IMessageConfigClient messageConfigClient; |
||||
|
||||
/** |
||||
* realId刷新 |
||||
*/ |
||||
@XxlJob(CERTIFICATET_DEAD_LINE_NOTICE) |
||||
// @Scheduled(cron = "0 */1 * * * ? ")
|
||||
public ReturnT<String> certificatetDeadLineNotice(String param) throws ParseException { |
||||
Date endTime = new Date(); |
||||
if (Func.isBlank(param)) { |
||||
endTime = new SimpleDateFormat("yyyy-MM-dd").parse(param); |
||||
} |
||||
CertificatetNoticeEntity noticeEntity = iImsCertificatetNoticeService.getOne(Wrappers.<CertificatetNoticeEntity>lambdaQuery() |
||||
.eq(CertificatetNoticeEntity::getIsDeleted, 0) |
||||
.last("limit 1;")); |
||||
//用户档案过期截止时间
|
||||
Date date = DateUtil.plusDays(endTime, noticeEntity.getSafeTime()); |
||||
List<CertificatetEntity> list = iImsCertificatetService.list(Wrappers.<CertificatetEntity>lambdaQuery() |
||||
.le(CertificatetEntity::getDeadTime, date)); |
||||
String noticeUsers = noticeEntity.getNoticeUsers(); |
||||
List<String> userList = Arrays.asList(noticeUsers.split(",")); |
||||
if (CollectionUtil.isNotEmpty(userList) && CollectionUtil.isNotEmpty(list)) { |
||||
List<String> personIds = list.stream().map(CertificatetEntity::getPersonId).collect(Collectors.toList()); |
||||
List<PersonManagemetEntity> personManagemetEntities = personManagemetMapper.selectList(Wrappers.<PersonManagemetEntity>query().lambda().in(PersonManagemetEntity::getId, personIds)); |
||||
String personNotice=""; |
||||
if (CollectionUtil.isNotEmpty(personManagemetEntities)) { |
||||
personNotice = personManagemetEntities.stream().map(PersonManagemetEntity::getName).collect(Collectors.joining(",")); |
||||
} |
||||
if ("1".equals(noticeEntity.getSendType())) { |
||||
sendSmsByUserList(userList, date,personNotice); |
||||
} |
||||
sendMessage(list.get(0), noticeEntity.getSafeTime(), noticeEntity.getNoticeUsers(),personNotice); |
||||
} |
||||
return new ReturnT<>("SUCCESS"); |
||||
} |
||||
|
||||
private void sendSmsByUserList(List<String> userList, Date date,String personNotice) { |
||||
//区分用户
|
||||
for (String s : userList) { |
||||
User user = UserCache.getUser(Long.valueOf(s)); |
||||
String phone = ""; |
||||
if (ObjectUtil.isNotEmpty(user)) { |
||||
phone = user.getPhone(); |
||||
} |
||||
//短信推送
|
||||
String code = "certificatetNotice"; |
||||
SmsConfigEntity smsConfigEntity = messageConfigClient.getSmsConfigByBusinessKey(code); |
||||
Map<String, String> contentParams = new HashMap<>(2); |
||||
contentParams.put("one", personNotice); |
||||
String deadLine = DateUtil.format(date, "yyyy-MM-dd"); |
||||
contentParams.put("two", deadLine); |
||||
smsConfigEntity.setTemplateParam(JSONObject.toJSONString(contentParams)); |
||||
smsConfigEntity.setPhones(phone); |
||||
messageConfigClient.pushSmsMessageByConfig(smsConfigEntity); |
||||
} |
||||
} |
||||
|
||||
private void sendMessage(CertificatetEntity certificatetEntity, Integer date, String users,String personNotice) { |
||||
// //注意:通知人是创建人所在机构
|
||||
BusinessMessageDTO message = new BusinessMessageDTO(); |
||||
message.setBusinessClassify("system"); |
||||
message.setBusinessKey(MessageConstants.BusinessClassifyEnum.CERTIFICATETNOTICE.getKey()); |
||||
message.setSubject(MessageConstants.BusinessClassifyEnum.CERTIFICATETNOTICE.getDescription()); |
||||
message.setTaskId(System.currentTimeMillis()); |
||||
message.setTenantId("200000"); |
||||
String countent = |
||||
personNotice + "的证书即将到期,请提交新的证书资料"; |
||||
message.setContent(countent); |
||||
message.setDeptId(certificatetEntity.getCreateDept()); |
||||
R<String> deptName = sysClient.getDeptName(certificatetEntity.getCreateDept()); |
||||
if (deptName.isSuccess()) { |
||||
message.setDeptName(deptName.getData()); |
||||
} |
||||
message.setUserIds(users); |
||||
User admin = userClient.userByAccount("200000", "admin").getData(); |
||||
message.setCreateUser(admin.getId()); |
||||
messageClient.sendAppAndWsMsgByUsers(message); |
||||
} |
||||
|
||||
|
||||
} |
@ -0,0 +1,13 @@
|
||||
package com.hnac.hzims.scheduled.service.basic; |
||||
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService; |
||||
import com.hnac.hzims.basic.entity.CertificatetNoticeEntity; |
||||
|
||||
/** |
||||
* 服务类 |
||||
* |
||||
* @author Chill |
||||
*/ |
||||
public interface IImsCertificatetNoticeService extends IService<CertificatetNoticeEntity> { |
||||
} |
@ -0,0 +1,13 @@
|
||||
package com.hnac.hzims.scheduled.service.basic; |
||||
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService; |
||||
import com.hnac.hzims.basic.entity.CertificatetEntity; |
||||
|
||||
/** |
||||
* 服务类 |
||||
* |
||||
* @author Chill |
||||
*/ |
||||
public interface IImsCertificatetService extends IService<CertificatetEntity> { |
||||
} |
@ -0,0 +1,21 @@
|
||||
package com.hnac.hzims.scheduled.service.basic.impl; |
||||
|
||||
import com.hnac.hzims.basic.entity.CertificatetNoticeEntity; |
||||
import com.hnac.hzims.scheduled.mapper.basic.CertificatetNoticeMapper; |
||||
import com.hnac.hzims.scheduled.service.basic.IImsCertificatetNoticeService; |
||||
import lombok.RequiredArgsConstructor; |
||||
import lombok.extern.slf4j.Slf4j; |
||||
|
||||
import org.springblade.core.mp.base.BaseServiceImpl; |
||||
import org.springframework.stereotype.Service; |
||||
|
||||
|
||||
/** |
||||
* 证书实现类 |
||||
* @author ty |
||||
*/ |
||||
@Service |
||||
@Slf4j |
||||
@RequiredArgsConstructor |
||||
public class CertificatetNoticeServiceImpl extends BaseServiceImpl<CertificatetNoticeMapper, CertificatetNoticeEntity> implements IImsCertificatetNoticeService { |
||||
} |
@ -0,0 +1,21 @@
|
||||
package com.hnac.hzims.scheduled.service.basic.impl; |
||||
|
||||
import com.hnac.hzims.basic.entity.CertificatetEntity; |
||||
import com.hnac.hzims.scheduled.mapper.basic.CertificatetMapper; |
||||
import com.hnac.hzims.scheduled.service.basic.IImsCertificatetService; |
||||
import lombok.RequiredArgsConstructor; |
||||
import lombok.extern.slf4j.Slf4j; |
||||
import org.springblade.core.mp.base.BaseServiceImpl; |
||||
import org.springframework.stereotype.Service; |
||||
|
||||
|
||||
|
||||
/** |
||||
* 证书实现类 |
||||
* @author ty |
||||
*/ |
||||
@Service |
||||
@Slf4j |
||||
@RequiredArgsConstructor |
||||
public class CertificatetServiceImpl extends BaseServiceImpl<CertificatetMapper, CertificatetEntity> implements IImsCertificatetService { |
||||
} |
@ -0,0 +1,56 @@
|
||||
package com.hnac.hzims.safeproduct.controller; |
||||
|
||||
import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport; |
||||
import com.hnac.hzims.safeproduct.constants.SafeProductConstant; |
||||
import io.swagger.annotations.Api; |
||||
import io.swagger.annotations.ApiOperation; |
||||
import lombok.AllArgsConstructor; |
||||
import org.apache.commons.lang3.StringUtils; |
||||
import org.springblade.core.boot.ctrl.BladeController; |
||||
import org.springblade.core.secure.BladeUser; |
||||
import org.springblade.core.tool.api.R; |
||||
import org.springblade.system.feign.ISysClient; |
||||
import org.springblade.system.user.entity.User; |
||||
import org.springblade.system.user.feign.IUserClient; |
||||
import org.springframework.web.bind.annotation.GetMapping; |
||||
import org.springframework.web.bind.annotation.RequestMapping; |
||||
import org.springframework.web.bind.annotation.RequestParam; |
||||
import org.springframework.web.bind.annotation.RestController; |
||||
|
||||
import java.util.List; |
||||
|
||||
/** |
||||
* 公用业务接口类 |
||||
* |
||||
* @author liwen |
||||
* @date 2023-12-28 |
||||
*/ |
||||
@RestController |
||||
@AllArgsConstructor |
||||
@RequestMapping("/base") |
||||
@Api(value = "公用业务", tags = "公用业务接口") |
||||
public class BaseController extends BladeController { |
||||
|
||||
private final ISysClient sysClient; |
||||
|
||||
private final IUserClient userClient; |
||||
|
||||
@GetMapping("/getDeptName") |
||||
@ApiOperation(value = "获取所属机构名") |
||||
@ApiOperationSupport(order = 1) |
||||
public R<String> getDeptName() { |
||||
BladeUser bladeUser = getUser(); |
||||
String deptId = bladeUser.getDeptId(); |
||||
if (StringUtils.isNotBlank(deptId)) { |
||||
return sysClient.getDeptName(Long.valueOf(deptId)); |
||||
} |
||||
return R.data(null, "所属机构为空"); |
||||
} |
||||
|
||||
@GetMapping("/getUserList") |
||||
@ApiOperation(value = "获取用户列表") |
||||
@ApiOperationSupport(order = 2) |
||||
public R<List<User>> getUserList(@RequestParam String name) { |
||||
return userClient.userListByCodeAndNameAndAccount(SafeProductConstant.TENANT_ID, null, name, null); |
||||
} |
||||
} |
@ -0,0 +1,133 @@
|
||||
package com.hnac.hzims.safeproduct.controller; |
||||
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage; |
||||
import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport; |
||||
import com.hnac.hzims.common.utils.Condition; |
||||
import com.hnac.hzims.safeproduct.entity.ConferencePlanEntity; |
||||
import com.hnac.hzims.safeproduct.entity.ConferenceRecordEntity; |
||||
import com.hnac.hzims.safeproduct.service.IConferencePlanService; |
||||
import com.hnac.hzims.safeproduct.service.IConferenceRecordService; |
||||
import io.swagger.annotations.Api; |
||||
import io.swagger.annotations.ApiImplicitParam; |
||||
import io.swagger.annotations.ApiImplicitParams; |
||||
import io.swagger.annotations.ApiOperation; |
||||
import lombok.AllArgsConstructor; |
||||
import org.springblade.core.boot.ctrl.BladeController; |
||||
import org.springblade.core.mp.support.Query; |
||||
import org.springblade.core.tool.api.R; |
||||
import org.springframework.web.bind.annotation.*; |
||||
import springfox.documentation.annotations.ApiIgnore; |
||||
|
||||
import javax.servlet.http.HttpServletResponse; |
||||
import javax.validation.Valid; |
||||
import java.util.Map; |
||||
|
||||
/** |
||||
* 会议管理接口类 |
||||
* |
||||
* @author liwen |
||||
* @date 2023-12-27 |
||||
*/ |
||||
@RestController |
||||
@AllArgsConstructor |
||||
@RequestMapping("/conference") |
||||
@Api(value = "会议管理", tags = "会议管理接口") |
||||
public class ConferenceController extends BladeController { |
||||
|
||||
private final IConferencePlanService conferencePlanService; |
||||
|
||||
private final IConferenceRecordService conferenceRecordService; |
||||
|
||||
@PostMapping("/savePlan") |
||||
@ApiOperation(value = "新增会议计划") |
||||
@ApiOperationSupport(order = 1) |
||||
public R savePlan(@Valid @RequestBody ConferencePlanEntity conferencePlan) { |
||||
return R.status(conferencePlanService.save(conferencePlan)); |
||||
} |
||||
|
||||
@PostMapping("/updatePlan") |
||||
@ApiOperation(value = "修改会议计划") |
||||
@ApiOperationSupport(order = 2) |
||||
public R updatePlan(@Valid @RequestBody ConferencePlanEntity conferencePlan) { |
||||
return R.status(conferencePlanService.updateById(conferencePlan)); |
||||
} |
||||
|
||||
@PostMapping("/removePlan") |
||||
@ApiOperation(value = "删除会议计划") |
||||
@ApiOperationSupport(order = 3) |
||||
public R removePlan(@RequestParam Long id) { |
||||
return R.status(conferencePlanService.removePlan(id)); |
||||
} |
||||
|
||||
@GetMapping("/planDetail") |
||||
@ApiOperation(value = "会议计划详情") |
||||
@ApiOperationSupport(order = 4) |
||||
public R<ConferencePlanEntity> planDetail(@RequestParam Long id) { |
||||
return R.data(conferencePlanService.getById(id)); |
||||
} |
||||
|
||||
@GetMapping("/planPage") |
||||
@ApiImplicitParams({ |
||||
@ApiImplicitParam(name = "unit", value = "单位", dataType = "query", paramType = "string"), |
||||
@ApiImplicitParam(name = "scheduledStartTime", value = "计划开始时间", dataType = "query", paramType = "string"), |
||||
@ApiImplicitParam(name = "scheduledEndTime", value = "计划结束时间", dataType = "query", paramType = "string") |
||||
}) |
||||
@ApiOperation(value = "会议计划分页") |
||||
@ApiOperationSupport(order = 5) |
||||
public R<IPage<ConferencePlanEntity>> planPage(@ApiIgnore @RequestParam Map<String, Object> param, Query query) { |
||||
IPage<ConferencePlanEntity> page = conferencePlanService.planPage(param, query); |
||||
return R.data(page); |
||||
} |
||||
|
||||
@PostMapping("/saveRecord") |
||||
@ApiOperation(value = "新增会议记录") |
||||
@ApiOperationSupport(order = 6) |
||||
public R saveRecord(@Valid @RequestBody ConferenceRecordEntity conferenceRecord) { |
||||
return R.status(conferenceRecordService.saveRecord(conferenceRecord)); |
||||
} |
||||
|
||||
@PostMapping("/updateRecord") |
||||
@ApiOperation(value = "修改会议记录") |
||||
@ApiOperationSupport(order = 7) |
||||
public R updateRecord(@Valid @RequestBody ConferenceRecordEntity conferenceRecord) { |
||||
return R.status(conferenceRecordService.updateById(conferenceRecord)); |
||||
} |
||||
|
||||
@PostMapping("/removeRecord") |
||||
@ApiOperation(value = "删除会议记录") |
||||
@ApiOperationSupport(order = 8) |
||||
public R removeRecord(@RequestParam Long id) { |
||||
return R.status(conferenceRecordService.removeById(id)); |
||||
} |
||||
|
||||
@GetMapping("/recordDetail") |
||||
@ApiOperation(value = "会议记录详情") |
||||
@ApiOperationSupport(order = 9) |
||||
public R<ConferenceRecordEntity> recordDetail(@RequestParam Long id) { |
||||
return R.data(conferenceRecordService.getById(id)); |
||||
} |
||||
|
||||
@GetMapping("/recordPage") |
||||
@ApiImplicitParams({ |
||||
@ApiImplicitParam(name = "conferencePlanId", value = "会议计划id", dataType = "query", paramType = "string") |
||||
}) |
||||
@ApiOperation(value = "会议记录分页") |
||||
@ApiOperationSupport(order = 10) |
||||
public R<IPage<ConferenceRecordEntity>> recordPage(@ApiIgnore @RequestParam Map<String, Object> param, Query query) { |
||||
IPage<ConferenceRecordEntity> page = conferenceRecordService.page(Condition.getPage(query), |
||||
Condition.getQueryWrapper(param, ConferenceRecordEntity.class)); |
||||
return R.data(page); |
||||
} |
||||
|
||||
@GetMapping("/exportConferenceData") |
||||
@ApiImplicitParams({ |
||||
@ApiImplicitParam(name = "unit", value = "单位", dataType = "query", paramType = "string"), |
||||
@ApiImplicitParam(name = "scheduledStartTime", value = "计划开始时间", dataType = "query", paramType = "string"), |
||||
@ApiImplicitParam(name = "scheduledEndTime", value = "计划结束时间", dataType = "query", paramType = "string") |
||||
}) |
||||
@ApiOperation(value = "会议数据导出") |
||||
@ApiOperationSupport(order = 11) |
||||
public void exportConferenceData(@ApiIgnore @RequestParam Map<String, Object> param, HttpServletResponse response) { |
||||
conferencePlanService.exportConferenceData(param, response); |
||||
} |
||||
} |
@ -0,0 +1,142 @@
|
||||
package com.hnac.hzims.safeproduct.controller; |
||||
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage; |
||||
import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport; |
||||
import com.hnac.hzims.common.utils.Condition; |
||||
import com.hnac.hzims.safeproduct.entity.HygienePlanEntity; |
||||
import com.hnac.hzims.safeproduct.entity.HygieneRecordEntity; |
||||
import com.hnac.hzims.safeproduct.service.IHygienePlanService; |
||||
import com.hnac.hzims.safeproduct.service.IHygieneRecordService; |
||||
import com.hnac.hzims.safeproduct.vo.HygieneMonthVO; |
||||
import com.hnac.hzims.safeproduct.vo.HygieneRecordDetailVO; |
||||
import io.swagger.annotations.Api; |
||||
import io.swagger.annotations.ApiImplicitParam; |
||||
import io.swagger.annotations.ApiImplicitParams; |
||||
import io.swagger.annotations.ApiOperation; |
||||
import lombok.AllArgsConstructor; |
||||
import org.springblade.core.boot.ctrl.BladeController; |
||||
import org.springblade.core.mp.support.Query; |
||||
import org.springblade.core.tool.api.R; |
||||
import org.springframework.web.bind.annotation.*; |
||||
import springfox.documentation.annotations.ApiIgnore; |
||||
|
||||
import javax.servlet.http.HttpServletResponse; |
||||
import javax.validation.Valid; |
||||
import java.util.Map; |
||||
|
||||
/** |
||||
* 卫生自查接口类 |
||||
* |
||||
* @author liwen |
||||
* @date 2023-12-27 |
||||
*/ |
||||
@RestController |
||||
@AllArgsConstructor |
||||
@RequestMapping("/hygiene") |
||||
@Api(value = "卫生自查", tags = "卫生自查接口") |
||||
public class HygieneController extends BladeController { |
||||
|
||||
private final IHygienePlanService hygienePlanService; |
||||
|
||||
private final IHygieneRecordService hygieneRecordService; |
||||
|
||||
@PostMapping("/savePlan") |
||||
@ApiOperation(value = "新增卫生自查计划") |
||||
@ApiOperationSupport(order = 1) |
||||
public R savePlan(@Valid @RequestBody HygienePlanEntity hygienePlanEntity) { |
||||
return hygienePlanService.savePlan(hygienePlanEntity); |
||||
} |
||||
|
||||
@PostMapping("/updatePlan") |
||||
@ApiOperation(value = "修改卫生自查计划") |
||||
@ApiOperationSupport(order = 2) |
||||
public R updatePlan(@Valid @RequestBody HygienePlanEntity hygienePlanEntity) { |
||||
return hygienePlanService.updatePlan(hygienePlanEntity); |
||||
} |
||||
|
||||
@PostMapping("/removePlan") |
||||
@ApiOperation(value = "删除卫生自查计划") |
||||
@ApiOperationSupport(order = 3) |
||||
public R removePlan(@RequestParam Long id) { |
||||
return R.status(hygienePlanService.removePlan(id)); |
||||
} |
||||
|
||||
@GetMapping("/planDetail") |
||||
@ApiOperation(value = "卫生自查计划详情") |
||||
@ApiOperationSupport(order = 4) |
||||
public R<HygienePlanEntity> planDetail(@RequestParam Long id) { |
||||
return R.data(hygienePlanService.getById(id)); |
||||
} |
||||
|
||||
@GetMapping("/planPage") |
||||
@ApiImplicitParams({ |
||||
@ApiImplicitParam(name = "zone", value = "责任区", dataType = "query", paramType = "string"), |
||||
@ApiImplicitParam(name = "principal", value = "责任人", dataType = "query", paramType = "string") |
||||
}) |
||||
@ApiOperation(value = "卫生自查计划分页") |
||||
@ApiOperationSupport(order = 5) |
||||
public R<IPage<HygienePlanEntity>> planPage(@ApiIgnore @RequestParam Map<String, Object> param, Query query) { |
||||
IPage<HygienePlanEntity> page = hygienePlanService.planPage(param, query); |
||||
return R.data(page); |
||||
} |
||||
|
||||
@PostMapping("/saveRecord") |
||||
@ApiOperation(value = "新增卫生自查记录") |
||||
@ApiOperationSupport(order = 6) |
||||
public R saveRecord(@Valid @RequestBody HygieneRecordEntity hygieneRecordEntity) { |
||||
return hygieneRecordService.saveRecord(hygieneRecordEntity); |
||||
} |
||||
|
||||
@PostMapping("/updateRecord") |
||||
@ApiOperation(value = "修改卫生自查记录") |
||||
@ApiOperationSupport(order = 7) |
||||
public R updateRecord(@Valid @RequestBody HygieneRecordEntity hygieneRecordEntity) { |
||||
return hygieneRecordService.updateRecord(hygieneRecordEntity); |
||||
} |
||||
|
||||
@PostMapping("/removeRecord") |
||||
@ApiOperation(value = "删除卫生自查记录") |
||||
@ApiOperationSupport(order = 8) |
||||
public R removeRecord(@RequestParam Long id) { |
||||
return R.status(hygieneRecordService.removeById(id)); |
||||
} |
||||
|
||||
@GetMapping("/recordDetail") |
||||
@ApiOperation(value = "卫生自查记录详情") |
||||
@ApiOperationSupport(order = 9) |
||||
public R<HygieneRecordDetailVO> recordDetail(@RequestParam Long id) { |
||||
return R.data(hygieneRecordService.getRecordDetail(id)); |
||||
} |
||||
|
||||
@GetMapping("/recordPage") |
||||
@ApiImplicitParams({ |
||||
@ApiImplicitParam(name = "hygienePlanId", value = "卫生自查计划id", dataType = "query", paramType = "string") |
||||
}) |
||||
@ApiOperation(value = "卫生自查记录分页") |
||||
@ApiOperationSupport(order = 10) |
||||
public R<IPage<HygieneRecordEntity>> recordPage(@ApiIgnore @RequestParam Map<String, Object> param, Query query) { |
||||
IPage<HygieneRecordEntity> page = hygieneRecordService.page(Condition.getPage(query), Condition.getQueryWrapper(param, |
||||
HygieneRecordEntity.class)); |
||||
return R.data(page); |
||||
} |
||||
|
||||
@GetMapping("/dataByMonth") |
||||
@ApiOperation(value = "月度统计表") |
||||
@ApiOperationSupport(order = 11) |
||||
public R<IPage<HygieneMonthVO>> dataByMonth(@RequestParam String month, Query query) { |
||||
IPage<HygieneMonthVO> page = hygienePlanService.dataByMonth(month, query); |
||||
return R.data(page); |
||||
} |
||||
|
||||
@GetMapping("/exportHygieneData") |
||||
@ApiImplicitParams({ |
||||
@ApiImplicitParam(name = "unit", value = "单位", dataType = "query", paramType = "string"), |
||||
@ApiImplicitParam(name = "scheduledStartTime", value = "计划开始时间", dataType = "query", paramType = "string"), |
||||
@ApiImplicitParam(name = "scheduledEndTime", value = "计划结束时间", dataType = "query", paramType = "string") |
||||
}) |
||||
@ApiOperation(value = "卫生自查数据导出") |
||||
@ApiOperationSupport(order = 13) |
||||
public void exportHygieneData(@ApiIgnore @RequestParam Map<String, Object> param, HttpServletResponse response) { |
||||
hygienePlanService.exportHygieneData(param, response); |
||||
} |
||||
} |
@ -0,0 +1,243 @@
|
||||
package com.hnac.hzims.safeproduct.controller; |
||||
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage; |
||||
import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport; |
||||
import com.hnac.hzims.common.utils.Condition; |
||||
import com.hnac.hzims.safeproduct.dto.TestDTO; |
||||
import com.hnac.hzims.safeproduct.dto.TestScoreDTO; |
||||
import com.hnac.hzims.safeproduct.dto.TrainRecordDTO; |
||||
import com.hnac.hzims.safeproduct.entity.TestEntity; |
||||
import com.hnac.hzims.safeproduct.entity.TrainPlanEntity; |
||||
import com.hnac.hzims.safeproduct.entity.TrainRecordEntity; |
||||
import com.hnac.hzims.safeproduct.service.ITestScoreService; |
||||
import com.hnac.hzims.safeproduct.service.ITestService; |
||||
import com.hnac.hzims.safeproduct.service.ITrainPlanService; |
||||
import com.hnac.hzims.safeproduct.service.ITrainRecordService; |
||||
import com.hnac.hzims.safeproduct.vo.TestScoreVO; |
||||
import com.hnac.hzims.safeproduct.vo.TrainMonthVO; |
||||
import com.hnac.hzims.safeproduct.vo.TrainYearVO; |
||||
import io.swagger.annotations.Api; |
||||
import io.swagger.annotations.ApiImplicitParam; |
||||
import io.swagger.annotations.ApiImplicitParams; |
||||
import io.swagger.annotations.ApiOperation; |
||||
import lombok.AllArgsConstructor; |
||||
import org.springblade.core.boot.ctrl.BladeController; |
||||
import org.springblade.core.mp.support.Query; |
||||
import org.springblade.core.tool.api.R; |
||||
import org.springframework.web.bind.annotation.*; |
||||
import springfox.documentation.annotations.ApiIgnore; |
||||
|
||||
import javax.servlet.http.HttpServletResponse; |
||||
import javax.validation.Valid; |
||||
import java.util.List; |
||||
import java.util.Map; |
||||
|
||||
/** |
||||
* 培训管理接口类 |
||||
* |
||||
* @author liwen |
||||
* @date 2023-12-25 |
||||
*/ |
||||
@RestController |
||||
@AllArgsConstructor |
||||
@RequestMapping("/train") |
||||
@Api(value = "培训管理", tags = "培训管理接口") |
||||
public class TrainController extends BladeController { |
||||
|
||||
private final ITrainPlanService trainPlanService; |
||||
|
||||
private final ITrainRecordService trainRecordService; |
||||
|
||||
private final ITestService testService; |
||||
|
||||
private final ITestScoreService testScoreService; |
||||
|
||||
@PostMapping("/saveTrainPlan") |
||||
@ApiOperation(value = "新增培训计划") |
||||
@ApiOperationSupport(order = 1) |
||||
public R saveTrainPlan(@Valid @RequestBody TrainPlanEntity trainPlanEntity) { |
||||
return R.status(trainPlanService.save(trainPlanEntity)); |
||||
} |
||||
|
||||
@PostMapping("/updateTrainPlan") |
||||
@ApiOperation(value = "修改培训计划") |
||||
@ApiOperationSupport(order = 2) |
||||
public R updateTrainPlan(@Valid @RequestBody TrainPlanEntity trainPlanEntity) { |
||||
return R.status(trainPlanService.updateById(trainPlanEntity)); |
||||
} |
||||
|
||||
@PostMapping("/removeTrainPlan") |
||||
@ApiOperation(value = "删除培训计划") |
||||
@ApiOperationSupport(order = 3) |
||||
public R removeTrainPlan(@RequestParam Long id) { |
||||
return R.status(trainPlanService.removeTrainPlan(id)); |
||||
} |
||||
|
||||
@GetMapping("/trainPlanDetail") |
||||
@ApiOperation(value = "培训计划详情") |
||||
@ApiOperationSupport(order = 4) |
||||
public R<TrainPlanEntity> trainPlanDetail(@RequestParam Long id) { |
||||
return R.data(trainPlanService.getById(id)); |
||||
} |
||||
|
||||
@GetMapping("/trainPlanPage") |
||||
@ApiImplicitParams({ |
||||
@ApiImplicitParam(name = "unit", value = "单位", dataType = "query", paramType = "string"), |
||||
@ApiImplicitParam(name = "scheduledStartTime", value = "计划培训开始时间", dataType = "query", paramType = "string"), |
||||
@ApiImplicitParam(name = "scheduledEndTime", value = "计划培训结束时间", dataType = "query", paramType = "string") |
||||
}) |
||||
@ApiOperation(value = "培训计划分页") |
||||
@ApiOperationSupport(order = 5) |
||||
public R<IPage<TrainPlanEntity>> trainPlanPage(@ApiIgnore @RequestParam Map<String, Object> param, Query query) { |
||||
IPage<TrainPlanEntity> page = trainPlanService.trainPlanPage(param, query); |
||||
return R.data(page); |
||||
} |
||||
|
||||
@PostMapping("/saveTrainRecord") |
||||
@ApiOperation(value = "新增培训记录") |
||||
@ApiOperationSupport(order = 6) |
||||
public R saveTrainRecord(@Valid @RequestBody TrainRecordEntity trainRecordEntity) { |
||||
return R.status(trainRecordService.saveTrainRecord(trainRecordEntity)); |
||||
} |
||||
|
||||
@PostMapping("/updateTrainRecord") |
||||
@ApiOperation(value = "修改培训记录") |
||||
@ApiOperationSupport(order = 7) |
||||
public R updateTrainRecord(@Valid @RequestBody TrainRecordEntity trainRecordEntity) { |
||||
return R.status(trainRecordService.updateById(trainRecordEntity)); |
||||
} |
||||
|
||||
@PostMapping("/removeTrainRecord") |
||||
@ApiOperation(value = "删除培训记录") |
||||
@ApiOperationSupport(order = 8) |
||||
public R removeTrainRecord(@RequestParam Long id) { |
||||
return R.status(trainRecordService.removeTrainRecord(id)); |
||||
} |
||||
|
||||
@GetMapping("/trainRecordDetail") |
||||
@ApiOperation(value = "培训记录详情") |
||||
@ApiOperationSupport(order = 9) |
||||
public R<TrainRecordEntity> trainRecordDetail(@RequestParam Long id) { |
||||
return R.data(trainRecordService.getById(id)); |
||||
} |
||||
|
||||
@GetMapping("/trainRecordPage") |
||||
@ApiImplicitParams({ |
||||
@ApiImplicitParam(name = "trainPlanId", value = "培训计划id", dataType = "query", paramType = "string") |
||||
}) |
||||
@ApiOperation(value = "培训记录分页") |
||||
@ApiOperationSupport(order = 10) |
||||
public R<IPage<TrainRecordEntity>> trainRecordPage(@ApiIgnore @RequestParam Map<String, Object> param, Query query) { |
||||
IPage<TrainRecordEntity> page = trainRecordService.page(Condition.getPage(query), Condition.getQueryWrapper(param, TrainRecordEntity.class)); |
||||
return R.data(page); |
||||
} |
||||
|
||||
@GetMapping("/getTrainRecordNameList") |
||||
@ApiOperation(value = "培训记录名称列表") |
||||
@ApiOperationSupport(order = 11) |
||||
public R<List<TrainRecordDTO>> getTrainRecordNameList(@RequestParam String trainPlanId) { |
||||
List<TrainRecordDTO> list = trainRecordService.getTrainRecordNameList(trainPlanId); |
||||
return R.data(list); |
||||
} |
||||
|
||||
@PostMapping("/saveTest") |
||||
@ApiOperation(value = "新增考试") |
||||
@ApiOperationSupport(order = 12) |
||||
public R saveTest(@Valid @RequestBody TestEntity testEntity) { |
||||
return testService.saveTest(testEntity); |
||||
} |
||||
|
||||
@PostMapping("/updateTest") |
||||
@ApiOperation(value = "修改考试") |
||||
@ApiOperationSupport(order = 13) |
||||
public R updateTest(@Valid @RequestBody TestEntity testEntity) { |
||||
return R.status(testService.updateTest(testEntity)); |
||||
} |
||||
|
||||
@PostMapping("/removeTest") |
||||
@ApiOperation(value = "删除考试") |
||||
@ApiOperationSupport(order = 14) |
||||
public R removeTest(@RequestParam Long id) { |
||||
return R.status(testService.removeTest(id)); |
||||
} |
||||
|
||||
@GetMapping("/testDetail") |
||||
@ApiOperation(value = "考试详情") |
||||
@ApiOperationSupport(order = 15) |
||||
public R<TestEntity> testDetail(@RequestParam Long id) { |
||||
return R.data(testService.getById(id)); |
||||
} |
||||
|
||||
@GetMapping("/testPage") |
||||
@ApiImplicitParams({ |
||||
@ApiImplicitParam(name = "trainPlanId", value = "培训计划id", dataType = "query", paramType = "string"), |
||||
@ApiImplicitParam(name = "trainRecordId", value = "培训记录id", dataType = "query", paramType = "string") |
||||
}) |
||||
@ApiOperation(value = "考试记录分页") |
||||
@ApiOperationSupport(order = 16) |
||||
public R<IPage<TestEntity>> testPage(@ApiIgnore @RequestParam Map<String, Object> param, Query query) { |
||||
IPage<TestEntity> page = testService.page(Condition.getPage(query), Condition.getQueryWrapper(param, TestEntity.class)); |
||||
return R.data(page); |
||||
} |
||||
|
||||
@GetMapping("/getTestNameList") |
||||
@ApiOperation(value = "考试记录名称列表") |
||||
@ApiOperationSupport(order = 17) |
||||
public R<List<TestDTO>> getTestNameList(@RequestParam String trainPlanId) { |
||||
List<TestDTO> list = testService.getTestNameList(trainPlanId); |
||||
return R.data(list); |
||||
} |
||||
|
||||
@GetMapping("/testScoreList") |
||||
@ApiOperation(value = "考试成绩列表") |
||||
@ApiOperationSupport(order = 18) |
||||
public R<List<TestScoreVO>> testScoreList(@RequestParam Long testId) { |
||||
List<TestScoreVO> list = testScoreService.testScoreList(testId); |
||||
return R.data(list); |
||||
} |
||||
|
||||
@PostMapping("/updateBatchScore") |
||||
@ApiOperation(value = "批量填写分数") |
||||
@ApiOperationSupport(order = 19) |
||||
public R updateBatchScore(@RequestBody TestScoreDTO testScoreDTO) { |
||||
return R.status(testScoreService.updateBatchScore(testScoreDTO)); |
||||
} |
||||
|
||||
@GetMapping("/trainDataByMonth") |
||||
@ApiOperation(value = "培训月度统计表") |
||||
@ApiOperationSupport(order = 20) |
||||
public R<IPage<TrainMonthVO>> trainDataByMonth(@RequestParam String month, Query query) { |
||||
IPage<TrainMonthVO> page = trainPlanService.dataByMonth(month, query); |
||||
return R.data(page); |
||||
} |
||||
|
||||
@GetMapping("/trainDataByYear") |
||||
@ApiOperation(value = "培训年度统计表") |
||||
@ApiOperationSupport(order = 21) |
||||
public R<IPage<TrainYearVO>> trainDataByYear(@RequestParam String year, Query query) { |
||||
IPage<TrainYearVO> page = trainPlanService.dataByYear(year, query); |
||||
return R.data(page); |
||||
} |
||||
|
||||
@GetMapping("/exportTrainPlanData") |
||||
@ApiImplicitParams({ |
||||
@ApiImplicitParam(name = "unit", value = "单位", dataType = "query", paramType = "string"), |
||||
@ApiImplicitParam(name = "scheduledStartTime", value = "计划开始时间", dataType = "query", paramType = "string"), |
||||
@ApiImplicitParam(name = "scheduledEndTime", value = "计划结束时间", dataType = "query", paramType = "string") |
||||
}) |
||||
@ApiOperation(value = "培训计划数据导出") |
||||
@ApiOperationSupport(order = 22) |
||||
public void exportTrainPlanData(@ApiIgnore @RequestParam Map<String, Object> param, HttpServletResponse response) { |
||||
trainPlanService.exportTrainPlanData(param, response); |
||||
} |
||||
|
||||
@GetMapping("/exportTrainRecordData") |
||||
@ApiImplicitParams({ |
||||
@ApiImplicitParam(name = "trainPlanId", value = "培训计划id", dataType = "query", paramType = "string") |
||||
}) |
||||
@ApiOperation(value = "培训记录数据导出") |
||||
@ApiOperationSupport(order = 23) |
||||
public void exportTrainRecordData(@ApiIgnore @RequestParam Map<String, Object> param, HttpServletResponse response) { |
||||
trainRecordService.exportTrainRecordData(param, response); |
||||
} |
||||
} |
@ -0,0 +1,43 @@
|
||||
package com.hnac.hzims.safeproduct.jobs; |
||||
|
||||
import com.hnac.hzims.safeproduct.entity.TrainPlanEntity; |
||||
import com.hnac.hzims.safeproduct.enums.TrainStatusEnum; |
||||
import com.hnac.hzims.safeproduct.service.ITrainPlanService; |
||||
import com.xxl.job.core.biz.model.ReturnT; |
||||
import com.xxl.job.core.handler.annotation.XxlJob; |
||||
import org.springblade.core.tool.utils.DateUtil; |
||||
import org.springframework.beans.factory.annotation.Autowired; |
||||
import org.springframework.stereotype.Component; |
||||
|
||||
import java.util.Date; |
||||
import java.util.List; |
||||
|
||||
/** |
||||
* 演练模块定时任务 |
||||
* |
||||
* @author liwen |
||||
* @date 2023-12-27 |
||||
*/ |
||||
@Component |
||||
public class TrainJob { |
||||
|
||||
@Autowired |
||||
ITrainPlanService trainPlanService; |
||||
|
||||
@XxlJob("autoChangeTrainPlanStatus") |
||||
public ReturnT<String> autoChangeTrainPlanStatus(String param) { |
||||
// 获取时间范围
|
||||
Date current = DateUtil.now(); |
||||
Date before = DateUtil.minusDays(current, 1); |
||||
String today = DateUtil.format(current, "yyyy-mm-dd hh:MM:ss"); |
||||
String yesterday = DateUtil.format(before, "yyyy-mm-dd hh:MM:ss"); |
||||
// 查询前一天的超时未完成培训计划
|
||||
List<TrainPlanEntity> list = trainPlanService.getWaitingTrainPlanInTimeRange(yesterday, today); |
||||
list.forEach(x -> { |
||||
x.setTrainStatus(TrainStatusEnum.UNFINISHED.getValue()); |
||||
}); |
||||
// 将状态置为未完成
|
||||
boolean flag = trainPlanService.updateBatchById(list); |
||||
return flag ? ReturnT.SUCCESS : ReturnT.FAIL; |
||||
} |
||||
} |
@ -0,0 +1,27 @@
|
||||
package com.hnac.hzims.safeproduct.mapper; |
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
||||
import com.hnac.hzims.safeproduct.dto.ConferenceExportDTO; |
||||
import com.hnac.hzims.safeproduct.entity.ConferencePlanEntity; |
||||
import org.apache.ibatis.annotations.Mapper; |
||||
|
||||
import java.util.List; |
||||
|
||||
/** |
||||
* 会议计划Mapper类 |
||||
* |
||||
* @author liwen |
||||
* @date 2023-12-27 |
||||
*/ |
||||
@Mapper |
||||
public interface ConferencePlanMapper extends BaseMapper<ConferencePlanEntity> { |
||||
|
||||
/** |
||||
* 根据单位和计划时间查询会议记录 |
||||
* @param unit 单位 |
||||
* @param startTime 计划开始时间 |
||||
* @param endTime 计划结束时间 |
||||
* @return 会议记录列表 |
||||
*/ |
||||
List<ConferenceExportDTO> getConferenceByUnitAndDate(String unit, String startTime, String endTime); |
||||
} |
@ -0,0 +1,23 @@
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
||||
<mapper namespace="com.hnac.hzims.safeproduct.mapper.ConferencePlanMapper"> |
||||
|
||||
<select id="getConferenceByUnitAndDate" resultType="com.hnac.hzims.safeproduct.dto.ConferenceExportDTO"> |
||||
SELECT |
||||
t1.unit, t1.scheduled_start_time, t1.scheduled_end_time, t1.theme, t1.location, t1.conference_method, |
||||
t1.host, t2.actual_start_time, t2.actual_end_time, t1.conference_status |
||||
FROM |
||||
hzims_conference_plan t1 |
||||
LEFT JOIN hzims_conference_record t2 ON t1.id = t2.conference_plan_id |
||||
WHERE |
||||
t1.is_deleted = 0 |
||||
<if test="unit != 'null' and unit != ''"> |
||||
AND t1.unit like concat('%', #{unit}, '%') |
||||
</if> |
||||
<if test="startTime != 'null' and startTime != ''"> |
||||
AND t1.scheduled_start_time >= #{startTime} |
||||
</if> |
||||
<if test="endTime != 'null' and endTime != ''"> |
||||
AND t1.scheduled_end_time < #{endTime} |
||||
</if> |
||||
</select> |
||||
</mapper> |
@ -0,0 +1,16 @@
|
||||
package com.hnac.hzims.safeproduct.mapper; |
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
||||
import com.hnac.hzims.safeproduct.entity.ConferenceRecordEntity; |
||||
import org.apache.ibatis.annotations.Mapper; |
||||
|
||||
/** |
||||
* 会议记录Mapper类 |
||||
* |
||||
* @author liwen |
||||
* @date 2023-12-27 |
||||
*/ |
||||
@Mapper |
||||
public interface ConferenceRecordMapper extends BaseMapper<ConferenceRecordEntity> { |
||||
|
||||
} |
@ -0,0 +1,4 @@
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
||||
<mapper namespace="com.hnac.hzims.safeproduct.mapper.ConferenceRecordMapper"> |
||||
|
||||
</mapper> |
@ -0,0 +1,45 @@
|
||||
package com.hnac.hzims.safeproduct.mapper; |
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
||||
import com.baomidou.mybatisplus.core.metadata.IPage; |
||||
import com.hnac.hzims.safeproduct.dto.HygieneExportDTO; |
||||
import com.hnac.hzims.safeproduct.entity.HygienePlanEntity; |
||||
import com.hnac.hzims.safeproduct.vo.HygieneMonthVO; |
||||
import org.apache.ibatis.annotations.Mapper; |
||||
|
||||
import java.util.List; |
||||
|
||||
/** |
||||
* 卫生自查计划Mapper类 |
||||
* |
||||
* @author liwen |
||||
* @date 2023-12-27 |
||||
*/ |
||||
@Mapper |
||||
public interface HygienePlanMapper extends BaseMapper<HygienePlanEntity> { |
||||
|
||||
/** |
||||
* 查询当月各单位的卫生自查总数 |
||||
* @param page 分页类 |
||||
* @param month 月份 |
||||
* @return 当月的卫生自查总数据 |
||||
*/ |
||||
IPage<HygieneMonthVO> selectByMonth(IPage<HygieneMonthVO> page, String month); |
||||
|
||||
/** |
||||
* 查询当月各单位已完成的卫生自查数据 |
||||
* @param page 分页类 |
||||
* @param month 月份 |
||||
* @return 当月的已完成数据 |
||||
*/ |
||||
IPage<HygieneMonthVO> selectFinishedDataByMonth(IPage<HygieneMonthVO> page, String month); |
||||
|
||||
/** |
||||
* 根据单位和计划时间查询卫生自查记录 |
||||
* @param unit 单位 |
||||
* @param startTime 计划开始时间 |
||||
* @param endTime 计划结束时间 |
||||
* @return 卫生自查记录 |
||||
*/ |
||||
List<HygieneExportDTO> getHygieneByUnitAndDate(String unit, String startTime, String endTime); |
||||
} |
@ -0,0 +1,52 @@
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
||||
<mapper namespace="com.hnac.hzims.safeproduct.mapper.HygienePlanMapper"> |
||||
|
||||
<select id="selectByMonth" resultType="com.hnac.hzims.safeproduct.vo.HygieneMonthVO"> |
||||
SELECT |
||||
unit, count(1) as scheduled_check_num |
||||
FROM |
||||
hzims_hygiene_plan |
||||
WHERE |
||||
is_deleted = 0 |
||||
AND scheduled_end_time like concat('%', #{month}, '%') |
||||
GROUP BY |
||||
unit |
||||
ORDER BY |
||||
unit |
||||
</select> |
||||
|
||||
<select id="selectFinishedDataByMonth" resultType="com.hnac.hzims.safeproduct.vo.HygieneMonthVO"> |
||||
SELECT |
||||
unit, count(1) as finished_task_num |
||||
FROM |
||||
hzims_hygiene_plan |
||||
WHERE |
||||
is_deleted = 0 |
||||
AND scheduled_end_time like concat('%', #{month}, '%') |
||||
AND hygiene_status = 'FINISHED' |
||||
GROUP BY |
||||
unit |
||||
ORDER BY |
||||
unit |
||||
</select> |
||||
|
||||
<select id="getHygieneByUnitAndDate" resultType="com.hnac.hzims.safeproduct.dto.HygieneExportDTO"> |
||||
SELECT |
||||
t1.unit, t1.zone, t1.principal, t1.check_item, t1.check_item_score, t2.code, t2.check_result, t2.comprehensive_score, |
||||
t2.check_user, t2.actual_start_time, t2.actual_end_time, t1.hygiene_status |
||||
FROM |
||||
hzims_hygiene_plan t1 |
||||
LEFT JOIN hzims_hygiene_record t2 ON t1.id = t2.hygiene_plan_id |
||||
WHERE |
||||
t1.is_deleted = 0 |
||||
<if test="unit != 'null' and unit != ''"> |
||||
AND t1.unit like concat('%', #{unit}, '%') |
||||
</if> |
||||
<if test="startTime != 'null' and startTime != ''"> |
||||
AND t1.scheduled_start_time >= #{startTime} |
||||
</if> |
||||
<if test="endTime != 'null' and endTime != ''"> |
||||
AND t1.scheduled_end_time < #{endTime} |
||||
</if> |
||||
</select> |
||||
</mapper> |
@ -0,0 +1,23 @@
|
||||
package com.hnac.hzims.safeproduct.mapper; |
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
||||
import com.hnac.hzims.safeproduct.entity.HygieneRecordEntity; |
||||
import com.hnac.hzims.safeproduct.vo.HygieneRecordDetailVO; |
||||
import org.apache.ibatis.annotations.Mapper; |
||||
|
||||
/** |
||||
* 卫生自查记录Mapper类 |
||||
* |
||||
* @author liwen |
||||
* @date 2023-12-27 |
||||
*/ |
||||
@Mapper |
||||
public interface HygieneRecordMapper extends BaseMapper<HygieneRecordEntity> { |
||||
|
||||
/** |
||||
* 查询卫生自查记录详情 |
||||
* @param id 卫生自查记录id |
||||
* @return 卫生自查记录详情VO类 |
||||
*/ |
||||
HygieneRecordDetailVO getRecordDetail(Long id); |
||||
} |
@ -0,0 +1,15 @@
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
||||
<mapper namespace="com.hnac.hzims.safeproduct.mapper.HygieneRecordMapper"> |
||||
|
||||
<select id="getRecordDetail" resultType="com.hnac.hzims.safeproduct.vo.HygieneRecordDetailVO"> |
||||
SELECT |
||||
t2.zone, t2.principal, t2.check_item, t2.check_item_score, t1.code, t1.check_time, t1.check_user, |
||||
t1.check_result, t1.comprehensive_score, t1.week_num |
||||
FROM |
||||
hzims_hygiene_record t1 |
||||
LEFT JOIN hzims_hygiene_plan t2 ON t1.hygiene_plan_id = h2.id |
||||
WHERE |
||||
t1.is_deleted = 0 |
||||
AND t1.id = #{id} |
||||
</select> |
||||
</mapper> |
@ -0,0 +1,64 @@
|
||||
package com.hnac.hzims.safeproduct.mapper; |
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
||||
import com.baomidou.mybatisplus.core.metadata.IPage; |
||||
import com.hnac.hzims.safeproduct.dto.AnalysisYearDTO; |
||||
import com.hnac.hzims.safeproduct.dto.RehearsalExportDTO; |
||||
import com.hnac.hzims.safeproduct.entity.RehearsalPlanEntity; |
||||
import com.hnac.hzims.safeproduct.vo.RehearsalMonthVO; |
||||
import com.hnac.hzims.safeproduct.vo.RehearsalYearVO; |
||||
import org.apache.ibatis.annotations.Mapper; |
||||
import org.apache.ibatis.annotations.Param; |
||||
|
||||
import java.util.List; |
||||
|
||||
/** |
||||
* 演练计划Mapper类 |
||||
* |
||||
* @author liwen |
||||
* @date 2023-12-27 |
||||
*/ |
||||
@Mapper |
||||
public interface RehearsalPlanMapper extends BaseMapper<RehearsalPlanEntity> { |
||||
|
||||
/** |
||||
* 查询当月各单位的演练总数 |
||||
* @param page 分页类 |
||||
* @param month 月份 |
||||
* @return 当月的演练总数据 |
||||
*/ |
||||
IPage<RehearsalMonthVO> selectByMonth(IPage<RehearsalMonthVO> page, String month); |
||||
|
||||
/** |
||||
* 查询当月各单位已完成的演练数据 |
||||
* @param page 分页类 |
||||
* @param month 月份 |
||||
* @return 当月的已完成数据 |
||||
*/ |
||||
IPage<RehearsalMonthVO> selectFinishedDataByMonth(IPage<RehearsalMonthVO> page, String month); |
||||
|
||||
/** |
||||
* 查询当年的所有单位 |
||||
* @param page 分页类 |
||||
* @param year 年份 |
||||
* @return 年度单位数据 |
||||
*/ |
||||
IPage<RehearsalYearVO> selectUnitByYear(IPage<RehearsalYearVO> page, @Param("year") String year); |
||||
|
||||
/** |
||||
* 查询各单位全年已完成的演练数据 |
||||
* @param unitList 单元列表 |
||||
* @param year 年份 |
||||
* @return 单位各月的数据列表 |
||||
*/ |
||||
List<AnalysisYearDTO> selectFinishedDataByUnit(@Param("unitList") List<String> unitList, @Param("year") String year); |
||||
|
||||
/** |
||||
* 根据单位和计划时间查询演练数据 |
||||
* @param unit 单位 |
||||
* @param startTime 计划开始时间 |
||||
* @param endTime 计划结束时间 |
||||
* @return 演练数据列表 |
||||
*/ |
||||
List<RehearsalExportDTO> getRehearsalByUnitAndDate(String unit, String startTime, String endTime); |
||||
} |
@ -0,0 +1,84 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?> |
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
||||
<mapper namespace="com.hnac.hzims.safeproduct.mapper.RehearsalPlanMapper"> |
||||
|
||||
<select id="selectByMonth" resultType="com.hnac.hzims.safeproduct.vo.RehearsalMonthVO"> |
||||
SELECT |
||||
unit, count(1) as scheduled_task_num |
||||
FROM |
||||
hzims_rehearsal_plan |
||||
WHERE |
||||
is_deleted = 0 |
||||
AND scheduled_end_time like concat('%', #{month}, '%') |
||||
GROUP BY |
||||
unit |
||||
ORDER BY |
||||
unit |
||||
</select> |
||||
|
||||
<select id="selectFinishedDataByMonth" resultType="com.hnac.hzims.safeproduct.vo.RehearsalMonthVO"> |
||||
SELECT |
||||
unit, count(1) as finished_task_num |
||||
FROM |
||||
hzims_rehearsal_plan |
||||
WHERE |
||||
is_deleted = 0 |
||||
AND scheduled_end_time like concat('%', #{month}, '%') |
||||
AND rehearsal_status = 'FINISHED' |
||||
GROUP BY |
||||
unit |
||||
ORDER BY |
||||
unit |
||||
</select> |
||||
|
||||
<select id="selectUnitByYear" resultType="com.hnac.hzims.safeproduct.vo.RehearsalYearVO"> |
||||
SELECT |
||||
distinct unit |
||||
FROM |
||||
hzims_rehearsal_plan |
||||
WHERE |
||||
is_deleted = 0 |
||||
AND scheduled_end_time like concat('%', #{year}, '%') |
||||
ORDER BY |
||||
unit |
||||
</select> |
||||
|
||||
<select id="selectFinishedDataByUnit" resultType="com.hnac.hzims.safeproduct.dto.AnalysisYearDTO"> |
||||
SELECT |
||||
unit, DATE_FORMAT(scheduled_end_time, '%m') as dateTime, count(1) as finished_num |
||||
FROM |
||||
hzims_rehearsal_plan |
||||
WHERE |
||||
is_deleted = 0 |
||||
AND scheduled_end_time like concat('%', #{year}, '%') |
||||
AND rehearsal_status = 'FINISHED' |
||||
AND unit in |
||||
<foreach collection="unitList" item="unit" open="(" close=")" separator=","> |
||||
#{unit} |
||||
</foreach> |
||||
GROUP BY |
||||
unit, DATE_FORMAT(scheduled_end_time, '%m') |
||||
ORDER BY |
||||
unit |
||||
</select> |
||||
|
||||
<select id="getRehearsalByUnitAndDate" resultType="com.hnac.hzims.safeproduct.dto.RehearsalExportDTO"> |
||||
SELECT |
||||
t1.unit, t1.subject, t1.scheduled_start_time, t1.scheduled_end_time, t1.location, |
||||
t2.people_num, t2.actual_start_time, t2.actual_end_time, t1.rehearsal_status |
||||
FROM |
||||
hzims_rehearsal_plan t1 |
||||
LEFT JOIN hzims_rehearsal_record t2 ON t1.id = t2.rehearsal_plan_id |
||||
WHERE |
||||
t1.is_deleted = 0 |
||||
<if test="unit != 'null' and unit != ''"> |
||||
AND t1.unit like concat('%', #{unit}, '%') |
||||
</if> |
||||
<if test="startTime != 'null' and startTime != ''"> |
||||
AND t1.scheduled_start_time >= #{startTime} |
||||
</if> |
||||
<if test="endTime != 'null' and endTime != ''"> |
||||
AND t1.scheduled_end_time < #{endTime} |
||||
</if> |
||||
</select> |
||||
</mapper> |
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in new issue