| @ -0,0 +1,134 @@ | |||
| package com.hxhq.business.domain; | |||
| import com.baomidou.mybatisplus.annotation.TableName; | |||
| import com.hxhq.common.core.domain.MpBaseEntity; | |||
| /** | |||
| * 存储位置-稽查轨迹对象 t_storage_location_jcgj | |||
| * | |||
| * @author HanLong | |||
| * @date 2025-12-22 | |||
| */ | |||
| @TableName("t_storage_location_jcgj") | |||
| public class StorageLocationJcgj extends MpBaseEntity | |||
| { | |||
| private static final long serialVersionUID = 1L; | |||
| /** 存储位置id */ | |||
| private Long storageLocationId; | |||
| /** 稽查轨迹类型 */ | |||
| private Integer jcgjlx; | |||
| /** 稽查名称 */ | |||
| private String jcmc; | |||
| private String jcmcEn; | |||
| /** 稽查名称颜色:1:蓝色;3:红色;5:绿色;7:橙色 */ | |||
| private Integer jcmcys; | |||
| /** 稽查内容 */ | |||
| private String jcnr; | |||
| private String jcnrEn; | |||
| /** 签名人id */ | |||
| private Long qmrId; | |||
| /** 签名人名称 */ | |||
| private String qmrMc; | |||
| private String qmrMcEn; | |||
| public Long getStorageLocationId() { | |||
| return storageLocationId; | |||
| } | |||
| public void setStorageLocationId(Long storageLocationId) { | |||
| this.storageLocationId = storageLocationId; | |||
| } | |||
| public void setJcgjlx(Integer jcgjlx) | |||
| { | |||
| this.jcgjlx = jcgjlx; | |||
| } | |||
| public Integer getJcgjlx() | |||
| { | |||
| return jcgjlx; | |||
| } | |||
| public void setJcmc(String jcmc) | |||
| { | |||
| this.jcmc = jcmc; | |||
| } | |||
| public String getJcmc() | |||
| { | |||
| return jcmc; | |||
| } | |||
| public void setJcmcys(Integer jcmcys) | |||
| { | |||
| this.jcmcys = jcmcys; | |||
| } | |||
| public Integer getJcmcys() | |||
| { | |||
| return jcmcys; | |||
| } | |||
| public void setJcnr(String jcnr) | |||
| { | |||
| this.jcnr = jcnr; | |||
| } | |||
| public String getJcnr() | |||
| { | |||
| return jcnr; | |||
| } | |||
| public void setQmrId(Long qmrId) | |||
| { | |||
| this.qmrId = qmrId; | |||
| } | |||
| public Long getQmrId() | |||
| { | |||
| return qmrId; | |||
| } | |||
| public String getQmrMc() { | |||
| return qmrMc; | |||
| } | |||
| public void setQmrMc(String qmrMc) { | |||
| this.qmrMc = qmrMc; | |||
| } | |||
| public String getJcmcEn() { | |||
| return jcmcEn; | |||
| } | |||
| public void setJcmcEn(String jcmcEn) { | |||
| this.jcmcEn = jcmcEn; | |||
| } | |||
| public String getJcnrEn() { | |||
| return jcnrEn; | |||
| } | |||
| public void setJcnrEn(String jcnrEn) { | |||
| this.jcnrEn = jcnrEn; | |||
| } | |||
| public String getQmrMcEn() { | |||
| return qmrMcEn; | |||
| } | |||
| public void setQmrMcEn(String qmrMcEn) { | |||
| this.qmrMcEn = qmrMcEn; | |||
| } | |||
| } | |||
| @ -0,0 +1,128 @@ | |||
| package com.hxhq.business.form.yq; | |||
| import com.hxhq.common.core.annotation.Compare; | |||
| public class StorageLocationForm { | |||
| private Long id; | |||
| /** 放置地点 */ | |||
| @Compare(name = "放置地点") | |||
| private String location; | |||
| /** 设备名称或编号 */ | |||
| @Compare(name = "设备名称或编号") | |||
| private String name; | |||
| /** 放置货架 */ | |||
| @Compare(name = "放置货架") | |||
| private String shelfPlacement; | |||
| /** 温层 */ | |||
| @Compare(name = "温层") | |||
| private String compartment; | |||
| /** 部门id */ | |||
| private Long deptId; | |||
| /** 状态 1-禁用 10-启用 */ | |||
| private Integer status; | |||
| @Compare(name = "所属部门") | |||
| private String deptName; | |||
| @Compare(name = "状态") | |||
| private String statusInfo; | |||
| private String qmrmm; | |||
| private Long qmrId; | |||
| public String getStatusInfo() { | |||
| return statusInfo; | |||
| } | |||
| public void setStatusInfo(String statusInfo) { | |||
| this.statusInfo = statusInfo; | |||
| } | |||
| public Long getQmrId() { | |||
| return qmrId; | |||
| } | |||
| public void setQmrId(Long qmrId) { | |||
| this.qmrId = qmrId; | |||
| } | |||
| public String getQmrmm() { | |||
| return qmrmm; | |||
| } | |||
| public void setQmrmm(String qmrmm) { | |||
| this.qmrmm = qmrmm; | |||
| } | |||
| public String getLocation() { | |||
| return location; | |||
| } | |||
| public void setLocation(String location) { | |||
| this.location = location; | |||
| } | |||
| public String getName() { | |||
| return name; | |||
| } | |||
| public void setName(String name) { | |||
| this.name = name; | |||
| } | |||
| public String getShelfPlacement() { | |||
| return shelfPlacement; | |||
| } | |||
| public void setShelfPlacement(String shelfPlacement) { | |||
| this.shelfPlacement = shelfPlacement; | |||
| } | |||
| public String getCompartment() { | |||
| return compartment; | |||
| } | |||
| public void setCompartment(String compartment) { | |||
| this.compartment = compartment; | |||
| } | |||
| public Long getDeptId() { | |||
| return deptId; | |||
| } | |||
| public void setDeptId(Long deptId) { | |||
| this.deptId = deptId; | |||
| } | |||
| public Integer getStatus() { | |||
| return status; | |||
| } | |||
| public void setStatus(Integer status) { | |||
| this.status = status; | |||
| } | |||
| public Long getId() { | |||
| return id; | |||
| } | |||
| public void setId(Long id) { | |||
| this.id = id; | |||
| } | |||
| public String getDeptName() { | |||
| return deptName; | |||
| } | |||
| public void setDeptName(String deptName) { | |||
| this.deptName = deptName; | |||
| } | |||
| } | |||
| @ -0,0 +1,16 @@ | |||
| package com.hxhq.business.mapper; | |||
| import com.baomidou.mybatisplus.core.mapper.BaseMapper; | |||
| import com.hxhq.business.domain.StorageLocationJcgj; | |||
| import com.hxhq.business.domain.YqJcgj; | |||
| /** | |||
| * 存储位置-稽查轨迹Mapper接口 | |||
| * | |||
| * @author HanLong | |||
| * @date 2025-12-22 | |||
| */ | |||
| public interface StorageLocationJcgjMapper extends BaseMapper<StorageLocationJcgj> | |||
| { | |||
| } | |||
| @ -0,0 +1,45 @@ | |||
| package com.hxhq.business.service; | |||
| import com.baomidou.mybatisplus.extension.service.IService; | |||
| import com.hxhq.business.domain.StorageLocation; | |||
| import com.hxhq.business.domain.StorageLocationJcgj; | |||
| import com.hxhq.business.domain.Yq; | |||
| import com.hxhq.business.domain.YqJcgj; | |||
| import java.util.List; | |||
| /** | |||
| * 存储位置-稽查轨迹Service接口 | |||
| * | |||
| * @author HanLong | |||
| * @date 2025-12-22 | |||
| */ | |||
| public interface IStorageLocationJcgjService extends IService<StorageLocationJcgj> | |||
| { | |||
| /** | |||
| * 查询存储位置-稽查轨迹列表 | |||
| * | |||
| * @param jcgj 稽查轨迹 | |||
| * @return 稽查轨迹集合 | |||
| */ | |||
| public List<StorageLocationJcgj> queryList(StorageLocationJcgj jcgj); | |||
| /** | |||
| * 新增稽查轨迹 | |||
| * @param storageLocation | |||
| * @param jcgjlx 稽查轨迹类型:1:流程;3:编辑 | |||
| * @param jcmc 稽查名称 | |||
| * @param jcmcEn 稽查名称-英文 | |||
| * @param jcmcys 稽查名称颜色:1:蓝色;3:红色;5:绿色;7:橙色 | |||
| * @param jcnr 稽查内容 | |||
| * @param jcnrEn 稽查内容-英文 | |||
| */ | |||
| public void saveJcgj(StorageLocation storageLocation, Integer jcgjlx, String jcmc, String jcmcEn, Integer jcmcys, String jcnr, String jcnrEn); | |||
| /** | |||
| * 批量新增稽查轨迹-保存日志 | |||
| * @param storageLocation | |||
| * @param jcgjList | |||
| */ | |||
| void saveBatchWithLog(StorageLocation storageLocation, List<StorageLocationJcgj> jcgjList); | |||
| } | |||
| @ -0,0 +1,97 @@ | |||
| package com.hxhq.business.service.impl; | |||
| import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; | |||
| import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; | |||
| import com.hxhq.business.domain.StorageLocation; | |||
| import com.hxhq.business.domain.StorageLocationJcgj; | |||
| import com.hxhq.business.domain.Yq; | |||
| import com.hxhq.business.domain.YqJcgj; | |||
| import com.hxhq.business.mapper.StorageLocationJcgjMapper; | |||
| import com.hxhq.business.mapper.YqJcgjMapper; | |||
| import com.hxhq.business.service.IStorageLocationJcgjService; | |||
| import com.hxhq.business.service.IStorageLocationService; | |||
| import com.hxhq.business.service.ISystemLogService; | |||
| import com.hxhq.business.service.IYqJcgjService; | |||
| import com.hxhq.common.core.domain.MpBaseEntity; | |||
| import com.hxhq.common.core.utils.StringUtils; | |||
| import com.hxhq.common.security.utils.SecurityUtils; | |||
| import com.hxhq.system.api.domain.SysUser; | |||
| import org.springframework.beans.factory.annotation.Autowired; | |||
| import org.springframework.scheduling.annotation.Async; | |||
| import org.springframework.stereotype.Service; | |||
| import java.util.Date; | |||
| import java.util.List; | |||
| /** | |||
| * 仪器管理-稽查轨迹Service业务层处理 | |||
| * | |||
| * @author HanLong | |||
| * @date 2025-12-22 | |||
| */ | |||
| @Service | |||
| public class StorageLocationJcgjServiceImpl extends ServiceImpl<StorageLocationJcgjMapper, StorageLocationJcgj> implements IStorageLocationJcgjService | |||
| { | |||
| @Autowired | |||
| private ISystemLogService systemLogService; | |||
| /** | |||
| * 查询仪器管理-稽查轨迹列表 | |||
| * | |||
| * @param jcgj 仪器管理-稽查轨迹 | |||
| * @return 仪器管理-稽查轨迹 | |||
| */ | |||
| @Override | |||
| public List<StorageLocationJcgj> queryList(StorageLocationJcgj jcgj) | |||
| { | |||
| LambdaQueryWrapper<StorageLocationJcgj> queryWrapper = new LambdaQueryWrapper<>(); | |||
| if (jcgj.getStorageLocationId() == null || jcgj.getStorageLocationId().longValue() < 0) { | |||
| throw new SecurityException("存储位置id不能为空"); | |||
| } | |||
| queryWrapper.eq(StorageLocationJcgj::getStorageLocationId, jcgj.getStorageLocationId()); | |||
| if (jcgj.getJcgjlx() != null && jcgj.getJcgjlx().intValue() > 0) { | |||
| queryWrapper.eq(StorageLocationJcgj::getJcgjlx, jcgj.getJcgjlx()); | |||
| } | |||
| queryWrapper.orderByDesc(MpBaseEntity::getId); | |||
| return this.list(queryWrapper); | |||
| } | |||
| @Override | |||
| @Async | |||
| public void saveJcgj(StorageLocation storageLocation, Integer jcgjlx, String jcmc, String jcmcEn, Integer jcmcys, String jcnr, String jcnrEn) { | |||
| Date date = new Date(); | |||
| SysUser sysUser = SecurityUtils.getLoginUser().getSysUser(); | |||
| StorageLocationJcgj jcgj = new StorageLocationJcgj(); | |||
| jcgj.setStorageLocationId(storageLocation.getId()); | |||
| jcgj.setJcgjlx(jcgjlx); | |||
| jcgj.setJcmc(jcmc); | |||
| jcgj.setJcmcEn(jcmcEn); | |||
| jcgj.setJcmcys(jcmcys); | |||
| jcgj.setJcnr(jcnr); | |||
| jcgj.setJcnrEn(jcnrEn); | |||
| jcgj.setQmrId(sysUser.getUserId()); | |||
| jcgj.setQmrMc(sysUser.getNickName()); | |||
| jcgj.setQmrMcEn(sysUser.getUserName()); | |||
| jcgj.setCreateTime(date); | |||
| this.save(jcgj); | |||
| systemLogService.saveInfoWithData(storageLocation.getName(), storageLocation.getName(), jcgj.getJcmc(), jcgj.getJcmcEn(), | |||
| jcgj.getJcnr(), jcgj.getJcnrEn(), jcgj.getQmrId(), jcgj.getQmrMc(), jcgj.getQmrMcEn(), jcgj.getRemark(), date); | |||
| } | |||
| @Override | |||
| @Async | |||
| public void saveBatchWithLog(StorageLocation storageLocation, List<StorageLocationJcgj> jcgjList) { | |||
| Date date = new Date(); | |||
| for (StorageLocationJcgj jcgj : jcgjList) { | |||
| jcgj.setCreateTime(date); | |||
| } | |||
| this.saveBatch(jcgjList); | |||
| for (StorageLocationJcgj jcgj : jcgjList) { | |||
| systemLogService.saveInfoWithData(storageLocation.getName(), storageLocation.getName(), jcgj.getJcmc(), jcgj.getJcmcEn(), | |||
| jcgj.getJcnr(), jcgj.getJcnrEn(), jcgj.getQmrId(), jcgj.getQmrMc(), jcgj.getQmrMcEn(), jcgj.getRemark(), date); | |||
| } | |||
| } | |||
| } | |||