生物安全是否在群,以及execl导出枚举
This commit is contained in:
@@ -58,7 +58,7 @@ public class Deworm extends BaseEntity
|
|||||||
private Long deptId;
|
private Long deptId;
|
||||||
|
|
||||||
/** 药品使用记录 */
|
/** 药品使用记录 */
|
||||||
@Excel(name = "药品使用记录")
|
// @Excel(name = "药品使用记录")
|
||||||
private Integer usageId;
|
private Integer usageId;
|
||||||
|
|
||||||
|
|
||||||
@@ -78,9 +78,28 @@ public class Deworm extends BaseEntity
|
|||||||
@Excel(name = "备注")
|
@Excel(name = "备注")
|
||||||
private String comment;
|
private String comment;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 是否在群查询条件(0-在群,1-离群),非数据库字段
|
||||||
|
*/
|
||||||
|
private Integer isDelete;
|
||||||
|
|
||||||
// 排序查询
|
// 排序查询
|
||||||
private String orderByColumn;
|
private String orderByColumn;
|
||||||
private String isAsc;
|
private String isAsc;
|
||||||
|
|
||||||
|
public void setGender(String gender) {
|
||||||
|
this.gender = gender;
|
||||||
|
if (gender != null && !gender.trim().isEmpty()) {
|
||||||
|
try {
|
||||||
|
Integer genderCode = Integer.valueOf(gender.trim());
|
||||||
|
this.genderName = Gender.getDescByCode(genderCode);
|
||||||
|
} catch (NumberFormatException e) {
|
||||||
|
// 如果转换失败,设置为空或默认值
|
||||||
|
this.genderName = null;
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
this.genderName = null;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -80,6 +80,8 @@ public class Diagnosis extends BaseEntity
|
|||||||
|
|
||||||
/** 诊疗结果 */
|
/** 诊疗结果 */
|
||||||
@Excel(name = "诊疗结果")
|
@Excel(name = "诊疗结果")
|
||||||
|
private String resultName;
|
||||||
|
/** 诊断结果 */
|
||||||
private String result;
|
private String result;
|
||||||
|
|
||||||
/** 开始时间 */
|
/** 开始时间 */
|
||||||
@@ -106,6 +108,11 @@ public class Diagnosis extends BaseEntity
|
|||||||
private String orderByColumn;
|
private String orderByColumn;
|
||||||
private String isAsc;
|
private String isAsc;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 是否在群查询条件(0-在群,1-离群),非数据库字段
|
||||||
|
*/
|
||||||
|
private Integer isDelete;
|
||||||
|
|
||||||
private Long userId;
|
private Long userId;
|
||||||
private Long deptId;
|
private Long deptId;
|
||||||
|
|
||||||
@@ -123,5 +130,19 @@ public class Diagnosis extends BaseEntity
|
|||||||
this.genderName = null;
|
this.genderName = null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
public void setResult(String result) {
|
||||||
|
this.result = result;
|
||||||
|
if (result != null && !result.trim().isEmpty()) {
|
||||||
|
try {
|
||||||
|
Integer resultCode = Integer.valueOf(result.trim());
|
||||||
|
this.resultName = Gender.getDescByCode(resultCode);
|
||||||
|
} catch (NumberFormatException e) {
|
||||||
|
// 如果转换失败,设置为空或默认值
|
||||||
|
this.resultName = null;
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
this.resultName = null;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -29,7 +29,7 @@ public class Health extends BaseEntity
|
|||||||
private Date datetime;
|
private Date datetime;
|
||||||
|
|
||||||
/** 羊只id */
|
/** 羊只id */
|
||||||
@Excel(name = "羊只id")
|
// @Excel(name = "羊只id")
|
||||||
private Long sheepId;
|
private Long sheepId;
|
||||||
private Integer[] sheepIds;
|
private Integer[] sheepIds;
|
||||||
|
|
||||||
@@ -79,6 +79,11 @@ public class Health extends BaseEntity
|
|||||||
private String orderByColumn;
|
private String orderByColumn;
|
||||||
private String isAsc;
|
private String isAsc;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 是否在群查询条件(0-在群,1-离群),非数据库字段
|
||||||
|
*/
|
||||||
|
private Integer isDelete;
|
||||||
|
|
||||||
public void setGender(String gender) {
|
public void setGender(String gender) {
|
||||||
this.gender = gender;
|
this.gender = gender;
|
||||||
if (gender != null && !gender.trim().isEmpty()) {
|
if (gender != null && !gender.trim().isEmpty()) {
|
||||||
|
|||||||
@@ -28,7 +28,6 @@ public class Immunity extends BaseEntity
|
|||||||
private Long id;
|
private Long id;
|
||||||
|
|
||||||
/** 羊只id */
|
/** 羊只id */
|
||||||
@Excel(name = "羊只id")
|
|
||||||
private Long sheepId;
|
private Long sheepId;
|
||||||
|
|
||||||
private Integer[] sheepIds;
|
private Integer[] sheepIds;
|
||||||
@@ -42,7 +41,6 @@ public class Immunity extends BaseEntity
|
|||||||
|
|
||||||
|
|
||||||
@Excel(name = "品种")
|
@Excel(name = "品种")
|
||||||
|
|
||||||
private String variety;
|
private String variety;
|
||||||
@Excel(name = "羊只类别")
|
@Excel(name = "羊只类别")
|
||||||
private String sheepType;
|
private String sheepType;
|
||||||
@@ -81,6 +79,11 @@ public class Immunity extends BaseEntity
|
|||||||
private Long userId;
|
private Long userId;
|
||||||
private Long deptId;
|
private Long deptId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 是否在群查询条件(0-在群,1-离群),非数据库字段
|
||||||
|
*/
|
||||||
|
private Integer isDelete;
|
||||||
|
|
||||||
// 药品使用
|
// 药品使用
|
||||||
private List<SwMedicineUsageDetails> usageDetails;
|
private List<SwMedicineUsageDetails> usageDetails;
|
||||||
|
|
||||||
|
|||||||
@@ -4,6 +4,8 @@ import java.util.Date;
|
|||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
|
import com.zhyc.module.biosafety.enums.QuarantineResult;
|
||||||
|
import com.zhyc.module.biosafety.enums.QuarantineStatus;
|
||||||
import com.zhyc.module.enums.Gender;
|
import com.zhyc.module.enums.Gender;
|
||||||
import lombok.AllArgsConstructor;
|
import lombok.AllArgsConstructor;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
@@ -91,10 +93,12 @@ public class QuarantineReport extends BaseEntity
|
|||||||
|
|
||||||
/** 检疫结果 */
|
/** 检疫结果 */
|
||||||
@Excel(name = "检疫结果")
|
@Excel(name = "检疫结果")
|
||||||
|
private String resultName;
|
||||||
private String result;
|
private String result;
|
||||||
|
|
||||||
/** 状态 */
|
/** 状态 */
|
||||||
@Excel(name = "状态")
|
@Excel(name = "状态")
|
||||||
|
private String statusName;
|
||||||
private Integer status;
|
private Integer status;
|
||||||
|
|
||||||
/** 备注*/
|
/** 备注*/
|
||||||
@@ -104,6 +108,11 @@ public class QuarantineReport extends BaseEntity
|
|||||||
private Long userId;
|
private Long userId;
|
||||||
private Long deptId;
|
private Long deptId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 是否在群查询条件(0-在群,1-离群),非数据库字段
|
||||||
|
*/
|
||||||
|
private Integer isDelete;
|
||||||
|
|
||||||
public void setGender(String gender) {
|
public void setGender(String gender) {
|
||||||
this.gender = gender;
|
this.gender = gender;
|
||||||
if (gender != null && !gender.trim().isEmpty()) {
|
if (gender != null && !gender.trim().isEmpty()) {
|
||||||
@@ -118,6 +127,35 @@ public class QuarantineReport extends BaseEntity
|
|||||||
this.genderName = null;
|
this.genderName = null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
// 检疫结果转换
|
||||||
|
public void setResult(String result) {
|
||||||
|
this.result = result;
|
||||||
|
if (result != null && !result.trim().isEmpty()) {
|
||||||
|
try {
|
||||||
|
Integer resultCode = Integer.valueOf(result.trim());
|
||||||
|
this.resultName = QuarantineResult.getDescByCode(resultCode);
|
||||||
|
} catch (NumberFormatException e) {
|
||||||
|
// 如果转换失败,设置为空或默认值
|
||||||
|
this.resultName = null;
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
this.genderName = null;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// 检疫状态
|
||||||
|
public void setStatus(Integer status) {
|
||||||
|
this.status = status;
|
||||||
|
if (status != null) {
|
||||||
|
try {
|
||||||
|
this.statusName = QuarantineStatus.getDescByCode(status);
|
||||||
|
} catch (NumberFormatException e) {
|
||||||
|
// 如果转换失败,设置为空或默认值
|
||||||
|
this.statusName = null;
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
this.statusName = null;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// 排序查询
|
// 排序查询
|
||||||
private String orderByColumn;
|
private String orderByColumn;
|
||||||
|
|||||||
@@ -5,6 +5,8 @@ import java.util.Date;
|
|||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
|
import com.zhyc.module.biosafety.enums.PrescriptionType;
|
||||||
|
import com.zhyc.module.biosafety.enums.TreatmentStatus;
|
||||||
import lombok.AllArgsConstructor;
|
import lombok.AllArgsConstructor;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
import lombok.NoArgsConstructor;
|
import lombok.NoArgsConstructor;
|
||||||
@@ -32,7 +34,7 @@ public class SwMedicineUsage extends BaseEntity
|
|||||||
private String name;
|
private String name;
|
||||||
|
|
||||||
/** 羊舍名称 */
|
/** 羊舍名称 */
|
||||||
@Excel(name = "使用名称" ,width = 20, needMerge = true)
|
@Excel(name = "羊舍名称" ,width = 20, needMerge = true)
|
||||||
private String sheepfoldName;
|
private String sheepfoldName;
|
||||||
private Integer sheepfoldId;
|
private Integer sheepfoldId;
|
||||||
/** 耳号 */
|
/** 耳号 */
|
||||||
@@ -51,8 +53,10 @@ public class SwMedicineUsage extends BaseEntity
|
|||||||
|
|
||||||
/** 使用类型 */
|
/** 使用类型 */
|
||||||
@Excel(name = "使用类型",width = 20, needMerge = true)
|
@Excel(name = "使用类型",width = 20, needMerge = true)
|
||||||
|
private String useTypeName;
|
||||||
private String useType;
|
private String useType;
|
||||||
|
|
||||||
|
|
||||||
private Long userId;
|
private Long userId;
|
||||||
private Long deptId;
|
private Long deptId;
|
||||||
|
|
||||||
@@ -61,4 +65,17 @@ public class SwMedicineUsage extends BaseEntity
|
|||||||
private List<SwMedicineUsageDetails> swMedicineUsageDetailsList;
|
private List<SwMedicineUsageDetails> swMedicineUsageDetailsList;
|
||||||
|
|
||||||
|
|
||||||
|
/** 状态转换 */
|
||||||
|
public void setUseType(String useType) {
|
||||||
|
this.useType = useType;
|
||||||
|
this.useTypeName = null;
|
||||||
|
if (useType != null && !useType.trim().isEmpty()) {
|
||||||
|
try {
|
||||||
|
this.useTypeName = PrescriptionType.getDescByCode(Integer.valueOf(useType.trim()));
|
||||||
|
} catch (NumberFormatException ex) {
|
||||||
|
// 可选:记录日志、或抛业务异常
|
||||||
|
this.useTypeName = "未知";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -4,6 +4,7 @@ import java.util.Date;
|
|||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
|
import com.zhyc.module.biosafety.enums.TreatmentStatus;
|
||||||
import com.zhyc.module.enums.Gender;
|
import com.zhyc.module.enums.Gender;
|
||||||
import lombok.AllArgsConstructor;
|
import lombok.AllArgsConstructor;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
@@ -97,22 +98,38 @@ public class Treatment extends BaseEntity
|
|||||||
private String veterinary;
|
private String veterinary;
|
||||||
/** 治疗状态 */
|
/** 治疗状态 */
|
||||||
@Excel(name = "治疗状态")
|
@Excel(name = "治疗状态")
|
||||||
|
private String statusName;
|
||||||
private String status;
|
private String status;
|
||||||
|
|
||||||
|
|
||||||
/** 药品使用记录id */
|
/** 药品使用记录id */
|
||||||
@Excel(name = "药品使用记录id")
|
|
||||||
private Integer usageId;
|
private Integer usageId;
|
||||||
|
|
||||||
private Long userId;
|
private Long userId;
|
||||||
private Long deptId;
|
private Long deptId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 是否在群查询条件(0-在群,1-离群),非数据库字段
|
||||||
|
*/
|
||||||
|
private Integer isDelete;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// 药品使用
|
// 药品使用
|
||||||
private List<SwMedicineUsageDetails> usageDetails;
|
private List<SwMedicineUsageDetails> usageDetails;
|
||||||
|
|
||||||
/** 备注 */
|
/** 备注 */
|
||||||
@Excel(name = "备注")
|
@Excel(name = "备注")
|
||||||
private String comment;
|
private String comment;
|
||||||
|
|
||||||
|
|
||||||
|
// 排序查询
|
||||||
|
private String orderByColumn;
|
||||||
|
private String isAsc;
|
||||||
|
|
||||||
|
/** 性别转换 */
|
||||||
public void setGender(String gender) {
|
public void setGender(String gender) {
|
||||||
this.gender = gender; // 保留原始字符串
|
this.gender = gender; // 保留原始字符串
|
||||||
this.genderName = null; // 先清空
|
this.genderName = null; // 先清空
|
||||||
@@ -125,8 +142,18 @@ public class Treatment extends BaseEntity
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
/** 状态转换 */
|
||||||
|
public void setStatus(String status) {
|
||||||
|
this.status = status;
|
||||||
|
this.statusName = null;
|
||||||
|
if (status != null && !status.trim().isEmpty()) {
|
||||||
|
try {
|
||||||
|
this.statusName = TreatmentStatus.getDescByCode(Integer.valueOf(status.trim()));
|
||||||
|
} catch (NumberFormatException ex) {
|
||||||
|
// 可选:记录日志、或抛业务异常
|
||||||
|
this.statusName = "未知";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// 排序查询
|
|
||||||
private String orderByColumn;
|
|
||||||
private String isAsc;
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,74 @@
|
|||||||
|
package com.zhyc.module.biosafety.enums;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 诊疗结果枚举
|
||||||
|
*/
|
||||||
|
public enum DiagnosisResult {
|
||||||
|
|
||||||
|
ABANDONED(0, "放弃"),
|
||||||
|
CURED(1, "已治愈"),
|
||||||
|
IN_TREATMENT(2, "治疗中"),
|
||||||
|
COMPLETED(3, "治疗完成");
|
||||||
|
|
||||||
|
private final int code;
|
||||||
|
private final String desc;
|
||||||
|
|
||||||
|
DiagnosisResult(int code, String desc) {
|
||||||
|
this.code = code;
|
||||||
|
this.desc = desc;
|
||||||
|
}
|
||||||
|
|
||||||
|
public int getCode() {
|
||||||
|
return code;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getDesc() {
|
||||||
|
return desc;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据code获取描述
|
||||||
|
*/
|
||||||
|
public static String getDescByCode(Integer code) {
|
||||||
|
if (code == null) {
|
||||||
|
return "";
|
||||||
|
}
|
||||||
|
for (DiagnosisResult result : values()) {
|
||||||
|
if (result.code == code) {
|
||||||
|
return result.desc;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return "";
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据code获取枚举
|
||||||
|
*/
|
||||||
|
public static DiagnosisResult getByCode(Integer code) {
|
||||||
|
if (code == null) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
for (DiagnosisResult result : values()) {
|
||||||
|
if (result.code == code) {
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据描述获取code
|
||||||
|
*/
|
||||||
|
public static Integer getCodeByDesc(String desc) {
|
||||||
|
if (desc == null || desc.trim().isEmpty()) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
for (DiagnosisResult result : values()) {
|
||||||
|
if (result.desc.equals(desc)) {
|
||||||
|
return result.code;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,75 @@
|
|||||||
|
package com.zhyc.module.biosafety.enums;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 处方类型枚举
|
||||||
|
*/
|
||||||
|
public enum PrescriptionType {
|
||||||
|
|
||||||
|
IMMUNITY(0, "免疫"),
|
||||||
|
DEWORMING(1, "驱虫"),
|
||||||
|
HEALTH_CARE(2, "保健"),
|
||||||
|
DISINFECTION(3, "消毒"),
|
||||||
|
DISEASE_TREATMENT(4, "疾病治疗");
|
||||||
|
|
||||||
|
private final int code;
|
||||||
|
private final String desc;
|
||||||
|
|
||||||
|
PrescriptionType(int code, String desc) {
|
||||||
|
this.code = code;
|
||||||
|
this.desc = desc;
|
||||||
|
}
|
||||||
|
|
||||||
|
public int getCode() {
|
||||||
|
return code;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getDesc() {
|
||||||
|
return desc;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据code获取描述
|
||||||
|
*/
|
||||||
|
public static String getDescByCode(Integer code) {
|
||||||
|
if (code == null) {
|
||||||
|
return "";
|
||||||
|
}
|
||||||
|
for (PrescriptionType type : values()) {
|
||||||
|
if (type.code == code) {
|
||||||
|
return type.desc;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return "";
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据code获取枚举
|
||||||
|
*/
|
||||||
|
public static PrescriptionType getByCode(Integer code) {
|
||||||
|
if (code == null) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
for (PrescriptionType type : values()) {
|
||||||
|
if (type.code == code) {
|
||||||
|
return type;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据描述获取code
|
||||||
|
*/
|
||||||
|
public static Integer getCodeByDesc(String desc) {
|
||||||
|
if (desc == null || desc.trim().isEmpty()) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
for (PrescriptionType type : values()) {
|
||||||
|
if (type.desc.equals(desc)) {
|
||||||
|
return type.code;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,71 @@
|
|||||||
|
package com.zhyc.module.biosafety.enums;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 检疫结果枚举
|
||||||
|
*/
|
||||||
|
public enum QuarantineResult {
|
||||||
|
|
||||||
|
NEGATIVE(0, "阴性"),
|
||||||
|
POSITIVE(1, "阳性");
|
||||||
|
|
||||||
|
private final int code;
|
||||||
|
private final String desc;
|
||||||
|
|
||||||
|
QuarantineResult(int code, String desc) {
|
||||||
|
this.code = code;
|
||||||
|
this.desc = desc;
|
||||||
|
}
|
||||||
|
|
||||||
|
public int getCode() {
|
||||||
|
return code;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getDesc() {
|
||||||
|
return desc;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据code获取描述
|
||||||
|
*/
|
||||||
|
public static String getDescByCode(Integer code) {
|
||||||
|
if (code == null) {
|
||||||
|
return "";
|
||||||
|
}
|
||||||
|
for (QuarantineResult result : values()) {
|
||||||
|
if (result.code == code) {
|
||||||
|
return result.desc;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return "";
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据code获取枚举
|
||||||
|
*/
|
||||||
|
public static QuarantineResult getByCode(Integer code) {
|
||||||
|
if (code == null) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
for (QuarantineResult result : values()) {
|
||||||
|
if (result.code == code) {
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据描述获取code
|
||||||
|
*/
|
||||||
|
public static Integer getCodeByDesc(String desc) {
|
||||||
|
if (desc == null || desc.trim().isEmpty()) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
for (QuarantineResult result : values()) {
|
||||||
|
if (result.desc.equals(desc)) {
|
||||||
|
return result.code;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,72 @@
|
|||||||
|
package com.zhyc.module.biosafety.enums;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 检疫状态枚举
|
||||||
|
*/
|
||||||
|
public enum QuarantineStatus {
|
||||||
|
|
||||||
|
PENDING(0, "送检中"),
|
||||||
|
TESTED(1, "已检测");
|
||||||
|
|
||||||
|
private final int code;
|
||||||
|
private final String desc;
|
||||||
|
|
||||||
|
QuarantineStatus(int code, String desc) {
|
||||||
|
this.code = code;
|
||||||
|
this.desc = desc;
|
||||||
|
}
|
||||||
|
|
||||||
|
public int getCode() {
|
||||||
|
return code;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getDesc() {
|
||||||
|
return desc;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据code获取描述
|
||||||
|
*/
|
||||||
|
public static String getDescByCode(Integer code) {
|
||||||
|
if (code == null) {
|
||||||
|
return "";
|
||||||
|
}
|
||||||
|
for (QuarantineStatus status : values()) {
|
||||||
|
if (status.code == code) {
|
||||||
|
return status.desc;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return "";
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据code获取枚举
|
||||||
|
*/
|
||||||
|
public static QuarantineStatus getByCode(Integer code) {
|
||||||
|
if (code == null) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
for (QuarantineStatus status : values()) {
|
||||||
|
if (status.code == code) {
|
||||||
|
return status;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据描述获取code
|
||||||
|
*/
|
||||||
|
public static Integer getCodeByDesc(String desc) {
|
||||||
|
if (desc == null || desc.trim().isEmpty()) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
for (QuarantineStatus status : values()) {
|
||||||
|
if (status.desc.equals(desc)) {
|
||||||
|
return status.code;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,31 @@
|
|||||||
|
package com.zhyc.module.biosafety.enums;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 治疗状态枚举
|
||||||
|
*/
|
||||||
|
public enum TreatmentStatus {
|
||||||
|
|
||||||
|
ABANDONED(-1, "放弃", 0),
|
||||||
|
IN_TREATMENT(0, "治疗中", 1),
|
||||||
|
TREATMENT_COMPLETED(1, "治疗完成", 2),
|
||||||
|
CURED(2, "已治愈", 3);
|
||||||
|
|
||||||
|
private final int code;
|
||||||
|
private final String desc;
|
||||||
|
private final int sort;
|
||||||
|
|
||||||
|
TreatmentStatus(int code, String desc, int sort) {
|
||||||
|
this.code = code;
|
||||||
|
this.desc = desc;
|
||||||
|
this.sort = sort;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static String getDescByCode(Integer code) {
|
||||||
|
for (TreatmentStatus status : values()) {
|
||||||
|
if (status.code == code) {
|
||||||
|
return status.desc;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return "未知";
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -35,7 +35,14 @@ public class UserPostController {
|
|||||||
// 获取岗位(部门)
|
// 获取岗位(部门)
|
||||||
@GetMapping("/getPost")
|
@GetMapping("/getPost")
|
||||||
public AjaxResult getPost(String postName){
|
public AjaxResult getPost(String postName){
|
||||||
List<Post> list = postService.selectPostList();
|
List<Post> list = postService.selectPostList(postName);
|
||||||
|
return AjaxResult.success(list);
|
||||||
|
}
|
||||||
|
|
||||||
|
// 获取岗位班组
|
||||||
|
@GetMapping("/getPostTeam")
|
||||||
|
public AjaxResult getPostTeam(){
|
||||||
|
List<Post> list = postService.selectPostList("班");
|
||||||
return AjaxResult.success(list);
|
return AjaxResult.success(list);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,12 +1,29 @@
|
|||||||
package com.zhyc.module.common.mapper;
|
package com.zhyc.module.common.mapper;
|
||||||
|
|
||||||
import com.zhyc.module.common.domain.Post;
|
import com.zhyc.module.common.domain.Post;
|
||||||
|
import org.apache.ibatis.annotations.Param;
|
||||||
|
import org.apache.ibatis.annotations.Result;
|
||||||
|
import org.apache.ibatis.annotations.Results;
|
||||||
import org.apache.ibatis.annotations.Select;
|
import org.apache.ibatis.annotations.Select;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
public interface PostMapper {
|
public interface PostMapper {
|
||||||
|
|
||||||
@Select("select * from sys_post where status = '0'")
|
/**
|
||||||
List<Post> selectPostList();
|
* 根据岗位名称模糊查询岗位列表
|
||||||
|
*
|
||||||
|
* @param postName 岗位名称(可为空)
|
||||||
|
* @return 岗位列表
|
||||||
|
*/
|
||||||
|
@Select("SELECT post_id, post_code, post_name, post_sort, status FROM sys_post WHERE post_name LIKE CONCAT('%', #{postName}, '%') AND status = '0'")
|
||||||
|
@Results({
|
||||||
|
@Result(property = "postId", column = "post_id"),
|
||||||
|
@Result(property = "postCode", column = "post_code"),
|
||||||
|
@Result(property = "postName", column = "post_name"),
|
||||||
|
@Result(property = "postSort", column = "post_sort"),
|
||||||
|
@Result(property = "status", column = "status")
|
||||||
|
})
|
||||||
|
List<Post> selectPostList(@Param("postName") String postName);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -5,5 +5,5 @@ import com.zhyc.module.common.domain.Post;
|
|||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
public interface PostService {
|
public interface PostService {
|
||||||
List<Post> selectPostList();
|
List<Post> selectPostList(String postName);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -15,8 +15,8 @@ public class PostServiceImpl implements PostService {
|
|||||||
PostMapper postMapper;
|
PostMapper postMapper;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<Post> selectPostList() {
|
public List<Post> selectPostList(String postName) {
|
||||||
List<Post> list = postMapper.selectPostList();
|
List<Post> list = postMapper.selectPostList(postName);
|
||||||
return list;
|
return list;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,4 +0,0 @@
|
|||||||
package com.zhyc.module.enums;
|
|
||||||
|
|
||||||
public enum UseType {
|
|
||||||
}
|
|
||||||
@@ -79,6 +79,8 @@ public class WorkOrderController extends BaseController
|
|||||||
@PostMapping
|
@PostMapping
|
||||||
public AjaxResult add(@RequestBody WorkOrder workOrder)
|
public AjaxResult add(@RequestBody WorkOrder workOrder)
|
||||||
{
|
{
|
||||||
|
workOrder.setDeptId(getDeptId()); //修改成你对应的实体类
|
||||||
|
workOrder.setUserId(getUserId());
|
||||||
return toAjax(workOrderService.insertWorkOrder(workOrder));
|
return toAjax(workOrderService.insertWorkOrder(workOrder));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -40,7 +40,8 @@ public class WorkOrder extends BaseEntity
|
|||||||
private Long planId;
|
private Long planId;
|
||||||
|
|
||||||
/** 业务类型:1免疫 2保健 3转群 4称重 5配种 6干奶 7淘汰 8消毒 9饲喂,必填 */
|
/** 业务类型:1免疫 2保健 3转群 4称重 5配种 6干奶 7淘汰 8消毒 9饲喂,必填 */
|
||||||
@Excel(name = "业务类型:1免疫 2保健 3转群 4称重 5配种 6干奶 7淘汰 8消毒 9饲喂,必填")
|
// @Excel(name = "业务类型:1免疫 2保健 3转群 4称重 5配种 6干奶 7淘汰 8消毒 9饲喂,必填")
|
||||||
|
@Excel(name = "业务类型", readConverterExp = "1=免疫,2=保健,3=转群,4=称重,5=配种,6=干奶,7=淘汰,8=消毒,9=饲喂")
|
||||||
private Integer bizType;
|
private Integer bizType;
|
||||||
private String bizTypes;
|
private String bizTypes;
|
||||||
private Integer [] bizTypeArray;
|
private Integer [] bizTypeArray;
|
||||||
@@ -100,13 +101,13 @@ public class WorkOrder extends BaseEntity
|
|||||||
private String toolList;
|
private String toolList;
|
||||||
|
|
||||||
/** 状态:0待派工 1已派工 2执行中 3已完成 4已取消 5异常,必填 */
|
/** 状态:0待派工 1已派工 2执行中 3已完成 4已取消 5异常,必填 */
|
||||||
@Excel(name = "状态:0待派工 1已派工 2执行中 3已完成 4已取消 5异常,必填")
|
@Excel(name = "状态", readConverterExp = "0=待派工,1=已派工,2=执行中,3=已完成,4=已取消,5=异常")
|
||||||
private Integer status;
|
private Integer status;
|
||||||
private String statuss;
|
private String statuss;
|
||||||
private Integer [] statusArray;
|
private Integer [] statusArray;
|
||||||
|
|
||||||
/** 优先级:1普通 2重要 3紧急,必填 */
|
/** 优先级:1普通 2重要 3紧急,必填 */
|
||||||
@Excel(name = "优先级:1普通 2重要 3紧急,必填")
|
@Excel(name = "优先级", readConverterExp = "1=普通,2=重要,3=紧急")
|
||||||
private Integer priority;
|
private Integer priority;
|
||||||
private String prioritys;
|
private String prioritys;
|
||||||
private Integer [] priorityArray;
|
private Integer [] priorityArray;
|
||||||
@@ -147,4 +148,6 @@ public class WorkOrder extends BaseEntity
|
|||||||
/** 逻辑删除:0正常 1已删除,必填 */
|
/** 逻辑删除:0正常 1已删除,必填 */
|
||||||
private Integer deleted;
|
private Integer deleted;
|
||||||
|
|
||||||
|
private Long deptId;
|
||||||
|
private Long userId;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,79 @@
|
|||||||
|
package com.zhyc.module.work.enums;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 业务类型枚举
|
||||||
|
*/
|
||||||
|
public enum BizType {
|
||||||
|
|
||||||
|
IMMUNITY(1, "免疫"),
|
||||||
|
HEALTH_CARE(2, "保健"),
|
||||||
|
TRANSFER_GROUP(3, "转群"),
|
||||||
|
WEIGHING(4, "称重"),
|
||||||
|
BREEDING(5, "配种"),
|
||||||
|
DRY_MILK(6, "干奶"),
|
||||||
|
ELIMINATION(7, "淘汰"),
|
||||||
|
DISINFECTION(8, "消毒"),
|
||||||
|
FEEDING(9, "饲喂");
|
||||||
|
|
||||||
|
private final int code;
|
||||||
|
private final String desc;
|
||||||
|
|
||||||
|
BizType(int code, String desc) {
|
||||||
|
this.code = code;
|
||||||
|
this.desc = desc;
|
||||||
|
}
|
||||||
|
|
||||||
|
public int getCode() {
|
||||||
|
return code;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getDesc() {
|
||||||
|
return desc;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据code获取描述
|
||||||
|
*/
|
||||||
|
public static String getDescByCode(Integer code) {
|
||||||
|
if (code == null) {
|
||||||
|
return "";
|
||||||
|
}
|
||||||
|
for (BizType type : values()) {
|
||||||
|
if (type.code == code) {
|
||||||
|
return type.desc;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return "";
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据code获取枚举
|
||||||
|
*/
|
||||||
|
public static BizType getByCode(Integer code) {
|
||||||
|
if (code == null) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
for (BizType type : values()) {
|
||||||
|
if (type.code == code) {
|
||||||
|
return type;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据描述获取code
|
||||||
|
*/
|
||||||
|
public static Integer getCodeByDesc(String desc) {
|
||||||
|
if (desc == null || desc.trim().isEmpty()) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
for (BizType type : values()) {
|
||||||
|
if (type.desc.equals(desc)) {
|
||||||
|
return type.code;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,73 @@
|
|||||||
|
package com.zhyc.module.work.enums;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 任务优先级枚举
|
||||||
|
*/
|
||||||
|
public enum TaskPriority {
|
||||||
|
|
||||||
|
NORMAL(1, "普通"),
|
||||||
|
IMPORTANT(2, "重要"),
|
||||||
|
URGENT(3, "紧急");
|
||||||
|
|
||||||
|
private final int code;
|
||||||
|
private final String desc;
|
||||||
|
|
||||||
|
TaskPriority(int code, String desc) {
|
||||||
|
this.code = code;
|
||||||
|
this.desc = desc;
|
||||||
|
}
|
||||||
|
|
||||||
|
public int getCode() {
|
||||||
|
return code;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getDesc() {
|
||||||
|
return desc;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据code获取描述
|
||||||
|
*/
|
||||||
|
public static String getDescByCode(Integer code) {
|
||||||
|
if (code == null) {
|
||||||
|
return "";
|
||||||
|
}
|
||||||
|
for (TaskPriority priority : values()) {
|
||||||
|
if (priority.code == code) {
|
||||||
|
return priority.desc;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return "";
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据code获取枚举
|
||||||
|
*/
|
||||||
|
public static TaskPriority getByCode(Integer code) {
|
||||||
|
if (code == null) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
for (TaskPriority priority : values()) {
|
||||||
|
if (priority.code == code) {
|
||||||
|
return priority;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据描述获取code
|
||||||
|
*/
|
||||||
|
public static Integer getCodeByDesc(String desc) {
|
||||||
|
if (desc == null || desc.trim().isEmpty()) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
for (TaskPriority priority : values()) {
|
||||||
|
if (priority.desc.equals(desc)) {
|
||||||
|
return priority.code;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,76 @@
|
|||||||
|
package com.zhyc.module.work.enums;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 任务状态枚举
|
||||||
|
*/
|
||||||
|
public enum TaskStatus {
|
||||||
|
|
||||||
|
PENDING(0, "待派工"),
|
||||||
|
ASSIGNED(1, "已派工"),
|
||||||
|
IN_PROGRESS(2, "执行中"),
|
||||||
|
COMPLETED(3, "已完成"),
|
||||||
|
CANCELLED(4, "已取消"),
|
||||||
|
EXCEPTION(5, "异常");
|
||||||
|
|
||||||
|
private final int code;
|
||||||
|
private final String desc;
|
||||||
|
|
||||||
|
TaskStatus(int code, String desc) {
|
||||||
|
this.code = code;
|
||||||
|
this.desc = desc;
|
||||||
|
}
|
||||||
|
|
||||||
|
public int getCode() {
|
||||||
|
return code;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getDesc() {
|
||||||
|
return desc;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据code获取描述
|
||||||
|
*/
|
||||||
|
public static String getDescByCode(Integer code) {
|
||||||
|
if (code == null) {
|
||||||
|
return "";
|
||||||
|
}
|
||||||
|
for (TaskStatus status : values()) {
|
||||||
|
if (status.code == code) {
|
||||||
|
return status.desc;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return "";
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据code获取枚举
|
||||||
|
*/
|
||||||
|
public static TaskStatus getByCode(Integer code) {
|
||||||
|
if (code == null) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
for (TaskStatus status : values()) {
|
||||||
|
if (status.code == code) {
|
||||||
|
return status;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据描述获取code
|
||||||
|
*/
|
||||||
|
public static Integer getCodeByDesc(String desc) {
|
||||||
|
if (desc == null || desc.trim().isEmpty()) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
for (TaskStatus status : values()) {
|
||||||
|
if (status.desc.equals(desc)) {
|
||||||
|
return status.code;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -1,6 +1,8 @@
|
|||||||
package com.zhyc.module.work.service.impl;
|
package com.zhyc.module.work.service.impl;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
|
import com.zhyc.common.annotation.DataScope;
|
||||||
import com.zhyc.common.utils.DateUtils;
|
import com.zhyc.common.utils.DateUtils;
|
||||||
import com.zhyc.common.utils.SecurityUtils;
|
import com.zhyc.common.utils.SecurityUtils;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
@@ -40,6 +42,7 @@ public class WorkOrderServiceImpl implements IWorkOrderService
|
|||||||
* @return 派工单
|
* @return 派工单
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
|
@DataScope(deptAlias = "w" , userAlias = "w")
|
||||||
public List<WorkOrder> selectWorkOrderList(WorkOrder workOrder)
|
public List<WorkOrder> selectWorkOrderList(WorkOrder workOrder)
|
||||||
{
|
{
|
||||||
String username = SecurityUtils.getLoginUser().getUser().getNickName();
|
String username = SecurityUtils.getLoginUser().getUser().getNickName();
|
||||||
|
|||||||
@@ -58,6 +58,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
and datetime between #{params.beginDatetime} and #{params.endDatetime}
|
and datetime between #{params.beginDatetime} and #{params.endDatetime}
|
||||||
</if>
|
</if>
|
||||||
<if test="technical != null and technical != ''">and technical = #{technical}</if>
|
<if test="technical != null and technical != ''">and technical = #{technical}</if>
|
||||||
|
<if test="isDelete != null and isDelete != '' ">and bs.is_delete = #{isDelete}</if>
|
||||||
${params.dataScope}
|
${params.dataScope}
|
||||||
</where>
|
</where>
|
||||||
|
|
||||||
|
|||||||
@@ -69,6 +69,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
<if test="result != null "> and result = #{result}</if>
|
<if test="result != null "> and result = #{result}</if>
|
||||||
<if test="treatDay != null "> and treat_day = #{treatDay}</if>
|
<if test="treatDay != null "> and treat_day = #{treatDay}</if>
|
||||||
<if test="sheepfoldId != null "> and sd.sheepfold_id = #{sheepfoldId}</if>
|
<if test="sheepfoldId != null "> and sd.sheepfold_id = #{sheepfoldId}</if>
|
||||||
|
<if test="isDelete != null and isDelete != '' ">and sf.is_delete = #{isDelete}</if>
|
||||||
${params.dataScope}
|
${params.dataScope}
|
||||||
</where>
|
</where>
|
||||||
ORDER BY datetime DESC
|
ORDER BY datetime DESC
|
||||||
|
|||||||
@@ -62,6 +62,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
</if>
|
</if>
|
||||||
<if test="params.beginDatetime != null and params.beginDatetime != '' and params.endDatetime != null and params.endDatetime != ''"> and datetime between #{params.beginDatetime} and #{params.endDatetime}</if>
|
<if test="params.beginDatetime != null and params.beginDatetime != '' and params.endDatetime != null and params.endDatetime != ''"> and datetime between #{params.beginDatetime} and #{params.endDatetime}</if>
|
||||||
<if test="technical != null and technical != ''"> and technical = #{technical}</if>
|
<if test="technical != null and technical != ''"> and technical = #{technical}</if>
|
||||||
|
<if test="isDelete != null and isDelete != '' ">and bs.is_delete = #{isDelete}</if>
|
||||||
${params.dataScope}
|
${params.dataScope}
|
||||||
</where>
|
</where>
|
||||||
<!-- 基准排序:日期永远第一序,降序 -->
|
<!-- 基准排序:日期永远第一序,降序 -->
|
||||||
|
|||||||
@@ -60,6 +60,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
</if>
|
</if>
|
||||||
<if test="params.beginDatetime != null and params.beginDatetime != '' and params.endDatetime != null and params.endDatetime != ''"> and datetime between #{params.beginDatetime} and #{params.endDatetime}</if>
|
<if test="params.beginDatetime != null and params.beginDatetime != '' and params.endDatetime != null and params.endDatetime != ''"> and datetime between #{params.beginDatetime} and #{params.endDatetime}</if>
|
||||||
<if test="technical != null and technical != ''"> and technical = #{technical}</if>
|
<if test="technical != null and technical != ''"> and technical = #{technical}</if>
|
||||||
|
<if test="isDelete != null and isDelete != '' ">and bs.is_delete = #{isDelete}</if>
|
||||||
${params.dataScope}
|
${params.dataScope}
|
||||||
</where>
|
</where>
|
||||||
<!-- 基准排序:日期永远第一序,降序 -->
|
<!-- 基准排序:日期永远第一序,降序 -->
|
||||||
|
|||||||
@@ -72,6 +72,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
<if test="result != null "> and result = #{result}</if>
|
<if test="result != null "> and result = #{result}</if>
|
||||||
<if test="status != null "> and status = #{status}</if>
|
<if test="status != null "> and status = #{status}</if>
|
||||||
<if test="sheepType != null and sheepType!= ''"> and sqr.sheep_type=#{sheepType}</if>
|
<if test="sheepType != null and sheepType!= ''"> and sqr.sheep_type=#{sheepType}</if>
|
||||||
|
<if test="isDelete != null and isDelete != '' ">and sf.is_delete = #{isDelete}</if>
|
||||||
${params.dataScope}
|
${params.dataScope}
|
||||||
</where>
|
</where>
|
||||||
ORDER BY datetime DESC
|
ORDER BY datetime DESC
|
||||||
|
|||||||
@@ -78,6 +78,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
<if test="diseaseId != null "> and disease_id = #{diseaseId}</if>
|
<if test="diseaseId != null "> and disease_id = #{diseaseId}</if>
|
||||||
<if test="status != null and status !=''"> and status = #{status}</if>
|
<if test="status != null and status !=''"> and status = #{status}</if>
|
||||||
<if test="veterinary != null and veterinary != ''"> and veterinary = #{veterinary}</if>
|
<if test="veterinary != null and veterinary != ''"> and veterinary = #{veterinary}</if>
|
||||||
|
<if test="isDelete != null and isDelete != '' ">and bs.is_delete = #{isDelete}</if>
|
||||||
${params.dataScope}
|
${params.dataScope}
|
||||||
</where>
|
</where>
|
||||||
ORDER BY datetime DESC
|
ORDER BY datetime DESC
|
||||||
|
|||||||
@@ -37,7 +37,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
</resultMap>
|
</resultMap>
|
||||||
|
|
||||||
<sql id="selectWorkOrderVo">
|
<sql id="selectWorkOrderVo">
|
||||||
select id, order_no, plan_id, biz_type, title, content, department, executor_ids,executor, execute_date, execute_time, sheep_scope, location, material_list, tool_list, status, priority, issuer_id, issuer,issue_time, receiver_id, receiver,receive_time, finish_time, result, remark, create_time, update_time, deleted from work_order
|
select id, order_no, plan_id, biz_type, title, content, department, executor_ids,executor, execute_date, execute_time, sheep_scope, location, material_list, tool_list, status, priority, issuer_id, issuer,issue_time, receiver_id, receiver,receive_time, finish_time, result, remark, create_time, update_time, deleted from work_order w
|
||||||
</sql>
|
</sql>
|
||||||
|
|
||||||
<select id="selectWorkOrderList" parameterType="WorkOrder" resultMap="WorkOrderResult">
|
<select id="selectWorkOrderList" parameterType="WorkOrder" resultMap="WorkOrderResult">
|
||||||
@@ -98,6 +98,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
and finish_time between #{beginFinishDate} and #{endFinishDate}
|
and finish_time between #{beginFinishDate} and #{endFinishDate}
|
||||||
</if>
|
</if>
|
||||||
<if test="result != null and result != ''"> and result = #{result}</if>
|
<if test="result != null and result != ''"> and result = #{result}</if>
|
||||||
|
${params.dataScope}
|
||||||
</where>
|
</where>
|
||||||
order by execute_date desc
|
order by execute_date desc
|
||||||
</select>
|
</select>
|
||||||
@@ -140,6 +141,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
<if test="createTime != null">create_time,</if>
|
<if test="createTime != null">create_time,</if>
|
||||||
<if test="updateTime != null">update_time,</if>
|
<if test="updateTime != null">update_time,</if>
|
||||||
<if test="deleted != null">deleted,</if>
|
<if test="deleted != null">deleted,</if>
|
||||||
|
<if test="deptId != null">dept_id,</if>
|
||||||
|
<if test="userId != null">user_id,</if>
|
||||||
</trim>
|
</trim>
|
||||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||||
<if test="orderNo != null and orderNo != ''">#{orderNo},</if>
|
<if test="orderNo != null and orderNo != ''">#{orderNo},</if>
|
||||||
@@ -170,6 +173,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
<if test="createTime != null">#{createTime},</if>
|
<if test="createTime != null">#{createTime},</if>
|
||||||
<if test="updateTime != null">#{updateTime},</if>
|
<if test="updateTime != null">#{updateTime},</if>
|
||||||
<if test="deleted != null">#{deleted},</if>
|
<if test="deleted != null">#{deleted},</if>
|
||||||
|
<if test="deptId != null">#{deptId},</if>
|
||||||
|
<if test="userId != null">#{userId},</if>
|
||||||
</trim>
|
</trim>
|
||||||
</insert>
|
</insert>
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user