|
|
|
@ -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<ZcgDto> queryList(ZcgSearchForm form) { |
|
|
|
public List<Zcg> queryList(ZcgSearchForm form) { |
|
|
|
QueryWrapper<Zcg> 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); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|