## 调整审批前缀;
This commit is contained in:
parent
340c93aea7
commit
6e024764d3
|
@ -10,9 +10,6 @@ import java.util.List;
|
|||
|
||||
/**
|
||||
* 审批业务表 服务类
|
||||
*
|
||||
* @author hzs
|
||||
* @since 2022-09-21
|
||||
*/
|
||||
public interface ISysApprovalBusinessService extends IService<SysApprovalBusiness> {
|
||||
|
||||
|
|
|
@ -9,8 +9,6 @@ import org.apache.ibatis.annotations.Param;
|
|||
|
||||
/**
|
||||
* 部门管理 服务层
|
||||
*
|
||||
* @author hzs
|
||||
*/
|
||||
public interface ISysDeptService {
|
||||
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -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", "审批"),
|
||||
|
||||
/**
|
||||
* 在线支付
|
||||
*/
|
||||
|
|
|
@ -1,23 +1,10 @@
|
|||
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 用户密码
|
||||
|
@ -38,6 +25,7 @@ public class SloganUtil {
|
|||
|
||||
/**
|
||||
* 密码找回
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
public static String passwordRecovery(String code) {
|
||||
|
@ -50,11 +38,11 @@ public class SloganUtil {
|
|||
|
||||
/**
|
||||
* 密码找回 标题
|
||||
*
|
||||
* @param
|
||||
* @return
|
||||
*/
|
||||
public static String passwordRecoveryTitle() {
|
||||
String slogan = "[HZS]--Email Authentication";
|
||||
return slogan;
|
||||
return "[HZS]--Email Authentication";
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue