Commit 7bd19d22 by tangzhaoqian Committed by chenzg

员工管理、审批代码优化,

parent 56af6282
......@@ -12,7 +12,7 @@ import cn.timer.api.aspect.lang.enums.OperatorType;
/**
* 自定义操作日志记录注解
*
* @author ruoyi
* @author Tang
*
*/
@Target({ ElementType.PARAMETER, ElementType.METHOD })
......
......@@ -3,7 +3,7 @@ package cn.timer.api.aspect.lang.enums;
/**
* 操作状态
*
* @author ruoyi
* @author Tang
*
*/
public enum BusinessStatus
......
......@@ -3,7 +3,7 @@ package cn.timer.api.aspect.lang.enums;
/**
* 操作人类别
*
* @author ruoyi
* @author Tang
*/
public enum OperatorType
{
......
......@@ -3,6 +3,8 @@ package cn.timer.api.bean.spmk;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.Table;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import com.baomidou.mybatisplus.annotation.IdType;
......@@ -10,7 +12,9 @@ import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import cn.timer.api.config.exception.ValidationMsg;
import cn.timer.api.config.validation.Insert;
import cn.timer.api.config.validation.Ranks;
import cn.timer.api.config.validation.Update;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
......@@ -44,6 +48,7 @@ public class SpmkApprovalG extends Model<SpmkApprovalG> {
@ApiModelProperty(value = "企业组织代码 企业组织代码", example = "101")
private Integer orgCode;
@NotBlank(groups = {Insert.class,Update.class},message = ValidationMsg.NOTBLANK)
@ApiModelProperty(value = "组名 ", example = "组名")
private String name;
......
......@@ -14,7 +14,9 @@ import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import cn.timer.api.config.exception.ValidationMsg;
import cn.timer.api.config.validation.Insert;
import cn.timer.api.config.validation.Ranks;
import cn.timer.api.config.validation.Update;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
......@@ -42,7 +44,7 @@ public class SpmkApprovalTemplateG extends Model<SpmkApprovalTemplateG> {
@GeneratedValue
@TableId(type = IdType.AUTO)
@ApiModelProperty(value = "编号 编号", example = "101")
@NotNull(groups = {Ranks.class},message = ValidationMsg.NOTNULL)
@NotNull(groups = {Ranks.class,Insert.class,Update.class},message = ValidationMsg.NOTNULL)
private Integer id;
@ApiModelProperty(value = "组名 ", example = "组名")
......
......@@ -7,7 +7,7 @@ import org.springframework.lang.Nullable;
/**
* 请求方式
*
* @author ruoyi
* @author Tang
*/
public enum HttpMethod
{
......
......@@ -94,10 +94,11 @@ public class Regular {
/**
* 港澳通行证验证
* */
// public static final String HKMAKAO = "/^[a-zA-Z0-9]{6,10}$/";
public static final String HKMAKAO = "/^[HMhm]{1}([0-9]{10}|[0-9]{8})$/";
/**
* 台湾通行证验证
* */
public static final String TAIWAN1 = " /^[0-9]{8}$/";
public static final String TAIWAN1 = "/^[0-9]{8}$/";
public static final String TAIWAN2 = "/^[0-9]{10}$/";
}
......@@ -61,6 +61,9 @@ import io.swagger.annotations.ApiOperation;
@RequestMapping(value = "/login", produces = { "application/json" })
public class LoginController {
@Value(value = "${config-8timer.init-password}")
public String pwd; // 系统赠送时间
@Value("${config-8timer.register-free-time}")
public Integer offset; // 系统赠送时间
......@@ -134,6 +137,9 @@ public class LoginController {
@Autowired
private QyzxEmpEntAssoMapper qyzxEmpEntAssoMapper;
@Autowired
private ZzglBmgwMMapper zzglBmgwMMapper;
@Autowired
private AliyunSMS aliyunSMS;
......@@ -406,7 +412,7 @@ public class LoginController {
if (qyzxEmpLogin1 != null) {
qyzxEmpLogin1.setPhone(phone);
qyzxEmpLogin1.setPw(Md5.md5("123456"));// 密码初始化
qyzxEmpLogin1.setPw(Md5.md5(pwd));// 密码初始化
qyzxEmpLogin1.updateById();
......@@ -544,9 +550,6 @@ public class LoginController {
return loginhan(qyzxEmpLogin1, request);
}
@Autowired
ZzglBmgwMMapper zzglBmgwMMapper;
private Result<QyzxEmpLogin> loginhan(QyzxEmpLogin qyzxEmpLogin1, HttpServletRequest request) {
if (qyzxEmpLogin1 == null)
return ResultUtil.error("帐号不存在!");
......
......@@ -10,7 +10,7 @@ import cn.timer.api.dto.qyzx.QyzxOperLogQuaryDto;
/**
* 操作日志 服务层
*
* @author ruoyi
* @author Tang
*/
public interface QyzxOperLogService
{
......
package cn.timer.api.controller.spmk.service;
import java.util.List;
import cn.timer.api.bean.spmk.SpmkApprovalG;
import cn.timer.api.config.annotation.UserBean;
import cn.timer.api.dto.spmk.SpmkApproveDetailDto;
public interface SpmkService {
......@@ -8,4 +12,6 @@ public interface SpmkService {
SpmkApproveDetailDto selectApproveDetailByAsId(Integer asId);
List<SpmkApprovalG> selectListAg(UserBean userBean);
}
......@@ -17,13 +17,20 @@ import cn.timer.api.bean.spmk.SpmkApprovalTemplateG;
import cn.timer.api.bean.spmk.SpmkApproveDetail;
import cn.timer.api.bean.spmk.SpmkApproveExecuteRecord;
import cn.timer.api.bean.spmk.SpmkCustomApproval;
import cn.timer.api.config.annotation.UserBean;
import cn.timer.api.controller.zzgl.service.ZzglBmgwMService;
import cn.timer.api.dao.spmk.SpmkApprovalGMapper;
import cn.timer.api.dao.spmk.SpmkApproveDetailMapper;
import cn.timer.api.dao.spmk.SpmkApproveExecuteRecordMapper;
import cn.timer.api.dao.spmk.SpmkCustomApprovalMapper;
import cn.timer.api.dto.spmk.SpmkApproveDetailDto;
import cn.timer.api.utils.ResultUtil;
@Service
public class SpmkServiceImpl implements SpmkService{
@Autowired
private ZzglBmgwMService zzglBmgwMService;
@Autowired
private SpmkCustomApprovalMapper spmkCustomApprovalMapper;
......@@ -32,6 +39,9 @@ public class SpmkServiceImpl implements SpmkService{
private SpmkApproveDetailMapper spmkApproveDetailMapper;
@Autowired
private SpmkApprovalGMapper spmkApprovalGMapper;
@Autowired
private SpmkApproveExecuteRecordMapper spmkApproveExecuteRecordMapper;
/**
......@@ -96,4 +106,11 @@ public class SpmkServiceImpl implements SpmkService{
return adD;
}
@Override
public List<SpmkApprovalG> selectListAg(UserBean userBean) {
// TODO Auto-generated method stub
List<Integer> depts = zzglBmgwMService.empNumupGetDepts(userBean.getOrgCode(), userBean.getEmpNum());
return spmkApprovalGMapper.selectListAgInCa(userBean.getOrgCode(), userBean.getEmpNum(), depts);
}
}
......@@ -29,6 +29,8 @@ import cn.hutool.core.lang.tree.TreeNode;
import cn.hutool.core.lang.tree.TreeNodeConfig;
import cn.hutool.core.lang.tree.TreeUtil;
import cn.hutool.core.util.StrUtil;
import cn.timer.api.aspect.lang.annotation.Log;
import cn.timer.api.aspect.lang.enums.BusinessType;
import cn.timer.api.bean.yggl.YgglMainEmp;
import cn.timer.api.bean.zzgl.ZzglAuth;
import cn.timer.api.bean.zzgl.ZzglBmgwM;
......@@ -258,6 +260,7 @@ public class ZzglController {
*/
@DeleteMapping(value = "/dept")
@ApiOperation(value = "删除部门岗位", httpMethod = "DELETE", notes = "接口发布说明")
@Log(title = "删除岗位", businessType = BusinessType.DELETE)
public Result<Integer> deldepts(@CurrentUser UserBean userBean, @RequestBody List<Integer> ids) {
YgglMainEmp ygglMainEmp = YgglMainEmp.builder().build();
UpdateWrapper<YgglMainEmp> updateWrapper = new UpdateWrapper<YgglMainEmp>();
......
......@@ -11,7 +11,7 @@ import cn.timer.api.dto.qyzx.QyzxOperLogQuaryDto;
/**
* 操作日志 数据层
*
* @author ruoyi
* @author Tang
*/
public interface QyzxOperLogMapper extends BaseMapper<QyzxOperLog> {
// /**
......
......@@ -11,6 +11,9 @@ import javax.validation.constraints.NotNull;
import cn.hutool.json.JSONObject;
import cn.timer.api.bean.spmk.SpmkInitiatorConfig;
import cn.timer.api.config.exception.ValidationMsg;
import cn.timer.api.config.validation.Insert;
import cn.timer.api.config.validation.Update;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
......@@ -29,15 +32,15 @@ public class SpmkCustomApprovalDto {
@ApiModelProperty(value = "企业组织代码 企业组织代码", example = "101")
private Integer orgCode;
@NotNull(message = "approvalGId为空")
@NotNull(message = "审批组id不能为空")
@ApiModelProperty(value = "审批组id 当前用户ID", example = "101")
private Integer approvalGId;
@NotBlank(message = "iconUrl为空")
@NotBlank(message = "审批图标不能为空")
@ApiModelProperty(value = "审批图标地址 ", example = "审批图标地址")
private String iconUrl;
@NotBlank(message = "name为空")
@NotBlank(message = "审批名称不能为空")
@ApiModelProperty(value = "审批名称 ", example = "审批名称")
private String name;
......
......@@ -22,7 +22,7 @@ import org.slf4j.LoggerFactory;
/**
* 通用http发送方法
*
* @author ruoyi
* @author Tang
*/
public class HttpUtils
{
......
......@@ -3,7 +3,7 @@ package cn.timer.api.utils;
/**
* 处理并记录日志文件
*
* @author ruoyi
* @author Tang
*/
public class LogUtils
{
......
......@@ -54,6 +54,7 @@ public class ResultUtil<T> {
public Result<T> setData(T t) {
this.result.setData(t);
this.result.setCode(STATUS_CODE_SUCCESS);
this.result.setMessage(MESSAGE_SUCCESS);
return this.result;
}
......
......@@ -14,7 +14,7 @@ import cn.hutool.core.util.StrUtil;
/**
* 客户端工具类
*
* @author ruoyi
* @author Tang
*/
public class ServletUtils
{
......
......@@ -10,7 +10,7 @@ import org.springframework.stereotype.Component;
/**
* spring工具类 方便在非spring管理环境中获取bean
*
* @author ruoyi
* @author Tang
*/
@Component
public final class SpringUtils implements BeanFactoryPostProcessor
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment