Compare commits

..

2 Commits

Author SHA1 Message Date
7bce9a0774 Merge remote-tracking branch 'origin/main' 2026-02-09 20:25:03 +08:00
5cf769c9f5 生物安全是否在群,以及execl导出枚举 2026-02-09 20:24:51 +08:00
30 changed files with 743 additions and 23 deletions

View File

@@ -58,7 +58,7 @@ public class Deworm extends BaseEntity
private Long deptId;
/** 药品使用记录 */
@Excel(name = "药品使用记录")
// @Excel(name = "药品使用记录")
private Integer usageId;
@@ -78,9 +78,28 @@ public class Deworm extends BaseEntity
@Excel(name = "备注")
private String comment;
/**
* 是否在群查询条件0-在群1-离群),非数据库字段
*/
private Integer isDelete;
// 排序查询
private String orderByColumn;
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;
}
}
}

View File

@@ -80,6 +80,8 @@ public class Diagnosis extends BaseEntity
/** 诊疗结果 */
@Excel(name = "诊疗结果")
private String resultName;
/** 诊断结果 */
private String result;
/** 开始时间 */
@@ -106,6 +108,11 @@ public class Diagnosis extends BaseEntity
private String orderByColumn;
private String isAsc;
/**
* 是否在群查询条件0-在群1-离群),非数据库字段
*/
private Integer isDelete;
private Long userId;
private Long deptId;
@@ -123,5 +130,19 @@ public class Diagnosis extends BaseEntity
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;
}
}
}

View File

@@ -29,7 +29,7 @@ public class Health extends BaseEntity
private Date datetime;
/** 羊只id */
@Excel(name = "羊只id")
// @Excel(name = "羊只id")
private Long sheepId;
private Integer[] sheepIds;
@@ -79,6 +79,11 @@ public class Health extends BaseEntity
private String orderByColumn;
private String isAsc;
/**
* 是否在群查询条件0-在群1-离群),非数据库字段
*/
private Integer isDelete;
public void setGender(String gender) {
this.gender = gender;
if (gender != null && !gender.trim().isEmpty()) {

View File

@@ -28,7 +28,6 @@ public class Immunity extends BaseEntity
private Long id;
/** 羊只id */
@Excel(name = "羊只id")
private Long sheepId;
private Integer[] sheepIds;
@@ -42,7 +41,6 @@ public class Immunity extends BaseEntity
@Excel(name = "品种")
private String variety;
@Excel(name = "羊只类别")
private String sheepType;
@@ -81,6 +79,11 @@ public class Immunity extends BaseEntity
private Long userId;
private Long deptId;
/**
* 是否在群查询条件0-在群1-离群),非数据库字段
*/
private Integer isDelete;
// 药品使用
private List<SwMedicineUsageDetails> usageDetails;

View File

@@ -4,6 +4,8 @@ import java.util.Date;
import java.util.List;
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 lombok.AllArgsConstructor;
import lombok.Data;
@@ -91,10 +93,12 @@ public class QuarantineReport extends BaseEntity
/** 检疫结果 */
@Excel(name = "检疫结果")
private String resultName;
private String result;
/** 状态 */
@Excel(name = "状态")
private String statusName;
private Integer status;
/** 备注*/
@@ -104,6 +108,11 @@ public class QuarantineReport extends BaseEntity
private Long userId;
private Long deptId;
/**
* 是否在群查询条件0-在群1-离群),非数据库字段
*/
private Integer isDelete;
public void setGender(String gender) {
this.gender = gender;
if (gender != null && !gender.trim().isEmpty()) {
@@ -118,6 +127,35 @@ public class QuarantineReport extends BaseEntity
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;

View File

@@ -5,6 +5,8 @@ import java.util.Date;
import java.util.List;
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.Data;
import lombok.NoArgsConstructor;
@@ -32,7 +34,7 @@ public class SwMedicineUsage extends BaseEntity
private String name;
/** 羊舍名称 */
@Excel(name = "使用名称" ,width = 20, needMerge = true)
@Excel(name = "羊舍名称" ,width = 20, needMerge = true)
private String sheepfoldName;
private Integer sheepfoldId;
/** 耳号 */
@@ -51,8 +53,10 @@ public class SwMedicineUsage extends BaseEntity
/** 使用类型 */
@Excel(name = "使用类型",width = 20, needMerge = true)
private String useTypeName;
private String useType;
private Long userId;
private Long deptId;
@@ -61,4 +65,17 @@ public class SwMedicineUsage extends BaseEntity
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 = "未知";
}
}
}
}

View File

@@ -4,6 +4,7 @@ import java.util.Date;
import java.util.List;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.zhyc.module.biosafety.enums.TreatmentStatus;
import com.zhyc.module.enums.Gender;
import lombok.AllArgsConstructor;
import lombok.Data;
@@ -97,22 +98,38 @@ public class Treatment extends BaseEntity
private String veterinary;
/** 治疗状态 */
@Excel(name = "治疗状态")
private String statusName;
private String status;
/** 药品使用记录id */
@Excel(name = "药品使用记录id")
private Integer usageId;
private Long userId;
private Long deptId;
/**
* 是否在群查询条件0-在群1-离群),非数据库字段
*/
private Integer isDelete;
// 药品使用
private List<SwMedicineUsageDetails> usageDetails;
/** 备注 */
@Excel(name = "备注")
private String comment;
// 排序查询
private String orderByColumn;
private String isAsc;
/** 性别转换 */
public void setGender(String gender) {
this.gender = gender; // 保留原始字符串
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;
}

View File

@@ -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;
}
}

View File

@@ -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;
}
}

View File

@@ -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;
}
}

View File

@@ -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;
}
}

View File

@@ -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 "未知";
}
}

View File

@@ -35,7 +35,14 @@ public class UserPostController {
// 获取岗位(部门)
@GetMapping("/getPost")
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);
}

View File

@@ -1,12 +1,29 @@
package com.zhyc.module.common.mapper;
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 java.util.List;
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);
}

View File

@@ -5,5 +5,5 @@ import com.zhyc.module.common.domain.Post;
import java.util.List;
public interface PostService {
List<Post> selectPostList();
List<Post> selectPostList(String postName);
}

View File

@@ -15,8 +15,8 @@ public class PostServiceImpl implements PostService {
PostMapper postMapper;
@Override
public List<Post> selectPostList() {
List<Post> list = postMapper.selectPostList();
public List<Post> selectPostList(String postName) {
List<Post> list = postMapper.selectPostList(postName);
return list;
}
}

View File

@@ -1,4 +0,0 @@
package com.zhyc.module.enums;
public enum UseType {
}

View File

@@ -79,6 +79,8 @@ public class WorkOrderController extends BaseController
@PostMapping
public AjaxResult add(@RequestBody WorkOrder workOrder)
{
workOrder.setDeptId(getDeptId()); //修改成你对应的实体类
workOrder.setUserId(getUserId());
return toAjax(workOrderService.insertWorkOrder(workOrder));
}

View File

@@ -40,7 +40,8 @@ public class WorkOrder extends BaseEntity
private Long planId;
/** 业务类型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 String bizTypes;
private Integer [] bizTypeArray;
@@ -100,13 +101,13 @@ public class WorkOrder extends BaseEntity
private String toolList;
/** 状态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 String statuss;
private Integer [] statusArray;
/** 优先级1普通 2重要 3紧急必填 */
@Excel(name = "优先级1普通 2重要 3紧急必填")
@Excel(name = "优先级", readConverterExp = "1=普通,2=重要,3=紧急")
private Integer priority;
private String prioritys;
private Integer [] priorityArray;
@@ -147,4 +148,6 @@ public class WorkOrder extends BaseEntity
/** 逻辑删除0正常 1已删除必填 */
private Integer deleted;
private Long deptId;
private Long userId;
}

View File

@@ -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;
}
}

View File

@@ -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;
}
}

View File

@@ -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;
}
}

View File

@@ -1,6 +1,8 @@
package com.zhyc.module.work.service.impl;
import java.util.List;
import com.zhyc.common.annotation.DataScope;
import com.zhyc.common.utils.DateUtils;
import com.zhyc.common.utils.SecurityUtils;
import org.springframework.beans.factory.annotation.Autowired;
@@ -40,6 +42,7 @@ public class WorkOrderServiceImpl implements IWorkOrderService
* @return 派工单
*/
@Override
@DataScope(deptAlias = "w" , userAlias = "w")
public List<WorkOrder> selectWorkOrderList(WorkOrder workOrder)
{
String username = SecurityUtils.getLoginUser().getUser().getNickName();

View File

@@ -58,6 +58,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
and datetime between #{params.beginDatetime} and #{params.endDatetime}
</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}
</where>

View File

@@ -69,6 +69,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="result != null "> and result = #{result}</if>
<if test="treatDay != null "> and treat_day = #{treatDay}</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}
</where>
ORDER BY datetime DESC

View File

@@ -62,6 +62,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</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="isDelete != null and isDelete != '' ">and bs.is_delete = #{isDelete}</if>
${params.dataScope}
</where>
<!-- 基准排序:日期永远第一序,降序 -->

View File

@@ -60,6 +60,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</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="isDelete != null and isDelete != '' ">and bs.is_delete = #{isDelete}</if>
${params.dataScope}
</where>
<!-- 基准排序:日期永远第一序,降序 -->

View File

@@ -72,6 +72,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="result != null "> and result = #{result}</if>
<if test="status != null "> and status = #{status}</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}
</where>
ORDER BY datetime DESC

View File

@@ -78,6 +78,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="diseaseId != null "> and disease_id = #{diseaseId}</if>
<if test="status != null and status !=''"> and status = #{status}</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}
</where>
ORDER BY datetime DESC

View File

@@ -37,7 +37,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</resultMap>
<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>
<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}
</if>
<if test="result != null and result != ''"> and result = #{result}</if>
${params.dataScope}
</where>
order by execute_date desc
</select>
@@ -140,6 +141,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="createTime != null">create_time,</if>
<if test="updateTime != null">update_time,</if>
<if test="deleted != null">deleted,</if>
<if test="deptId != null">dept_id,</if>
<if test="userId != null">user_id,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<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="updateTime != null">#{updateTime},</if>
<if test="deleted != null">#{deleted},</if>
<if test="deptId != null">#{deptId},</if>
<if test="userId != null">#{userId},</if>
</trim>
</insert>