## 调整审批前缀;

This commit is contained in:
cabbage 2025-08-26 17:39:44 +08:00
parent 340c93aea7
commit 6e024764d3
6 changed files with 25 additions and 103 deletions

View File

@ -10,9 +10,6 @@ import java.util.List;
/**
* 审批业务表 服务类
*
* @author hzs
* @since 2022-09-21
*/
public interface ISysApprovalBusinessService extends IService<SysApprovalBusiness> {

View File

@ -9,8 +9,6 @@ import org.apache.ibatis.annotations.Param;
/**
* 部门管理 服务层
*
* @author hzs
*/
public interface ISysDeptService {

View File

@ -14,9 +14,6 @@ import java.util.List;
/**
* 审批业务表 服务实现类
*
* @author hzs
* @since 2022-09-21
*/
@Service
public class SysApprovalBusinessServiceImpl extends ServiceImpl<SysApprovalBusinessMapper, SysApprovalBusiness> implements ISysApprovalBusinessService {
@ -61,9 +58,9 @@ public class SysApprovalBusinessServiceImpl extends ServiceImpl<SysApprovalBusin
public String queryLastCode() {
String code = baseMapper.queryLastCode();
if (null == code) {
code = EOrderPrefix.APPROVAL_CODE.getValue() + "00000100";
code = EOrderPrefix.DEFAULT.getValue() + "00000100";
} else {
code = EOrderPrefix.APPROVAL_CODE.getValue() + String.format("%08d", (Integer.parseInt(code.replaceAll(EOrderPrefix.APPROVAL_CODE.getValue(), "")) + 1));
code = EOrderPrefix.DEFAULT.getValue() + String.format("%08d", (Integer.parseInt(code.replaceAll(EOrderPrefix.DEFAULT.getValue(), "")) + 1));
}
return code;
}

View File

@ -3,66 +3,42 @@ package com.hzs.system.sys.service.impl;
import java.text.DecimalFormat;
import java.util.List;
import com.hzs.common.core.enums.EOrderPrefix;
import com.hzs.common.domain.system.sys.SysDept;
import com.hzs.system.sys.param.SysDeptQueryParam;
import com.hzs.system.sys.vo.SysDeptQueryVO;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.hzs.common.core.constant.UserConstants;
import com.hzs.common.core.utils.StringUtils;
import com.hzs.system.sys.mapper.SysDeptMapper;
import com.hzs.system.sys.service.ISysDeptService;
import javax.annotation.Resource;
/**
* 部门管理 服务实现
*
* @author hzs
*/
@Service
public class SysDeptServiceImpl implements ISysDeptService {
@Autowired
@Resource
private SysDeptMapper sysDeptMapper;
/**
* 查询部门管理数据
*
* @param param
* @return
*/
@Override
public List<SysDeptQueryVO> selectDeptList(SysDeptQueryParam param) {
return sysDeptMapper.selectDeptList(param);
}
/**
* 根据部门ID查询信息
*
* @param deptId 部门ID
* @return 部门信息
*/
@Override
public SysDept selectDeptById(Long deptId) {
return sysDeptMapper.selectDeptById(deptId);
}
/**
* 查询部门是否存在用户
*
* @param deptId 部门ID
* @return 结果 true 存在 false 不存在
*/
@Override
public boolean checkDeptExistUser(Long deptId) {
return sysDeptMapper.checkDeptExistUser(deptId) > 0;
}
/**
* 校验部门名称是否唯一
*
* @param dept 部门信息
* @return 结果
*/
@Override
public String checkDeptNameUnique(SysDept dept) {
long deptId = StringUtils.isNull(dept.getDeptId()) ? -1L : dept.getDeptId();
@ -73,36 +49,17 @@ public class SysDeptServiceImpl implements ISysDeptService {
return UserConstants.UNIQUE;
}
/**
* 新增保存部门信息
*
* @param dept 部门信息
* @return 结果
*/
@Override
public int insertDept(SysDept dept) {
dept.setDeptCode(this.getNextDeptCode());
return sysDeptMapper.insertDept(dept);
}
/**
* 修改保存部门信息
*
* @param dept 部门信息
* @return 结果
*/
@Override
public int updateDept(SysDept dept) {
return sysDeptMapper.updateDept(dept);
}
/**
* 删除部门管理信息
*
* @param deptId 部门ID
* @param userId
* @return
*/
@Override
public int deleteDeptById(Long deptId, Long userId) {
return sysDeptMapper.deleteDeptById(deptId, userId);
@ -117,9 +74,9 @@ public class SysDeptServiceImpl implements ISysDeptService {
DecimalFormat decimalFormat = new DecimalFormat("0000");
String deptCode = sysDeptMapper.getMaxDeptCode();
if (StringUtils.isEmpty(deptCode)) {
return "HZS" + decimalFormat.format(1);
return EOrderPrefix.DEFAULT.getValue() + decimalFormat.format(1);
} else {
return "HZS" + decimalFormat.format(Integer.parseInt(deptCode.replace("HZS", "")) + 1);
return EOrderPrefix.DEFAULT.getValue() + decimalFormat.format(Integer.parseInt(deptCode.replace(EOrderPrefix.DEFAULT.getValue(), "")) + 1);
}
}

View File

@ -13,7 +13,7 @@ public enum EOrderPrefix {
/**
* 默认
*/
DEFAULT("DO", "默认"),
DEFAULT("BD", "默认"),
/**
* 订单
@ -70,11 +70,6 @@ public enum EOrderPrefix {
*/
IO_ORDER_CODE("BO", "业务领用订单"),
/**
* 三方订单
*/
THIRD_ORDER_CODE("TH", "订单"),
/**
* 发货单
*/
@ -106,21 +101,11 @@ public enum EOrderPrefix {
*/
TRADE_CODE("TD", "交易流水"),
/**
* 退款
*/
REFUND_CODE("RT", "退款"),
/**
* 撤销订单
*/
REVOKE_ORDER_CODE("RK", "撤销订单"),
/**
* 审批
*/
APPROVAL_CODE("HZS", "审批"),
/**
* 在线支付
*/

View File

@ -1,36 +1,23 @@
package com.hzs.common.core.utils;/**
* @Description:
* @Author: yuhui
* @Time: 2023/3/30 17:14
* @Classname: SloganUtil
* @PackageName: com.hzs.common.core.utils
*/
package com.hzs.common.core.utils;
/**
*@BelongsProject: hzs_cloud
*@BelongsPackage: com.hzs.common.core.utils
*@Author: yh
*@CreateTime: 2023-03-30 17:14
*@Description: TODO
*@Version: 1.0
*/
public class SloganUtil {
/**
* 注册成功 发送欢迎邮件标语
* @param nickName 用户名称
* @param userName 用户账号
* @param password 用户密码
* 注册成功 发送欢迎邮件标语
*
* @param nickName 用户名称
* @param userName 用户账号
* @param password 用户密码
* @return
*/
public static String registerSuccessSlogan(String nickName,String userName,String password){
String slogan = "Welcome "+nickName+",\n" +
public static String registerSuccessSlogan(String nickName, String userName, String password) {
String slogan = "Welcome " + nickName + ",\n" +
"We would like to welcome you to HZS Biotech!\n" +
"\n" +
"Your Account Information\n" +
"This is your account login information for member management system.\n" +
"Login ID : ("+userName+")\n" +
"Password "+password+"\n" +
"Login ID : (" + userName + ")\n" +
"Password " + password + "\n" +
"For your account safety purpose, please change your login password immediately once you have logged into your member management system.\n" +
"Thank you for choosing HZS Biotech as your business partner.";
return slogan;
@ -38,23 +25,24 @@ public class SloganUtil {
/**
* 密码找回
*
* @return
*/
public static String passwordRecovery(String code){
public static String passwordRecovery(String code) {
String slogan = "Verify your email address\n" +
"To continue setting up your HZS account, please verify that this is your email address.\n" +
"YOUR EMAIL Verification Code"+code+"\n" +
"YOUR EMAIL Verification Code" + code + "\n" +
"This link will expire in 5 days. If you did not make this request, please disregard this email. For help, contact us through our Help center.";
return slogan;
}
/**
* 密码找回 标题
*
* @param
* @return
*/
public static String passwordRecoveryTitle(){
String slogan = "[HZS]--Email Authentication";
return slogan;
public static String passwordRecoveryTitle() {
return "[HZS]--Email Authentication";
}
}