Commit ac523a15 by Administrator

Merge branch 'tzq' into 'develop'

Tzq

See merge request 8timerv2/8timerapiv200!101
parents 297d8629 dca81593
......@@ -3,11 +3,14 @@ package cn.timer.api.bean.spmk;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.Table;
import javax.validation.constraints.NotNull;
import com.baomidou.mybatisplus.annotation.IdType;
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.Ranks;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
......@@ -35,6 +38,7 @@ public class SpmkApprovalG extends Model<SpmkApprovalG> {
@GeneratedValue
@TableId(type = IdType.AUTO)
@ApiModelProperty(value = "编号 编号", example = "101")
@NotNull(groups = {Ranks.class},message = ValidationMsg.NOTNULL)
private Integer id;
@ApiModelProperty(value = "企业组织代码 企业组织代码", example = "101")
......@@ -44,6 +48,7 @@ public class SpmkApprovalG extends Model<SpmkApprovalG> {
private String name;
@ApiModelProperty(value = "排序 排序", example = "101")
@NotNull(groups = {Ranks.class},message = ValidationMsg.NOTNULL)
private Integer ranks;
@ApiModelProperty(value = "是否可编辑 0是 1否", example = "101")
......
......@@ -5,6 +5,7 @@ import java.util.Date;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.Table;
import javax.validation.constraints.NotNull;
import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.IdType;
......@@ -12,6 +13,8 @@ import com.baomidou.mybatisplus.annotation.TableField;
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.Ranks;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
......@@ -27,7 +30,7 @@ import lombok.NoArgsConstructor;
@NoArgsConstructor
@AllArgsConstructor
@Table(name = "spmk_approval_template")
@ApiModel("员工登录表")
@ApiModel("审批模板")
public class SpmkApprovalTemplate extends Model<SpmkApprovalTemplate> {
/**
......@@ -39,6 +42,7 @@ public class SpmkApprovalTemplate extends Model<SpmkApprovalTemplate> {
@GeneratedValue
@TableId(type = IdType.AUTO)
@ApiModelProperty(value = "编号 编号", example = "101")
@NotNull(groups = {Ranks.class},message = ValidationMsg.NOTNULL)
private Integer id;
@ApiModelProperty(value = "审批模板组id 当前用户ID", example = "101")
......@@ -57,6 +61,7 @@ public class SpmkApprovalTemplate extends Model<SpmkApprovalTemplate> {
private Integer isOpen;
@ApiModelProperty(value = "排序 由于区分关键字,命名后缀加s", example = "101")
@NotNull(groups = {Ranks.class},message = ValidationMsg.NOTNULL)
private Integer ranks;
@ApiModelProperty(value = "审批意见 是否必填 意见 0是 1否", example = "101")
......
......@@ -5,6 +5,7 @@ import java.util.Date;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.Table;
import javax.validation.constraints.NotNull;
import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.IdType;
......@@ -12,6 +13,8 @@ import com.baomidou.mybatisplus.annotation.TableField;
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.Ranks;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
......@@ -39,12 +42,14 @@ public class SpmkApprovalTemplateG extends Model<SpmkApprovalTemplateG> {
@GeneratedValue
@TableId(type = IdType.AUTO)
@ApiModelProperty(value = "编号 编号", example = "101")
@NotNull(groups = {Ranks.class},message = ValidationMsg.NOTNULL)
private Integer id;
@ApiModelProperty(value = "组名 ", example = "组名")
private String name;
@ApiModelProperty(value = "排序 排序", example = "101")
@NotNull(groups = {Ranks.class},message = ValidationMsg.NOTNULL)
private Integer ranks;
@TableField(fill = FieldFill.INSERT_UPDATE)
......
......@@ -45,10 +45,10 @@ public class SpmkApproveExecuteRecord extends Model<SpmkApproveExecuteRecord> {
@ApiModelProperty(value = "审批汇总id 审批汇总id", example = "101")
private Integer approveSummaryId;
@ApiModelProperty(value = "名称 ", example = "发起申请 1抄送人 审批人 连续多级主管")
@ApiModelProperty(value = "名称 ", example = "发起申请 1抄送人 审批人 ")
private String name;
@ApiModelProperty(value = "类型 0发起申请 1抄送人 2审批人 3连续多级主管", example = "101")
@ApiModelProperty(value = "类型 0发起申请 1抄送人 2审批人", example = "101")
private Integer type;
@ApiModelProperty(value = "状态 0未执行 1审批中 2同意 3拒绝", example = "101")
......
......@@ -5,6 +5,7 @@ import java.util.Date;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.Table;
import javax.validation.constraints.NotNull;
import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.IdType;
......@@ -12,6 +13,8 @@ import com.baomidou.mybatisplus.annotation.TableField;
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.Ranks;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
......@@ -39,6 +42,7 @@ public class SpmkCustomApproval extends Model<SpmkCustomApproval> {
@GeneratedValue
@TableId(type = IdType.AUTO)
@ApiModelProperty(value = "编号 编号", example = "101")
@NotNull(groups = {Ranks.class},message = ValidationMsg.NOTNULL)
private Integer id;
@ApiModelProperty(value = "企业组织代码 企业组织代码", example = "101")
......@@ -59,7 +63,8 @@ public class SpmkCustomApproval extends Model<SpmkCustomApproval> {
@ApiModelProperty(value = "审批开关 0启用 1停用", example = "101")
private Integer isOpen;
@ApiModelProperty(value = "排序 排序", example = "101")
@NotNull(groups = {Ranks.class},message = ValidationMsg.NOTNULL)
@ApiModelProperty(value = "排序", example = "101")
private Integer ranks;
@ApiModelProperty(value = "审批意见 是否必填 意见 0是 1否", example = "101")
......
......@@ -5,7 +5,7 @@ import lombok.Getter;
public interface SpmkEnumInterface {
/**
* 员工类型
* 执行人状态
*/
@Getter
enum ExecutorSts implements SpmkEnumInterface {
......@@ -22,4 +22,144 @@ public interface SpmkEnumInterface {
}
/**
* 审批汇总状态
*/
@Getter
enum ApproveSummarySts implements SpmkEnumInterface {
IN(0, "审批中"), UNDONE(1, "已撤销"), FINISH(2, "通过/完成"), REFUSE(3, "已拒绝");
private Integer type;
private String name;
ApproveSummarySts(Integer type, String name) {
this.type = type;
this.name = name;
}
}
/**
* 是否可编辑
*/
@Getter
enum IsEditable implements SpmkEnumInterface {
TRUE(0, "是"), FALSE(1, "否");
private Integer type;
private String name;
IsEditable(Integer type, String name) {
this.type = type;
this.name = name;
}
}
/**
* 是否启用
*/
@Getter
enum IsOpen implements SpmkEnumInterface {
TRUE(0, "是"), FALSE(1, "否");
private Integer type;
private String name;
IsOpen(Integer type, String name) {
this.type = type;
this.name = name;
}
}
/**
* 审批意见 是否必填
*/
@Getter
enum IsOpinion implements SpmkEnumInterface {
TRUE(0, "是"), FALSE(1, "否");
private Integer type;
private String name;
IsOpinion(Integer type, String name) {
this.type = type;
this.name = name;
}
}
/**
* 类型 0发起申请 1抄送人 2审批人
*/
@Getter
enum ParticipatorType implements SpmkEnumInterface {
INITIATOR(0, "发起人"), COPY(1, "抄送人"), APPROVER(2, "审批人");
private Integer type;
private String name;
ParticipatorType(Integer type, String name) {
this.type = type;
this.name = name;
}
}
/**
* 执行记录状态
*/
@Getter
enum ExecuteRecordSts implements SpmkEnumInterface {
NON_EXECUTION(0, "未执行"), IN_EXECUTION(1, "执行中"), AGREE(2, "同意"), REFUSE(3, "拒绝");
private Integer type;
private String name;
ExecuteRecordSts(Integer type, String name) {
this.type = type;
this.name = name;
}
}
/**
* 可见范围 0部分可见 1所有可见 2禁用
*/
@Getter
enum IsAllvisible implements SpmkEnumInterface {
PORTION(0, "部分可见"), ALL(1, "所有可见"), DISABLED(2, "禁用");
private Integer type;
private String name;
IsAllvisible(Integer type, String name) {
this.type = type;
this.name = name;
}
}
/**
* 发起人配置 类型 1员工 2部门 3岗位
*/
@Getter
enum InitiatorConfigType implements SpmkEnumInterface {
EMPLOYEE(0, "员工"), DEPARTMENT(1, "部门"), POST(2, "岗位");
private Integer type;
private String name;
InitiatorConfigType(Integer type, String name) {
this.type = type;
this.name = name;
}
}
}
......@@ -8,6 +8,7 @@ import java.util.Map;
import java.util.regex.Pattern;
import cn.timer.api.dto.yggl.YgbintuDto;
import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
/**
......@@ -57,7 +58,7 @@ public interface YgEnumInterface {
}
}
/**
* 员工类型
*/
......
package cn.timer.api.config.exception;
public class Regular {
/**
* 不超过20字符
*/
public static final String CHARS20 = "(\\s|\\S){0,20}";
/**
* 不超过500字符
*/
public static final String CHARS500 = "(\\s|\\S){0,500}";
/**
* 手机号码
*/
public static final String PHONE = "^((13[0-9])|(14[5|7])|(15([0-3]|[5-9]))|(17[013678])|(18[0,5-9]))\\d{8}$";
/**
* 账号是否合法
*/
public static final String TOFZHANHAO = "^[a-zA-Z][a-zA-Z0-9_]{4,15}$";
/**
* 密码是否合法
*/
public static final String TOFPW = "^[a-zA-Z]\\w{5,17}$";
/**
* 强密码
*/
public static final String SHPW = "^(?=.*\\d)(?=.*[a-z])(?=.*[A-Z])[a-zA-Z0-9]{8,10}$";
/**
* 纯汉字输入
*/
public static final String CHINESE = "[\\u4E00-\\u9FA5]*";
/**
* 邮箱
*/
public static final String EMAIL = "^\\w+([-+.]\\w+)*@\\w+([-.]\\w+)*\\.\\w+([-.]\\w+)*$";
/**
* 域名
*/
public static final String DNS = "[a-zA-Z0-9][-a-zA-Z0-9]{0,62}(\\.[a-zA-Z0-9][-a-zA-Z0-9]{0,62})+\\.?";
/**
* 非负整数
*/
public static final String FUNUM = "^(0|[1-9][0-9]*)$";
/**
* xml文件命名
*/
public static final String XML = "^([a-zA-Z]+-?)+[a-zA-Z0-9]+\\.(xml|XML|Xml)$";
/**
* QQ
*/
public static final String QQ = "[1-9][0-9]{4,}";
/**
* 邮政
*/
public static final String YOUZHEN = "[1-9]\\d{5}(?!\\d)";
/**
* IP
*/
public static final String IPADDRESS = "\\d+\\.\\d+\\.\\d+\\.\\d+";
/**
* IP255.255.255.255
*/
public static final String IP255 = "((?:(?:25[0-5]|2[0-4]\\d|[01]?\\d?\\d)\\.){3}(?:25[0-5]|2[0-4]\\d|[01]?\\d?\\d))";
/**
* IP-V4
*/
public static final String IPV4 = "\\b(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\b";
/**
* IP-V6
*/
public static final String IPV6 = "(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\\\\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\\\\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))";
/**
* 子网掩码
*/
public static final String SUBM = "((?:(?:25[0-5]|2[0-4]\\\\d|[01]?\\\\d?\\\\d)\\\\.){3}(?:25[0-5]|2[0-4]\\\\d|[01]?\\\\d?\\\\d))";
/**
* yyyy-mm-dd 平闰年校验
*/
public static final String YMD = "^(?:(?!0000)[0-9]{4}-(?:(?:0[1-9]|1[0-2])-(?:0[1-9]|1[0-9]|2[0-8])|(?:0[13-9]|1[0-2])-(?:29|30)|(?:0[13578]|1[02])-31)|(?:[0-9]{2}(?:0[48]|[2468][048]|[13579][26])|(?:0[48]|[2468][048]|[13579][26])00)-02-29)$";
/**
* 身份证校验码看isIdCard
*/
public static final String IDSTRING = "(^[1-9]\\\\d{5}(18|19|20)\\\\d{2}((0[1-9])|(10|11|12))(([0-2][1-9])|10|20|30|31)\\\\d{3}[0-9Xx]$)|(^[1-9]\\\\d{5}\\\\d{2}((0[1-9])|(10|11|12))(([0-2][1-9])|10|20|30|31)\\\\d{3}$)";
/**
* 检查身份证是否合法 验证时请先验证长度是否为15为或者18位
* */
public static final String IDCARD = "\\d{6}(19|20)*[0-99]{2}(0[1-9]{1}|10|11|12)(0[1-9]{1}|1[0-9]|2[0-9]|30|31)(\\w*)";
/**
* 检查护照是否合法
* */
public static final String PASSPORT1 = "/^[a-zA-Z]{5,17}$/";
public static final String PASSPORT2 = "/^[a-zA-Z0-9]{5,17}$/";
/**
* 港澳通行证验证
* */
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 TAIWAN2 = "/^[0-9]{10}$/";
}
package cn.timer.api.config.validation;
public interface Insert {
}
package cn.timer.api.config.validation;
public interface Ranks {
}
package cn.timer.api.config.validation;
public interface Update {
}
package cn.timer.api.config.validation;
import java.util.Collection;
import java.util.Iterator;
import java.util.LinkedList;
import java.util.List;
import java.util.ListIterator;
import javax.validation.Valid;
import lombok.Data;
@Data
public class ValidList<E> implements List<E> {
@Valid
private List<E> list = new LinkedList<>();
@Override
public int size() {
return list.size();
}
@Override
public boolean isEmpty() {
return list.isEmpty();
}
@Override
public boolean contains(Object o) {
return list.contains(o);
}
@Override
public Iterator<E> iterator() {
return list.iterator();
}
@Override
public Object[] toArray() {
return list.toArray();
}
@Override
public <T> T[] toArray(T[] a) {
return list.toArray(a);
}
@Override
public boolean add(E e) {
return list.add(e);
}
@Override
public boolean remove(Object o) {
return list.remove(o);
}
@Override
public boolean containsAll(Collection<?> c) {
return list.containsAll(c);
}
@Override
public boolean addAll(Collection<? extends E> c) {
return list.addAll(c);
}
@Override
public boolean addAll(int index, Collection<? extends E> c) {
return list.addAll(index, c);
}
@Override
public boolean removeAll(Collection<?> c) {
return list.removeAll(c);
}
@Override
public boolean retainAll(Collection<?> c) {
return list.retainAll(c);
}
@Override
public void clear() {
list.clear();
}
@Override
public E get(int index) {
return list.get(index);
}
@Override
public E set(int index, E element) {
return list.set(index, element);
}
@Override
public void add(int index, E element) {
list.add(index, element);
}
@Override
public E remove(int index) {
return list.remove(index);
}
@Override
public int indexOf(Object o) {
return list.indexOf(o);
}
@Override
public int lastIndexOf(Object o) {
return list.lastIndexOf(o);
}
@Override
public ListIterator<E> listIterator() {
return list.listIterator();
}
@Override
public ListIterator<E> listIterator(int index) {
return list.listIterator(index);
}
@Override
public List<E> subList(int fromIndex, int toIndex) {
return list.subList(fromIndex, toIndex);
}
}
......@@ -47,8 +47,12 @@ import cn.timer.api.bean.yggl.YgglMainEmp;
import cn.timer.api.config.annotation.CurrentUser;
import cn.timer.api.config.annotation.UserBean;
import cn.timer.api.config.enuminterface.SpmkEnumInterface;
import cn.timer.api.config.enuminterface.SpmkEnumInterface.ApproveSummarySts;
import cn.timer.api.config.enuminterface.SpmkEnumInterface.ExecutorSts;
import cn.timer.api.config.exception.CustomException;
import cn.timer.api.config.validation.Insert;
import cn.timer.api.config.validation.Ranks;
import cn.timer.api.config.validation.ValidList;
import cn.timer.api.controller.spmk.service.SpmkServiceImpl;
import cn.timer.api.controller.zzgl.service.ZzglBmgwMService;
import cn.timer.api.dao.spmk.SpmkApprovalGMapper;
......@@ -167,7 +171,7 @@ public class SpmkController {
@PutMapping(value = "/update_approval_template_g")
@ApiOperation(value = "4.排序-审批模板组", httpMethod = "PUT", notes = "排序-审批模板组")
@ApiOperationSupport(order = 4)
public Result<Object> ranksAtg(@RequestBody List<SpmkApprovalTemplateG> list){
public Result<Object> ranksAtg(@Validated(Ranks.class) @RequestBody ValidList<SpmkApprovalTemplateG> list){
return spmkApprovalTemplateGMapper.updateListRandsById(list) ? ResultUtil.success("操作成功!") : ResultUtil.error("操作失败!");
}
......@@ -244,7 +248,7 @@ public class SpmkController {
@PutMapping(value = "/update_approval_template")
@ApiOperation(value = "8.排序-审批模板", httpMethod = "PUT", notes = "查询列表-审批模板组")
@ApiOperationSupport(order = 8)
public Result<Object> ranksAt(@RequestBody List<SpmkApprovalTemplate> list){
public Result<Object> ranksAt(@Validated({Ranks.class})@RequestBody ValidList<SpmkApprovalTemplate> list){
return spmkApprovalTemplateMapper.updateListRandsById(list) ? ResultUtil.success("操作成功!") : ResultUtil.error("操作失败!");
......@@ -322,7 +326,7 @@ public class SpmkController {
@PutMapping(value = "/update_approval_g")
@ApiOperation(value = "12.排序-审批组", httpMethod = "PUT", notes = "排序-审批组")
@ApiOperationSupport(order = 12)
public Result<Object> ranksAg(@RequestBody List<SpmkApprovalG> list){
public Result<Object> ranksAg(@Validated({Ranks.class}) @RequestBody ValidList<SpmkApprovalG> list){
return spmkApprovalGMapper.updateListRandsById(list) ? ResultUtil.success("操作成功!") : ResultUtil.error("操作失败!");
}
......@@ -437,7 +441,7 @@ public class SpmkController {
@PutMapping(value = "/update_custom_approval")
@ApiOperation(value = "16.排序-自定义审批", httpMethod = "PUT", notes = "排序-自定义审批")
@ApiOperationSupport(order = 16)
public Result<Object> ranksCa(@RequestBody List<SpmkCustomApproval> list){
public Result<Object> ranksCa(@Validated({Ranks.class}) @RequestBody ValidList<SpmkCustomApproval> list){
return spmkCustomApprovalMapper.updateListRandsById(list) ? ResultUtil.success("操作成功!") : ResultUtil.error("操作失败!");
}
......@@ -482,7 +486,7 @@ public class SpmkController {
.initiator(spmkApproveSummaryDto.getInitiator())
.approveName(spmkApproveSummaryDto.getApproveName())
.assoType(spmkApproveSummaryDto.getAssoType())
.sts(0)
.sts(ApproveSummarySts.IN.ordinal())
.currentApprover(currentApprover).build();
if (!as.insert()) {
......@@ -599,7 +603,7 @@ public class SpmkController {
if (aSummary.getSts() == 1 || aSummary.getSts() == 2 || aSummary.getSts() == 3) {
if (aSummary.getSts() > SpmkEnumInterface.ApproveSummarySts.IN.ordinal()) {
return ResultUtil.error("该审批已结束!");
}
......@@ -642,8 +646,8 @@ public class SpmkController {
.select(SpmkApproveSummary::getSts,SpmkApproveSummary::getAssoType)
.eq(SpmkApproveSummary::getId, approvingDto.getAsId()));
if (aSummary.getSts() != 3) {
SpmkApproveSummary.builder().id(approvingDto.getAsId()).currentApprover("").endTime(new Date()).sts(2).build().updateById();
if (aSummary.getSts() != SpmkEnumInterface.ApproveSummarySts.REFUSE.ordinal()) {
SpmkApproveSummary.builder().id(approvingDto.getAsId()).currentApprover("").endTime(new Date()).sts(ApproveSummarySts.FINISH.ordinal()).build().updateById();
//审批完成后 业务
SpmkAssoBusiness sab = SpmkAssoBusinessFactory.createSpmkAssoType(ApproveEnum.getEnums(aSummary.getAssoType()));
......@@ -695,7 +699,7 @@ public class SpmkController {
.select(SpmkApproveSummary::getSts)
.eq(SpmkApproveSummary::getId, id));
return as != null && as.getSts() != 2 ? (SpmkApproveSummary.builder().id(id).endTime(new Date()).sts(1).build().updateById() ?
return as != null && as.getSts() != ApproveSummarySts.FINISH.ordinal() ? (SpmkApproveSummary.builder().id(id).endTime(new Date()).sts(ApproveSummarySts.UNDONE.ordinal()).build().updateById() ?
ResultUtil.success("操作成功!") : ResultUtil.error("操作失败_1!")) : ResultUtil.error("审批已结束,无法撤销!");
}
......
......@@ -44,14 +44,13 @@ import com.github.pagehelper.util.StringUtil;
import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
import cn.hutool.core.bean.BeanUtil;
import cn.hutool.core.bean.copier.CopyOptions;
import cn.hutool.core.collection.CollUtil;
import cn.hutool.core.date.BetweenFormater.Level;
import cn.hutool.core.date.DateUtil;
import cn.hutool.core.lang.tree.Tree;
import cn.hutool.core.lang.tree.TreeNodeConfig;
import cn.hutool.core.lang.tree.TreeUtil;
import cn.hutool.core.util.ObjectUtil;
import cn.hutool.core.util.ReUtil;
import cn.hutool.core.util.StrUtil;
import cn.hutool.json.JSONUtil;
import cn.timer.api.bean.clazz.CommonArea;
......@@ -77,12 +76,10 @@ import cn.timer.api.config.annotation.CurrentUser;
import cn.timer.api.config.annotation.UserBean;
import cn.timer.api.config.enuminterface.YgEnumInterface;
import cn.timer.api.config.enums.CommonEnum;
import cn.timer.api.config.exception.Regular;
import cn.timer.api.dao.clazz.CommonAreaMapper;
import cn.timer.api.dao.qyzx.QyzxEmpLoginMapper;
import cn.timer.api.dao.yggl.YgAreaDtoMapper;
import cn.timer.api.dao.yggl.YgCityDtoMapper;
import cn.timer.api.dao.yggl.YgMzDtoMapper;
import cn.timer.api.dao.yggl.YgProDtoMapper;
import cn.timer.api.dao.yggl.YgglMainEmpMapper;
import cn.timer.api.dao.yggl.YgglMainLzbMapper;
import cn.timer.api.dao.zzgl.ZzglBmgwMMapper;
......@@ -91,17 +88,13 @@ import cn.timer.api.dto.yggl.LoginInfoDto;
import cn.timer.api.dto.yggl.LoginerChargeDto;
import cn.timer.api.dto.yggl.LzbQueryDto;
import cn.timer.api.dto.yggl.LzygQueryDto;
import cn.timer.api.dto.yggl.YgAreaDto;
import cn.timer.api.dto.yggl.YgCartogramDto;
import cn.timer.api.dto.yggl.YgCityDto;
import cn.timer.api.dto.yggl.YgDrjqbDto;
import cn.timer.api.dto.yggl.YgDrsDto;
import cn.timer.api.dto.yggl.YgKVDto;
import cn.timer.api.dto.yggl.YgProDto;
import cn.timer.api.dto.yggl.YgQueryDto;
import cn.timer.api.dto.yggl.YgbintuDto;
import cn.timer.api.dto.yggl.YgglCartogramDto;
import cn.timer.api.dto.yggl.YgjgDto;
import cn.timer.api.dto.yggl.YgmzDto;
import cn.timer.api.dto.yggl.YgzzDto;
import cn.timer.api.utils.Md5;
......@@ -136,14 +129,6 @@ public class YgglController {
@Autowired
private ZzglBmgwMMapper zzglBmgwMMapper;
// weng(籍贯)
@Autowired
private YgAreaDtoMapper ygAreaDtoMapper;
@Autowired
private YgCityDtoMapper ygCityDtoMapper;
@Autowired
private YgProDtoMapper ygProDtoMapper;
// weng(民族)
@Autowired
private YgMzDtoMapper ygMzDtoMapper;
......@@ -155,7 +140,7 @@ public class YgglController {
* @return
*/
@GetMapping(value = "/loginmessage")
@ApiOperation(value = " 获取登录人的相关信息", httpMethod = "GET", notes = "接口发布说明")
@ApiOperation(value = "获取登录人的相关信息", httpMethod = "GET", notes = "接口发布说明")
@ApiOperationSupport(order = 68)
public Result<LoginInfoDto> loginmessage(@CurrentUser UserBean userBean) {
Integer empNum = userBean.getEmpNum();
......@@ -363,6 +348,29 @@ public class YgglController {
String phone = addygdaDto.getPhone();
Integer zjType = addygdaDto.getZjType();
String zjNum = addygdaDto.getZjNum();
boolean isvalid = true;
switch (zjType) {
case 0:
isvalid = ReUtil.isMatch(Regular.IDCARD, zjNum);
break;
case 1:
isvalid = ReUtil.isMatch(Regular.HKMAKAO, zjNum);
break;
case 2:
isvalid = ReUtil.isMatch(Regular.TAIWAN1, zjNum) || ReUtil.isMatch(Regular.TAIWAN2, zjNum);
break;
case 3:
isvalid = ReUtil.isMatch(Regular.PASSPORT1, zjNum) || ReUtil.isMatch(Regular.PASSPORT2, zjNum);
break;
default:
break;
}
if (!isvalid) {
return ResultUtil.error("证件格式不对!");
}
Integer jobType = addygdaDto.getJobType();
Date rzTime = addygdaDto.getRzTime();
Integer syq = addygdaDto.getSyq();
......@@ -1737,13 +1745,13 @@ public class YgglController {
CommonAreaMapper commonAreaMapper;
/**
* 籍贯树-Mini
* 籍贯树
*
* @param
* @return
*/
@GetMapping(value = "/native_place")
@ApiOperation(value = "籍贯树-Mini", httpMethod = "GET", notes = "籍贯树-Mini")
@ApiOperation(value = "籍贯树", httpMethod = "GET", notes = "籍贯树")
@ApiOperationSupport(order = 60)
public Result<List<CommonArea>> selectNativePlace() {
......@@ -1753,129 +1761,6 @@ public class YgglController {
}
/**
* 展示籍贯/展示所有籍贯
*
* @param
* @return
*/
@PostMapping(value = "/jg")
@ApiOperation(value = "展示籍贯所有省市区", httpMethod = "POST", notes = "接口发布说明")
@ApiOperationSupport(order = 60)
public Result<List<YgjgDto>> selectjgs(@CurrentUser UserBean userBean) {
List<YgjgDto> oldfather = new ArrayList<YgjgDto>();// 老父亲
List<YgProDto> pro = new LambdaQueryChainWrapper<YgProDto>(ygProDtoMapper).list();// super继承人
List<YgCityDto> city = new LambdaQueryChainWrapper<YgCityDto>(ygCityDtoMapper).list();
List<YgAreaDto> area = new LambdaQueryChainWrapper<YgAreaDto>(ygAreaDtoMapper).list();
for (YgProDto p : pro) {
Map<String, Object> map = BeanUtil.beanToMap(p);
// 设置别名对应bean
HashMap<String, String> mapping = CollUtil.newHashMap();
mapping.put("id", "jgid");
mapping.put("name", "jgname");
YgjgDto ygproDto = BeanUtil.mapToBean(map, YgjgDto.class, CopyOptions.create().setFieldMapping(mapping));
// 添加cityList
// 给一个upid
List<YgCityDto> outcity = uptocityList(city, ygproDto.getJgid());
// 新建一个篮子
List<YgjgDto> cityDtos = new ArrayList<YgjgDto>();
for (YgCityDto c : outcity) {
Map<String, Object> map2 = BeanUtil.beanToMap(c);
HashMap<String, String> mapping2 = CollUtil.newHashMap();
mapping2.put("id", "jgid");
mapping2.put("name", "jgname");
mapping2.put("province", "upid");
YgjgDto ygcityDto = BeanUtil.mapToBean(map2, YgjgDto.class,
CopyOptions.create().setFieldMapping(mapping2));
// 把果实收起来
cityDtos.add(ygcityDto);
List<YgAreaDto> outarea = uptoareaList(area, ygcityDto.getJgid());
List<YgjgDto> areaDtos = new ArrayList<YgjgDto>();
for (YgAreaDto a : outarea) {
Map<String, Object> map3 = BeanUtil.beanToMap(a);
HashMap<String, String> mapping3 = CollUtil.newHashMap();
mapping3.put("id", "jgid");
mapping3.put("name", "jgname");
mapping3.put("city", "upid");
YgjgDto ygjgDto3 = BeanUtil.mapToBean(map3, YgjgDto.class,
CopyOptions.create().setFieldMapping(mapping3));
areaDtos.add(ygjgDto3);
}
ygcityDto.setYgjgDtoList(areaDtos);
areaDtos.add(ygcityDto);
}
ygproDto.setYgjgDtoList(cityDtos);
oldfather.add(ygproDto);
}
return ResultUtil.data(oldfather, "老父亲出来了");
}
// 根据上级id抽取出list
public List<YgCityDto> uptocityList(List<YgCityDto> city, Integer jgid) {
List<YgCityDto> outcity = new ArrayList<YgCityDto>();
for (YgCityDto c : city) {
if (c.getProvince().equals(jgid)) {
outcity.add(c);
}
}
city.removeAll(outcity);
return outcity;
}
public List<YgAreaDto> uptoareaList(List<YgAreaDto> area, Integer jgid) {
List<YgAreaDto> outarea = new ArrayList<YgAreaDto>();
for (YgAreaDto a : area) {
if (a.getCity().equals(jgid)) {
outarea.add(a);
}
}
area.removeAll(outarea);
return outarea;
}
/**
* 展示籍贯/展示所有籍贯(威力增强版)
*
* @param
* @return
*/
@PostMapping(value = "/jgshow/{jgid}")
@ApiOperation(value = "展示籍贯所有省市区威力增强版", httpMethod = "POST", notes = "接口发布说明")
@ApiOperationSupport(order = 388)
public Result<Map<String, String>> selectjgs1(@CurrentUser UserBean userBean, @PathVariable String jgid) {
// public Result<List<YgjgDto>> selectjgs1(@CurrentUser UserBean userBean,
// @RequestBody YgjgDto ygjgDto) {
Integer upId = Integer.valueOf(jgid);
// List<YgjgDto> maps = new ArrayList<YgjgDto>();
Map<String, String> maps = new HashMap<String, String>();
if (upId == null || upId % 100 != 0) { // 省份
List<YgProDto> list = new LambdaQueryChainWrapper<YgProDto>(ygProDtoMapper)
.select(YgProDto::getId, YgProDto::getProvince, YgProDto::getName).orderByAsc(YgProDto::getProvince)
.list();
list.forEach((item) -> maps.put((item.getId()).toString(), item.getName()));
} else if (upId % 10000 == 0) {
List<YgCityDto> list = new LambdaQueryChainWrapper<YgCityDto>(ygCityDtoMapper)
.select(YgCityDto::getId, YgCityDto::getProvince, YgCityDto::getCity, YgCityDto::getName)
.eq(YgCityDto::getProvince, upId).orderByAsc(YgCityDto::getProvince).orderByAsc(YgCityDto::getCity)
.list();
list.forEach((item) -> maps.put((item.getId()).toString(), item.getName()));
} else if (upId % 100 == 0) {
List<YgAreaDto> list = new LambdaQueryChainWrapper<YgAreaDto>(ygAreaDtoMapper)
.select(YgAreaDto::getId, YgAreaDto::getName).eq(YgAreaDto::getCity, upId)
.orderByAsc(YgAreaDto::getProvince).orderByAsc(YgAreaDto::getCity).list();
list.forEach((item) -> maps.put((item.getId()).toString(), item.getName()));
}
return ResultUtil.data(maps, "展示籍贯成功");
}
/**
* 查询员工列表
*
* @param
......
......@@ -10,7 +10,9 @@ import java.util.Date;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Pattern;
import cn.timer.api.config.exception.Regular;
import cn.timer.api.config.exception.ValidationMsg;
import cn.timer.api.utils.Page;
import io.swagger.annotations.ApiModelProperty;
......@@ -37,6 +39,7 @@ public class AddygdaDto extends Page implements Serializable{
private String name;
@NotBlank(message = ValidationMsg.NOTBLANK)
@Pattern(regexp=Regular.PHONE,message = ValidationMsg.PATTERN)
@ApiModelProperty(value="手机号",example="101")
private String phone;
......
......@@ -19,7 +19,9 @@ import cn.timer.api.bean.spmk.SpmkApproveSummary;
import cn.timer.api.bean.spmk.SpmkExecutor;
import cn.timer.api.bean.yggl.YgglMainEmp;
import cn.timer.api.bean.zzgl.ZzglBmgwM;
import cn.timer.api.config.enuminterface.SpmkEnumInterface.ExecuteRecordSts;
import cn.timer.api.config.enuminterface.SpmkEnumInterface.ExecutorSts;
import cn.timer.api.config.enuminterface.SpmkEnumInterface.ParticipatorType;
import cn.timer.api.dto.spmk.Condition;
import cn.timer.api.dto.spmk.FlowChildren;
import cn.timer.api.dto.spmk.FromData;
......@@ -39,7 +41,6 @@ public class RouterUtils {
private final static String EXECUTING = "1";
private final static String EXECUTED = "2";
private final static String CREATOR = "creator";
private final static String RULES = "rules";
private final static String AUDIT = "audit";
private final static String COPY = "copy";
private final static String RELATION_TYPE_DEPARTMENT = "department";
......@@ -105,9 +106,6 @@ public class RouterUtils {
}
break user;
// case EXECUTING:
// listUser.get(i).setExecute(EXECUTED);
// break;
}
}
isAuditNext = true;
......@@ -124,8 +122,6 @@ public class RouterUtils {
// 装配 部门人员
if (RELATION_TYPE_DEPARTMENT.equals(listRelations.get(i).getType()) && listRelations.get(i).getDepartmentId() != null) {
Console.log("listRelations-----------"+ listRelations);
Console.log("obj-----------"+ obj);
List<YgglMainEmp> listYgglMainEmp = selectOtherlistent(Integer.parseInt(obj.get("orgCode",FromData.class).getValue().trim()), Integer.valueOf(listRelations.get(i).getDepartmentId().trim()));
System.out.println(listYgglMainEmp);
......@@ -304,8 +300,8 @@ public class RouterUtils {
.builder()
.approveSummaryId(asId)
.name("发起申请")
.type(0)
.sts(2)
.type(ParticipatorType.INITIATOR.ordinal())
.sts(ExecuteRecordSts.AGREE.ordinal())
.build();
// 新增 审批执行记录
aer.insert();
......@@ -326,8 +322,8 @@ public class RouterUtils {
.builder()
.approveSummaryId(asId)
.name("审批人")
.type(2)
.sts(1)
.type(ParticipatorType.APPROVER.ordinal())
.sts(ExecuteRecordSts.IN_EXECUTION.ordinal())
.build();
// 新增 审批执行记录
aer2.insert();
......@@ -359,8 +355,8 @@ public class RouterUtils {
.builder()
.approveSummaryId(asId)
.name("抄送人")
.type(1)
.sts(2)
.type(ParticipatorType.COPY.ordinal())
.sts(ExecuteRecordSts.AGREE.ordinal())
.build();
// 新增 审批执行记录
aer3.insert();
......@@ -425,7 +421,7 @@ public class RouterUtils {
// 历史审批人
SpmkApproveSummary.builder().id(asId).historyApprover(listUser.get(i_user).getName()).build().updateById();
// 0未执行 1执行中 2同意 3拒绝 4 转派
if (sts == 3) {
if (sts == ExecutorSts.REFUSE.ordinal()) {
// 更新 审批汇总 状态
SpmkApproveSummary.builder().id(asId).currentApprover("").endTime(new Date()).sts(sts).build().updateById();
SpmkApproveExecuteRecord
......@@ -438,7 +434,7 @@ public class RouterUtils {
listFlowChildren.get(i_user).setExecute(EXECUTED);
return;
//转派 处理
}else if (sts == 4) {
}else if (sts == ExecutorSts.REDEPLOY.ordinal()) {
List<User> users1 = CollectionUtil.sub(listUser, 0, i_user+1);
users1.add(redeployUser);
List<User> users2 = CollectionUtil.sub(listUser, i_user+1, listUser.size());
......@@ -470,7 +466,7 @@ public class RouterUtils {
SpmkApproveExecuteRecord aer = SpmkApproveExecuteRecord
.builder()
.id(executeRecordId)
.sts(2)
.sts(ExecutorSts.AGREE.ordinal())
.build();
// 更新 审批执行记录
aer.updateById();
......@@ -486,7 +482,7 @@ public class RouterUtils {
.approveSummaryId(asId)
.name("发起申请")
.type(0)
.sts(2)
.sts(ExecuteRecordSts.AGREE.ordinal())
.build();
// 新增 审批执行记录
aer.insert();
......@@ -509,8 +505,8 @@ public class RouterUtils {
.builder()
.approveSummaryId(asId)
.name("审批人")
.type(2)
.sts(1)
.type(ParticipatorType.APPROVER.ordinal())
.sts(ExecuteRecordSts.IN_EXECUTION.ordinal())
.build();
// 新增 审批执行记录
aer2.insert();
......@@ -535,8 +531,8 @@ public class RouterUtils {
.builder()
.approveSummaryId(asId)
.name("抄送人")
.type(1)
.sts(2)
.type(ParticipatorType.COPY.ordinal())
.sts(ExecuteRecordSts.AGREE.ordinal())
.build();
// 新增 审批执行记录
aer3.insert();
......
package cn.timer.api.utils.router.business;
import cn.hutool.core.util.ObjectUtil;
import cn.hutool.core.util.StrUtil;
import cn.hutool.json.JSONObject;
import cn.timer.api.dto.spmk.FromData;
......@@ -17,21 +18,21 @@ public class EvectionBusiness extends SpmkAssoBusiness {
public void handleApprove(JSONObject jsonObj) {
// TODO Auto-generated method stub
// 发起人企业id
String orgCode = jsonObj.get("orgCode",FromData.class).getValue();
String orgCode = ObjectUtil.isNull(jsonObj.get("orgCode",FromData.class)) ? null : jsonObj.get("orgCode",FromData.class).getValue();
// 发起人id
String id = jsonObj.get("id",FromData.class).getValue();
String id = ObjectUtil.isNull(jsonObj.get("id",FromData.class)) ? null : jsonObj.get("id",FromData.class).getValue();
// 发起人名称
String initiator = jsonObj.get("initiator",FromData.class).getValue();
String initiator = ObjectUtil.isNull(jsonObj.get("initiator",FromData.class)) ? null : jsonObj.get("initiator",FromData.class).getValue();
// 开始时间
String startTime = jsonObj.get("__startTime",FromData.class).getValue();
String startTime = ObjectUtil.isNull(jsonObj.get("__startTime",FromData.class)) ? null : jsonObj.get("__startTime",FromData.class).getValue();
// 结束时间
String endTime = jsonObj.get("__endTime",FromData.class).getValue();
String endTime = ObjectUtil.isNull(jsonObj.get("__endTime",FromData.class)) ? null : jsonObj.get("__endTime",FromData.class).getValue();
// 时长
String longTime = jsonObj.get("__longTime",FromData.class).getValue();
String longTime = ObjectUtil.isNull(jsonObj.get("__longTime",FromData.class)) ? null : jsonObj.get("__longTime",FromData.class).getValue();
// 出差事由
String businessTrip = jsonObj.get("__businessTrip",FromData.class).getValue();
String businessTrip = ObjectUtil.isNull(jsonObj.get("__businessTrip",FromData.class)) ? null : jsonObj.get("__businessTrip",FromData.class).getValue();
// 上传文件
String UploadAttachment = jsonObj.get("UploadAttachment",FromData.class).getValue();
String UploadAttachment = ObjectUtil.isNull(jsonObj.get("UploadAttachment",FromData.class)) ? null : jsonObj.get("UploadAttachment",FromData.class).getValue();
// 调 考勤管理 业务
......
package cn.timer.api.utils.router.business;
import cn.hutool.core.util.ObjectUtil;
import cn.hutool.json.JSONObject;
import cn.timer.api.dto.spmk.FromData;
import lombok.Builder;
......@@ -17,24 +18,24 @@ public class LeaveBusiness extends SpmkAssoBusiness {
public void handleApprove(JSONObject jsonObj) {
// TODO Auto-generated method stub
// 发起人企业id
String orgCode = jsonObj.get("orgCode",FromData.class).getValue();
String orgCode = ObjectUtil.isNull(jsonObj.get("orgCode",FromData.class)) ? null : jsonObj.get("orgCode",FromData.class).getValue();
// 发起人id
String id = jsonObj.get("id",FromData.class).getValue();
String id = ObjectUtil.isNull(jsonObj.get("id",FromData.class)) ? null : jsonObj.get("id",FromData.class).getValue();
// 发起人名称
String initiator = jsonObj.get("initiator",FromData.class).getValue();
String initiator = ObjectUtil.isNull(jsonObj.get("initiator",FromData.class)) ? null : jsonObj.get("initiator",FromData.class).getValue();
// 请假类型
String LeaveType = jsonObj.get("__LeaveType",FromData.class).getValue();
String LeaveType = ObjectUtil.isNull(jsonObj.get("__LeaveType",FromData.class)) ? null : jsonObj.get("__LeaveType",FromData.class).getValue();
// 开始时间
String startTime = jsonObj.get("__startTime",FromData.class).getValue();
String startTime = ObjectUtil.isNull(jsonObj.get("__startTime",FromData.class)) ? null : jsonObj.get("__startTime",FromData.class).getValue();
// 结束时间
String endTime = jsonObj.get("__endTime",FromData.class).getValue();
String endTime = ObjectUtil.isNull(jsonObj.get("__endTime",FromData.class)) ? null : jsonObj.get("__endTime",FromData.class).getValue();
// 时长
String longTime = jsonObj.get("__longTime",FromData.class).getValue();
String longTime = ObjectUtil.isNull(jsonObj.get("__longTime",FromData.class)) ? null : jsonObj.get("__longTime",FromData.class).getValue();
// 请假事由
String ReasonsForLeave = jsonObj.get("__ReasonsForLeave",FromData.class).getValue();
String ReasonsForLeave = ObjectUtil.isNull(jsonObj.get("__ReasonsForLeave",FromData.class)) ? null : jsonObj.get("__ReasonsForLeave",FromData.class).getValue();
// 上传文件
String UploadAttachment = jsonObj.get("UploadAttachment",FromData.class).getValue();
String UploadAttachment = ObjectUtil.isNull(jsonObj.get("UploadAttachment",FromData.class)) ? null : jsonObj.get("UploadAttachment",FromData.class).getValue();
// 调 考勤管理 业务
}
......
package cn.timer.api.utils.router.business;
import cn.hutool.core.util.ObjectUtil;
import cn.hutool.json.JSONObject;
import cn.timer.api.dto.spmk.FromData;
import lombok.Builder;
......@@ -17,38 +18,38 @@ public class RecruitBusiness extends SpmkAssoBusiness {
public void handleApprove(JSONObject jsonObj) {
// TODO Auto-generated method stub
// 发起人企业id
String orgCode = jsonObj.get("orgCode",FromData.class).getValue();
String orgCode = ObjectUtil.isNull(jsonObj.get("orgCode",FromData.class)) ? null : jsonObj.get("orgCode",FromData.class).getValue();
// 发起人id
String id = jsonObj.get("id",FromData.class).getValue();
String id = ObjectUtil.isNull(jsonObj.get("id",FromData.class)) ? null : jsonObj.get("id",FromData.class).getValue();
// 发起人名称
String initiator = jsonObj.get("initiator",FromData.class).getValue();
String initiator = ObjectUtil.isNull(jsonObj.get("initiator",FromData.class)) ? null : jsonObj.get("initiator",FromData.class).getValue();
// 招聘部门
String RecruitmentDept = jsonObj.get("__RecruitmentDept",FromData.class).getValue();
String RecruitmentDept = ObjectUtil.isNull(jsonObj.get("__RecruitmentDept",FromData.class)) ? null : jsonObj.get("__RecruitmentDept",FromData.class).getValue();
// 招聘职位
String RecruitmentPost = jsonObj.get("__RecruitmentPost",FromData.class).getValue();
String RecruitmentPost = ObjectUtil.isNull(jsonObj.get("__RecruitmentPost",FromData.class)) ? null : jsonObj.get("__RecruitmentPost",FromData.class).getValue();
// 工性性质
String WorkingNature = jsonObj.get("__WorkingNature",FromData.class).getValue();
String WorkingNature = ObjectUtil.isNull(jsonObj.get("__WorkingNature",FromData.class)) ? null : jsonObj.get("__WorkingNature",FromData.class).getValue();
// 招聘人数
String NumberOfRecruiters = jsonObj.get("__NumberOfRecruiters",FromData.class).getValue();
String NumberOfRecruiters = ObjectUtil.isNull(jsonObj.get("__NumberOfRecruiters",FromData.class)) ? null : jsonObj.get("__NumberOfRecruiters",FromData.class).getValue();
// 已在岗人数
String NumberOfPeople = jsonObj.get("NumberOfPeople",FromData.class).getValue();
String NumberOfPeople = ObjectUtil.isNull(jsonObj.get("NumberOfPeople",FromData.class)) ? null : jsonObj.get("NumberOfPeople",FromData.class).getValue();
// 招聘原因
String RecruitmentReasons = jsonObj.get("RecruitmentReasons",FromData.class).getValue();
String RecruitmentReasons = ObjectUtil.isNull(jsonObj.get("RecruitmentReasons",FromData.class)) ? null : jsonObj.get("RecruitmentReasons",FromData.class).getValue();
// 该岗位工作职责
String operatingDuty = jsonObj.get("operatingDuty",FromData.class).getValue();
String operatingDuty = ObjectUtil.isNull(jsonObj.get("operatingDuty",FromData.class)) ? null : jsonObj.get("operatingDuty",FromData.class).getValue();
// 招聘要求
String RecruitmentRequirements = jsonObj.get("RecruitmentRequirements",FromData.class).getValue();
String RecruitmentRequirements = ObjectUtil.isNull(jsonObj.get("RecruitmentRequirements",FromData.class)) ? null : jsonObj.get("RecruitmentRequirements",FromData.class).getValue();
// 薪酬上限
String SalaryCap = jsonObj.get("SalaryCap",FromData.class).getValue();
String SalaryCap = ObjectUtil.isNull(jsonObj.get("SalaryCap",FromData.class)) ? null : jsonObj.get("SalaryCap",FromData.class).getValue();
// 薪酬下限
String TransferInDepartment = jsonObj.get("TransferInDepartment",FromData.class).getValue();
String TransferInDepartment = ObjectUtil.isNull(jsonObj.get("TransferInDepartment",FromData.class)) ? null : jsonObj.get("TransferInDepartment",FromData.class).getValue();
// 生效日期
String PayFloor = jsonObj.get("PayFloor",FromData.class).getValue();
String PayFloor = ObjectUtil.isNull(jsonObj.get("PayFloor",FromData.class)) ? null : jsonObj.get("PayFloor",FromData.class).getValue();
// 备注
String Remarks = jsonObj.get("Remarks",FromData.class).getValue();
String Remarks = ObjectUtil.isNull(jsonObj.get("Remarks",FromData.class)) ? null : jsonObj.get("Remarks",FromData.class).getValue();
// 上传文件
String UploadAttachment = jsonObj.get("UploadAttachment",FromData.class).getValue();
String UploadAttachment = ObjectUtil.isNull(jsonObj.get("UploadAttachment",FromData.class)) ? null : jsonObj.get("UploadAttachment",FromData.class).getValue();
// 调 招聘管理 业务
......
......@@ -4,6 +4,7 @@ import java.text.ParseException;
import org.springframework.beans.factory.annotation.Autowired;
import cn.hutool.core.util.ObjectUtil;
import cn.hutool.json.JSONObject;
import cn.timer.api.controller.yggl.service.YgglService;
import cn.timer.api.dto.spmk.FromData;
......@@ -26,29 +27,30 @@ public class RegularizationBusiness extends SpmkAssoBusiness {
public void handleApprove(JSONObject jsonObj) throws Exception {
// TODO Auto-generated method stub
// 发起人企业id
String orgCode = jsonObj.get("orgCode",FromData.class).getValue();
// String orgCode = jsonObj.get("orgCode",FromData.class).getValue();
// 发起人名称
String initiator = jsonObj.get("initiator",FromData.class).getValue();
// String initiator = jsonObj.get("initiator",FromData.class).getValue();
// 申请人名称
String applicant = jsonObj.get("__applicant",FromData.class).getValue();
String applicant = ObjectUtil.isNull(jsonObj.get("__applicant",FromData.class)) ? null : jsonObj.get("__applicant",FromData.class).getValue();
// 试用期内主要工作和成绩
String WorkAndAchievement = jsonObj.get("WorkAndAchievement",FromData.class).getValue();
// String WorkAndAchievement = jsonObj.get("WorkAndAchievement",FromData.class).getValue();
// 存在问题及改进意见
String problem = jsonObj.get("problem",FromData.class).getValue();
// String problem = jsonObj.get("problem",FromData.class).getValue();
// 上传文件
String file = jsonObj.get("file",FromData.class).getValue();
// String file = jsonObj.get("file",FromData.class).getValue();
// 发起人id
Integer id = Integer.parseInt(jsonObj.get("id",FromData.class).getValue());
Integer id = ObjectUtil.isNull(jsonObj.get("id",FromData.class)) ? null : Integer.parseInt(jsonObj.get("id",FromData.class).getValue());
// 计划转正时间
String confirmationTime = jsonObj.get("confirmationTime",FromData.class).getValue();
String confirmationTime = ObjectUtil.isNull(jsonObj.get("confirmationTime",FromData.class)) ? null : jsonObj.get("confirmationTime",FromData.class).getValue();
// 实际转正时间
String newConfirmationTime = jsonObj.get("__newConfirmationTime",FromData.class).getValue();
String newConfirmationTime = ObjectUtil.isNull(jsonObj.get("__newConfirmationTime",FromData.class)) ? null : jsonObj.get("__newConfirmationTime",FromData.class).getValue();
// 备注
String Remarks = jsonObj.get("Remarks",FromData.class).getValue();
String Remarks = ObjectUtil.isNull(jsonObj.get("Remarks",FromData.class)) ? null : jsonObj.get("Remarks",FromData.class).getValue();
YgzzDto ygzzDto = YgzzDto.builder()
.empNum(id)
......
package cn.timer.api.utils.router.business;
import cn.hutool.core.util.ObjectUtil;
import cn.hutool.json.JSONObject;
import cn.timer.api.dto.spmk.FromData;
import lombok.Builder;
......@@ -16,18 +17,18 @@ public class ReissueACardBusiness extends SpmkAssoBusiness {
public void handleApprove(JSONObject jsonObj) {
// TODO Auto-generated method stub
// 发起人企业id
String orgCode = jsonObj.get("orgCode",FromData.class).getValue();
String orgCode = ObjectUtil.isNull(jsonObj.get("orgCode",FromData.class)) ? null : jsonObj.get("orgCode",FromData.class).getValue();
// 发起人id
String id = jsonObj.get("id",FromData.class).getValue();
String id = ObjectUtil.isNull(jsonObj.get("id",FromData.class)) ? null : jsonObj.get("id",FromData.class).getValue();
// 发起人名称
String initiator = jsonObj.get("initiator",FromData.class).getValue();
String initiator = ObjectUtil.isNull(jsonObj.get("initiator",FromData.class)) ? null : jsonObj.get("initiator",FromData.class).getValue();
// 补卡时间
String PatchCardTime = jsonObj.get("__PatchCardTime",FromData.class).getValue();
String PatchCardTime = ObjectUtil.isNull(jsonObj.get("__PatchCardTime",FromData.class)) ? null : jsonObj.get("__PatchCardTime",FromData.class).getValue();
// 缺卡原因
String cardShortage = jsonObj.get("cardShortage",FromData.class).getValue();
String cardShortage = ObjectUtil.isNull(jsonObj.get("cardShortage",FromData.class)) ? null : jsonObj.get("cardShortage",FromData.class).getValue();
// 上传文件
String UploadAttachment = jsonObj.get("UploadAttachment",FromData.class).getValue();
String UploadAttachment = ObjectUtil.isNull(jsonObj.get("UploadAttachment",FromData.class)) ? null : jsonObj.get("UploadAttachment",FromData.class).getValue();
// 调 考勤管理 业务
}
......
......@@ -3,6 +3,7 @@ package cn.timer.api.utils.router.business;
import java.text.ParseException;
import org.springframework.beans.factory.annotation.Autowired;import cn.hutool.core.date.DateUtil;
import cn.hutool.core.util.ObjectUtil;
import cn.hutool.json.JSONObject;
import cn.timer.api.controller.yggl.service.YgglService;
import cn.timer.api.dto.spmk.FromData;
......@@ -25,20 +26,20 @@ public class ResignationBusiness extends SpmkAssoBusiness {
public void handleApprove(JSONObject jsonObj) throws Exception {
// TODO Auto-generated method stub
// 发起人企业id
Integer orgCode = Integer.parseInt(jsonObj.get("orgCode",FromData.class).getValue());
Integer orgCode = ObjectUtil.isNull(jsonObj.get("orgCode",FromData.class)) ? null : Integer.parseInt(jsonObj.get("orgCode",FromData.class).getValue());
// 发起人id
Integer id = Integer.parseInt(jsonObj.get("id",FromData.class).getValue());
Integer id = ObjectUtil.isNull(jsonObj.get("id",FromData.class)) ? null : Integer.parseInt(jsonObj.get("",FromData.class).getValue());
// 发起人名称
String initiator = jsonObj.get("initiator",FromData.class).getValue();
String initiator = ObjectUtil.isNull(jsonObj.get("initiator",FromData.class)) ? null : jsonObj.get("initiator",FromData.class).getValue();
// 申请人
String applicant = jsonObj.get("__applicant",FromData.class).getValue();
String applicant = ObjectUtil.isNull(jsonObj.get("__applicant",FromData.class)) ? null : jsonObj.get("__applicant",FromData.class).getValue();
// 计划离职日期
String terminationDate = jsonObj.get("__terminationDate",FromData.class).getValue();
String terminationDate = ObjectUtil.isNull(jsonObj.get("__terminationDate",FromData.class)) ? null : jsonObj.get("__terminationDate",FromData.class).getValue();
// 离职原因
String ReasonForResignation = jsonObj.get("__ReasonForResignation",FromData.class).getValue();
String ReasonForResignation = ObjectUtil.isNull(jsonObj.get("__ReasonForResignation",FromData.class)) ? null : jsonObj.get("__ReasonForResignation",FromData.class).getValue();
// 备注
String Remarks = jsonObj.get("Remarks",FromData.class).getValue();
String Remarks = ObjectUtil.isNull(jsonObj.get("Remarks",FromData.class)) ? null : jsonObj.get("Remarks",FromData.class).getValue();
LzygQueryDto dto = LzygQueryDto.builder()
.orgCode(orgCode)
......
......@@ -2,6 +2,7 @@ package cn.timer.api.utils.router.business;
import org.springframework.beans.factory.annotation.Autowired;
import cn.hutool.core.util.ObjectUtil;
import cn.hutool.json.JSONObject;
import cn.timer.api.controller.zzgl.service.ZzglBmgwMService;
import cn.timer.api.dto.spmk.FromData;
......@@ -23,26 +24,26 @@ public class TransferPositionBusiness extends SpmkAssoBusiness {
public void handleApprove(JSONObject jsonObj) {
// TODO Auto-generated method stub
// 发起人企业id
Integer orgCode = Integer.parseInt(jsonObj.get("orgCode",FromData.class).getValue());
Integer orgCode = ObjectUtil.isNull(jsonObj.get("orgCode",FromData.class)) ? null : Integer.parseInt(jsonObj.get("orgCode",FromData.class).getValue());
// 发起人id
Integer id = Integer.parseInt(jsonObj.get("id",FromData.class).getValue());
Integer id = ObjectUtil.isNull(jsonObj.get("id",FromData.class)) ? null : Integer.parseInt(jsonObj.get("id",FromData.class).getValue());
// 发起人名称
String initiator = jsonObj.get("initiator",FromData.class).getValue();
String initiator = ObjectUtil.isNull(jsonObj.get("initiator",FromData.class)) ? null : jsonObj.get("initiator",FromData.class).getValue();
// 申请人
String applicant = jsonObj.get("__applicant",FromData.class).getValue();
String applicant = ObjectUtil.isNull(jsonObj.get("__applicant",FromData.class)) ? null : jsonObj.get("__applicant",FromData.class).getValue();
// 申请原因
String ReasonForApplication = jsonObj.get("__ReasonForApplication",FromData.class).getValue();
String ReasonForApplication = ObjectUtil.isNull(jsonObj.get("__ReasonForApplication",FromData.class)) ? null : jsonObj.get("__ReasonForApplication",FromData.class).getValue();
// 调入部门
Integer TransferInDepartment = Integer.parseInt(jsonObj.get("__TransferInDepartment",FromData.class).getValue());
Integer TransferInDepartment = ObjectUtil.isNull(jsonObj.get("__TransferInDepartment",FromData.class)) ? null : Integer.parseInt(jsonObj.get("__TransferInDepartment",FromData.class).getValue());
// 调入岗位
String TransferInPosition = jsonObj.get("__TransferInPosition",FromData.class).getValue();
String TransferInPosition = ObjectUtil.isNull(jsonObj.get("__TransferInPosition",FromData.class)) ? null : jsonObj.get("__TransferInPosition",FromData.class).getValue();
// 生效日期
String effectiveDate = jsonObj.get("__effectiveDate",FromData.class).getValue();
String effectiveDate = ObjectUtil.isNull(jsonObj.get("__effectiveDate",FromData.class)) ? null : jsonObj.get("__effectiveDate",FromData.class).getValue();
// 备注
String Remarks = jsonObj.get("Remarks",FromData.class).getValue();
String Remarks = ObjectUtil.isNull(jsonObj.get("Remarks",FromData.class)) ? null : jsonObj.get("Remarks",FromData.class).getValue();
// 上传文件
String UploadAttachment = jsonObj.get("UploadAttachment",FromData.class).getValue();
String UploadAttachment = ObjectUtil.isNull(jsonObj.get("UploadAttachment",FromData.class)) ? null : jsonObj.get("UploadAttachment",FromData.class).getValue();
UpEmpDeptDto upEmpDeptDto = UpEmpDeptDto.builder()
.dpetId(TransferInDepartment)
......
package cn.timer.api.utils.router.business;
import cn.hutool.core.util.ObjectUtil;
import cn.hutool.json.JSONObject;
import cn.timer.api.dto.spmk.FromData;
import lombok.Builder;
......@@ -16,24 +17,24 @@ public class WorkOvertimeBusiness extends SpmkAssoBusiness {
public void handleApprove(JSONObject jsonObj) {
// TODO Auto-generated method stub
// 发起人企业id
String orgCode = jsonObj.get("orgCode",FromData.class).getValue();
String orgCode = ObjectUtil.isNull(jsonObj.get("orgCode",FromData.class)) ? null : jsonObj.get("orgCode",FromData.class).getValue();
// 发起人id
String id = jsonObj.get("id",FromData.class).getValue();
String id = ObjectUtil.isNull(jsonObj.get("id",FromData.class)) ? null : jsonObj.get("id",FromData.class).getValue();
// 发起人名称
String initiator = jsonObj.get("initiator",FromData.class).getValue();
String initiator = ObjectUtil.isNull(jsonObj.get("initiator",FromData.class)) ? null : jsonObj.get("initiator",FromData.class).getValue();
// 开始时间
String startTime = jsonObj.get("__startTime",FromData.class).getValue();
String startTime = ObjectUtil.isNull(jsonObj.get("__startTime",FromData.class)) ? null : jsonObj.get("__startTime",FromData.class).getValue();
// 结束时间
String endTime = jsonObj.get("__endTime",FromData.class).getValue();
String endTime = ObjectUtil.isNull(jsonObj.get("__endTime",FromData.class)) ? null : jsonObj.get("__endTime",FromData.class).getValue();
// 时长
String timeLong = jsonObj.get("__timeLong",FromData.class).getValue();
String timeLong = ObjectUtil.isNull(jsonObj.get("__timeLong",FromData.class)) ? null : jsonObj.get("__timeLong",FromData.class).getValue();
// 加班补偿方式
String compensate = jsonObj.get("__compensate",FromData.class).getValue();
String compensate = ObjectUtil.isNull(jsonObj.get("__compensate",FromData.class)) ? null : jsonObj.get("__compensate",FromData.class).getValue();
// 加班原因
String OvertimeReason = jsonObj.get("__OvertimeReason",FromData.class).getValue();
String OvertimeReason = ObjectUtil.isNull(jsonObj.get("__OvertimeReason",FromData.class)) ? null : jsonObj.get("__OvertimeReason",FromData.class).getValue();
// 上传文件
String UploadAttachment = jsonObj.get("UploadAttachment",FromData.class).getValue();
String UploadAttachment = ObjectUtil.isNull(jsonObj.get("UploadAttachment",FromData.class)) ? null : jsonObj.get("UploadAttachment",FromData.class).getValue();
// 调 考勤管理 业务
}
......
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