diff --git a/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/controller/PublicController.java b/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/controller/PublicController.java index bb754d5..14f2fae 100644 --- a/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/controller/PublicController.java +++ b/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/controller/PublicController.java @@ -5,7 +5,6 @@ import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.toolkit.Wrappers; import com.hxhq.business.domain.*; import com.hxhq.business.dto.study.StudyListDto; -import com.hxhq.business.dto.zcg.ZcgDto; import com.hxhq.business.enums.study.StudyStatusEnum; import com.hxhq.business.form.study.StudyFormPreSearchForm; import com.hxhq.business.form.study.StudySearchForm; 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 c052c0f..c85150d 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 @@ -1,8 +1,7 @@ package com.hxhq.business.controller; -import java.util.List; -import com.hxhq.business.dto.zcg.ZcgDto; +import com.hxhq.business.domain.Zcg; import com.hxhq.business.form.zcg.ZcgYsffForm; import com.hxhq.business.form.zcg.ZcgYsghForm; import com.hxhq.business.form.zcg.ZcgSearchForm; @@ -15,6 +14,8 @@ import com.hxhq.common.core.web.controller.BaseController; import com.hxhq.common.core.web.domain.AjaxResult; import com.hxhq.common.core.web.page.TableDataInfo; +import java.util.List; + /** * 暂存柜Controller @@ -37,7 +38,7 @@ public class ZcgController extends BaseController public TableDataInfo list(ZcgSearchForm form) { startPage(); - List list = zcgService.queryList(form); + List list = zcgService.queryList(form); return getDataTable(list); } 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 1d6fecc..0b9abbd 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 @@ -28,6 +28,10 @@ public class Zcg extends MpBaseEntity @TableField(updateStrategy = FieldStrategy.IGNORED) private String lqr1Mc; + /** 钥匙1领取人名称 */ + @TableField(updateStrategy = FieldStrategy.IGNORED) + private String lqr1McEn; + /** 钥匙2领取人ID */ @TableField(updateStrategy = FieldStrategy.IGNORED) private Long lqr2Id; @@ -36,6 +40,10 @@ public class Zcg extends MpBaseEntity @TableField(updateStrategy = FieldStrategy.IGNORED) private String lqr2Mc; + /** 钥匙2领取人名称 */ + @TableField(updateStrategy = FieldStrategy.IGNORED) + private String lqr2McEn; + /** 状态:1:未借用;5:借用中 */ private Integer zt; @@ -43,6 +51,22 @@ public class Zcg extends MpBaseEntity @TableField(updateStrategy = FieldStrategy.IGNORED) private String glyj; + public String getLqr1McEn() { + return lqr1McEn; + } + + public void setLqr1McEn(String lqr1McEn) { + this.lqr1McEn = lqr1McEn; + } + + public String getLqr2McEn() { + return lqr2McEn; + } + + public void setLqr2McEn(String lqr2McEn) { + this.lqr2McEn = lqr2McEn; + } + public String getLqr1Mc() { return lqr1Mc; } diff --git a/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/dto/zcg/ZcgDto.java b/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/dto/zcg/ZcgDto.java deleted file mode 100644 index 79c4c7b..0000000 --- a/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/dto/zcg/ZcgDto.java +++ /dev/null @@ -1,94 +0,0 @@ -package com.hxhq.business.dto.zcg; - -import com.baomidou.mybatisplus.annotation.FieldStrategy; -import com.baomidou.mybatisplus.annotation.TableField; -import com.fasterxml.jackson.annotation.JsonFormat; - -import java.util.Date; - -/** - * @author 15881 - */ -public class ZcgDto { - - /** 暂存柜id*/ - private Long id; - - /** 暂存柜名称 */ - private String mc; - - /** 钥匙1领取人名称 */ - @TableField(updateStrategy = FieldStrategy.IGNORED) - private String lqr1Mc; - - /** 钥匙2领取人名称 */ - @TableField(updateStrategy = FieldStrategy.IGNORED) - private String lqr2Mc; - - /** 状态:1:未借用;5:借用中 */ - private Integer zt; - - /** 关联药剂 */ - @TableField(updateStrategy = FieldStrategy.IGNORED) - private String glyj; - - /** 创建时间 */ - @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") - private Date createTime; - - public Date getCreateTime() { - return createTime; - } - - public void setCreateTime(Date createTime) { - this.createTime = createTime; - } - - public Long getId() { - return id; - } - - public void setId(Long id) { - this.id = id; - } - - public String getMc() { - return mc; - } - - public void setMc(String mc) { - this.mc = mc; - } - - public String getLqr1Mc() { - return lqr1Mc; - } - - public void setLqr1Mc(String lqr1Mc) { - this.lqr1Mc = lqr1Mc; - } - - public String getLqr2Mc() { - return lqr2Mc; - } - - public void setLqr2Mc(String lqr2Mc) { - this.lqr2Mc = lqr2Mc; - } - - public Integer getZt() { - return zt; - } - - public void setZt(Integer zt) { - this.zt = zt; - } - - public String getGlyj() { - return glyj; - } - - public void setGlyj(String glyj) { - this.glyj = glyj; - } -} 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 a3a473f..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 @@ -3,7 +3,6 @@ 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 com.hxhq.business.dto.zcg.ZcgDto; import org.apache.ibatis.annotations.Param; import java.util.List; @@ -23,7 +22,7 @@ public interface ZcgMapper extends BaseMapper * @param queryWrapper * @return */ - List queryList(@Param("ew") Wrapper queryWrapper); + List queryList(@Param("ew") Wrapper queryWrapper); /** * 查询暂存柜 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 bd81384..91193e5 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 @@ -4,7 +4,6 @@ import java.util.List; import com.hxhq.business.domain.Zcg; import com.baomidou.mybatisplus.extension.service.IService; -import com.hxhq.business.dto.zcg.ZcgDto; import com.hxhq.business.form.zcg.ZcgYsffForm; import com.hxhq.business.form.zcg.ZcgYsghForm; import com.hxhq.business.form.zcg.ZcgSearchForm; @@ -23,7 +22,7 @@ public interface IZcgService extends IService * @param form 暂存柜 * @return 暂存柜集合 */ - public List queryList(ZcgSearchForm form); + public List queryList(ZcgSearchForm form); /** * 查询暂存柜 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 93bc5f6..2d5c47b 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 @@ -7,7 +7,6 @@ import java.util.List; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.toolkit.Wrappers; import com.hxhq.business.domain.ZcgTz; -import com.hxhq.business.dto.zcg.ZcgDto; import com.hxhq.business.enums.zykgl.zcgJyztEnum; import com.hxhq.business.form.zcg.ZcgYsffForm; import com.hxhq.business.form.zcg.ZcgYsghForm; @@ -46,7 +45,7 @@ public class ZcgServiceImpl extends ServiceImpl implements IZcgS * @return 暂存柜 */ @Override - public List queryList(ZcgSearchForm form) { + public List queryList(ZcgSearchForm form) { QueryWrapper queryWrapper = Wrappers.query(); queryWrapper.eq("t.del_flag", "0"); if (form.getZt() != null && form.getZt().intValue() > 0) { @@ -111,29 +110,15 @@ public class ZcgServiceImpl extends ServiceImpl implements IZcgS if (!zcgOld.getZt().equals(zcgJyztEnum.jyz.getValue())) { throw new SecurityException("暂存柜未借用"); } - zcgOld.setLqr1Id(null); zcgOld.setLqr1Mc(null); + zcgOld.setLqr1McEn(null); zcgOld.setLqr2Id(null); zcgOld.setLqr2Mc(null); + zcgOld.setLqr2McEn(null); zcgOld.setGlyj(null); zcgOld.setZt(zcgJyztEnum.wjy.getValue()); this.updateById(zcgOld); - //存台账 - ZcgTz zcgTz = new ZcgTz(); - zcgTz.setZcgId(zcgOld.getId()); - - zcgTz.setGhr1Id(ghr1.getUserId()); - zcgTz.setGhr1Mc(ghr1.getNickName()); - - zcgTz.setGhr2Id(ghr2.getUserId()); - zcgTz.setGhr2Mc(ghr2.getNickName()); - - zcgTz.setJsrId(SecurityUtils.getUserId()); - zcgTz.setJsrMc(SecurityUtils.getNickName()); - zcgTz.setCreateTime(new Date()); - zcgTz.setQmyy("钥匙归还"); - zcgTzService.save(zcgTz); } @@ -175,22 +160,12 @@ public class ZcgServiceImpl extends ServiceImpl implements IZcgS for (Zcg zcg : zcgList) { zcg.setLqr1Id(null); zcg.setLqr1Mc(null); + zcg.setLqr1McEn(null); zcg.setLqr2Id(null); zcg.setLqr2Mc(null); + zcg.setLqr2McEn(null); zcg.setGlyj(null); zcg.setZt(zcgJyztEnum.wjy.getValue()); - //存台账 - ZcgTz zcgTz = new ZcgTz(); - zcgTz.setZcgId(zcg.getId()); - zcgTz.setGhr1Id(ghr1.getUserId()); - zcgTz.setGhr1Mc(ghr1.getNickName()); - zcgTz.setGhr2Id(ghr2.getUserId()); - zcgTz.setGhr2Mc(ghr2.getNickName()); - zcgTz.setJsrId(SecurityUtils.getUserId()); - zcgTz.setJsrMc(SecurityUtils.getNickName()); - zcgTz.setCreateTime(new Date()); - zcgTz.setQmyy("钥匙归还"); - zcgTzList.add(zcgTz); } this.saveOrUpdateBatch(zcgList); zcgTzService.saveBatch(zcgTzList); @@ -221,7 +196,6 @@ public class ZcgServiceImpl extends ServiceImpl implements IZcgS checkPassword(lqr1,form.getLqr1mm()); //验证钥匙2领取人密码 checkPassword(lqr2,form.getLqr2mm()); - if (form.getId() == null || form.getId().longValue() < 0) { throw new SecurityException("参数id不正确"); } @@ -234,8 +208,10 @@ public class ZcgServiceImpl extends ServiceImpl implements IZcgS } zcgOld.setLqr1Id(form.getLqr1Id()); zcgOld.setLqr1Mc(lqr1.getNickName()); + zcgOld.setLqr1McEn(lqr1.getUserName()); zcgOld.setLqr2Id(form.getLqr2Id()); zcgOld.setLqr2Mc(lqr2.getNickName()); + zcgOld.setLqr2McEn(lqr2.getUserName()); if (StringUtils.isBlank(zcgOld.getGlyj())) { zcgOld.setGlyj(form.getGlyj()); } else { @@ -243,22 +219,6 @@ public class ZcgServiceImpl extends ServiceImpl implements IZcgS } zcgOld.setZt(zcgJyztEnum.jyz.getValue()); this.updateById(zcgOld); - //存台账 - ZcgTz zcgTz = new ZcgTz(); - zcgTz.setZcgId(zcgOld.getId()); - - zcgTz.setLqr1Id(lqr1.getUserId()); - zcgTz.setLqr1Mc(lqr1.getNickName()); - - zcgTz.setLqr2Id(lqr2.getUserId()); - zcgTz.setLqr2Mc(lqr2.getNickName()); - - zcgTz.setFfrId(SecurityUtils.getUserId()); - zcgTz.setFfrMc(SecurityUtils.getNickName()); - zcgTz.setCreateTime(new Date()); - zcgTz.setQmyy("钥匙发放"); - zcgTzService.save(zcgTz); - } 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 9b45a04..97f62e1 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 @@ -10,8 +10,8 @@ where t.id=#{id} - + select t.id,t.mc,t.lqr1_mc,t.lqr1_mc_en,t.lqr2_mc,t.lqr2_mc_en,t.zt,t.glyj,t.create_time FROM `t_zcg` t