Browse Source

feat:[资源库管理][钥匙管理]新增列表查询,详情,发放,归还

master
15881625488@163.com 3 weeks ago
parent
commit
a91a20e0f2
18 changed files with 470 additions and 311 deletions
  1. +18
    -11
      hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/controller/ZcgController.java
  2. +0
    -66
      hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/controller/ZcgYjController.java
  3. +24
    -32
      hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/domain/GyzjFfjl.java
  4. +24
    -32
      hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/domain/MjyFfjl.java
  5. +24
    -17
      hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/domain/Zcg.java
  6. +0
    -71
      hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/domain/ZcgYj.java
  7. +51
    -0
      hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/enums/zykgl/zcgJyztEnum.java
  8. +120
    -0
      hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/form/zcg/YsffForm.java
  9. +10
    -0
      hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/form/zcg/YsghForm.java
  10. +42
    -0
      hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/form/zcg/ZcgSearchForm.java
  11. +19
    -0
      hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/mapper/ZcgMapper.java
  12. +0
    -14
      hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/mapper/ZcgYjMapper.java
  13. +30
    -2
      hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/service/IZcgService.java
  14. +0
    -23
      hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/service/IZcgYjService.java
  15. +92
    -3
      hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/service/impl/ZcgServiceImpl.java
  16. +0
    -34
      hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/service/impl/ZcgYjServiceImpl.java
  17. +16
    -0
      hxhq-modules/hxhq-system/src/main/resources/mapper/business/ZcgMapper.xml
  18. +0
    -6
      hxhq-modules/hxhq-system/src/main/resources/mapper/business/ZcgYjMapper.xml

+ 18
- 11
hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/controller/ZcgController.java View File

@ -3,6 +3,9 @@ package com.hxhq.business.controller;
import java.util.Arrays; import java.util.Arrays;
import java.util.List; 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.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller; import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.*; import org.springframework.web.bind.annotation.*;
@ -30,10 +33,10 @@ public class ZcgController extends BaseController
* 查询暂存柜列表 * 查询暂存柜列表
*/ */
@GetMapping("/list") @GetMapping("/list")
public TableDataInfo list(Zcg zck)
public TableDataInfo list(ZcgSearchForm form)
{ {
startPage(); startPage();
List<Zcg> list = zcgService.queryList(zck);
List<Zcg> list = zcgService.queryList(form);
return getDataTable(list); return getDataTable(list);
} }
@ -43,24 +46,28 @@ public class ZcgController extends BaseController
@GetMapping(value = "/info") @GetMapping(value = "/info")
public AjaxResult getInfo(Long id) 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("操作成功");
} }
} }

+ 0
- 66
hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/controller/ZcgYjController.java View File

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

+ 24
- 32
hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/domain/GyzjFfjl.java View File

@ -43,17 +43,17 @@ public class GyzjFfjl extends MpBaseEntity
/** 使用量 */ /** 使用量 */
private String syl; 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 */ /** 暂存柜id */
private Long zckId; private Long zckId;
@ -145,44 +145,36 @@ public class GyzjFfjl extends MpBaseEntity
return syl; 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) public void setZckId(Long zckId)

+ 24
- 32
hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/domain/MjyFfjl.java View File

@ -43,17 +43,17 @@ public class MjyFfjl extends MpBaseEntity
/** 使用量 */ /** 使用量 */
private String syl; 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 */ /** 暂存柜id */
private Long zckId; private Long zckId;
@ -145,44 +145,36 @@ public class MjyFfjl extends MpBaseEntity
return syl; 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) public void setZckId(Long zckId)

+ 24
- 17
hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/domain/Zcg.java View File

@ -15,21 +15,32 @@ public class Zcg extends MpBaseEntity
{ {
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
/** 暂存名称 */
/** 暂存名称 */
private String mc; private String mc;
/** 钥匙编号 */ /** 钥匙编号 */
private String bh; private String bh;
/** 钥匙1领取人 */
private Long yslqr1;
/** 钥匙1领取人ID */
private Long lqr1Id;
/** 钥匙2领取人 */
private Long yslqr2;
/** 钥匙2领取人ID */
private Long lqr2Id;
/** 状态:1:未借用;5:借用中 */ /** 状态:1:未借用;5:借用中 */
private Integer zt; private Integer zt;
/** 关联药剂 */
private String glyj;
public String getGlyj() {
return glyj;
}
public void setGlyj(String glyj) {
this.glyj = glyj;
}
public void setMc(String mc) public void setMc(String mc)
{ {
this.mc = mc; this.mc = mc;
@ -50,24 +61,20 @@ public class Zcg extends MpBaseEntity
return bh; 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) public void setZt(Integer zt)

+ 0
- 71
hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/domain/ZcgYj.java View File

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

+ 51
- 0
hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/enums/zykgl/zcgJyztEnum.java View File

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

+ 120
- 0
hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/form/zcg/YsffForm.java View File

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

+ 10
- 0
hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/form/zcg/YsghForm.java View File

@ -0,0 +1,10 @@
package com.hxhq.business.form.zcg;
import com.hxhq.business.domain.Zcg;
/**
* @author 15881
*/
public class YsghForm extends Zcg {
}

+ 42
- 0
hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/form/zcg/ZcgSearchForm.java View File

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

+ 19
- 0
hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/mapper/ZcgMapper.java View File

@ -1,7 +1,13 @@
package com.hxhq.business.mapper; package com.hxhq.business.mapper;
import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.hxhq.business.domain.Zcg; import com.hxhq.business.domain.Zcg;
import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Param;
import java.util.List;
import java.util.Map;
/** /**
* 暂存柜Mapper接口 * 暂存柜Mapper接口
* *
@ -11,4 +17,17 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
public interface ZcgMapper extends BaseMapper<Zcg> public interface ZcgMapper extends BaseMapper<Zcg>
{ {
/**
* 查询暂存柜列表
* @param queryWrapper
* @return
*/
List<Zcg> queryList(@Param("ew") Wrapper<Zcg> queryWrapper);
/**
* 查询暂存柜
* @param id
* @return
*/
Zcg queryInfo(@Param("id") Long id);
} }

+ 0
- 14
hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/mapper/ZcgYjMapper.java View File

@ -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<ZcgYj>
{
}

+ 30
- 2
hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/service/IZcgService.java View File

@ -1,8 +1,13 @@
package com.hxhq.business.service; package com.hxhq.business.service;
import java.util.List; import java.util.List;
import java.util.Map;
import com.hxhq.business.domain.Zcg; import com.hxhq.business.domain.Zcg;
import com.baomidou.mybatisplus.extension.service.IService; 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接口 * 暂存柜Service接口
@ -15,9 +20,32 @@ public interface IZcgService extends IService
/** /**
* 查询暂存柜列表 * 查询暂存柜列表
* *
* @param zcg 暂存柜
* @param form 暂存柜
* @return 暂存柜集合 * @return 暂存柜集合
*/ */
public List<Zcg> queryList(Zcg zcg);
public List<Zcg> 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);
} }

+ 0
- 23
hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/service/IZcgYjService.java View File

@ -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<ZcgYj>
{
/**
* 查询暂存柜-关联药剂列表
*
* @param zcgYj 暂存柜-关联药剂
* @return 暂存柜-关联药剂集合
*/
public List<ZcgYj> queryList(ZcgYj zcgYj);
}

+ 92
- 3
hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/service/impl/ZcgServiceImpl.java View File

@ -1,13 +1,22 @@
package com.hxhq.business.service.impl; package com.hxhq.business.service.impl;
import java.util.List; import java.util.List;
import java.util.Map;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.toolkit.Wrappers; 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 org.springframework.stereotype.Service;
import com.hxhq.business.mapper.ZcgMapper; import com.hxhq.business.mapper.ZcgMapper;
import com.hxhq.business.domain.Zcg; import com.hxhq.business.domain.Zcg;
import com.hxhq.business.service.IZcgService; import com.hxhq.business.service.IZcgService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.transaction.annotation.Transactional;
/** /**
* 暂存柜Service业务层处理 * 暂存柜Service业务层处理
@ -21,14 +30,94 @@ public class ZcgServiceImpl extends ServiceImpl implements IZcgS
/** /**
* 查询暂存柜列表 * 查询暂存柜列表
* *
* @param zcg 暂存柜
* @param form 暂存柜
* @return 暂存柜 * @return 暂存柜
*/ */
@Override @Override
public List<Zcg> queryList(Zcg zcg)
public List<Zcg> queryList(ZcgSearchForm form)
{ {
QueryWrapper<Zcg> queryWrapper = Wrappers.query(); QueryWrapper<Zcg> 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
} }
} }

+ 0
- 34
hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/service/impl/ZcgYjServiceImpl.java View File

@ -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<ZcgYjMapper, ZcgYj> implements IZcgYjService
{
/**
* 查询暂存柜-关联药剂列表
*
* @param zcgYj 暂存柜-关联药剂
* @return 暂存柜-关联药剂
*/
@Override
public List<ZcgYj> queryList(ZcgYj zcgYj)
{
QueryWrapper<ZcgYj> queryWrapper = Wrappers.query();
return this.list(queryWrapper);
}
}

+ 16
- 0
hxhq-modules/hxhq-system/src/main/resources/mapper/business/ZcgMapper.xml View File

@ -3,4 +3,20 @@
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd"> "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.hxhq.business.mapper.ZcgMapper"> <mapper namespace="com.hxhq.business.mapper.ZcgMapper">
<select id="queryInfo" resultType="com.hxhq.business.domain.Zcg">
select t.*
FROM `t_zcg` t
where t.id=#{id}
</select>
<select id="queryList" resultType="com.hxhq.business.domain.Zcg">
select t.*
FROM `t_zcg` t
<if test="ew.sqlSegment != '' and ew.sqlSegment != null">
<where>
${ew.sqlSegment}
</where>
</if>
</select>
</mapper> </mapper>

+ 0
- 6
hxhq-modules/hxhq-system/src/main/resources/mapper/business/ZcgYjMapper.xml View File

@ -1,6 +0,0 @@
<?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.hxhq.business.mapper.ZcgYjMapper">
</mapper>

Loading…
Cancel
Save