Commit 35c70661 by dengshichuan

Merge branch 'tzq' into 'develop'

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

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