diff --git a/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/controller/ZcgController.java b/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/controller/ZcgController.java index c5ec793..76bc809 100644 --- a/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/controller/ZcgController.java +++ b/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/controller/ZcgController.java @@ -3,6 +3,9 @@ package com.hxhq.business.controller; import java.util.Arrays; import java.util.List; +import com.hxhq.business.form.zcg.YsffForm; +import com.hxhq.business.form.zcg.YsghForm; +import com.hxhq.business.form.zcg.ZcgSearchForm; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.*; @@ -30,10 +33,10 @@ public class ZcgController extends BaseController * 查询暂存柜列表 */ @GetMapping("/list") - public TableDataInfo list(Zcg zck) + public TableDataInfo list(ZcgSearchForm form) { startPage(); - List list = zcgService.queryList(zck); + List list = zcgService.queryList(form); return getDataTable(list); } @@ -43,24 +46,28 @@ public class ZcgController extends BaseController @GetMapping(value = "/info") public AjaxResult getInfo(Long id) { - return AjaxResult.success(zcgService.getById(id)); + return AjaxResult.success(zcgService.queryInfo(id)); } /** - * 新增暂存柜信息 + * 钥匙归还 */ - @PostMapping("/save") - public AjaxResult save(@RequestBody Zcg zck) + @PostMapping("/ysgh") + public AjaxResult ysgh(@RequestBody YsghForm form) { - return toAjax(zcgService.saveOrUpdate(zck)); + zcgService.ysgh(form); + return AjaxResult.success("操作成功"); } /** - * 删除暂存柜信息 + * 钥匙发放 */ - @PostMapping("/delete") - public AjaxResult delete(@RequestBody Long[] ids) + @PostMapping("/ysff") + public AjaxResult ysff(@RequestBody YsffForm form) { - return toAjax(zcgService.removeByIds(Arrays.asList(ids))); + zcgService.ysff(form); + return AjaxResult.success("操作成功"); } + + } diff --git a/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/controller/ZcgYjController.java b/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/controller/ZcgYjController.java deleted file mode 100644 index 8bbcd1d..0000000 --- a/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/controller/ZcgYjController.java +++ /dev/null @@ -1,66 +0,0 @@ -package com.hxhq.business.controller; - -import java.util.Arrays; -import java.util.List; - -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.stereotype.Controller; -import org.springframework.web.bind.annotation.*; -import com.hxhq.business.domain.ZcgYj; -import com.hxhq.business.service.IZcgYjService; -import com.hxhq.common.core.web.controller.BaseController; -import com.hxhq.common.core.web.domain.AjaxResult; -import com.hxhq.common.core.web.page.TableDataInfo; - - -/** - * 暂存柜-关联药剂Controller - * - * @author hxhq - * @date 2025-12-18 - */ -@RestController -@RequestMapping("/business/zcgYj") -public class ZcgYjController extends BaseController -{ - @Autowired - private IZcgYjService zcgYjService; - - /** - * 查询暂存柜-关联药剂列表 - */ - @GetMapping("/list") - public TableDataInfo list(ZcgYj zcgYj) - { - startPage(); - List list = zcgYjService.queryList(zcgYj); - return getDataTable(list); - } - - /** - * 获取暂存柜-关联药剂详细信息 - */ - @GetMapping(value = "/info") - public AjaxResult getInfo(Long id) - { - return AjaxResult.success(zcgYjService.getById(id)); - } - - /** - * 新增暂存柜-关联药剂信息 - */ - @PostMapping("/save") - public AjaxResult save(@RequestBody ZcgYj zcgYj) - { - return toAjax(zcgYjService.saveOrUpdate(zcgYj)); - } - - /** - * 删除暂存柜-关联药剂信息 - */ - @PostMapping("/delete") - public AjaxResult delete(@RequestBody Long[] ids) - { - return toAjax(zcgYjService.removeByIds(Arrays.asList(ids))); - } -} diff --git a/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/domain/GyzjFfjl.java b/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/domain/GyzjFfjl.java index ccad101..30f3f85 100644 --- a/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/domain/GyzjFfjl.java +++ b/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/domain/GyzjFfjl.java @@ -43,17 +43,17 @@ public class GyzjFfjl extends MpBaseEntity /** 使用量 */ private String syl; - /** 领取人1 */ - private Long lqr1; + /** 领取人1 id */ + private Long lqr1Id; - /** 领取人2 */ - private Long lqr2; + /** 领取人2 id */ + private Long lqr2Id; - /** 库管员1 */ - private Long kgy1; + /** 库管员1 id*/ + private Long kgy1Id; - /** 库管员2 */ - private Long kgy2; + /** 库管员2 id*/ + private Long kgy2Id; /** 暂存柜id */ private Long zckId; @@ -145,44 +145,36 @@ public class GyzjFfjl extends MpBaseEntity return syl; } - public void setLqr1(Long lqr1) - { - this.lqr1 = lqr1; + public Long getLqr1Id() { + return lqr1Id; } - public Long getLqr1() - { - return lqr1; + public void setLqr1Id(Long lqr1Id) { + this.lqr1Id = lqr1Id; } - public void setLqr2(Long lqr2) - { - this.lqr2 = lqr2; + public Long getLqr2Id() { + return lqr2Id; } - public Long getLqr2() - { - return lqr2; + public void setLqr2Id(Long lqr2Id) { + this.lqr2Id = lqr2Id; } - public void setKgy1(Long kgy1) - { - this.kgy1 = kgy1; + public Long getKgy1Id() { + return kgy1Id; } - public Long getKgy1() - { - return kgy1; + public void setKgy1Id(Long kgy1Id) { + this.kgy1Id = kgy1Id; } - public void setKgy2(Long kgy2) - { - this.kgy2 = kgy2; + public Long getKgy2Id() { + return kgy2Id; } - public Long getKgy2() - { - return kgy2; + public void setKgy2Id(Long kgy2Id) { + this.kgy2Id = kgy2Id; } public void setZckId(Long zckId) diff --git a/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/domain/MjyFfjl.java b/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/domain/MjyFfjl.java index 726ee75..f0ffd64 100644 --- a/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/domain/MjyFfjl.java +++ b/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/domain/MjyFfjl.java @@ -43,17 +43,17 @@ public class MjyFfjl extends MpBaseEntity /** 使用量 */ private String syl; - /** 领取人1 */ - private Long lqr1; + /** 领取人1 id */ + private Long lqr1Id; - /** 领取人2 */ - private Long lqr2; + /** 领取人2 id */ + private Long lqr2Id; - /** 库管员1 */ - private Long kgy1; + /** 库管员1 id*/ + private Long kgy1Id; - /** 库管员2 */ - private Long kgy2; + /** 库管员2 id*/ + private Long kgy2Id; /** 暂存柜id */ private Long zckId; @@ -145,44 +145,36 @@ public class MjyFfjl extends MpBaseEntity return syl; } - public void setLqr1(Long lqr1) - { - this.lqr1 = lqr1; + public Long getLqr1Id() { + return lqr1Id; } - public Long getLqr1() - { - return lqr1; + public void setLqr1Id(Long lqr1Id) { + this.lqr1Id = lqr1Id; } - public void setLqr2(Long lqr2) - { - this.lqr2 = lqr2; + public Long getLqr2Id() { + return lqr2Id; } - public Long getLqr2() - { - return lqr2; + public void setLqr2Id(Long lqr2Id) { + this.lqr2Id = lqr2Id; } - public void setKgy1(Long kgy1) - { - this.kgy1 = kgy1; + public Long getKgy1Id() { + return kgy1Id; } - public Long getKgy1() - { - return kgy1; + public void setKgy1Id(Long kgy1Id) { + this.kgy1Id = kgy1Id; } - public void setKgy2(Long kgy2) - { - this.kgy2 = kgy2; + public Long getKgy2Id() { + return kgy2Id; } - public Long getKgy2() - { - return kgy2; + public void setKgy2Id(Long kgy2Id) { + this.kgy2Id = kgy2Id; } public void setZckId(Long zckId) diff --git a/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/domain/Zcg.java b/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/domain/Zcg.java index 1e0f32a..1cfd0f7 100644 --- a/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/domain/Zcg.java +++ b/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/domain/Zcg.java @@ -15,21 +15,32 @@ public class Zcg extends MpBaseEntity { private static final long serialVersionUID = 1L; - /** 暂存库名称 */ + /** 暂存柜名称 */ private String mc; /** 钥匙编号 */ private String bh; - /** 钥匙1领取人 */ - private Long yslqr1; + /** 钥匙1领取人ID */ + private Long lqr1Id; - /** 钥匙2领取人 */ - private Long yslqr2; + /** 钥匙2领取人ID */ + private Long lqr2Id; /** 状态:1:未借用;5:借用中 */ private Integer zt; + /** 关联药剂 */ + private String glyj; + + public String getGlyj() { + return glyj; + } + + public void setGlyj(String glyj) { + this.glyj = glyj; + } + public void setMc(String mc) { this.mc = mc; @@ -50,24 +61,20 @@ public class Zcg extends MpBaseEntity return bh; } - public void setYslqr1(Long yslqr1) - { - this.yslqr1 = yslqr1; + public Long getLqr1Id() { + return lqr1Id; } - public Long getYslqr1() - { - return yslqr1; + public void setLqr1Id(Long lqr1Id) { + this.lqr1Id = lqr1Id; } - public void setYslqr2(Long yslqr2) - { - this.yslqr2 = yslqr2; + public Long getLqr2Id() { + return lqr2Id; } - public Long getYslqr2() - { - return yslqr2; + public void setLqr2Id(Long lqr2Id) { + this.lqr2Id = lqr2Id; } public void setZt(Integer zt) diff --git a/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/domain/ZcgYj.java b/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/domain/ZcgYj.java deleted file mode 100644 index b39c611..0000000 --- a/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/domain/ZcgYj.java +++ /dev/null @@ -1,71 +0,0 @@ -package com.hxhq.business.domain; - -import com.baomidou.mybatisplus.annotation.TableName; -import com.hxhq.common.core.domain.MpBaseEntity; - - -/** - * 暂存柜-关联药剂对象 t_zcg_yj - * - * @author hxhq - * @date 2025-12-18 - */ -@TableName("t_zcg_yj") -public class ZcgYj extends MpBaseEntity -{ - private static final long serialVersionUID = 1L; - - /** 暂存库id */ - private Long zcgId; - - /** 药剂名称 */ - private String yjmc; - - /** 药剂id */ - private Long yjId; - - /** 药剂类型:1:供试品;3:给药制剂;5:麻精药 */ - private Long yjlx; - - - public void setZcgId(Long zcgId) - { - this.zcgId = zcgId; - } - - public Long getZcgId() - { - return zcgId; - } - - public void setYjmc(String yjmc) - { - this.yjmc = yjmc; - } - - public String getYjmc() - { - return yjmc; - } - - public void setYjId(Long yjId) - { - this.yjId = yjId; - } - - public Long getYjId() - { - return yjId; - } - - public void setYjlx(Long yjlx) - { - this.yjlx = yjlx; - } - - public Long getYjlx() - { - return yjlx; - } - -} diff --git a/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/enums/zykgl/zcgJyztEnum.java b/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/enums/zykgl/zcgJyztEnum.java new file mode 100644 index 0000000..9b10f9b --- /dev/null +++ b/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/enums/zykgl/zcgJyztEnum.java @@ -0,0 +1,51 @@ +package com.hxhq.business.enums.zykgl; + +/** + * 借阅状态 1:未借用 5:借用中 + * @author tanfei + */ +public enum zcgJyztEnum { + + /** + * 未借用 + */ + wjy(1, "未借用"), + + /** + * 借用中 + */ + jyz(5, "借用中"); + + private int value; + private String text; + + zcgJyztEnum(int value, String text) { + this.value = value; + this.text = text; + } + + public int getValue() { + return value; + } + + public void setValue(int value) { + this.value = value; + } + + public String getText() { + return text; + } + + public void setText(String text) { + this.text = text; + } + + public static zcgJyztEnum getEnumByValue(int type) { + for (zcgJyztEnum bt : values()) { + if (bt.value == type) { + return bt; + } + } + return null; + } +} diff --git a/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/form/zcg/YsffForm.java b/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/form/zcg/YsffForm.java new file mode 100644 index 0000000..ecc4d69 --- /dev/null +++ b/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/form/zcg/YsffForm.java @@ -0,0 +1,120 @@ +package com.hxhq.business.form.zcg; + +import com.hxhq.business.domain.Zcg; + +/** + * @author 15881 + */ +public class YsffForm { + + + /** 暂存柜id */ + private Long id; + + /** 关联药剂 */ + private String glyj; + + /** 签名意义 */ + private String qmyy; + + /** 备注 */ + private String remark; + + /** 钥匙1领取人ID */ + private Long lqr1Id; + + /** 钥匙2领取人ID */ + private Long lqr2Id; + + /** 钥匙1领取人密码 */ + private String lqr1mm; + + /** 钥匙2领取人密码 */ + private String lqr2mm; + + /** 发放人 */ + private String ffrId; + + /** 钥匙2领取人密码 */ + private String ffrmm; + + public Long getId() { + return id; + } + + public void setId(Long id) { + this.id = id; + } + + public String getGlyj() { + return glyj; + } + + public void setGlyj(String glyj) { + this.glyj = glyj; + } + + public String getQmyy() { + return qmyy; + } + + public void setQmyy(String qmyy) { + this.qmyy = qmyy; + } + + public String getRemark() { + return remark; + } + + public void setRemark(String remark) { + this.remark = remark; + } + + public Long getLqr1Id() { + return lqr1Id; + } + + public void setLqr1Id(Long lqr1Id) { + this.lqr1Id = lqr1Id; + } + + public Long getLqr2Id() { + return lqr2Id; + } + + public void setLqr2Id(Long lqr2Id) { + this.lqr2Id = lqr2Id; + } + + public String getLqr1mm() { + return lqr1mm; + } + + public void setLqr1mm(String lqr1mm) { + this.lqr1mm = lqr1mm; + } + + public String getLqr2mm() { + return lqr2mm; + } + + public void setLqr2mm(String lqr2mm) { + this.lqr2mm = lqr2mm; + } + + public String getFfrId() { + return ffrId; + } + + public void setFfrId(String ffrId) { + this.ffrId = ffrId; + } + + public String getFfrmm() { + return ffrmm; + } + + public void setFfrmm(String ffrmm) { + this.ffrmm = ffrmm; + } +} diff --git a/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/form/zcg/YsghForm.java b/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/form/zcg/YsghForm.java new file mode 100644 index 0000000..2cce477 --- /dev/null +++ b/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/form/zcg/YsghForm.java @@ -0,0 +1,10 @@ +package com.hxhq.business.form.zcg; + +import com.hxhq.business.domain.Zcg; + +/** + * @author 15881 + */ +public class YsghForm extends Zcg { + +} diff --git a/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/form/zcg/ZcgSearchForm.java b/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/form/zcg/ZcgSearchForm.java new file mode 100644 index 0000000..163a7f8 --- /dev/null +++ b/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/form/zcg/ZcgSearchForm.java @@ -0,0 +1,42 @@ +package com.hxhq.business.form.zcg; + +import com.hxhq.business.domain.Zcg; + +/** + * @author 15881 + */ +public class ZcgSearchForm { + + /** 借用人 */ + private Long jyrId; + + /** 暂存柜名称 */ + private String mc; + + /** 状态:1:未借用;5:借用中 */ + private Integer zt; + + public Long getJyrId() { + return jyrId; + } + + public void setJyrId(Long jyrId) { + this.jyrId = jyrId; + } + + public String getMc() { + return mc; + } + + public void setMc(String mc) { + this.mc = mc; + } + + public Integer getZt() { + return zt; + } + + public void setZt(Integer zt) { + this.zt = zt; + } +} diff --git a/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/mapper/ZcgMapper.java b/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/mapper/ZcgMapper.java index 3aa1579..e2fc155 100644 --- a/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/mapper/ZcgMapper.java +++ b/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/mapper/ZcgMapper.java @@ -1,7 +1,13 @@ package com.hxhq.business.mapper; +import com.baomidou.mybatisplus.core.conditions.Wrapper; import com.hxhq.business.domain.Zcg; import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import org.apache.ibatis.annotations.Param; + +import java.util.List; +import java.util.Map; + /** * 暂存柜Mapper接口 * @@ -11,4 +17,17 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper; public interface ZcgMapper extends BaseMapper { + /** + * 查询暂存柜列表 + * @param queryWrapper + * @return + */ + List queryList(@Param("ew") Wrapper queryWrapper); + + /** + * 查询暂存柜 + * @param id + * @return + */ + Zcg queryInfo(@Param("id") Long id); } diff --git a/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/mapper/ZcgYjMapper.java b/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/mapper/ZcgYjMapper.java deleted file mode 100644 index ece06ad..0000000 --- a/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/mapper/ZcgYjMapper.java +++ /dev/null @@ -1,14 +0,0 @@ -package com.hxhq.business.mapper; - -import com.hxhq.business.domain.ZcgYj; -import com.baomidou.mybatisplus.core.mapper.BaseMapper; -/** - * 暂存柜-关联药剂Mapper接口 - * - * @author hxhq - * @date 2025-12-18 - */ -public interface ZcgYjMapper extends BaseMapper -{ - -} diff --git a/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/service/IZcgService.java b/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/service/IZcgService.java index 1e7cb6d..3d1dd9b 100644 --- a/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/service/IZcgService.java +++ b/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/service/IZcgService.java @@ -1,8 +1,13 @@ package com.hxhq.business.service; import java.util.List; +import java.util.Map; + import com.hxhq.business.domain.Zcg; import com.baomidou.mybatisplus.extension.service.IService; +import com.hxhq.business.form.zcg.YsffForm; +import com.hxhq.business.form.zcg.YsghForm; +import com.hxhq.business.form.zcg.ZcgSearchForm; /** * 暂存柜Service接口 @@ -15,9 +20,32 @@ public interface IZcgService extends IService /** * 查询暂存柜列表 * - * @param zcg 暂存柜 + * @param form 暂存柜 * @return 暂存柜集合 */ - public List queryList(Zcg zcg); + public List queryList(ZcgSearchForm form); + + /** + * 查询暂存柜 + * + * @param id + * @return 暂存柜 + */ + public Zcg queryInfo(Long id); + + + /** + * 钥匙归还 + * + * @param form + */ + public void ysgh(YsghForm form); + + /** + * 钥匙发放 + * + * @param form + */ + public void ysff(YsffForm form); } diff --git a/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/service/IZcgYjService.java b/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/service/IZcgYjService.java deleted file mode 100644 index e2f867c..0000000 --- a/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/service/IZcgYjService.java +++ /dev/null @@ -1,23 +0,0 @@ -package com.hxhq.business.service; - -import java.util.List; -import com.hxhq.business.domain.ZcgYj; -import com.baomidou.mybatisplus.extension.service.IService; - -/** - * 暂存柜-关联药剂Service接口 - * - * @author hxhq - * @date 2025-12-18 - */ -public interface IZcgYjService extends IService -{ - /** - * 查询暂存柜-关联药剂列表 - * - * @param zcgYj 暂存柜-关联药剂 - * @return 暂存柜-关联药剂集合 - */ - public List queryList(ZcgYj zcgYj); - -} diff --git a/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/service/impl/ZcgServiceImpl.java b/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/service/impl/ZcgServiceImpl.java index 58b840b..7b5f59c 100644 --- a/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/service/impl/ZcgServiceImpl.java +++ b/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/service/impl/ZcgServiceImpl.java @@ -1,13 +1,22 @@ package com.hxhq.business.service.impl; import java.util.List; +import java.util.Map; + import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.toolkit.Wrappers; +import com.hxhq.business.enums.zykgl.JyztEnum; +import com.hxhq.business.enums.zykgl.zcgJyztEnum; +import com.hxhq.business.form.zcg.YsffForm; +import com.hxhq.business.form.zcg.YsghForm; +import com.hxhq.business.form.zcg.ZcgSearchForm; +import com.hxhq.common.core.utils.StringUtils; import org.springframework.stereotype.Service; import com.hxhq.business.mapper.ZcgMapper; import com.hxhq.business.domain.Zcg; import com.hxhq.business.service.IZcgService; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import org.springframework.transaction.annotation.Transactional; /** * 暂存柜Service业务层处理 @@ -21,14 +30,94 @@ public class ZcgServiceImpl extends ServiceImpl implements IZcgS /** * 查询暂存柜列表 * - * @param zcg 暂存柜 + * @param form 暂存柜 * @return 暂存柜 */ @Override - public List queryList(Zcg zcg) + public List queryList(ZcgSearchForm form) { QueryWrapper queryWrapper = Wrappers.query(); - return this.list(queryWrapper); + if(form.getZt()!=null&&form.getZt().intValue()>0){ + queryWrapper.eq("t.zt",form.getZt()); + } + if (StringUtils.isNoneBlank(form.getMc())) { + queryWrapper.and(p -> p.like("t.`mc`", form.getMc())); + } + if(form.getJyrId()!=null&&form.getJyrId().intValue()>0){ + queryWrapper.and(p -> p.eq("t.`lqr1_id`", form.getJyrId()).or().eq("t.`lqr2_id`", form.getJyrId())); + } + return baseMapper.queryList(queryWrapper); + } + + + /** + * 查询暂存柜 + * + * @param id + * @return 暂存柜 + */ + @Override + public Zcg queryInfo(Long id){ + return baseMapper.queryInfo(id); + } + + + /** + * 钥匙归还 + * + * @param form + */ + @Override + @Transactional(rollbackFor = Exception.class) + public void ysgh(YsghForm form){ + if(form.getId()==null||form.getId().longValue()<0){ + throw new SecurityException("参数id不正确"); + } + Zcg zcgOld=this.getById(form.getId()); + if(zcgOld==null){ + throw new SecurityException("暂存柜不存在或已删除"); + } + if(!zcgOld.getZt().equals(zcgJyztEnum.jyz.getValue())){ + throw new SecurityException("暂存柜未借用"); + } + //验证钥匙1领取人密码,钥匙2领取人密码,发放人密码 todo + zcgOld.setLqr2Id(0L); + zcgOld.setLqr2Id(0L); + zcgOld.setGlyj(""); + zcgOld.setZt(zcgJyztEnum.wjy.getValue()); + this.updateById(zcgOld); + //存台账 + } + + /** + * 钥匙发放 + * + * @param form + */ + @Override + @Transactional(rollbackFor = Exception.class) + public void ysff(YsffForm form){ + if(form.getId()==null||form.getId().longValue()<0){ + throw new SecurityException("参数id不正确"); + } + Zcg zcgOld=this.getById(form.getId()); + if(zcgOld==null){ + throw new SecurityException("暂存柜不存在或已删除"); + } + if(!zcgOld.getZt().equals(zcgJyztEnum.wjy.getValue())){ + throw new SecurityException("暂存柜已借用"); + } + //验证钥匙1领取人密码,钥匙2领取人密码,发放人密码 todo + zcgOld.setLqr1Id(form.getLqr1Id()); + zcgOld.setLqr2Id(form.getLqr2Id()); + if(StringUtils.isBlank(zcgOld.getGlyj())){ + zcgOld.setGlyj(form.getGlyj()); + }else{ + zcgOld.setGlyj(zcgOld.getGlyj()+","+form.getGlyj()); + } + zcgOld.setZt(zcgJyztEnum.jyz.getValue()); + this.updateById(zcgOld); + //存台账 todo } } diff --git a/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/service/impl/ZcgYjServiceImpl.java b/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/service/impl/ZcgYjServiceImpl.java deleted file mode 100644 index bd168f7..0000000 --- a/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/service/impl/ZcgYjServiceImpl.java +++ /dev/null @@ -1,34 +0,0 @@ -package com.hxhq.business.service.impl; - -import java.util.List; -import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; -import com.baomidou.mybatisplus.core.toolkit.Wrappers; -import org.springframework.stereotype.Service; -import com.hxhq.business.mapper.ZcgYjMapper; -import com.hxhq.business.domain.ZcgYj; -import com.hxhq.business.service.IZcgYjService; -import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; - -/** - * 暂存柜-关联药剂Service业务层处理 - * - * @author hxhq - * @date 2025-12-18 - */ -@Service -public class ZcgYjServiceImpl extends ServiceImpl implements IZcgYjService -{ - /** - * 查询暂存柜-关联药剂列表 - * - * @param zcgYj 暂存柜-关联药剂 - * @return 暂存柜-关联药剂 - */ - @Override - public List queryList(ZcgYj zcgYj) - { - QueryWrapper queryWrapper = Wrappers.query(); - return this.list(queryWrapper); - } - -} diff --git a/hxhq-modules/hxhq-system/src/main/resources/mapper/business/ZcgMapper.xml b/hxhq-modules/hxhq-system/src/main/resources/mapper/business/ZcgMapper.xml index b155a31..cf12f55 100644 --- a/hxhq-modules/hxhq-system/src/main/resources/mapper/business/ZcgMapper.xml +++ b/hxhq-modules/hxhq-system/src/main/resources/mapper/business/ZcgMapper.xml @@ -3,4 +3,20 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> + + + + \ No newline at end of file diff --git a/hxhq-modules/hxhq-system/src/main/resources/mapper/business/ZcgYjMapper.xml b/hxhq-modules/hxhq-system/src/main/resources/mapper/business/ZcgYjMapper.xml deleted file mode 100644 index f5de26d..0000000 --- a/hxhq-modules/hxhq-system/src/main/resources/mapper/business/ZcgYjMapper.xml +++ /dev/null @@ -1,6 +0,0 @@ - - - - \ No newline at end of file