Merge remote-tracking branch 'origin/main'

This commit is contained in:
wyt 2025-12-11 10:53:34 +08:00
commit d0c4a6664f
19 changed files with 1280 additions and 39 deletions

View File

@ -17,11 +17,11 @@
<groupId>zhyc</groupId>
<artifactId>zhyc-common</artifactId>
</dependency>
<!-- MyBatis-Plus 核心,已含 @TableField -->
<dependency>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
<version>1.18.38</version> <!-- 使用最新版本 -->
<scope>provided</scope>
<groupId>com.baomidou</groupId>
<artifactId>mybatis-plus-boot-starter</artifactId>
<version>3.5.3.2</version> <!-- 用你项目已有的版本 -->
</dependency>
<dependency>
<groupId>org.projectlombok</groupId>

View File

@ -0,0 +1,104 @@
package com.zhyc.module.app.controller;
import java.util.List;
import javax.servlet.http.HttpServletResponse;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import com.zhyc.common.annotation.Log;
import com.zhyc.common.core.controller.BaseController;
import com.zhyc.common.core.domain.AjaxResult;
import com.zhyc.common.enums.BusinessType;
import com.zhyc.module.app.domain.AppVersion;
import com.zhyc.module.app.service.IAppVersionService;
import com.zhyc.common.utils.poi.ExcelUtil;
import com.zhyc.common.core.page.TableDataInfo;
/**
* 应用版本信息Controller
*
* @author 漂泊
* @date 2025-12-09
*/
@RestController
@RequestMapping("/app/version")
public class AppVersionController extends BaseController
{
@Autowired
private IAppVersionService appVersionService;
/**
* 查询应用版本信息列表
*/
// @PreAuthorize("@ss.hasPermi('app:version:list')")
@GetMapping("/list")
public TableDataInfo list(AppVersion appVersion)
{
startPage();
List<AppVersion> list = appVersionService.selectAppVersionList(appVersion);
return getDataTable(list);
}
/**
* 导出应用版本信息列表
*/
// @PreAuthorize("@ss.hasPermi('app:version:export')")
@Log(title = "应用版本信息", businessType = BusinessType.EXPORT)
@PostMapping("/export")
public void export(HttpServletResponse response, AppVersion appVersion)
{
List<AppVersion> list = appVersionService.selectAppVersionList(appVersion);
ExcelUtil<AppVersion> util = new ExcelUtil<AppVersion>(AppVersion.class);
util.exportExcel(response, list, "应用版本信息数据");
}
/**
* 获取应用版本信息详细信息
*/
// @PreAuthorize("@ss.hasPermi('app:version:query')")
@GetMapping(value = "/{id}")
public AjaxResult getInfo(@PathVariable("id") Long id)
{
return success(appVersionService.selectAppVersionById(id));
}
/**
* 新增应用版本信息
*/
// @PreAuthorize("@ss.hasPermi('app:version:add')")
@Log(title = "应用版本信息", businessType = BusinessType.INSERT)
@PostMapping
public AjaxResult add(@RequestBody AppVersion appVersion)
{
return toAjax(appVersionService.insertAppVersion(appVersion));
}
/**
* 修改应用版本信息
*/
// @PreAuthorize("@ss.hasPermi('app:version:edit')")
@Log(title = "应用版本信息", businessType = BusinessType.UPDATE)
@PutMapping
public AjaxResult edit(@RequestBody AppVersion appVersion)
{
return toAjax(appVersionService.updateAppVersion(appVersion));
}
/**
* 删除应用版本信息
*/
// @PreAuthorize("@ss.hasPermi('app:version:remove')")
@Log(title = "应用版本信息", businessType = BusinessType.DELETE)
@DeleteMapping("/{ids}")
public AjaxResult remove(@PathVariable Long[] ids)
{
return toAjax(appVersionService.deleteAppVersionByIds(ids));
}
}

View File

@ -0,0 +1,82 @@
package com.zhyc.module.app.domain;
import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.zhyc.common.annotation.Excel;
import com.zhyc.common.core.domain.BaseEntity;
/**
* 应用版本信息对象 app_version
*
* @author ruoyi
* @date 2025-12-09
*/
@Data
@NoArgsConstructor
@AllArgsConstructor
public class AppVersion extends BaseEntity
{
private static final long serialVersionUID = 1L;
/** 主键ID */
private Long id;
/** 平台类型 */
@Excel(name = "平台类型")
private String platform;
/** 版本代码用于比较的数字如1000 */
@Excel(name = "版本代码", readConverterExp = "用=于比较的数字如1000")
private Long versionCode;
/** 版本名称如1.0.0 */
@Excel(name = "版本名称", readConverterExp = "如=1.0.0")
private String versionName;
/** 是否强制更新0否1是 */
@Excel(name = "是否强制更新", readConverterExp = "0=否1是")
private Integer isForceUpdate;
/** 是否最新版本 */
@Excel(name = "是否最新版本")
private Integer isLatest;
/** 最小兼容版本 */
@Excel(name = "最小兼容版本")
private Long minVersionCode;
/** 下载地址 */
@Excel(name = "下载地址")
private String downloadUrl;
/** 更新标题 */
@Excel(name = "更新标题")
private String updateTitle;
/** 更新内容 */
@Excel(name = "更新内容")
private String updateContent;
/** 文件大小(字节) */
@Excel(name = "文件大小", readConverterExp = "字=节")
private Long fileSize;
/** 文件MD5 */
@Excel(name = "文件MD5")
private String md5Hash;
/** 发布时间 */
@JsonFormat(pattern = "yyyy-MM-dd")
@Excel(name = "发布时间", width = 30, dateFormat = "yyyy-MM-dd")
private Date publishTime;
/** 是否删除 */
@Excel(name = "是否删除")
private Integer isDeleted;
}

View File

@ -0,0 +1,63 @@
package com.zhyc.module.app.mapper;
import java.util.List;
import com.zhyc.module.app.domain.AppVersion;
import org.apache.ibatis.annotations.Mapper;
/**
* 应用版本信息Mapper接口
*
* @author ruoyi
* @date 2025-12-09
*/
@Mapper
public interface AppVersionMapper
{
/**
* 查询应用版本信息
*
* @param id 应用版本信息主键
* @return 应用版本信息
*/
public AppVersion selectAppVersionById(Long id);
/**
* 查询应用版本信息列表
*
* @param appVersion 应用版本信息
* @return 应用版本信息集合
*/
public List<AppVersion> selectAppVersionList(AppVersion appVersion);
/**
* 新增应用版本信息
*
* @param appVersion 应用版本信息
* @return 结果
*/
public int insertAppVersion(AppVersion appVersion);
/**
* 修改应用版本信息
*
* @param appVersion 应用版本信息
* @return 结果
*/
public int updateAppVersion(AppVersion appVersion);
/**
* 删除应用版本信息
*
* @param id 应用版本信息主键
* @return 结果
*/
public int deleteAppVersionById(Long id);
/**
* 批量删除应用版本信息
*
* @param ids 需要删除的数据主键集合
* @return 结果
*/
public int deleteAppVersionByIds(Long[] ids);
}

View File

@ -0,0 +1,61 @@
package com.zhyc.module.app.service;
import java.util.List;
import com.zhyc.module.app.domain.AppVersion;
/**
* 应用版本信息Service接口
*
* @author ruoyi
* @date 2025-12-09
*/
public interface IAppVersionService
{
/**
* 查询应用版本信息
*
* @param id 应用版本信息主键
* @return 应用版本信息
*/
public AppVersion selectAppVersionById(Long id);
/**
* 查询应用版本信息列表
*
* @param appVersion 应用版本信息
* @return 应用版本信息集合
*/
public List<AppVersion> selectAppVersionList(AppVersion appVersion);
/**
* 新增应用版本信息
*
* @param appVersion 应用版本信息
* @return 结果
*/
public int insertAppVersion(AppVersion appVersion);
/**
* 修改应用版本信息
*
* @param appVersion 应用版本信息
* @return 结果
*/
public int updateAppVersion(AppVersion appVersion);
/**
* 批量删除应用版本信息
*
* @param ids 需要删除的应用版本信息主键集合
* @return 结果
*/
public int deleteAppVersionByIds(Long[] ids);
/**
* 删除应用版本信息信息
*
* @param id 应用版本信息主键
* @return 结果
*/
public int deleteAppVersionById(Long id);
}

View File

@ -0,0 +1,96 @@
package com.zhyc.module.app.service.impl;
import java.util.List;
import com.zhyc.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.zhyc.module.app.mapper.AppVersionMapper;
import com.zhyc.module.app.domain.AppVersion;
import com.zhyc.module.app.service.IAppVersionService;
/**
* 应用版本信息Service业务层处理
*
* @author ruoyi
* @date 2025-12-09
*/
@Service
public class AppVersionServiceImpl implements IAppVersionService
{
@Autowired
private AppVersionMapper appVersionMapper;
/**
* 查询应用版本信息
*
* @param id 应用版本信息主键
* @return 应用版本信息
*/
@Override
public AppVersion selectAppVersionById(Long id)
{
return appVersionMapper.selectAppVersionById(id);
}
/**
* 查询应用版本信息列表
*
* @param appVersion 应用版本信息
* @return 应用版本信息
*/
@Override
public List<AppVersion> selectAppVersionList(AppVersion appVersion)
{
return appVersionMapper.selectAppVersionList(appVersion);
}
/**
* 新增应用版本信息
*
* @param appVersion 应用版本信息
* @return 结果
*/
@Override
public int insertAppVersion(AppVersion appVersion)
{
appVersion.setCreateTime(DateUtils.getNowDate());
return appVersionMapper.insertAppVersion(appVersion);
}
/**
* 修改应用版本信息
*
* @param appVersion 应用版本信息
* @return 结果
*/
@Override
public int updateAppVersion(AppVersion appVersion)
{
appVersion.setUpdateTime(DateUtils.getNowDate());
return appVersionMapper.updateAppVersion(appVersion);
}
/**
* 批量删除应用版本信息
*
* @param ids 需要删除的应用版本信息主键
* @return 结果
*/
@Override
public int deleteAppVersionByIds(Long[] ids)
{
return appVersionMapper.deleteAppVersionByIds(ids);
}
/**
* 删除应用版本信息信息
*
* @param id 应用版本信息主键
* @return 结果
*/
@Override
public int deleteAppVersionById(Long id)
{
return appVersionMapper.deleteAppVersionById(id);
}
}

View File

@ -6,6 +6,7 @@ import javax.servlet.http.HttpServletResponse;
import com.zhyc.common.utils.SecurityUtils;
import com.zhyc.common.utils.StringUtils;
import com.zhyc.module.frozen.mapper.DdFeMapper;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
@ -26,18 +27,18 @@ import com.zhyc.common.core.page.TableDataInfo;
*/
@RestController
@RequestMapping("/frozen/embryo")
public class DdFeController extends BaseController
{
public class DdFeController extends BaseController {
@Autowired
private IDdFeService ddFeService;
@Autowired
private DdFeMapper ddFeMapper;
/**
* 查询冻胚库存列表
*/
@PreAuthorize("@ss.hasPermi('frozen:embryo:list')")
@GetMapping("/list")
public TableDataInfo list(DdFe ddFe)
{
public TableDataInfo list(DdFe ddFe) {
startPage();
List<DdFe> list = ddFeService.selectDdFeList(ddFe);
return getDataTable(list);
@ -49,8 +50,7 @@ public class DdFeController extends BaseController
@PreAuthorize("@ss.hasPermi('frozen:embryo:export')")
@Log(title = "冻胚库存", businessType = BusinessType.EXPORT)
@PostMapping("/export")
public void export(HttpServletResponse response, DdFe ddFe)
{
public void export(HttpServletResponse response, DdFe ddFe) {
List<DdFe> list = ddFeService.selectDdFeList(ddFe);
ExcelUtil<DdFe> util = new ExcelUtil<DdFe>(DdFe.class);
util.exportExcel(response, list, "冻胚库存数据");
@ -61,8 +61,7 @@ public class DdFeController extends BaseController
*/
@PreAuthorize("@ss.hasPermi('frozen:embryo:query')")
@GetMapping(value = "/{id}")
public AjaxResult getInfo(@PathVariable("id") Long id)
{
public AjaxResult getInfo(@PathVariable("id") Long id) {
return success(ddFeService.selectDdFeById(id));
}
@ -72,8 +71,7 @@ public class DdFeController extends BaseController
@PreAuthorize("@ss.hasPermi('frozen:embryo:add')")
@Log(title = "冻胚库存", businessType = BusinessType.INSERT)
@PostMapping
public AjaxResult add(@RequestBody DdFe ddFe)
{
public AjaxResult add(@RequestBody DdFe ddFe) {
ddFe.setCreateBy(SecurityUtils.getUsername());
return toAjax(ddFeService.insertDdFe(ddFe));
}
@ -84,8 +82,7 @@ public class DdFeController extends BaseController
@PreAuthorize("@ss.hasPermi('frozen:embryo:edit')")
@Log(title = "冻胚库存", businessType = BusinessType.UPDATE)
@PutMapping
public AjaxResult edit(@RequestBody DdFe ddFe)
{
public AjaxResult edit(@RequestBody DdFe ddFe) {
return toAjax(ddFeService.updateDdFe(ddFe));
}
@ -94,9 +91,8 @@ public class DdFeController extends BaseController
*/
@PreAuthorize("@ss.hasPermi('frozen:embryo:remove')")
@Log(title = "冻胚库存", businessType = BusinessType.DELETE)
@DeleteMapping("/{ids}")
public AjaxResult remove(@PathVariable Long[] ids)
{
@DeleteMapping("/{ids}")
public AjaxResult remove(@PathVariable Long[] ids) {
return toAjax(ddFeService.deleteDdFeByIds(ids));
}
@ -126,13 +122,26 @@ public class DdFeController extends BaseController
Integer qty;
switch (grade) {
case "A": qty = (Integer) flush.getOrDefault("gradeA", 0); break;
case "B": qty = (Integer) flush.getOrDefault("gradeB", 0); break;
case "C": qty = (Integer) flush.getOrDefault("gradeC", 0); break;
case "D": qty = (Integer) flush.getOrDefault("gradeD", 0); break;
case "囊胚": qty = (Integer) flush.getOrDefault("cell24", 0); break;
case "桑椹胚": qty = (Integer) flush.getOrDefault("cell8", 0); break;
default: qty = 0;
case "A":
qty = (Integer) flush.getOrDefault("gradeA", 0);
break;
case "B":
qty = (Integer) flush.getOrDefault("gradeB", 0);
break;
case "C":
qty = (Integer) flush.getOrDefault("gradeC", 0);
break;
case "D":
qty = (Integer) flush.getOrDefault("gradeD", 0);
break;
case "囊胚":
qty = (Integer) flush.getOrDefault("cell24", 0);
break;
case "桑椹胚":
qty = (Integer) flush.getOrDefault("cell8", 0);
break;
default:
qty = 0;
}
return success(qty);
}
@ -153,4 +162,10 @@ public class DdFeController extends BaseController
});
return success();
}
// 唯一性校验
@GetMapping("/checkCode")
public AjaxResult exist(@RequestParam String code) {
return success(ddFeMapper.existsByCode(code) > 0);
}
}

View File

@ -72,4 +72,6 @@ public interface DdFeMapper
* 废弃更新只改状态出库日期废弃原因更新人
*/
int updateDiscard(DdFe dto);
// 唯一性校验
int existsByCode(@Param("code") String code);
}

View File

@ -4,6 +4,7 @@ import java.util.HashMap;
import java.util.List;
import java.util.Map;
import com.zhyc.common.exception.ServiceException;
import com.zhyc.common.utils.DateUtils;
import com.zhyc.common.utils.StringUtils;
import com.zhyc.module.produce.breed.domain.ScEmbryoFlush;
@ -65,6 +66,9 @@ public class DdFeServiceImpl implements IDdFeService
@Override
public int insertDdFe(DdFe ddFe)
{
if (ddFeMapper.existsByCode(ddFe.getCode()) > 0) {
throw new ServiceException("胚胎编号已存在,请勿重复录入");
}
ddFe.setCreateTime(DateUtils.getNowDate());
return ddFeMapper.insertDdFe(ddFe);
}

View File

@ -0,0 +1,105 @@
package com.zhyc.module.work.controller;
import java.util.List;
import javax.servlet.http.HttpServletResponse;
import com.zhyc.module.work.domain.WorkOrder;
import com.zhyc.module.work.service.IWorkOrderService;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import com.zhyc.common.annotation.Log;
import com.zhyc.common.core.controller.BaseController;
import com.zhyc.common.core.domain.AjaxResult;
import com.zhyc.common.enums.BusinessType;
import com.zhyc.common.utils.poi.ExcelUtil;
import com.zhyc.common.core.page.TableDataInfo;
/**
* 派工单Controller
*
* @author piaobo
* @date 2025-12-07
*/
@RestController
@RequestMapping("/work/work")
public class WorkOrderController extends BaseController
{
@Autowired
private IWorkOrderService workOrderService;
/**
* 查询派工单列表
*/
@PreAuthorize("@ss.hasPermi('work:work:list')")
@GetMapping("/list")
public TableDataInfo list(WorkOrder workOrder)
{
startPage();
List<WorkOrder> list = workOrderService.selectWorkOrderList(workOrder);
return getDataTable(list);
}
/**
* 导出派工单列表
*/
@PreAuthorize("@ss.hasPermi('work:work:export')")
@Log(title = "派工单", businessType = BusinessType.EXPORT)
@PostMapping("/export")
public void export(HttpServletResponse response, WorkOrder workOrder)
{
List<WorkOrder> list = workOrderService.selectWorkOrderList(workOrder);
ExcelUtil<WorkOrder> util = new ExcelUtil<WorkOrder>(WorkOrder.class);
util.exportExcel(response, list, "派工单数据");
}
/**
* 获取派工单详细信息
*/
@PreAuthorize("@ss.hasPermi('work:work:query')")
@GetMapping(value = "/{id}")
public AjaxResult getInfo(@PathVariable("id") Long id)
{
return success(workOrderService.selectWorkOrderById(id));
}
/**
* 新增派工单
*/
@PreAuthorize("@ss.hasPermi('work:work:add')")
@Log(title = "派工单", businessType = BusinessType.INSERT)
@PostMapping
public AjaxResult add(@RequestBody WorkOrder workOrder)
{
return toAjax(workOrderService.insertWorkOrder(workOrder));
}
/**
* 修改派工单
*/
@PreAuthorize("@ss.hasPermi('work:work:edit')")
@Log(title = "派工单", businessType = BusinessType.UPDATE)
@PutMapping
public AjaxResult edit(@RequestBody WorkOrder workOrder)
{
return toAjax(workOrderService.updateWorkOrder(workOrder));
}
/**
* 删除派工单
*/
@PreAuthorize("@ss.hasPermi('work:work:remove')")
@Log(title = "派工单", businessType = BusinessType.DELETE)
@DeleteMapping("/{ids}")
public AjaxResult remove(@PathVariable Long[] ids)
{
return toAjax(workOrderService.deleteWorkOrderByIds(ids));
}
}

View File

@ -0,0 +1,13 @@
package com.zhyc.module.work.domain;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
@Data
@AllArgsConstructor
@NoArgsConstructor
class LocationJson {
private Long id;
private String sheepfoldName;
}

View File

@ -0,0 +1,13 @@
package com.zhyc.module.work.domain;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
@Data
@NoArgsConstructor
@AllArgsConstructor
class SheepJson {
private Long id;
private String sheepNo;
}

View File

@ -0,0 +1,137 @@
package com.zhyc.module.work.domain;
import java.util.Date;
import java.util.HashMap;
import java.util.List;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.extension.handlers.JacksonTypeHandler;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.zhyc.common.annotation.Excel;
import com.zhyc.common.core.domain.BaseEntity;
/**
* 派工单对象 work_order
*
* @author piaobo
* @date 2025-12-07
*/
@Data
@NoArgsConstructor
@AllArgsConstructor
public class WorkOrder extends BaseEntity
{
private static final long serialVersionUID = 1L;
/** 派工单唯一主键,自增整数 */
private Long id;
/** 业务单号 */
@Excel(name = "业务单号")
private String orderNo;
/** 关联生产/免疫计划ID无计划可空 */
@Excel(name = "关联生产/免疫计划ID无计划可空")
private Long planId;
/** 业务类型1免疫 2保健 3转群 4称重 5配种 6干奶 7淘汰 8消毒 9饲喂必填 */
@Excel(name = "业务类型1免疫 2保健 3转群 4称重 5配种 6干奶 7淘汰 8消毒 9饲喂必填")
private Integer bizType;
/** 简短任务标 */
@Excel(name = "简短任务标")
private String title;
/** 任务详细要求及注意事项,可空 */
@Excel(name = "任务详细要求及注意事项,可空")
private String content;
/** 执行部门/班组,下拉选择,必填 */
@Excel(name = "执行部门/班组,下拉选择,必填")
private String department;
/** 执行人ID多人用英文逗号必填 */
@Excel(name = "执行人ID")
private String executorIds;
// 执行人
@Excel(name = "执行人")
private String executor;
/** 计划执行日期,必填 */
@JsonFormat(pattern = "yyyy-MM-dd")
@Excel(name = "计划执行日期,必填", width = 30, dateFormat = "yyyy-MM-dd")
private Date executeDate;
/** 计划执行时段,可空 */
@Excel(name = "计划执行时段,可空")
private String executeTime;
/** 涉及羊只范围 */
@Excel(name = "涉及羊只范围")
@TableField(typeHandler = JacksonTypeHandler.class)
private List<SheepJson> sheepScope;
/** 执行地点/栏舍 */
@Excel(name = "执行地点/栏舍")
@TableField(typeHandler = JacksonTypeHandler.class)
private List<LocationJson> location;
/** 需领物料 */
@Excel(name = "需领物料")
private String materialList;
/** 需用设备 */
@Excel(name = "需用设备")
private String toolList;
/** 状态0待派工 1已派工 2执行中 3已完成 4已取消 5异常必填 */
@Excel(name = "状态0待派工 1已派工 2执行中 3已完成 4已取消 5异常必填")
private Integer status;
/** 优先级1普通 2重要 3紧急必填 */
@Excel(name = "优先级1普通 2重要 3紧急必填")
private Integer priority;
/** 派工人用户 */
@Excel(name = "派工人用户")
private Long issuerId;
// 派工人
@Excel(name = "派工人")
private String issuer;
/** 派工时间 */
@JsonFormat(pattern = "yyyy-MM-dd")
@Excel(name = "派工时间", width = 30, dateFormat = "yyyy-MM-dd")
private Date issueTime;
/** 接工人用户 */
@Excel(name = "接工人用户")
private Long receiverId;
// 接工人
@Excel(name = "接工人")
private String receiver;
/** 接工时间 */
@JsonFormat(pattern = "yyyy-MM-dd")
@Excel(name = "接工时间", width = 30, dateFormat = "yyyy-MM-dd")
private Date receiveTime;
/** 实际完成时间,可空 */
@JsonFormat(pattern = "yyyy-MM-dd")
@Excel(name = "实际完成时间,可空", width = 30, dateFormat = "yyyy-MM-dd")
private Date finishTime;
/** 执行结果填报,可空 */
@Excel(name = "执行结果填报,可空")
private String result;
/** 逻辑删除0正常 1已删除必填 */
private Integer deleted;
}

View File

@ -0,0 +1,63 @@
package com.zhyc.module.work.mapper;
import java.util.List;
import com.zhyc.module.work.domain.WorkOrder;
import org.apache.ibatis.annotations.Mapper;
/**
* 派工单Mapper接口
*
* @author piaobo
* @date 2025-12-07
*/
@Mapper
public interface WorkOrderMapper
{
/**
* 查询派工单
*
* @param id 派工单主键
* @return 派工单
*/
public WorkOrder selectWorkOrderById(Long id);
/**
* 查询派工单列表
*
* @param workOrder 派工单
* @return 派工单集合
*/
public List<WorkOrder> selectWorkOrderList(WorkOrder workOrder);
/**
* 新增派工单
*
* @param workOrder 派工单
* @return 结果
*/
public int insertWorkOrder(WorkOrder workOrder);
/**
* 修改派工单
*
* @param workOrder 派工单
* @return 结果
*/
public int updateWorkOrder(WorkOrder workOrder);
/**
* 删除派工单
*
* @param id 派工单主键
* @return 结果
*/
public int deleteWorkOrderById(Long id);
/**
* 批量删除派工单
*
* @param ids 需要删除的数据主键集合
* @return 结果
*/
public int deleteWorkOrderByIds(Long[] ids);
}

View File

@ -0,0 +1,61 @@
package com.zhyc.module.work.service;
import java.util.List;
import com.zhyc.module.work.domain.WorkOrder;
/**
* 派工单Service接口
*
* @author piaobo
* @date 2025-12-07
*/
public interface IWorkOrderService
{
/**
* 查询派工单
*
* @param id 派工单主键
* @return 派工单
*/
public WorkOrder selectWorkOrderById(Long id);
/**
* 查询派工单列表
*
* @param workOrder 派工单
* @return 派工单集合
*/
public List<WorkOrder> selectWorkOrderList(WorkOrder workOrder);
/**
* 新增派工单
*
* @param workOrder 派工单
* @return 结果
*/
public int insertWorkOrder(WorkOrder workOrder);
/**
* 修改派工单
*
* @param workOrder 派工单
* @return 结果
*/
public int updateWorkOrder(WorkOrder workOrder);
/**
* 批量删除派工单
*
* @param ids 需要删除的派工单主键集合
* @return 结果
*/
public int deleteWorkOrderByIds(Long[] ids);
/**
* 删除派工单信息
*
* @param id 派工单主键
* @return 结果
*/
public int deleteWorkOrderById(Long id);
}

View File

@ -0,0 +1,108 @@
package com.zhyc.module.work.service.impl;
import java.util.List;
import com.zhyc.common.utils.DateUtils;
import com.zhyc.common.utils.SecurityUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.zhyc.module.work.mapper.WorkOrderMapper;
import com.zhyc.module.work.domain.WorkOrder;
import com.zhyc.module.work.service.IWorkOrderService;
/**
* 派工单Service业务层处理
*
* @author piaobo
* @date 2025-12-07
*/
@Service
public class WorkOrderServiceImpl implements IWorkOrderService
{
@Autowired
private WorkOrderMapper workOrderMapper;
/**
* 查询派工单
*
* @param id 派工单主键
* @return 派工单
*/
@Override
public WorkOrder selectWorkOrderById(Long id)
{
return workOrderMapper.selectWorkOrderById(id);
}
/**
* 查询派工单列表
*
* @param workOrder 派工单
* @return 派工单
*/
@Override
public List<WorkOrder> selectWorkOrderList(WorkOrder workOrder)
{
String username = SecurityUtils.getLoginUser().getUser().getNickName();
return workOrderMapper.selectWorkOrderList(workOrder);
}
/**
* 新增派工单
*
* @param workOrder 派工单
* @return 结果
*/
@Override
public int insertWorkOrder(WorkOrder workOrder)
{
String username = SecurityUtils.getLoginUser().getUser().getNickName();
Long usrId = SecurityUtils.getLoginUser().getUserId();
workOrder.setIssuer(username);
workOrder.setIssuerId(usrId);
workOrder.setCreateTime(DateUtils.getNowDate());
return workOrderMapper.insertWorkOrder(workOrder);
}
/**
* 修改派工单
*
* @param workOrder 派工单
* @return 结果
*/
@Override
public int updateWorkOrder(WorkOrder workOrder)
{
if (workOrder.getStatus() != null && workOrder.getStatus()>3){
String username = SecurityUtils.getLoginUser().getUser().getNickName();
Long usrId = SecurityUtils.getLoginUser().getUserId();
workOrder.setIssuer(username);
workOrder.setIssuerId(usrId);
}
workOrder.setUpdateTime(DateUtils.getNowDate());
return workOrderMapper.updateWorkOrder(workOrder);
}
/**
* 批量删除派工单
*
* @param ids 需要删除的派工单主键
* @return 结果
*/
@Override
public int deleteWorkOrderByIds(Long[] ids)
{
return workOrderMapper.deleteWorkOrderByIds(ids);
}
/**
* 删除派工单信息
*
* @param id 派工单主键
* @return 结果
*/
@Override
public int deleteWorkOrderById(Long id)
{
return workOrderMapper.deleteWorkOrderById(id);
}
}

View File

@ -0,0 +1,125 @@
<?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.zhyc.module.app.mapper.AppVersionMapper">
<resultMap type="AppVersion" id="AppVersionResult">
<result property="id" column="id" />
<result property="platform" column="platform" />
<result property="versionCode" column="version_code" />
<result property="versionName" column="version_name" />
<result property="isForceUpdate" column="is_force_update" />
<result property="isLatest" column="is_latest" />
<result property="minVersionCode" column="min_version_code" />
<result property="downloadUrl" column="download_url" />
<result property="updateTitle" column="update_title" />
<result property="updateContent" column="update_content" />
<result property="fileSize" column="file_size" />
<result property="md5Hash" column="md5_hash" />
<result property="publishTime" column="publish_time" />
<result property="createTime" column="create_time" />
<result property="updateTime" column="update_time" />
<result property="isDeleted" column="is_deleted" />
</resultMap>
<sql id="selectAppVersionVo">
select id, platform, version_code, version_name, is_force_update, is_latest, min_version_code, download_url, update_title, update_content, file_size, md5_hash, publish_time, create_time, update_time, is_deleted from app_version
</sql>
<select id="selectAppVersionList" parameterType="AppVersion" resultMap="AppVersionResult">
<include refid="selectAppVersionVo"/>
<where>
<if test="id != null "> and id = #{id}</if>
<if test="platform != null and platform != ''"> and platform = #{platform}</if>
<if test="versionCode != null "> and version_code = #{versionCode}</if>
<if test="versionName != null and versionName != ''"> and version_name like concat('%', #{versionName}, '%')</if>
<if test="isForceUpdate != null "> and is_force_update = #{isForceUpdate}</if>
<if test="isLatest != null "> and is_latest = #{isLatest}</if>
<if test="minVersionCode != null "> and min_version_code = #{minVersionCode}</if>
<if test="downloadUrl != null and downloadUrl != ''"> and download_url = #{downloadUrl}</if>
<if test="updateTitle != null and updateTitle != ''"> and update_title = #{updateTitle}</if>
<if test="updateContent != null and updateContent != ''"> and update_content = #{updateContent}</if>
<if test="fileSize != null "> and file_size = #{fileSize}</if>
<if test="params.beginMd5Hash != null and params.beginMd5Hash != '' and params.endMd5Hash != null and params.endMd5Hash != ''"> and md5_hash between #{params.beginMd5Hash} and #{params.endMd5Hash}</if>
<if test="params.beginPublishTime != null and params.beginPublishTime != '' and params.endPublishTime != null and params.endPublishTime != ''"> and publish_time between #{params.beginPublishTime} and #{params.endPublishTime}</if>
<if test="isDeleted != null "> and is_deleted = #{isDeleted}</if>
</where>
</select>
<select id="selectAppVersionById" parameterType="Long" resultMap="AppVersionResult">
<include refid="selectAppVersionVo"/>
where id = #{id}
</select>
<insert id="insertAppVersion" parameterType="AppVersion" useGeneratedKeys="true" keyProperty="id">
insert into app_version
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="platform != null">platform,</if>
<if test="versionCode != null">version_code,</if>
<if test="versionName != null">version_name,</if>
<if test="isForceUpdate != null">is_force_update,</if>
<if test="isLatest != null">is_latest,</if>
<if test="minVersionCode != null">min_version_code,</if>
<if test="downloadUrl != null">download_url,</if>
<if test="updateTitle != null">update_title,</if>
<if test="updateContent != null">update_content,</if>
<if test="fileSize != null">file_size,</if>
<if test="md5Hash != null">md5_hash,</if>
<if test="publishTime != null">publish_time,</if>
<if test="createTime != null">create_time,</if>
<if test="updateTime != null">update_time,</if>
<if test="isDeleted != null">is_deleted,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="platform != null">#{platform},</if>
<if test="versionCode != null">#{versionCode},</if>
<if test="versionName != null">#{versionName},</if>
<if test="isForceUpdate != null">#{isForceUpdate},</if>
<if test="isLatest != null">#{isLatest},</if>
<if test="minVersionCode != null">#{minVersionCode},</if>
<if test="downloadUrl != null">#{downloadUrl},</if>
<if test="updateTitle != null">#{updateTitle},</if>
<if test="updateContent != null">#{updateContent},</if>
<if test="fileSize != null">#{fileSize},</if>
<if test="md5Hash != null">#{md5Hash},</if>
<if test="publishTime != null">#{publishTime},</if>
<if test="createTime != null">#{createTime},</if>
<if test="updateTime != null">#{updateTime},</if>
<if test="isDeleted != null">#{isDeleted},</if>
</trim>
</insert>
<update id="updateAppVersion" parameterType="AppVersion">
update app_version
<trim prefix="SET" suffixOverrides=",">
<if test="platform != null">platform = #{platform},</if>
<if test="versionCode != null">version_code = #{versionCode},</if>
<if test="versionName != null">version_name = #{versionName},</if>
<if test="isForceUpdate != null">is_force_update = #{isForceUpdate},</if>
<if test="isLatest != null">is_latest = #{isLatest},</if>
<if test="minVersionCode != null">min_version_code = #{minVersionCode},</if>
<if test="downloadUrl != null">download_url = #{downloadUrl},</if>
<if test="updateTitle != null">update_title = #{updateTitle},</if>
<if test="updateContent != null">update_content = #{updateContent},</if>
<if test="fileSize != null">file_size = #{fileSize},</if>
<if test="md5Hash != null">md5_hash = #{md5Hash},</if>
<if test="publishTime != null">publish_time = #{publishTime},</if>
<if test="createTime != null">create_time = #{createTime},</if>
<if test="updateTime != null">update_time = #{updateTime},</if>
<if test="isDeleted != null">is_deleted = #{isDeleted},</if>
</trim>
where id = #{id}
</update>
<delete id="deleteAppVersionById" parameterType="Long">
delete from app_version where id = #{id}
</delete>
<delete id="deleteAppVersionByIds" parameterType="String">
delete from app_version where id in
<foreach item="id" collection="array" open="(" separator="," close=")">
#{id}
</foreach>
</delete>
</mapper>

View File

@ -59,8 +59,10 @@
<if test="code != null and code != ''">and code like concat('%', #{code}, '%')</if>
<if test="grade != null and grade != ''">and grade = #{grade}</if>
<if test="status != null and status != ''">and status = #{status}</if>
<if test="tech != null and tech != ''">and tech = #{tech}</if>
<if test="outDate != null "> and out_date = #{outDate}</if>
<if test="tech != null and tech != ''">
AND tech LIKE CONCAT('%', #{tech}, '%')
</if>
<if test="outDate != null ">and out_date = #{outDate}</if>
<if test="params.beginFreezeDate != null and params.endFreezeDate != null">
and freeze_date between #{params.beginFreezeDate} and #{params.endFreezeDate}
</if>
@ -164,23 +166,26 @@
</delete>
<select id="selectFlushByEwe" resultType="map">
SELECT grade_a gradeA,
grade_b gradeB,
grade_c gradeC,
grade_d gradeD,
cell_2_4 cell24,
cell_8 cell8,
donor_male_no ramId
SELECT grade_a gradeA,
grade_b gradeB,
grade_c gradeC,
grade_d gradeD,
cell_2_4 cell24,
cell_8 cell8,
donor_male_no ramId
FROM sc_embryo_flush
WHERE donor_female_no = #{eweNo}
ORDER BY flush_time DESC
LIMIT 1
ORDER BY flush_time DESC LIMIT 1
</select>
<update id="updateDiscard" parameterType="DdFe">
UPDATE dd_fe
SET status = #{status},
SET status = #{status},
discard_txt = #{discardTxt}
WHERE id = #{id}
</update>
<select id="existsByCode" resultType="int">
SELECT COUNT(*) FROM dd_fe WHERE code = #{code}
</select>
</mapper>

View File

@ -0,0 +1,184 @@
<?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.zhyc.module.work.mapper.WorkOrderMapper">
<resultMap type="WorkOrder" id="WorkOrderResult">
<result property="id" column="id" />
<result property="orderNo" column="order_no" />
<result property="planId" column="plan_id" />
<result property="bizType" column="biz_type" />
<result property="title" column="title" />
<result property="content" column="content" />
<result property="department" column="department" />
<result property="executorIds" column="executor_ids" />
<result property="executor" column="executor" />
<result property="executeDate" column="execute_date" />
<result property="executeTime" column="execute_time" />
<result property="sheepScope" column="sheep_scope" typeHandler="com.baomidou.mybatisplus.extension.handlers.JacksonTypeHandler" />
<result property="location" column="location" typeHandler="com.baomidou.mybatisplus.extension.handlers.JacksonTypeHandler" />
<result property="materialList" column="material_list" />
<result property="toolList" column="tool_list" />
<result property="status" column="status" />
<result property="priority" column="priority" />
<result property="issuerId" column="issuer_id" />
<result property="issuer" column="issuer" />
<result property="issueTime" column="issue_time" />
<result property="receiverId" column="receiver_id" />
<result property="receiver" column="receiver" />
<result property="receiveTime" column="receive_time" />
<result property="finishTime" column="finish_time" />
<result property="result" column="result" />
<result property="remark" column="remark" />
<result property="createTime" column="create_time" />
<result property="updateTime" column="update_time" />
<result property="deleted" column="deleted" />
</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
</sql>
<select id="selectWorkOrderList" parameterType="WorkOrder" resultMap="WorkOrderResult">
<include refid="selectWorkOrderVo"/>
<where>
<if test="orderNo != null and orderNo != ''"> and order_no like concat('%', #{orderNo}, '%')</if>
<if test="planId != null "> and plan_id = #{planId}</if>
<if test="bizType != null "> and biz_type = #{bizType}</if>
<if test="title != null and title != ''"> and title like coucat('%', #{title},'%')</if>
<if test="content != null and content != ''"> and content = #{content}</if>
<if test="department != null and department != ''"> and department = #{department}</if>
<if test="executor != null and executor != ''"> and executor like coucat('%',#{executor},'%') </if>
<if test="params.beginPlanDate != null and params.beginPlanDate != '' and params.endPlanDat != null and params.endPlanDate != ''"> and execute_date between #{params.beginPlanDate} and #{params.endPlanDate}</if>
<if test="executeTime != null and executeTime != ''"> and execute_time = #{executeTime}</if>
<if test="sheepScope != null and sheepScope != ''"> and sheep_scope = #{sheepScope}</if>
<if test="location != null and location != ''"> and location = #{location}</if>
<if test="materialList != null and materialList != ''"> and material_list = #{materialList}</if>
<if test="toolList != null and toolList != ''"> and tool_list = #{toolList}</if>
<if test="status != null "> and status = #{status}</if>
<if test="priority != null "> and priority = #{priority}</if>
<if test="issuer != null "> and issuer like concat('%',#{issuer},'%') </if>
<if test="issueTime != null "> and issue_time = #{issueTime}</if>
<if test="receiverId != null "> and receiver_id = #{receiverId}</if>
<if test="receiveTime != null "> and receive_time = #{receiveTime}</if>
<if test="params.beginDatetime != null and params.beginDatetime != '' and params.endFinishDate != null and params.endFinishDate != ''"> and finish_time between #{params.beginFinishDate} and #{params.endFinishDate}</if>
<if test="result != null and result != ''"> and result = #{result}</if>
</where>
</select>
<select id="selectWorkOrderById" parameterType="Long" resultMap="WorkOrderResult">
<include refid="selectWorkOrderVo"/>
where id = #{id}
</select>
<insert id="insertWorkOrder" parameterType="WorkOrder" useGeneratedKeys="true" keyProperty="id">
insert into work_order
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="orderNo != null and orderNo != ''">order_no,</if>
<if test="planId != null">plan_id,</if>
<if test="bizType != null">biz_type,</if>
<if test="title != null and title != ''">title,</if>
<if test="content != null">content,</if>
<if test="department != null and department != ''">department,</if>
<if test="executorIds != null and executorIds != ''">executor_ids,</if>
<if test="executor != null and executor != ''">executor,</if>
<if test="executeDate != null">execute_date,</if>
<if test="executeTime != null">execute_time,</if>
<if test="sheepScope != null and sheepScope != ''">sheep_scope,</if>
<if test="location != null">location,</if>
<if test="materialList != null">material_list,</if>
<if test="toolList != null">tool_list,</if>
<if test="status != null">status,</if>
<if test="priority != null">priority,</if>
<if test="issuerId != null">issuer_id,</if>
<if test="issuer != null">issuer,</if>
<if test="issueTime != null">issue_time,</if>
<if test="receiverId != null">receiver_id,</if>
<if test="receiver != null">receiver,</if>
<if test="receiveTime != null">receive_time,</if>
<if test="finishTime != null">finish_time,</if>
<if test="result != null">`result`,</if>
<if test="remark != null">remark,</if>
<if test="createTime != null">create_time,</if>
<if test="updateTime != null">update_time,</if>
<if test="deleted != null">deleted,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="orderNo != null and orderNo != ''">#{orderNo},</if>
<if test="planId != null">#{planId},</if>
<if test="bizType != null">#{bizType},</if>
<if test="title != null and title != ''">#{title},</if>
<if test="content != null">#{content},</if>
<if test="department != null and department != ''">#{department},</if>
<if test="executorIds != null and executorIds != ''">#{executorIds},</if>
<if test="executor != null and executor != ''">#{executor},</if>
<if test="executeDate != null">#{executeDate},</if>
<if test="executeTime != null">#{executeTime},</if>
<if test="sheepScope != null and sheepScope != ''">#{sheepScope,typeHandler=com.baomidou.mybatisplus.extension.handlers.JacksonTypeHandler},</if>
<if test="location != null">#{location,typeHandler=com.baomidou.mybatisplus.extension.handlers.JacksonTypeHandler},</if>
<if test="materialList != null">#{materialList},</if>
<if test="toolList != null">#{toolList},</if>
<if test="status != null">#{status},</if>
<if test="priority != null">#{priority},</if>
<if test="issuerId != null">#{issuerId},</if>
<if test="issuer != null">#{issuer},</if>
<if test="issueTime != null">#{issueTime},</if>
<if test="receiverId != null">#{receiverId},</if>
<if test="receiver != null">#{receiver},</if>
<if test="receiveTime != null">#{receiveTime},</if>
<if test="finishTime != null">#{finishTime},</if>
<if test="result != null">#{result},</if>
<if test="remark != null">#{remark},</if>
<if test="createTime != null">#{createTime},</if>
<if test="updateTime != null">#{updateTime},</if>
<if test="deleted != null">#{deleted},</if>
</trim>
</insert>
<update id="updateWorkOrder" parameterType="WorkOrder">
update work_order
<trim prefix="SET" suffixOverrides=",">
<if test="orderNo != null and orderNo != ''">order_no = #{orderNo},</if>
<if test="planId != null">plan_id = #{planId},</if>
<if test="bizType != null">biz_type = #{bizType},</if>
<if test="title != null and title != ''">title = #{title},</if>
<if test="content != null">content = #{content},</if>
<if test="department != null and department != ''">department = #{department},</if>
<if test="executorIds != null and executorIds != ''">executor_ids = #{executorIds},</if>
<if test="executor != null and executor != ''">executor = #{executor},</if>
<if test="executeDate != null">execute_date = #{executeDate},</if>
<if test="executeTime != null">execute_time = #{executeTime},</if>
<if test="sheepScope != null and sheepScope != ''">sheep_scope = #{sheepScope,typeHandler=com.baomidou.mybatisplus.extension.handlers.JacksonTypeHandler},</if>
<if test="location != null">location = #{location,typeHandler=com.baomidou.mybatisplus.extension.handlers.JacksonTypeHandler},</if>
<if test="materialList != null">material_list = #{materialList},</if>
<if test="toolList != null">tool_list = #{toolList},</if>
<if test="status != null">status = #{status},</if>
<if test="priority != null">priority = #{priority},</if>
<if test="issuerId != null">issuer_id = #{issuerId},</if>
<if test="issuer != null">issuer = #{issuer},</if>
<if test="issueTime != null">issue_time = #{issueTime},</if>
<if test="receiverId != null">receiver_id = #{receiverId},</if>
<if test="receiver != null">receiver = #{receiver},</if>
<if test="receiveTime != null">receive_time = #{receiveTime},</if>
<if test="finishTime != null">finish_time = #{finishTime},</if>
<if test="result != null">`result` = #{result},</if>
<if test="remark != null">remark = #{remark},</if>
<if test="createTime != null">create_time = #{createTime},</if>
<if test="updateTime != null">update_time = #{updateTime},</if>
<if test="deleted != null">deleted = #{deleted},</if>
</trim>
where id = #{id}
</update>
<delete id="deleteWorkOrderById" parameterType="Long">
delete from work_order where id = #{id}
</delete>
<delete id="deleteWorkOrderByIds" parameterType="String">
delete from work_order where id in
<foreach item="id" collection="array" open="(" separator="," close=")">
#{id}
</foreach>
</delete>
</mapper>