Commit 9d1ddc8a by 邓实川
parents e5a2e428 6089e9af
......@@ -2,10 +2,8 @@ package cn.timer.api.bean.clazz;
import java.util.List;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.Table;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
......
......@@ -58,6 +58,10 @@ public class SpmkApproveExecuteRecord extends Model<SpmkApproveExecuteRecord> {
@ApiModelProperty(value = "创建时间 ", example = "创建时间")
private Date createTime;
@TableField(fill = FieldFill.UPDATE)
@ApiModelProperty(value = "操作时间 ", example = "操作时间")
private Date updateTime;
private List<SpmkExecutor> spmkExecutors;
}
\ No newline at end of file
......@@ -65,4 +65,8 @@ public class SpmkExecutor extends Model<SpmkExecutor> {
@ApiModelProperty(value = "创建时间 ", example = "创建时间")
private Date createTime;
@TableField(fill = FieldFill.UPDATE)
@ApiModelProperty(value = "创建时间 ", example = "创建时间")
private Date updateTime;
}
\ No newline at end of file
......@@ -190,6 +190,9 @@ public class YgglMainEmp extends Model<YgglMainEmp> {
@ApiModelProperty(value="是否企业中心管理员 ",example="0-否 1-主账号 2-子账号")
private Integer isManager;
@ApiModelProperty(value="离职前状态 1试用、2正式 ",example="1试用、2正式")
private Integer beforeLeavingSts;
@Transient
@TableField(exist = false)
private String workTime;//工龄
......
......@@ -98,7 +98,7 @@ public interface SpmkEnumInterface {
*/
@Getter
enum ParticipatorType implements SpmkEnumInterface {
INITIATOR(0, "发起"), COPY(1, "抄送人"), APPROVER(2, "审批人");
INITIATOR(0, "发起申请"), COPY(1, "抄送人"), APPROVER(2, "审批人");
private Integer type;
private String name;
......
......@@ -64,7 +64,7 @@ public interface YgEnumInterface {
*/
@Getter
enum YgJobType implements YgEnumInterface {
QUANZHI(0, "全"), SHIXI(1, "实习"), JIANZHI(2, "兼"), LWPQ(3, "劳务派遣"), LAOWU(4, "劳务"), PAIQIAN(5, "派遣"),
QUANZHI(0, "全职"), SHIXI(1, "实习"), JIANZHI(2, "兼职"), LWPQ(3, "劳务派遣"), LAOWU(4, "劳务"), PAIQIAN(5, "派遣"),
WAIBAO(6, "外包"), TUIXIU(7, "退休");
private Integer type;
......
......@@ -11,20 +11,22 @@ import lombok.Getter;
@Getter
public enum CommonEnum {
NULL_STR(0,""),
/**
* 1 超管理员
*/
U_TYPE_ADMIN(1, "超管理员"),
U_TYPE_ADMIN(0, "超管理员"),
/**
* 2 子管理
*/
U_TYPE_C_ADMIN(2, "子管理"),
U_TYPE_C_ADMIN(1, "子管理"),
/**
* 3 普通员工
*/
U_TYPE_EMP(3, "普通员工"),
U_TYPE_EMP(2, "普通员工"),
/**
* 0 关闭
......
package cn.timer.api.config.exception;
import java.io.IOException;
import java.util.ArrayList;
import java.util.List;
......@@ -65,6 +66,15 @@ public class GlobalExceptionHandler {
}
/**
* io异常
*/
@ExceptionHandler(IOException.class)
public Result<Object> ioException(IOException e) {
log.error(e.getMessage(), e);
return ResultUtil.error(e.getMessage());
}
/**
* 自定义验证异常
*/
@ExceptionHandler(MethodArgumentNotValidException.class)
......
......@@ -38,6 +38,8 @@ import cn.timer.api.bean.zzgl.ZzglAuth;
import cn.timer.api.bean.zzgl.ZzglBmgwM;
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.enuminterface.YgEnumInterface.YgJobType;
import cn.timer.api.config.enums.CommonEnum;
import cn.timer.api.controller.spmk.service.SpmkServiceImpl;
import cn.timer.api.dao.qyzx.QyzxEmpEntAssoMapper;
......@@ -430,7 +432,7 @@ public class LoginController {
@ApiOperation(value = "6.注册企业", httpMethod = "POST", notes = "接口发布说明")
@ApiOperationSupport(order = 6)
@Log(title = "企业注册", businessType = BusinessType.INSERT)
public Result<String> register(@RequestBody EntRegisterDto entRegisterDto) {
public Result<String> register(@RequestBody EntRegisterDto entRegisterDto) throws Exception{
// 事务回滚
/*
* DefaultTransactionDefinition def = new DefaultTransactionDefinition();
......@@ -473,12 +475,6 @@ public class LoginController {
if (login == null) {
// 员工信息
/*
* QyzxEmpLogin qyzxEmpLogin =
* QyzxEmpLogin.builder().phone(phone).pw(Md5.md5(pw))
* .sts(CommonEnum.U_STS_ON.getType()).orgId(qyzxEntInfoM.getId()).regTime(
* DateUtil.date()) .endTime(DateUtil.nextMonth()).build();
*/
QyzxEmpLogin qyzxEmpLogin = QyzxEmpLogin.builder().phone(phone).pw(Md5.md5(pw))
.sts(CommonEnum.U_STS_ON.getType()).orgId(qyzxEntInfoM.getId()).regTime(DateUtil.date())
.build();
......@@ -489,8 +485,9 @@ public class LoginController {
}
}
boolean b4 = YgglMainEmp.builder().orgCode(qyzxEntInfoM.getId()).empNum(login.getId()).rzTime(new Date()).isManager(1)
.name(username).jobStatus(1).build().insert();
boolean b4 = YgglMainEmp.builder().orgCode(qyzxEntInfoM.getId()).empNum(login.getId()).rzTime(new Date())
.isManager(CommonEnum.U_TYPE_ADMIN.getType()).name(username).phone(phone).jobType(YgJobType.QUANZHI.getType()).jobStatus(YgEnumInterface.jobStatus.ZHENSHI.getType())
.build().insert();
if (!b4) {
TransactionAspectSupport.currentTransactionStatus().setRollbackOnly();
return ResultUtil.error("注册企业失败3");
......
......@@ -142,25 +142,6 @@ public class QyzxController {
}
/**
* 企业认证-审核-通过/未通过
*
* @param qyzxEntAuth
* @return
*/
/*
* @PostMapping(value = "/entauthcheck")
*
* @ApiOperation(value = "企业认证-审核-通过/未通过", httpMethod = "POST", notes =
* "接口发布说明") public Result<QyzxEntAuth> entauthcheck1(@CurrentUser UserBean
* userBean, @RequestBody QyzxEntAuth qyzxEntAuth) { Integer id =
* qyzxEntAuth.getId(); Integer authType = qyzxEntAuth.getAuthType(); if (id ==
* null || authType == null) { return ResultUtil.error("参数缺少/异常"); } QyzxEntAuth
* entAuth = QyzxEntAuth.builder().id(id).authType(authType).build(); boolean b
* = entAuth.updateById(); if (b) { return ResultUtil.data(qyzxEntAuth,
* "企业认证-审批成功"); } else { return ResultUtil.error("企业认证-审批失败"); } }
*/
/**
* 运营管理 企业认证-审核-通过/不通过(weng)
*
* @param qyzxEntAuth
......@@ -267,10 +248,10 @@ public class QyzxController {
@GetMapping(value = "/entlist")
@ApiOperation(value = "企业列表", httpMethod = "GET", notes = "接口发布说明")
public Result<List<QyzxEntInfoM>> entlist1(@CurrentUser UserBean userBean) {
Integer empNum = userBean.getEmpNum();
QueryWrapper<QyzxEmpEntAsso> queryWrapper = new QueryWrapper<>();
queryWrapper.select("org_code").eq("emp_num", empNum);
List<Object> orgCodes = qyzxEmpEntAssoMapper.selectObjs(queryWrapper);
List<Object> orgCodes = qyzxEmpEntAssoMapper.selectObjs(new QueryWrapper<QyzxEmpEntAsso>().lambda()
.select(QyzxEmpEntAsso::getOrgCode)
.eq(QyzxEmpEntAsso::getEmpNum, userBean.getEmpNum()));
List<QyzxEntInfoM> qyzxEntInfoMs = new LambdaQueryChainWrapper<QyzxEntInfoM>(qyzxEntInfoMMapper)
.in(CollUtil.isNotEmpty(orgCodes), QyzxEntInfoM::getId, orgCodes).list();
return ResultUtil.data(qyzxEntInfoMs, "获取企业信息成功");
......@@ -327,56 +308,6 @@ public class QyzxController {
}
}
// 下载系统使用手册 直接提供(OSS公共读权限文件)url地址到前端按钮
/**
* 意见反馈
*/
/*
* @PostMapping(value = "/feedback")
*
* @ApiOperation(value = "意见反馈", httpMethod = "POST", notes = "接口发布说明") public
* Result<QyzxSuggestionFeeback> feedback(@CurrentUser UserBean userBean,
*
* @RequestParam(required = false) String opinionText, @RequestParam(required =
* false) String moudle,
*
* @Param("files") List<MultipartFile> files) { String url = null; List<String>
* list = new ArrayList<String>(); if (files != null) { for (MultipartFile file
* : files) { String path = "8timer2.0/" + userBean.getOrgCode() + "/" + moudle
* + "/" + file.getOriginalFilename(); if (file == null || file.getSize() <= 0)
* { return ResultUtil.error("上传的文件为空,请重新选择!"); } else { try { url =
* oss.uploadFile(path, file.getInputStream()); list.add(url); } catch
* (IOException e) { e.printStackTrace(); } } } } QyzxSuggestionFeeback feeback
* = new QyzxSuggestionFeeback(); feeback.setEmpNum(userBean.getEmpNum());
* feeback.setOpinionText(opinionText); feeback.setCreateTime(new Date());
* feeback.setOrgCode(userBean.getOrgCode()); boolean a = feeback.insert(); if
* (a && list.size() > 0) { for (String opinionUrl : list) {
* QyzxFeebackAccessory.builder().feebackId(feeback.getId()).opinionUrl(
* opinionUrl).build().insert(); } } return ResultUtil.success("意见反馈成功!"); }
*/
// /**
// * 意见反馈2
// */
// @PostMapping(value = "/feedback")
// @ApiOperation(value = "意见反馈", httpMethod = "POST", notes = "接口发布说明")
// public Result<String> feedback(@CurrentUser UserBean userBean, @RequestBody FeebackDto feebackDto) {
// String opinionText = feebackDto.getOpinionText();
// List<String> urlList = feebackDto.getUrlList();
// QyzxSuggestionFeeback qs = QyzxSuggestionFeeback.builder().orgCode(userBean.getOrgCode()).empNum(userBean.getEmpNum()).opinionText(opinionText).bugType(1).createTime(new Date()).build();
//
// boolean tof = qs.insert();
// Integer feebackId = qs.getId();
// if (tof) {
// for (String str : urlList) {
// QyzxFeebackAccessory.builder().feebackId(feebackId).opinionUrl(str).build().insert();
// }
// return ResultUtil.data("意见反馈成功!");
// }
//
// return ResultUtil.data("意见反馈失败!");
// }
/**
* 意见反馈
*/
......@@ -438,8 +369,8 @@ public class QyzxController {
.build().insertOrUpdate();
// 添加或修改服务计算表
Integer number = qyzxPayServe.getNum();
QueryWrapper<QyzxAttaFwjsb> queryWrapper = new QueryWrapper<>();
queryWrapper.eq("emp_num", userBean.getEmpNum()).eq("code", code);
LambdaQueryWrapper<QyzxAttaFwjsb> queryWrapper = new QueryWrapper<QyzxAttaFwjsb>().lambda();
queryWrapper.eq(QyzxAttaFwjsb::getEmpNum, userBean.getEmpNum()).eq(QyzxAttaFwjsb::getCode, code);
Integer result = QyzxAttaFwjsb.builder().build().selectCount(queryWrapper);
if (result != null && result > 0) {
QyzxAttaFwjsb fwjb = QyzxAttaFwjsb.builder().build().selectOne(queryWrapper);
......@@ -465,7 +396,7 @@ public class QyzxController {
@ApiOperation(value = "查看服务计算", httpMethod = "GET", notes = "接口发布说明")
public Result<List<QyzxAttaFwjsb>> fwjs(@CurrentUser UserBean userBean) {
List<QyzxAttaFwjsb> qyzxAttaFpgl = QyzxAttaFwjsb.builder().build()
.selectList(new QueryWrapper<QyzxAttaFwjsb>().eq("emp_num", userBean.getEmpNum()));
.selectList(new QueryWrapper<QyzxAttaFwjsb>().lambda().eq(QyzxAttaFwjsb::getEmpNum, userBean.getEmpNum()));
return ResultUtil.data(qyzxAttaFpgl, "获取服务计算成功");
}
......@@ -479,7 +410,7 @@ public class QyzxController {
@ApiOperation(value = "获取购买记录", httpMethod = "GET", notes = "接口发布说明")
public Result<List<QyzxLogBuy>> selectgmjl(@CurrentUser UserBean userBean) {
List<QyzxLogBuy> qyzxLogBuy = QyzxLogBuy.builder().build()
.selectList(new QueryWrapper<QyzxLogBuy>().eq("emp_num", userBean.getEmpNum()));
.selectList(new QueryWrapper<QyzxLogBuy>().lambda().eq(QyzxLogBuy::getEmpNum, userBean.getEmpNum()));
return ResultUtil.data(qyzxLogBuy, "获取购买记录成功");
}
......
......@@ -18,10 +18,8 @@ import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import com.alibaba.druid.sql.visitor.functions.Nil;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
......@@ -49,8 +47,8 @@ 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.enums.CommonEnum;
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;
......@@ -88,10 +86,10 @@ import io.swagger.annotations.ApiOperation;
@Transactional
@RequestMapping(value = "/spmk",
produces = { "application/json","multipart/form-data" })
//@BindingResultCtrol(title = "发起审批")
public class SpmkController {
@Autowired
SpmkServiceImpl spmkService;
@Autowired
private SpmkApprovalTemplateGMapper spmkApprovalTemplateGMapper;
@Autowired
......@@ -127,7 +125,7 @@ public class SpmkController {
public Result<Object> saveAtg(@RequestBody SpmkApprovalTemplateG spmkApprovalTemplateG){
if (spmkApprovalTemplateG.selectCount(new QueryWrapper<SpmkApprovalTemplateG>().lambda()
.ne(SpmkApprovalTemplateG::getId, spmkApprovalTemplateG.getId())
.ne(spmkApprovalTemplateG.getId() != null,SpmkApprovalTemplateG::getId, spmkApprovalTemplateG.getId())
.eq(SpmkApprovalTemplateG::getName, spmkApprovalTemplateG.getName())) > 0) {
return ResultUtil.error("审批模板组名重复!");
}
......@@ -198,7 +196,7 @@ public class SpmkController {
at.setRouter(ObjectUtil.serialize(spmkApprovalTemplateDto.getRouter()));
if (at.selectCount(new QueryWrapper<SpmkApprovalTemplate>().lambda()
.ne(SpmkApprovalTemplate::getId, at.getId())
.ne(at.getId() != null, SpmkApprovalTemplate::getId, at.getId())
.eq(SpmkApprovalTemplate::getName, at.getName())) > 0) {
return ResultUtil.error("审批模板名重复!");
}
......@@ -266,7 +264,7 @@ public class SpmkController {
public Result<Object> saveAg(@CurrentUser UserBean userBean, @RequestBody SpmkApprovalG spmkApprovalG){
if (spmkApprovalG.selectCount(new QueryWrapper<SpmkApprovalG>().lambda()
.ne(SpmkApprovalG::getId, spmkApprovalG.getId())
.ne(spmkApprovalG.getId() != null, SpmkApprovalG::getId, spmkApprovalG.getId())
.eq(SpmkApprovalG::getName, spmkApprovalG.getName())
.eq(SpmkApprovalG::getOrgCode, userBean.getOrgCode())) > 0) {
return ResultUtil.error("审批组名重复!");
......@@ -315,7 +313,6 @@ public class SpmkController {
public Result<Object> selectListAg(@CurrentUser UserBean userBean){
List<Integer> depts = zzglBmgwMService.empNumupGetDepts(userBean.getOrgCode(), userBean.getEmpNum());
System.out.println(depts);
return ResultUtil.data(spmkApprovalGMapper.selectListAgInCa(userBean.getOrgCode(), userBean.getEmpNum(), depts),"操作成功!");
}
......@@ -349,7 +346,7 @@ public class SpmkController {
BeanUtil.copyProperties(spmkCustomApprovalDto, ca , "froms","router","initiatorConfigs");
if (ca.selectCount(new QueryWrapper<SpmkCustomApproval>().lambda()
.ne(SpmkCustomApproval::getId, ca.getId())
.ne(ca.getId() != null, SpmkCustomApproval::getId, ca.getId())
.eq(SpmkCustomApproval::getName, ca.getName())
.eq(SpmkCustomApproval::getOrgCode, userBean.getOrgCode())) > 0) {
return ResultUtil.error("自定义审批名重复!");
......@@ -381,8 +378,6 @@ public class SpmkController {
}
//
/**
* 注意: 为保证该api的原子性 要加 事务处理 回滚(方法注解-@Transactional(rollbackFor = Exception.class))
......@@ -414,7 +409,6 @@ public class SpmkController {
}
return ResultUtil.success("操作成功!");
}
/**
......@@ -468,7 +462,7 @@ public class SpmkController {
listRouter.add(spmkApproveSummaryDto.getRouter());
JSONObject jSONObject = spmkApproveSummaryDto.getRequestData()
.set("orgCode", FromData.builder().value(String.valueOf(userBean.getOrgCode())).build())
.set("initiator", FromData.builder().value(spmkApproveSummaryDto.getInitiator()).build())
.set("initiator", FromData.builder().value(ygglMainEmp.getName()).build())
.set("headUrl", FromData.builder().value(ygglMainEmp.getHeadUrl()).build())
.set("id", FromData.builder().value(StrUtil.toString(userBean.getEmpNum())).build());
RouterUtils.NextNode(listRouter, jSONObject, ISFIRST);
......@@ -561,18 +555,7 @@ public class SpmkController {
@Log(title = "审批-审批详情", businessType = BusinessType.OTHER)
public Result<Object> selectAd(@PathVariable(required = true) Integer id) {
SpmkApproveDetail ad = spmkApproveDetailMapper.selectOne(new QueryWrapper<SpmkApproveDetail>().lambda().eq(SpmkApproveDetail::getApproveSummaryId, id));
SpmkApproveDetailDto adD = SpmkApproveDetailDto.builder().build();
if (ad == null) {
return ResultUtil.data(adD, "操作成功!");
}
List<SpmkApproveExecuteRecord> listAer = spmkApproveExecuteRecordMapper.selectListByAsId(id);
BeanUtil.copyProperties(ad, adD, "requestData","froms","router","spmkApproveExecuteRecord");
adD.setRequestData(ObjectUtil.deserialize(ad.getRequestData()));
adD.setFroms(ObjectUtil.deserialize(ad.getFroms()));
adD.setRouter(ObjectUtil.deserialize(ad.getRouter()));
adD.setFlowChildren(ObjectUtil.deserialize(ad.getFlowChildren()));
adD.setApproveExecuteRecord(listAer);
SpmkApproveDetailDto adD = spmkService.selectApproveDetailByAsId(id);
return ResultUtil.data(adD, "操作成功!");
}
......@@ -626,6 +609,7 @@ public class SpmkController {
if (aSummary.getSts() == 0) {
List<FlowChildren> listFlowChildren = ObjectUtil.deserialize(ad.getFlowChildren());
// 审批逻辑
RouterUtils.approving(
listFlowChildren,
approvingDto.getAsId(),
......@@ -647,12 +631,14 @@ public class SpmkController {
.eq(SpmkApproveSummary::getId, approvingDto.getAsId()));
if (aSummary.getSts() != SpmkEnumInterface.ApproveSummarySts.REFUSE.ordinal()) {
SpmkApproveSummary.builder().id(approvingDto.getAsId()).currentApprover("").endTime(new Date()).sts(ApproveSummarySts.FINISH.ordinal()).build().updateById();
SpmkApproveSummary.builder().id(approvingDto.getAsId()).currentApprover(CommonEnum.NULL_STR.getDesc()).endTime(new Date()).sts(ApproveSummarySts.FINISH.ordinal()).build().updateById();
JSONObject jSONObject = ObjectUtil.deserialize(ad.getRequestData());
jSONObject.set("approveId", approvingDto.getAsId());
//审批完成后 业务
SpmkAssoBusiness sab = SpmkAssoBusinessFactory.createSpmkAssoType(ApproveEnum.getEnums(aSummary.getAssoType()));
if (sab != null)
sab.handleApprove(ObjectUtil.deserialize(ad.getRequestData()));
sab.handleApprove(jSONObject);
}
}
......@@ -758,16 +744,13 @@ public class SpmkController {
return ResultUtil.data(spmkIcons,"获取图标列表成功");
}
@Autowired
SpmkServiceImpl SpmkService;
//TODO 测试-生成 审批组 和 自定义审批
@GetMapping(value = "/test")
@ApiOperation(value = "98.测试-生成 审批组 和 自定义审批", httpMethod = "GET", notes = "测试-生成 审批组 和 自定义审批")
@ApiOperationSupport(order = 98)
public Result<List<SpmkIcon>> createCustomApproval(@RequestParam Integer orgCode){
SpmkService.createCustomApproval(orgCode);
spmkService.createCustomApproval(orgCode);
List<SpmkIcon> spmkIcons = SpmkIcon.builder().build().selectAll();
......
package cn.timer.api.controller.spmk.service;
import cn.timer.api.dto.spmk.SpmkApproveDetailDto;
public interface SpmkService {
boolean createCustomApproval(Integer orgCode);
SpmkApproveDetailDto selectApproveDetailByAsId(Integer asId);
}
......@@ -10,17 +10,29 @@ import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import cn.hutool.core.bean.BeanUtil;
import cn.hutool.core.lang.Console;
import cn.hutool.core.util.ObjectUtil;
import cn.timer.api.bean.spmk.SpmkApprovalG;
import cn.timer.api.bean.spmk.SpmkApprovalTemplate;
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.dao.spmk.SpmkApproveDetailMapper;
import cn.timer.api.dao.spmk.SpmkApproveExecuteRecordMapper;
import cn.timer.api.dao.spmk.SpmkCustomApprovalMapper;
import cn.timer.api.dto.spmk.SpmkApproveDetailDto;
@Service
public class SpmkServiceImpl implements SpmkService{
@Autowired
SpmkCustomApprovalMapper spmkCustomApprovalMapper;
private SpmkCustomApprovalMapper spmkCustomApprovalMapper;
@Autowired
private SpmkApproveDetailMapper spmkApproveDetailMapper;
@Autowired
private SpmkApproveExecuteRecordMapper spmkApproveExecuteRecordMapper;
/**
* 根据orgCode查数据库 审批模板 生成 自定义模板
......@@ -62,4 +74,26 @@ public class SpmkServiceImpl implements SpmkService{
return true;
}
/**
* 根据审批汇总id 获取 审批详情
*/
@Override
public SpmkApproveDetailDto selectApproveDetailByAsId(Integer asId) {
// TODO Auto-generated method stub
SpmkApproveDetail ad = spmkApproveDetailMapper.selectOne(new QueryWrapper<SpmkApproveDetail>().lambda().eq(SpmkApproveDetail::getApproveSummaryId, asId));
SpmkApproveDetailDto adD = SpmkApproveDetailDto.builder().build();
if (ad == null) {
return null;
}
List<SpmkApproveExecuteRecord> listAer = spmkApproveExecuteRecordMapper.selectListByAsId(asId);
BeanUtil.copyProperties(ad, adD, "requestData","froms","router","spmkApproveExecuteRecord");
adD.setRequestData(ObjectUtil.deserialize(ad.getRequestData()));
adD.setFroms(ObjectUtil.deserialize(ad.getFroms()));
adD.setRouter(ObjectUtil.deserialize(ad.getRouter()));
adD.setFlowChildren(ObjectUtil.deserialize(ad.getFlowChildren()));
adD.setApproveExecuteRecord(listAer);
return adD;
}
}
......@@ -55,7 +55,7 @@ public class AddygdaDto extends Page implements Serializable{
@ApiModelProperty(value="工作性质 0全职、1实习生、2兼职、3劳务派遣、4劳务、5派遣、6外包、7退休返聘",example="0")
private Integer jobType;
@NotNull(message = ValidationMsg.NOTNULL)
// @NotNull(message = ValidationMsg.NOTNULL)
@ApiModelProperty(value="入职日期 ",example="客户注册后的时间为入职时间")
private Date rzTime;
......@@ -67,7 +67,6 @@ public class AddygdaDto extends Page implements Serializable{
@ApiModelProperty(value="性别 0:男;1:女",example="0")
private Integer sex;
@NotNull(message = ValidationMsg.NOTNULL)
@ApiModelProperty(value="部门岗位id",example="0")
private Integer bmgwId;
......
package cn.timer.api.dto.yggl;
import java.io.Serializable;
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 io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
/**
* 员工导入模板
* @author Tang
*
*/
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
public class ImportEmpDto implements Serializable{
private static final long serialVersionUID = -1230023773946170942L;
@NotBlank(message = ValidationMsg.NOTBLANK)
@ApiModelProperty(value="员工姓名",example="华仔")
private String name;
@NotBlank(message = ValidationMsg.NOTBLANK)
@Pattern(regexp=Regular.PHONE,message = ValidationMsg.PATTERN)
@ApiModelProperty(value="手机号",example="101")
private String phone;
@NotNull(message = ValidationMsg.NOTNULL)
@ApiModelProperty(value="证件类型 0:身份证;1:港澳居民来往内地通行证;2:台湾居民来往大陆通行证;3:外国护照;4:其他",example="0")
private Integer zjType;
@NotBlank(message = ValidationMsg.NOTBLANK)
@ApiModelProperty(value="证件号码 ",example="证件号码")
private String zjNum;
@NotNull(message = ValidationMsg.NOTNULL)
@ApiModelProperty(value="工作性质 0全职、1实习生、2兼职、3劳务派遣、4劳务、5派遣、6外包、7退休返聘",example="0")
private Integer jobType;
@ApiModelProperty(value="入职日期 ",example="客户注册后的时间为入职时间")
private String rzTime;
@NotNull(message = ValidationMsg.NOTNULL)
@ApiModelProperty(value="试用期 0:无试用期;1:1个月;2:2个月;3:3个月;4:4个月;5:5个月;6:6个月(有试用期显示选项)",example="0")
private Integer syq;
@NotNull(message = ValidationMsg.NOTNULL)
@ApiModelProperty(value="性别 0:男;1:女",example="0")
private Integer sex;
}
......@@ -22,6 +22,7 @@ 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.config.enums.CommonEnum;
import cn.timer.api.dto.spmk.Condition;
import cn.timer.api.dto.spmk.FlowChildren;
import cn.timer.api.dto.spmk.FromData;
......@@ -36,14 +37,37 @@ import cn.timer.api.dto.spmk.User;
*
*/
public class RouterUtils {
/**
* 0 未执行
*/
private final static String UNEXECUTED = "0";
/**
* 1 执行中
*/
private final static String EXECUTING = "1";
/**
* 2 已执行
*/
private final static String EXECUTED = "2";
/**
* creator 抄送人
*/
private final static String CREATOR = "creator";
/**
* audit 审批人
*/
private final static String AUDIT = "audit";
/**
* copy 抄送人
*/
private final static String COPY = "copy";
/**
* department 部门类型
*/
private final static String RELATION_TYPE_DEPARTMENT = "department";
/**
* users 用户类型
*/
private final static String RELATION_TYPE_USERS = "users";
public static List<Router> NextNode(List<Router> listRouter,JSONObject obj, boolean isFirse) throws NumberFormatException, ConvertException, Exception {
......@@ -76,7 +100,7 @@ public class RouterUtils {
.name(obj.get("initiator",FromData.class).getValue())
.id(obj.get("id",FromData.class).getValue())
.headUrl(obj.get("headUrl",FromData.class).getValue())
.execute("0")
.execute(UNEXECUTED)
.build();
users.add(userFirst);
List<Relation> relations = new ArrayList<Relation>();
......@@ -238,9 +262,8 @@ public class RouterUtils {
public static List<YgglMainEmp> selectOtherlistent(Integer orgCode, Integer id){
ArrayList<Integer> list = new ArrayList<Integer>();
QueryWrapper<ZzglBmgwM> queryWrapper = new QueryWrapper<ZzglBmgwM>();
queryWrapper.eq("org_code", orgCode);
List<ZzglBmgwM> zzglBmgwMs = ZzglBmgwM.builder().build().selectList(queryWrapper);
List<ZzglBmgwM> zzglBmgwMs = ZzglBmgwM.builder().build().selectList(new QueryWrapper<ZzglBmgwM>().lambda()
.eq(ZzglBmgwM::getOrgCode, orgCode));
list.add(id);
ZzglBmgwM.getDepts(list, id, zzglBmgwMs);
......@@ -293,13 +316,14 @@ public class RouterUtils {
continue;
}
// ClassName 区分参与审批流程人的角色 CREATOR(发起人)、AUDIT(审核人)、COPY(抄送人)
// 各个角色的逻辑不同
switch (listFlowChildren.get(i).getClassName()) {
case CREATOR:
SpmkApproveExecuteRecord aer = SpmkApproveExecuteRecord
.builder()
.approveSummaryId(asId)
.name("发起申请")
.name(ParticipatorType.INITIATOR.getName())
.type(ParticipatorType.INITIATOR.ordinal())
.sts(ExecuteRecordSts.AGREE.ordinal())
.build();
......@@ -321,7 +345,7 @@ public class RouterUtils {
SpmkApproveExecuteRecord aer2 = SpmkApproveExecuteRecord
.builder()
.approveSummaryId(asId)
.name("审批人")
.name(ParticipatorType.APPROVER.getName())
.type(ParticipatorType.APPROVER.ordinal())
.sts(ExecuteRecordSts.IN_EXECUTION.ordinal())
.build();
......@@ -354,7 +378,7 @@ public class RouterUtils {
SpmkApproveExecuteRecord aer3 = SpmkApproveExecuteRecord
.builder()
.approveSummaryId(asId)
.name("抄送人")
.name(ParticipatorType.COPY.getName())
.type(ParticipatorType.COPY.ordinal())
.sts(ExecuteRecordSts.AGREE.ordinal())
.build();
......@@ -423,7 +447,7 @@ public class RouterUtils {
// 0未执行 1执行中 2同意 3拒绝 4 转派
if (sts == ExecutorSts.REFUSE.ordinal()) {
// 更新 审批汇总 状态
SpmkApproveSummary.builder().id(asId).currentApprover("").endTime(new Date()).sts(sts).build().updateById();
SpmkApproveSummary.builder().id(asId).currentApprover(CommonEnum.NULL_STR.getDesc()).endTime(new Date()).sts(sts).build().updateById();
SpmkApproveExecuteRecord
.builder()
.id(executeRecordId)
......@@ -434,6 +458,7 @@ public class RouterUtils {
listFlowChildren.get(i_user).setExecute(EXECUTED);
return;
//转派 处理
//在 原审批人 列表中 插入 一个被转派人(审批人)
}else if (sts == ExecutorSts.REDEPLOY.ordinal()) {
List<User> users1 = CollectionUtil.sub(listUser, 0, i_user+1);
users1.add(redeployUser);
......@@ -480,8 +505,8 @@ public class RouterUtils {
SpmkApproveExecuteRecord aer = SpmkApproveExecuteRecord
.builder()
.approveSummaryId(asId)
.name("发起申请")
.type(0)
.name(ParticipatorType.INITIATOR.getName())
.type(ParticipatorType.INITIATOR.ordinal())
.sts(ExecuteRecordSts.AGREE.ordinal())
.build();
// 新增 审批执行记录
......@@ -504,7 +529,7 @@ public class RouterUtils {
SpmkApproveExecuteRecord aer2 = SpmkApproveExecuteRecord
.builder()
.approveSummaryId(asId)
.name("审批人")
.name(ParticipatorType.APPROVER.getName())
.type(ParticipatorType.APPROVER.ordinal())
.sts(ExecuteRecordSts.IN_EXECUTION.ordinal())
.build();
......@@ -530,7 +555,7 @@ public class RouterUtils {
SpmkApproveExecuteRecord aer3 = SpmkApproveExecuteRecord
.builder()
.approveSummaryId(asId)
.name("抄送人")
.name(ParticipatorType.COPY.getName())
.type(ParticipatorType.COPY.ordinal())
.sts(ExecuteRecordSts.AGREE.ordinal())
.build();
......@@ -541,7 +566,7 @@ public class RouterUtils {
for (Relation relation : listRelation) {
List<User> listUser2 = relation.getUsers();
if (listUser2 != null) {
// 新增 执行人
for (User user2 : listUser2) {
SpmkExecutor executor = SpmkExecutor.builder()
......@@ -554,6 +579,7 @@ public class RouterUtils {
executor.insert();
}
}
}
listFlowChildren.get(i).setExecute(EXECUTED);
break;
......
package cn.timer.api.utils.router.business;
import java.text.ParseException;
import org.springframework.beans.factory.annotation.Autowired;
import cn.hutool.core.convert.Convert;
import cn.hutool.core.util.ObjectUtil;
import cn.hutool.core.util.StrUtil;
import cn.hutool.json.JSONObject;
import cn.timer.api.controller.kqgl.service.KqglService;
import cn.timer.api.dto.kqmk.AttEvectionApprovalDto;
import cn.timer.api.dto.spmk.FromData;
import cn.timer.api.utils.DateUtil;
import lombok.Builder;
/**
......@@ -14,8 +21,11 @@ import lombok.Builder;
@Builder
public class EvectionBusiness extends SpmkAssoBusiness {
@Autowired
private KqglService kqglService;
@Override
public void handleApprove(JSONObject jsonObj) {
public void handleApprove(JSONObject jsonObj) throws ParseException {
// TODO Auto-generated method stub
// 发起人企业id
String orgCode = ObjectUtil.isNull(jsonObj.get("orgCode",FromData.class)) ? null : jsonObj.get("orgCode",FromData.class).getValue();
......@@ -23,6 +33,9 @@ public class EvectionBusiness extends SpmkAssoBusiness {
String id = ObjectUtil.isNull(jsonObj.get("id",FromData.class)) ? null : jsonObj.get("id",FromData.class).getValue();
// 发起人名称
String initiator = ObjectUtil.isNull(jsonObj.get("initiator",FromData.class)) ? null : jsonObj.get("initiator",FromData.class).getValue();
// 审批汇总id
String approveId = ObjectUtil.isNull(jsonObj.get("approveId",FromData.class)) ? null : jsonObj.get("approveId",FromData.class).getValue();
// 开始时间
String startTime = ObjectUtil.isNull(jsonObj.get("__startTime",FromData.class)) ? null : jsonObj.get("__startTime",FromData.class).getValue();
// 结束时间
......@@ -34,8 +47,17 @@ public class EvectionBusiness extends SpmkAssoBusiness {
// 上传文件
String UploadAttachment = ObjectUtil.isNull(jsonObj.get("UploadAttachment",FromData.class)) ? null : jsonObj.get("UploadAttachment",FromData.class).getValue();
// 调 考勤管理 业务
AttEvectionApprovalDto eaD = AttEvectionApprovalDto
.builder()
.evectionid(Convert.toInt(approveId))
.evectiontype(1)
.starttime(DateUtil.getStringTime(startTime, "yyyy-MM-dd HH:mm:ss"))
.endtime(DateUtil.getStringTime(endTime, "yyyy-MM-dd HH:mm:ss"))
.duration(Convert.toDouble(longTime))
.build();
// 调 考勤管理 业务-出差
kqglService.attevectionapproval(eaD);
}
}
package cn.timer.api.utils.router.business;
import org.springframework.beans.factory.annotation.Autowired;
import cn.hutool.core.convert.Convert;
import cn.hutool.core.util.ObjectUtil;
import cn.hutool.json.JSONObject;
import cn.timer.api.controller.kqgl.service.KqglService;
import cn.timer.api.dto.kqmk.AttEvectionApprovalDto;
import cn.timer.api.dto.spmk.FromData;
import cn.timer.api.utils.DateUtil;
import lombok.Builder;
/**
* 外出
* 外出-业务
* @author Tang
*
*/
@Builder
public class GoOutBusiness extends SpmkAssoBusiness {
@Autowired
private KqglService kqglService;
@Override
public void handleApprove(JSONObject jsonObj) throws Exception {
// TODO Auto-generated method stub
......@@ -19,6 +31,9 @@ public class GoOutBusiness extends SpmkAssoBusiness {
String id = jsonObj.get("id",FromData.class).getValue();
// 发起人名称
String initiator = jsonObj.get("initiator",FromData.class).getValue();
// 审批汇总id
String approveId = ObjectUtil.isNull(jsonObj.get("approveId",FromData.class)) ? null : jsonObj.get("approveId",FromData.class).getValue();
// 开始时间
String startTime = jsonObj.get("__startTime",FromData.class).getValue();
// 结束时间
......@@ -30,8 +45,17 @@ public class GoOutBusiness extends SpmkAssoBusiness {
// 上传文件
String UploadAttachment = jsonObj.get("UploadAttachment",FromData.class).getValue();
// 调 考勤管理 业务
AttEvectionApprovalDto eaD = AttEvectionApprovalDto
.builder()
.evectionid(Convert.toInt(approveId))
.evectiontype(2)
.starttime(DateUtil.getStringTime(startTime, "yyyy-MM-dd HH:mm:ss"))
.endtime(DateUtil.getStringTime(endTime, "yyyy-MM-dd HH:mm:ss"))
.duration(Convert.toDouble(longTime))
.build();
// 调 考勤管理 业务-外出
kqglService.attevectionapproval(eaD);
}
}
package cn.timer.api.utils.router.business;
import java.text.ParseException;
import org.springframework.beans.factory.annotation.Autowired;
import cn.hutool.core.convert.Convert;
import cn.hutool.core.util.ObjectUtil;
import cn.hutool.json.JSONObject;
import cn.timer.api.controller.kqgl.service.KqglService;
import cn.timer.api.dto.kqmk.AttEvectionApprovalDto;
import cn.timer.api.dto.kqmk.AttLeaveApprovalDto;
import cn.timer.api.dto.spmk.FromData;
import cn.timer.api.utils.DateUtil;
import lombok.Builder;
/**
......@@ -14,8 +23,11 @@ import lombok.Builder;
@Builder
public class LeaveBusiness extends SpmkAssoBusiness {
@Autowired
private KqglService kqglService;
@Override
public void handleApprove(JSONObject jsonObj) {
public void handleApprove(JSONObject jsonObj) throws ParseException {
// TODO Auto-generated method stub
// 发起人企业id
String orgCode = ObjectUtil.isNull(jsonObj.get("orgCode",FromData.class)) ? null : jsonObj.get("orgCode",FromData.class).getValue();
......@@ -24,6 +36,9 @@ public class LeaveBusiness extends SpmkAssoBusiness {
// 发起人名称
String initiator = ObjectUtil.isNull(jsonObj.get("initiator",FromData.class)) ? null : jsonObj.get("initiator",FromData.class).getValue();
// 审批汇总id
String approveId = ObjectUtil.isNull(jsonObj.get("approveId",FromData.class)) ? null : jsonObj.get("approveId",FromData.class).getValue();
// 请假类型
String LeaveType = ObjectUtil.isNull(jsonObj.get("__LeaveType",FromData.class)) ? null : jsonObj.get("__LeaveType",FromData.class).getValue();
// 开始时间
......@@ -37,7 +52,17 @@ public class LeaveBusiness extends SpmkAssoBusiness {
// 上传文件
String UploadAttachment = ObjectUtil.isNull(jsonObj.get("UploadAttachment",FromData.class)) ? null : jsonObj.get("UploadAttachment",FromData.class).getValue();
// 调 考勤管理 业务
AttLeaveApprovalDto laD = AttLeaveApprovalDto
.builder()
.leaveid(Convert.toInt(approveId))
.leavetype(Convert.toInt(LeaveType))
.starttime(DateUtil.getStringTime(startTime, "yyyy-MM-dd HH:mm:ss"))
.endtime(DateUtil.getStringTime(endTime, "yyyy-MM-dd HH:mm:ss"))
.duration(Convert.toDouble(longTime))
.build();
// 调 考勤管理 业务-请假
kqglService.attleaveapproval(laD);
}
}
package cn.timer.api.utils.router.business;
import java.text.ParseException;
import org.springframework.beans.factory.annotation.Autowired;
import cn.hutool.core.convert.Convert;
import cn.hutool.core.util.ObjectUtil;
import cn.hutool.json.JSONObject;
import cn.timer.api.controller.kqgl.service.KqglService;
import cn.timer.api.dto.kqmk.AttRepairApprovalDto;
import cn.timer.api.dto.spmk.FromData;
import cn.timer.api.utils.DateUtil;
import lombok.Builder;
/**
......@@ -13,8 +21,11 @@ import lombok.Builder;
@Builder
public class ReissueACardBusiness extends SpmkAssoBusiness {
@Autowired
private KqglService kqglService;
@Override
public void handleApprove(JSONObject jsonObj) {
public void handleApprove(JSONObject jsonObj) throws ParseException {
// TODO Auto-generated method stub
// 发起人企业id
String orgCode = ObjectUtil.isNull(jsonObj.get("orgCode",FromData.class)) ? null : jsonObj.get("orgCode",FromData.class).getValue();
......@@ -23,14 +34,28 @@ public class ReissueACardBusiness extends SpmkAssoBusiness {
// 发起人名称
String initiator = ObjectUtil.isNull(jsonObj.get("initiator",FromData.class)) ? null : jsonObj.get("initiator",FromData.class).getValue();
// 审批汇总id
String approveId = ObjectUtil.isNull(jsonObj.get("approveId",FromData.class)) ? null : jsonObj.get("approveId",FromData.class).getValue();
// 补卡时间
String PatchCardTime = ObjectUtil.isNull(jsonObj.get("__PatchCardTime",FromData.class)) ? null : jsonObj.get("__PatchCardTime",FromData.class).getValue();
// 缺卡原因
String cardShortage = ObjectUtil.isNull(jsonObj.get("cardShortage",FromData.class)) ? null : jsonObj.get("cardShortage",FromData.class).getValue();
// 缺卡时段-上班、下班-前端未改
String cardreplperiod = ObjectUtil.isNull(jsonObj.get("cardreplperiod",FromData.class)) ? null : jsonObj.get("cardreplperiod",FromData.class).getValue();
// 上传文件
String UploadAttachment = ObjectUtil.isNull(jsonObj.get("UploadAttachment",FromData.class)) ? null : jsonObj.get("UploadAttachment",FromData.class).getValue();
// 调 考勤管理 业务
AttRepairApprovalDto raD = AttRepairApprovalDto
.builder()
.repairid(Convert.toInt(approveId))
.cardrepltime(DateUtil.getStringTime(PatchCardTime, "yyyy-MM-dd HH:mm:ss"))
.cardreplperiod(Convert.toInt(cardreplperiod))
.build();
// 调 考勤管理 业务-补卡
kqglService.attrepairapproval(raD);
}
}
......@@ -35,6 +35,9 @@ public class SpmkAssoBusinessFactory {
case EVECTION:
sat = EvectionBusiness.builder().build();
break;
case GO_OUT:
sat = GoOutBusiness.builder().build();
break;
case REISSUE_A_CARD:
sat = ReissueACardBusiness.builder().build();
break;
......
package cn.timer.api.utils.router.business;
import java.text.ParseException;
import org.springframework.beans.factory.annotation.Autowired;
import cn.hutool.core.convert.Convert;
import cn.hutool.core.util.ObjectUtil;
import cn.hutool.json.JSONObject;
import cn.timer.api.controller.kqgl.service.KqglService;
import cn.timer.api.dto.kqmk.AttOvertimeApprovalDto;
import cn.timer.api.dto.spmk.FromData;
import cn.timer.api.utils.DateUtil;
import lombok.Builder;
/**
......@@ -13,8 +21,11 @@ import lombok.Builder;
@Builder
public class WorkOvertimeBusiness extends SpmkAssoBusiness {
@Autowired
private KqglService kqglService;
@Override
public void handleApprove(JSONObject jsonObj) {
public void handleApprove(JSONObject jsonObj) throws ParseException {
// TODO Auto-generated method stub
// 发起人企业id
String orgCode = ObjectUtil.isNull(jsonObj.get("orgCode",FromData.class)) ? null : jsonObj.get("orgCode",FromData.class).getValue();
......@@ -23,6 +34,9 @@ public class WorkOvertimeBusiness extends SpmkAssoBusiness {
// 发起人名称
String initiator = ObjectUtil.isNull(jsonObj.get("initiator",FromData.class)) ? null : jsonObj.get("initiator",FromData.class).getValue();
// 审批汇总id
String approveId = ObjectUtil.isNull(jsonObj.get("approveId",FromData.class)) ? null : jsonObj.get("approveId",FromData.class).getValue();
// 开始时间
String startTime = ObjectUtil.isNull(jsonObj.get("__startTime",FromData.class)) ? null : jsonObj.get("__startTime",FromData.class).getValue();
// 结束时间
......@@ -33,10 +47,24 @@ public class WorkOvertimeBusiness extends SpmkAssoBusiness {
String compensate = ObjectUtil.isNull(jsonObj.get("__compensate",FromData.class)) ? null : jsonObj.get("__compensate",FromData.class).getValue();
// 加班原因
String OvertimeReason = ObjectUtil.isNull(jsonObj.get("__OvertimeReason",FromData.class)) ? null : jsonObj.get("__OvertimeReason",FromData.class).getValue();
// 加班类型-前端未给
String overtimetype = ObjectUtil.isNull(jsonObj.get("__overtimetype",FromData.class)) ? null : jsonObj.get("__overtimetype",FromData.class).getValue();
// 上传文件
String UploadAttachment = ObjectUtil.isNull(jsonObj.get("UploadAttachment",FromData.class)) ? null : jsonObj.get("UploadAttachment",FromData.class).getValue();
// 调 考勤管理 业务
AttOvertimeApprovalDto oaD = AttOvertimeApprovalDto
.builder()
.overtimeid(Convert.toInt(approveId))
.overtimetype(Convert.toInt(overtimetype))
.starttime(DateUtil.getStringTime(startTime, "yyyy-MM-dd HH:mm:ss"))
.endtime(DateUtil.getStringTime(endTime, "yyyy-MM-dd HH:mm:ss"))
.duration(Convert.toDouble(timeLong))
.compensate(Convert.toInt(compensate))
.build();
// 调 考勤管理 业务-加班
kqglService.attovertimeapproval(oaD);
}
}
......@@ -2,9 +2,9 @@ package cn.timer.api.utils.router.enums;
public enum ApproveEnum {
DEFAULT(0, "默认", 1), REGULARIZATION(1, "转正", 1), RESIGNATION(2, "离职", 1), TRANSFER_POSITION(3, "调岗", 1),
RECRUIT(4, "招聘", 1), WORK_OVERTIME(5, "加班", 2), LEAVE(6, "请假", 2), EVECTION(7, "出差", 2), REISSUE_A_CARD(8, "补卡", 2),
WAGE_ADJUSTMENT(9, "调薪", 3),;
DEFAULT(0, "默认", 1), REGULARIZATION(1, "转正", 1), RESIGNATION(2, "离职", 1), TRANSFER_POSITION(3, "调岗", 1),RECRUIT(4, "招聘", 1),
WORK_OVERTIME(5, "加班", 2), LEAVE(6, "请假", 2), EVECTION(7, "出差", 2), GO_OUT(8, "外出", 2),REISSUE_A_CARD(9, "补卡", 2),
WAGE_ADJUSTMENT(10, "调薪", 3);
private Integer type;
......
......@@ -10,6 +10,7 @@
<result column="type" property="type" />
<result column="sts" property="sts" />
<result column="create_time" property="createTime" />
<result column="update_time" property="updateTime" />
</resultMap>
<resultMap id="BaseResultMapDto" type="cn.timer.api.bean.spmk.SpmkApproveExecuteRecord" >
......@@ -19,6 +20,7 @@
<result column="type" property="type" />
<result column="sts" property="sts" />
<result column="create_time" property="createTime" />
<result column="update_time" property="updateTime" />
<collection column="SpmkExecutor_id" property="spmkExecutors" ofType="cn.timer.api.bean.spmk.SpmkExecutor"
resultMap="cn.timer.api.dao.spmk.SpmkExecutorMapper.BaseResultMap" columnPrefix="SpmkExecutor_">
</collection>
......@@ -30,7 +32,8 @@
name,
type,
sts,
create_time
create_time,
update_time
</sql>
<sql id="Base_Column_List_a">
......@@ -39,7 +42,8 @@
a.name,
a.type,
a.sts,
a.create_time
a.create_time,
a.update_time
</sql>
<sql id="Base_Column_List_Alias_b">
......@@ -50,7 +54,8 @@
b.operator_header_url SpmkExecutor_operator_header_url,
b.opinion SpmkExecutor_opinion,
b.sts SpmkExecutor_sts,
b.create_time SpmkExecutor_create_time
b.create_time SpmkExecutor_create_time,
b.update_time SpmkExecutor_update_time
</sql>
<sql id="Base_Column_List_Alias">
......@@ -59,7 +64,8 @@
name SpmkApproveExecuteRecord_name,
type SpmkApproveExecuteRecord_type,
sts SpmkApproveExecuteRecord_sts,
create_time SpmkApproveExecuteRecord_create_time
create_time SpmkApproveExecuteRecord_create_time,
update_time SpmkApproveExecuteRecord_update_time
</sql>
......@@ -93,7 +99,10 @@
sts,
</if>
<if test ='null != createTime'>
create_time
create_time,
</if>
<if test ='null != updateTime'>
update_time
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
......@@ -111,6 +120,9 @@
</if>
<if test ='null != createTime'>
#{createTime}
</if>,
<if test ='null != updateTime'>
#{updateTime}
</if>
</trim>
</insert>
......@@ -127,7 +139,8 @@
<if test ='null != name'>name = #{name},</if>
<if test ='null != type'>type = #{type},</if>
<if test ='null != sts'>sts = #{sts},</if>
<if test ='null != createTime'>create_time = #{createTime}</if>
<if test ='null != createTime'>create_time = #{createTime},</if>
<if test ='null != updateTime'>update_time = #{updateTime}</if>
</set>
WHERE id = #{id}
</update>
......
......@@ -12,6 +12,7 @@
<result column="opinion" property="opinion" />
<result column="sts" property="sts" />
<result column="create_time" property="createTime" />
<result column="update_time" property="updateTime" />
</resultMap>
<sql id="Base_Column_List">
......@@ -22,7 +23,8 @@
operator_header_url,
opinion,
sts,
create_time
create_time,
update_time
</sql>
<sql id="Base_Column_List_Alias">
......@@ -33,7 +35,8 @@
operator_header_url SpmkExecutor_operator_header_url,
opinion SpmkExecutor_opinion,
sts SpmkExecutor_sts,
create_time SpmkExecutor_create_time
create_time SpmkExecutor_create_time,
update_time SpmkExecutor_update_time
</sql>
<!--
......@@ -60,7 +63,10 @@
sts,
</if>
<if test ='null != createTime'>
create_time
create_time,
</if>
<if test ='null != updateTime'>
update_time
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
......@@ -83,7 +89,10 @@
#{sts},
</if>
<if test ='null != createTime'>
#{createTime}
#{createTime},
</if>
<if test ='null != updateTime'>
#{updateTime}
</if>
</trim>
</insert>
......@@ -102,7 +111,8 @@
<if test ='null != operatorHeaderUrl'>operator_header_url = #{operatorHeaderUrl},</if>
<if test ='null != opinion'>opinion = #{opinion},</if>
<if test ='null != sts'>sts = #{sts},</if>
<if test ='null != createTime'>create_time = #{createTime}</if>
<if test ='null != createTime'>create_time = #{createTime},</if>
<if test ='null != updateTime'>update_time = #{updateTime}</if>
</set>
WHERE id = #{id}
</update>
......
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