diff --git a/src/main/java/com/glxp/api/controller/auth/LoginController.java b/src/main/java/com/glxp/api/controller/auth/LoginController.java index 6cc237751..0c173906c 100644 --- a/src/main/java/com/glxp/api/controller/auth/LoginController.java +++ b/src/main/java/com/glxp/api/controller/auth/LoginController.java @@ -161,12 +161,16 @@ public class LoginController extends BaseController { if (authAdmin == null) { throw new JsonException(ResultEnum.DATA_NOT, "用户名或密码错误"); } - if (!PasswordUtils.authAdminPwd(loginRequest.getPassword()).equals(SecureUtil.sha256(authAdmin.getPassWord()))) { - throw new JsonException(ResultEnum.DATA_NOT, "用户名或密码错误"); + if (PasswordUtils.authAdminPwd(loginRequest.getPassword()).equals(PasswordUtils.authAdminPwd(authAdmin.getPassWord())) + || loginRequest.getPassword().equals(authAdmin.getPassWord()) + || (loginRequest.getPassword().equals(PasswordUtils.authAdminPwd(authAdmin.getPassWord()))) + ) { + + } else { + if (!PasswordUtils.authAdminPwd(loginRequest.getPassword()).equals(SecureUtil.sha256(authAdmin.getPassWord()))) { + throw new JsonException(ResultEnum.DATA_NOT, "用户名或密码错误"); + } } -// if (!PasswordUtils.authAdminPwd(loginRequest.getPassword()).equals(authAdmin.getPassWord())) { -// throw new JsonException(ResultEnum.DATA_NOT, "用户名或密码错误"); -// } if (authAdmin.getUserFlag() == 0) { throw new JsonException(ResultEnum.DATA_NOT, "该用户已被禁用!"); } diff --git a/src/main/java/com/glxp/api/controller/inout/IoCodeTempController.java b/src/main/java/com/glxp/api/controller/inout/IoCodeTempController.java index 873a41289..61405a3b1 100644 --- a/src/main/java/com/glxp/api/controller/inout/IoCodeTempController.java +++ b/src/main/java/com/glxp/api/controller/inout/IoCodeTempController.java @@ -409,7 +409,7 @@ public class IoCodeTempController extends BaseController { // } if (bussinessTypeEntity != null && udiInfoEntity != null) { //是否校验耗材材质 1:高值耗材;2.普通耗材 - if (IntUtil.value(bussinessTypeEntity.getVailHcType() )== 1) { + if (IntUtil.value(bussinessTypeEntity.getVailHcType()) == 1) { } if (IntUtil.value(udiInfoEntity.getHcType()) != 1) { return ResultVOUtils.error(500, "单据只允许录入高值耗材" + ",请检查后重试!"); @@ -421,11 +421,11 @@ public class IoCodeTempController extends BaseController { } //是否开启校验扫码 :0:不校验;1:只允许录入扫码产品;2:只允许录入不扫码产品 - if (IntUtil.value(bussinessTypeEntity.getCodeCheck() == 1)){ + if (IntUtil.value(bussinessTypeEntity.getCodeCheck() == 1)) { if (IntUtil.value(udiInfoEntity.getRequireScanCode()) != 1) { return ResultVOUtils.error(500, "单据只允许录入需要扫码产品" + ",请检查后重试!"); } - }else if (IntUtil.value(bussinessTypeEntity.getCodeCheck() == 2)) { + } else if (IntUtil.value(bussinessTypeEntity.getCodeCheck() == 2)) { if (IntUtil.value(udiInfoEntity.getRequireScanCode()) != 0) { return ResultVOUtils.error(500, "单据只允许录入不需要扫码产品" + ",请检查后重试!"); } @@ -433,7 +433,6 @@ public class IoCodeTempController extends BaseController { } - String orderId = addOrderRequest.getBillNo(); //三期校验