|
|
@ -486,13 +486,19 @@ public class GspServiceImpl extends ServiceImpl implements IGspS |
|
|
SysUser lqr1 = sysUserService.selectUserById(form.getLqr1Id()); |
|
|
SysUser lqr1 = sysUserService.selectUserById(form.getLqr1Id()); |
|
|
SysUser lqr2 = sysUserService.selectUserById(form.getLqr2Id()); |
|
|
SysUser lqr2 = sysUserService.selectUserById(form.getLqr2Id()); |
|
|
SysUser ffr1 = sysUserService.selectUserById(form.getFfrId()); |
|
|
SysUser ffr1 = sysUserService.selectUserById(form.getFfrId()); |
|
|
if(StringUtils.isEmpty(form.getLqr1mm()) || !SecurityUtils.matchesPassword(form.getLqr1mm(),lqr1.getPassword())) { |
|
|
|
|
|
|
|
|
if(StringUtils.isEmpty(form.getLqr1mm())) { |
|
|
|
|
|
throw new ServiceException("请输入钥匙领取人1密码"); |
|
|
|
|
|
} else if(lqr1 == null || !SecurityUtils.matchesPassword(form.getLqr1mm(),lqr1.getPassword())) { |
|
|
throw new ServiceException("钥匙领取人1密码错误"); |
|
|
throw new ServiceException("钥匙领取人1密码错误"); |
|
|
} |
|
|
} |
|
|
if(StringUtils.isEmpty(form.getLqr2mm()) || !SecurityUtils.matchesPassword(form.getLqr2mm(),lqr2.getPassword())) { |
|
|
|
|
|
|
|
|
if(StringUtils.isEmpty(form.getLqr2mm())) { |
|
|
|
|
|
throw new ServiceException("请输入钥匙领取人2密码"); |
|
|
|
|
|
} else if(lqr2 == null || !SecurityUtils.matchesPassword(form.getLqr2mm(),lqr2.getPassword())) { |
|
|
throw new ServiceException("钥匙领取人2密码错误"); |
|
|
throw new ServiceException("钥匙领取人2密码错误"); |
|
|
} |
|
|
} |
|
|
if(StringUtils.isEmpty(form.getFfrmm()) || !SecurityUtils.matchesPassword(form.getFfrmm(),ffr1.getPassword())) { |
|
|
|
|
|
|
|
|
if(StringUtils.isEmpty(form.getFfrmm())) { |
|
|
|
|
|
throw new ServiceException("请输入发放人密码"); |
|
|
|
|
|
} else if(ffr1 == null ||!SecurityUtils.matchesPassword(form.getFfrmm(),ffr1.getPassword())) { |
|
|
throw new ServiceException("发放人密码错误"); |
|
|
throw new ServiceException("发放人密码错误"); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
@ -575,24 +581,32 @@ public class GspServiceImpl extends ServiceImpl implements IGspS |
|
|
public void ff(FfGspForm form) { |
|
|
public void ff(FfGspForm form) { |
|
|
//验证领取人1、领取人2、发放人1、发放人2密码 |
|
|
//验证领取人1、领取人2、发放人1、发放人2密码 |
|
|
SysUser lqr1 = sysUserService.selectUserById(form.getLqr1Id()); |
|
|
SysUser lqr1 = sysUserService.selectUserById(form.getLqr1Id()); |
|
|
if(StringUtils.isEmpty(form.getLqr1mm()) || !SecurityUtils.matchesPassword(form.getLqr1mm(),lqr1.getPassword())) { |
|
|
|
|
|
|
|
|
if(StringUtils.isEmpty(form.getLqr1mm()) ) { |
|
|
|
|
|
throw new ServiceException("请输入领取人1密码"); |
|
|
|
|
|
} else if(lqr1 == null ||!SecurityUtils.matchesPassword(form.getLqr1mm(),lqr1.getPassword())) { |
|
|
throw new ServiceException("领取人1密码错误"); |
|
|
throw new ServiceException("领取人1密码错误"); |
|
|
} |
|
|
} |
|
|
SysUser lqr2 = null; |
|
|
SysUser lqr2 = null; |
|
|
if(form.getLqr2Id() != null) { |
|
|
if(form.getLqr2Id() != null) { |
|
|
lqr2 = sysUserService.selectUserById(form.getLqr2Id()); |
|
|
lqr2 = sysUserService.selectUserById(form.getLqr2Id()); |
|
|
if(StringUtils.isEmpty(form.getLqr2mm()) || !SecurityUtils.matchesPassword(form.getLqr2mm(),lqr2.getPassword())) { |
|
|
|
|
|
|
|
|
if(StringUtils.isEmpty(form.getLqr2mm())) { |
|
|
|
|
|
throw new ServiceException("请输入领取人2密码"); |
|
|
|
|
|
} else if(lqr2 == null || !SecurityUtils.matchesPassword(form.getLqr2mm(),lqr2.getPassword())) { |
|
|
throw new ServiceException("领取人2密码错误"); |
|
|
throw new ServiceException("领取人2密码错误"); |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
SysUser ffr1 = sysUserService.selectUserById(form.getFfr1Id()); |
|
|
SysUser ffr1 = sysUserService.selectUserById(form.getFfr1Id()); |
|
|
if(StringUtils.isEmpty(form.getFfr1mm()) || !SecurityUtils.matchesPassword(form.getFfr1mm(),ffr1.getPassword())) { |
|
|
|
|
|
|
|
|
if(StringUtils.isEmpty(form.getFfr1mm())) { |
|
|
|
|
|
throw new ServiceException("请输入发放人1密码"); |
|
|
|
|
|
} else if(ffr1 == null || !SecurityUtils.matchesPassword(form.getFfr1mm(),ffr1.getPassword())) { |
|
|
throw new ServiceException("发放人1密码错误"); |
|
|
throw new ServiceException("发放人1密码错误"); |
|
|
} |
|
|
} |
|
|
SysUser ffr2 = null; |
|
|
SysUser ffr2 = null; |
|
|
if(form.getFfr2Id() != null) { |
|
|
if(form.getFfr2Id() != null) { |
|
|
ffr2 = sysUserService.selectUserById(form.getFfr2Id()); |
|
|
ffr2 = sysUserService.selectUserById(form.getFfr2Id()); |
|
|
if(StringUtils.isEmpty(form.getFfr2mm()) || !SecurityUtils.matchesPassword(form.getFfr2mm(),ffr2.getPassword())) { |
|
|
|
|
|
|
|
|
if(StringUtils.isEmpty(form.getFfr2mm())) { |
|
|
|
|
|
throw new ServiceException("请输入发放人2密码"); |
|
|
|
|
|
} else if(ffr2 == null || !SecurityUtils.matchesPassword(form.getFfr2mm(),ffr2.getPassword())) { |
|
|
throw new ServiceException("发放人2密码错误"); |
|
|
throw new ServiceException("发放人2密码错误"); |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
@ -646,7 +660,7 @@ public class GspServiceImpl extends ServiceImpl implements IGspS |
|
|
} |
|
|
} |
|
|
gspOld.setFfrq(now); |
|
|
gspOld.setFfrq(now); |
|
|
gspOld.setFfbz(form.getRemark()); |
|
|
gspOld.setFfbz(form.getRemark()); |
|
|
gspOld.setMdIds(form.getMdMcs()); |
|
|
|
|
|
|
|
|
gspOld.setMdIds(form.getMdIds()); |
|
|
gspOld.setMdOther(form.getMdOther()); |
|
|
gspOld.setMdOther(form.getMdOther()); |
|
|
gspOld.setZjzt(ZjztEnum.yff.getValue()); |
|
|
gspOld.setZjzt(ZjztEnum.yff.getValue()); |
|
|
//endregion |
|
|
//endregion |
|
|
@ -1027,12 +1041,12 @@ public class GspServiceImpl extends ServiceImpl implements IGspS |
|
|
gspJcgj.setJcmcEn("Dispose"); |
|
|
gspJcgj.setJcmcEn("Dispose"); |
|
|
LinkedHashMap<String, String> jcnrMap = new LinkedHashMap<>(); |
|
|
LinkedHashMap<String, String> jcnrMap = new LinkedHashMap<>(); |
|
|
jcnrMap.put("处置方式", form.getCzfs()); |
|
|
jcnrMap.put("处置方式", form.getCzfs()); |
|
|
jcnrMap.put("处置量", form.getCzl()); |
|
|
|
|
|
|
|
|
jcnrMap.put("处置量", form.getCzl() + gspOld.getKcdw()); |
|
|
jcnrMap.put("原因", form.getRemark()); |
|
|
jcnrMap.put("原因", form.getRemark()); |
|
|
gspJcgj.setJcnr(JctUtil.formatStr(jcnrMap)); |
|
|
gspJcgj.setJcnr(JctUtil.formatStr(jcnrMap)); |
|
|
LinkedHashMap<String, String> jcnrMapEn = new LinkedHashMap<>(); |
|
|
LinkedHashMap<String, String> jcnrMapEn = new LinkedHashMap<>(); |
|
|
jcnrMapEn.put("Dispose Method", form.getCzfs()); |
|
|
jcnrMapEn.put("Dispose Method", form.getCzfs()); |
|
|
jcnrMapEn.put("Amount", form.getCzl()); |
|
|
|
|
|
|
|
|
jcnrMapEn.put("Amount", form.getCzl() + gspOld.getKcdw()); |
|
|
jcnrMapEn.put("Reason", form.getRemark()); |
|
|
jcnrMapEn.put("Reason", form.getRemark()); |
|
|
gspJcgj.setJcnrEn(JctUtil.formatStr(jcnrMapEn)); |
|
|
gspJcgj.setJcnrEn(JctUtil.formatStr(jcnrMapEn)); |
|
|
gspJcgj.setJcmcys(JcmcysEnum.green.getValue()); |
|
|
gspJcgj.setJcmcys(JcmcysEnum.green.getValue()); |
|
|
@ -1092,12 +1106,12 @@ public class GspServiceImpl extends ServiceImpl implements IGspS |
|
|
gspJcgj.setJcmcEn("Dispose"); |
|
|
gspJcgj.setJcmcEn("Dispose"); |
|
|
LinkedHashMap<String, String> jcnrMap = new LinkedHashMap<>(); |
|
|
LinkedHashMap<String, String> jcnrMap = new LinkedHashMap<>(); |
|
|
jcnrMap.put("处置方式", itemForm.getCzfs()); |
|
|
jcnrMap.put("处置方式", itemForm.getCzfs()); |
|
|
jcnrMap.put("处置量", itemForm.getCzl()); |
|
|
|
|
|
|
|
|
jcnrMap.put("处置量", itemForm.getCzl() + gsp.getKcdw()); |
|
|
jcnrMap.put("原因", itemForm.getRemark()); |
|
|
jcnrMap.put("原因", itemForm.getRemark()); |
|
|
gspJcgj.setJcnr(JctUtil.formatStr(jcnrMap)); |
|
|
gspJcgj.setJcnr(JctUtil.formatStr(jcnrMap)); |
|
|
LinkedHashMap<String, String> jcnrMapEn = new LinkedHashMap<>(); |
|
|
LinkedHashMap<String, String> jcnrMapEn = new LinkedHashMap<>(); |
|
|
jcnrMapEn.put("Dispose Method", itemForm.getCzfs()); |
|
|
jcnrMapEn.put("Dispose Method", itemForm.getCzfs()); |
|
|
jcnrMapEn.put("Amount", itemForm.getCzl()); |
|
|
|
|
|
|
|
|
jcnrMapEn.put("Amount", itemForm.getCzl() + gsp.getKcdw()); |
|
|
jcnrMapEn.put("Reason", itemForm.getRemark()); |
|
|
jcnrMapEn.put("Reason", itemForm.getRemark()); |
|
|
gspJcgj.setJcnrEn(JctUtil.formatStr(jcnrMapEn)); |
|
|
gspJcgj.setJcnrEn(JctUtil.formatStr(jcnrMapEn)); |
|
|
gspJcgj.setJcmcys(JcmcysEnum.green.getValue()); |
|
|
gspJcgj.setJcmcys(JcmcysEnum.green.getValue()); |
|
|
@ -1279,24 +1293,33 @@ public class GspServiceImpl extends ServiceImpl implements IGspS |
|
|
@Transactional(rollbackFor = Exception.class) |
|
|
@Transactional(rollbackFor = Exception.class) |
|
|
public void gh(GspGhForm form) { |
|
|
public void gh(GspGhForm form) { |
|
|
SysUser ghr1 = sysUserService.selectUserById(form.getGhr1Id()); |
|
|
SysUser ghr1 = sysUserService.selectUserById(form.getGhr1Id()); |
|
|
if(StringUtils.isEmpty(form.getGhr1mm()) || !SecurityUtils.matchesPassword(form.getGhr1mm(),ghr1.getPassword())) { |
|
|
|
|
|
|
|
|
if(StringUtils.isEmpty(form.getGhr1mm())) { |
|
|
|
|
|
throw new ServiceException("请输入归还人1密码"); |
|
|
|
|
|
} else if(ghr1 == null || !SecurityUtils.matchesPassword(form.getGhr1mm(),ghr1.getPassword())) { |
|
|
throw new ServiceException("归还人1密码错误"); |
|
|
throw new ServiceException("归还人1密码错误"); |
|
|
} |
|
|
} |
|
|
SysUser ghr2 = null; |
|
|
SysUser ghr2 = null; |
|
|
if(form.getGhr2Id() != null) { |
|
|
if(form.getGhr2Id() != null) { |
|
|
ghr2 = sysUserService.selectUserById(form.getGhr2Id()); |
|
|
ghr2 = sysUserService.selectUserById(form.getGhr2Id()); |
|
|
if(StringUtils.isEmpty(form.getGhr2mm()) || !SecurityUtils.matchesPassword(form.getGhr2mm(),ghr2.getPassword())) { |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if(StringUtils.isEmpty(form.getGhr2mm())) { |
|
|
|
|
|
throw new ServiceException("请输入归还人2密码"); |
|
|
|
|
|
} else if(ghr2 == null || !SecurityUtils.matchesPassword(form.getGhr2mm(),ghr2.getPassword())) { |
|
|
throw new ServiceException("归还人2密码错误"); |
|
|
throw new ServiceException("归还人2密码错误"); |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
SysUser jsr1 = sysUserService.selectUserById(form.getJsr1Id()); |
|
|
SysUser jsr1 = sysUserService.selectUserById(form.getJsr1Id()); |
|
|
if(StringUtils.isEmpty(form.getJsr1mm()) || !SecurityUtils.matchesPassword(form.getJsr1mm(),jsr1.getPassword())) { |
|
|
|
|
|
|
|
|
if(StringUtils.isEmpty(form.getJsr1mm())) { |
|
|
|
|
|
throw new ServiceException("请输入库管员1密码"); |
|
|
|
|
|
} else if(jsr1 == null || !SecurityUtils.matchesPassword(form.getJsr1mm(),jsr1.getPassword())) { |
|
|
throw new ServiceException("库管员1密码错误"); |
|
|
throw new ServiceException("库管员1密码错误"); |
|
|
} |
|
|
} |
|
|
SysUser jsr2 = null; |
|
|
SysUser jsr2 = null; |
|
|
if(form.getJsr2Id() != null) { |
|
|
if(form.getJsr2Id() != null) { |
|
|
jsr2 = sysUserService.selectUserById(form.getJsr2Id()); |
|
|
jsr2 = sysUserService.selectUserById(form.getJsr2Id()); |
|
|
if(StringUtils.isEmpty(form.getJsr2mm()) || !SecurityUtils.matchesPassword(form.getJsr2mm(),jsr2.getPassword())) { |
|
|
|
|
|
|
|
|
if(StringUtils.isEmpty(form.getJsr2mm())) { |
|
|
|
|
|
throw new ServiceException("请输入库管员2密码"); |
|
|
|
|
|
} else if(jsr2 == null || !SecurityUtils.matchesPassword(form.getJsr2mm(),jsr2.getPassword())) { |
|
|
throw new ServiceException("库管员2密码错误"); |
|
|
throw new ServiceException("库管员2密码错误"); |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|