Commit 6896cb94 by tangzhaoqian

员工导出、导入,审批请假、补卡、加班、出差、外出对接,审批逻辑优化

parent 7f508266
...@@ -57,6 +57,10 @@ public class SpmkApproveExecuteRecord extends Model<SpmkApproveExecuteRecord> { ...@@ -57,6 +57,10 @@ public class SpmkApproveExecuteRecord extends Model<SpmkApproveExecuteRecord> {
@TableField(fill = FieldFill.INSERT) @TableField(fill = FieldFill.INSERT)
@ApiModelProperty(value = "创建时间 ", example = "创建时间") @ApiModelProperty(value = "创建时间 ", example = "创建时间")
private Date createTime; private Date createTime;
@TableField(fill = FieldFill.UPDATE)
@ApiModelProperty(value = "操作时间 ", example = "操作时间")
private Date updateTime;
private List<SpmkExecutor> spmkExecutors; private List<SpmkExecutor> spmkExecutors;
......
...@@ -64,5 +64,9 @@ public class SpmkExecutor extends Model<SpmkExecutor> { ...@@ -64,5 +64,9 @@ public class SpmkExecutor extends Model<SpmkExecutor> {
@TableField(fill = FieldFill.INSERT) @TableField(fill = FieldFill.INSERT)
@ApiModelProperty(value = "创建时间 ", example = "创建时间") @ApiModelProperty(value = "创建时间 ", example = "创建时间")
private Date createTime; private Date createTime;
@TableField(fill = FieldFill.UPDATE)
@ApiModelProperty(value = "创建时间 ", example = "创建时间")
private Date updateTime;
} }
\ No newline at end of file
...@@ -18,10 +18,8 @@ import org.springframework.web.bind.annotation.RequestMapping; ...@@ -18,10 +18,8 @@ import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam; import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController; 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.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport; import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
...@@ -50,7 +48,6 @@ import cn.timer.api.config.enuminterface.SpmkEnumInterface; ...@@ -50,7 +48,6 @@ import cn.timer.api.config.enuminterface.SpmkEnumInterface;
import cn.timer.api.config.enuminterface.SpmkEnumInterface.ApproveSummarySts; import cn.timer.api.config.enuminterface.SpmkEnumInterface.ApproveSummarySts;
import cn.timer.api.config.enuminterface.SpmkEnumInterface.ExecutorSts; import cn.timer.api.config.enuminterface.SpmkEnumInterface.ExecutorSts;
import cn.timer.api.config.exception.CustomException; 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.Ranks;
import cn.timer.api.config.validation.ValidList; import cn.timer.api.config.validation.ValidList;
import cn.timer.api.controller.spmk.service.SpmkServiceImpl; import cn.timer.api.controller.spmk.service.SpmkServiceImpl;
...@@ -88,10 +85,8 @@ import io.swagger.annotations.ApiOperation; ...@@ -88,10 +85,8 @@ import io.swagger.annotations.ApiOperation;
@Transactional @Transactional
@RequestMapping(value = "/spmk", @RequestMapping(value = "/spmk",
produces = { "application/json","multipart/form-data" }) produces = { "application/json","multipart/form-data" })
//@BindingResultCtrol(title = "发起审批")
public class SpmkController { public class SpmkController {
@Autowired @Autowired
private SpmkApprovalTemplateGMapper spmkApprovalTemplateGMapper; private SpmkApprovalTemplateGMapper spmkApprovalTemplateGMapper;
@Autowired @Autowired
...@@ -127,7 +122,7 @@ public class SpmkController { ...@@ -127,7 +122,7 @@ public class SpmkController {
public Result<Object> saveAtg(@RequestBody SpmkApprovalTemplateG spmkApprovalTemplateG){ public Result<Object> saveAtg(@RequestBody SpmkApprovalTemplateG spmkApprovalTemplateG){
if (spmkApprovalTemplateG.selectCount(new QueryWrapper<SpmkApprovalTemplateG>().lambda() 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) { .eq(SpmkApprovalTemplateG::getName, spmkApprovalTemplateG.getName())) > 0) {
return ResultUtil.error("审批模板组名重复!"); return ResultUtil.error("审批模板组名重复!");
} }
...@@ -198,7 +193,7 @@ public class SpmkController { ...@@ -198,7 +193,7 @@ public class SpmkController {
at.setRouter(ObjectUtil.serialize(spmkApprovalTemplateDto.getRouter())); at.setRouter(ObjectUtil.serialize(spmkApprovalTemplateDto.getRouter()));
if (at.selectCount(new QueryWrapper<SpmkApprovalTemplate>().lambda() 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) { .eq(SpmkApprovalTemplate::getName, at.getName())) > 0) {
return ResultUtil.error("审批模板名重复!"); return ResultUtil.error("审批模板名重复!");
} }
...@@ -266,7 +261,7 @@ public class SpmkController { ...@@ -266,7 +261,7 @@ public class SpmkController {
public Result<Object> saveAg(@CurrentUser UserBean userBean, @RequestBody SpmkApprovalG spmkApprovalG){ public Result<Object> saveAg(@CurrentUser UserBean userBean, @RequestBody SpmkApprovalG spmkApprovalG){
if (spmkApprovalG.selectCount(new QueryWrapper<SpmkApprovalG>().lambda() 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::getName, spmkApprovalG.getName())
.eq(SpmkApprovalG::getOrgCode, userBean.getOrgCode())) > 0) { .eq(SpmkApprovalG::getOrgCode, userBean.getOrgCode())) > 0) {
return ResultUtil.error("审批组名重复!"); return ResultUtil.error("审批组名重复!");
...@@ -315,7 +310,6 @@ public class SpmkController { ...@@ -315,7 +310,6 @@ public class SpmkController {
public Result<Object> selectListAg(@CurrentUser UserBean userBean){ public Result<Object> selectListAg(@CurrentUser UserBean userBean){
List<Integer> depts = zzglBmgwMService.empNumupGetDepts(userBean.getOrgCode(), userBean.getEmpNum()); List<Integer> depts = zzglBmgwMService.empNumupGetDepts(userBean.getOrgCode(), userBean.getEmpNum());
System.out.println(depts);
return ResultUtil.data(spmkApprovalGMapper.selectListAgInCa(userBean.getOrgCode(), userBean.getEmpNum(), depts),"操作成功!"); return ResultUtil.data(spmkApprovalGMapper.selectListAgInCa(userBean.getOrgCode(), userBean.getEmpNum(), depts),"操作成功!");
} }
...@@ -349,7 +343,7 @@ public class SpmkController { ...@@ -349,7 +343,7 @@ public class SpmkController {
BeanUtil.copyProperties(spmkCustomApprovalDto, ca , "froms","router","initiatorConfigs"); BeanUtil.copyProperties(spmkCustomApprovalDto, ca , "froms","router","initiatorConfigs");
if (ca.selectCount(new QueryWrapper<SpmkCustomApproval>().lambda() 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::getName, ca.getName())
.eq(SpmkCustomApproval::getOrgCode, userBean.getOrgCode())) > 0) { .eq(SpmkCustomApproval::getOrgCode, userBean.getOrgCode())) > 0) {
return ResultUtil.error("自定义审批名重复!"); return ResultUtil.error("自定义审批名重复!");
...@@ -649,10 +643,12 @@ public class SpmkController { ...@@ -649,10 +643,12 @@ public class SpmkController {
if (aSummary.getSts() != SpmkEnumInterface.ApproveSummarySts.REFUSE.ordinal()) { 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("").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())); SpmkAssoBusiness sab = SpmkAssoBusinessFactory.createSpmkAssoType(ApproveEnum.getEnums(aSummary.getAssoType()));
if (sab != null) if (sab != null)
sab.handleApprove(ObjectUtil.deserialize(ad.getRequestData())); sab.handleApprove(jSONObject);
} }
} }
......
...@@ -53,6 +53,7 @@ import cn.hutool.core.util.IdcardUtil; ...@@ -53,6 +53,7 @@ import cn.hutool.core.util.IdcardUtil;
import cn.hutool.core.util.ObjectUtil; import cn.hutool.core.util.ObjectUtil;
import cn.hutool.core.util.ReUtil; import cn.hutool.core.util.ReUtil;
import cn.hutool.core.util.StrUtil; import cn.hutool.core.util.StrUtil;
import cn.hutool.json.JSONObject;
import cn.hutool.json.JSONUtil; import cn.hutool.json.JSONUtil;
import cn.timer.api.bean.clazz.CommonArea; import cn.timer.api.bean.clazz.CommonArea;
import cn.timer.api.bean.clazz.SysRegion; import cn.timer.api.bean.clazz.SysRegion;
...@@ -78,6 +79,7 @@ import cn.timer.api.config.annotation.UserBean; ...@@ -78,6 +79,7 @@ import cn.timer.api.config.annotation.UserBean;
import cn.timer.api.config.enuminterface.YgEnumInterface; import cn.timer.api.config.enuminterface.YgEnumInterface;
import cn.timer.api.config.enums.CommonEnum; import cn.timer.api.config.enums.CommonEnum;
import cn.timer.api.config.exception.Regular; import cn.timer.api.config.exception.Regular;
import cn.timer.api.config.validation.ValidList;
import cn.timer.api.dao.clazz.CommonAreaMapper; import cn.timer.api.dao.clazz.CommonAreaMapper;
import cn.timer.api.dao.qyzx.QyzxEmpLoginMapper; import cn.timer.api.dao.qyzx.QyzxEmpLoginMapper;
import cn.timer.api.dao.yggl.YgMzDtoMapper; import cn.timer.api.dao.yggl.YgMzDtoMapper;
...@@ -344,10 +346,9 @@ public class YgglController { ...@@ -344,10 +346,9 @@ public class YgglController {
* @return * @return
*/ */
@PostMapping(value = "/addygda") @PostMapping(value = "/addygda")
@ApiOperation(value = "添加员工档案", httpMethod = "POST", notes = "接口发布说明") @ApiOperation(value = "4.添加员工档案", httpMethod = "POST", notes = "接口发布说明")
@ApiOperationSupport(order = 4) @ApiOperationSupport(order = 4)
public Result<Object> addygda(@CurrentUser UserBean userBean, @Validated @RequestBody AddygdaDto addygdaDto) public Result<Object> addygda(@CurrentUser UserBean userBean, @Validated @RequestBody AddygdaDto addygdaDto) throws Exception {
throws Exception {
Integer orgCode = userBean.getOrgCode(); Integer orgCode = userBean.getOrgCode();
String name = addygdaDto.getName(); String name = addygdaDto.getName();
String phone = addygdaDto.getPhone(); String phone = addygdaDto.getPhone();
...@@ -377,23 +378,19 @@ public class YgglController { ...@@ -377,23 +378,19 @@ public class YgglController {
} }
Integer jobType = addygdaDto.getJobType(); Integer jobType = addygdaDto.getJobType();
Date rzTime = null; Date rzTime = addygdaDto.getRzTime() == null ? new Date() : addygdaDto.getRzTime();
if (addygdaDto.getRzTime() == null)
rzTime = new Date();
else
rzTime = addygdaDto.getRzTime();
Integer syq = addygdaDto.getSyq(); Integer syq = addygdaDto.getSyq();
Integer sex = addygdaDto.getSex(); Integer sex = addygdaDto.getSex();
Integer bmgwId = addygdaDto.getBmgwId(); Integer bmgwId = addygdaDto.getBmgwId();
if (StrUtil.hasBlank(phone) || StrUtil.hasBlank(name) || StrUtil.hasBlank(zjNum)) { // if (StrUtil.hasBlank(phone) || StrUtil.hasBlank(name) || StrUtil.hasBlank(zjNum)) {
return ResultUtil.error("请输入员工姓名,手机号和身份证号"); // return ResultUtil.error("请输入员工姓名,手机号和身份证号");
} // }
if (!ObjectUtil.isAllNotEmpty(name, phone, zjType, zjNum, jobType, rzTime, syq, bmgwId, sex)) { // if (!ObjectUtil.isAllNotEmpty(name, phone, zjType, zjNum, jobType, rzTime, syq, bmgwId, sex)) {
return ResultUtil.error("请完善员工信息!"); // return ResultUtil.error("请完善员工信息!");
} // }
if (!IdcardUtil.isValidCard(zjNum)) { // if (!IdcardUtil.isValidCard(zjNum)) {
return ResultUtil.error("请输入有效的证件信息!"); // return ResultUtil.error("请输入有效的证件信息!");
} // }
QyzxEmpLogin login = new LambdaQueryChainWrapper<QyzxEmpLogin>(qyzxEmpLoginMapper) QyzxEmpLogin login = new LambdaQueryChainWrapper<QyzxEmpLogin>(qyzxEmpLoginMapper)
.eq(!StrUtil.hasBlank(phone), QyzxEmpLogin::getPhone, phone).one(); .eq(!StrUtil.hasBlank(phone), QyzxEmpLogin::getPhone, phone).one();
...@@ -412,7 +409,7 @@ public class YgglController { ...@@ -412,7 +409,7 @@ public class YgglController {
.userType(CommonEnum.U_TYPE_EMP.getType()).status(1).build().insert();// usertype2普通员工 status1正常 .userType(CommonEnum.U_TYPE_EMP.getType()).status(1).build().insert();// usertype2普通员工 status1正常
YgglMainEmp ygglMainEmp = YgglMainEmp.builder().name(name).phone(phone).zjType(zjType).zjNum(zjNum) YgglMainEmp ygglMainEmp = YgglMainEmp.builder().name(name).phone(phone).zjType(zjType).zjNum(zjNum)
.jobType(jobType).jobStatus(YgEnumInterface.jobStatus.SHIYONG.getType()).rzTime(rzTime).syq(syq) .jobType(jobType).jobStatus(YgEnumInterface.jobStatus.SHIYONG.getType()).rzTime(rzTime).syq(syq)
.sex(sex).empNum(qyzxEmpLogin.getId()).orgCode(orgCode).build(); .sex(sex).empNum(qyzxEmpLogin.getId()).orgCode(orgCode).bmgwId(bmgwId).build();
ygglMainEmp.insert(); ygglMainEmp.insert();
if (addygdaDto.getBmgwId() != null) { if (addygdaDto.getBmgwId() != null) {
...@@ -435,7 +432,7 @@ public class YgglController { ...@@ -435,7 +432,7 @@ public class YgglController {
// status1正常 // status1正常
YgglMainEmp ygglMainEmp = YgglMainEmp.builder().name(name).phone(phone).zjType(zjType).zjNum(zjNum) YgglMainEmp ygglMainEmp = YgglMainEmp.builder().name(name).phone(phone).zjType(zjType).zjNum(zjNum)
.jobType(jobType).jobStatus(YgEnumInterface.jobStatus.SHIYONG.getType()).rzTime(rzTime).syq(syq) .jobType(jobType).jobStatus(YgEnumInterface.jobStatus.SHIYONG.getType()).rzTime(rzTime).syq(syq)
.sex(sex).empNum(login.getId()).orgCode(orgCode).build(); .sex(sex).empNum(login.getId()).orgCode(orgCode).bmgwId(bmgwId).build();
ygglMainEmp.insert(); ygglMainEmp.insert();
if (addygdaDto.getBmgwId() != null) { if (addygdaDto.getBmgwId() != null) {
new LambdaUpdateChainWrapper<YgglMainEmp>(ygglMainEmpMapper) new LambdaUpdateChainWrapper<YgglMainEmp>(ygglMainEmpMapper)
...@@ -519,29 +516,111 @@ public class YgglController { ...@@ -519,29 +516,111 @@ public class YgglController {
* 导入员工档案 * 导入员工档案
*/ */
@PostMapping(value = "/import_emp_record") @PostMapping(value = "/import_emp_record")
@ApiOperation(value = "导入员工档案", httpMethod = "POST", notes = "接口发布说明") @ApiOperation(value = "7.导入员工档案", httpMethod = "POST", notes = "接口发布说明")
@ApiOperationSupport(order = 7) @ApiOperationSupport(order = 7)
public Result<List<YgDrjqbDto>> importEmpRecord( public Result<JSONObject> importEmpRecord(
@CurrentUser UserBean userBean/* ,@Validated @RequestBody List<AddygdaDto> listAddygdaDto */) { @CurrentUser UserBean userBean ,@Validated @RequestBody ValidList<AddygdaDto> listAddygdaDto ) throws Exception {
List<QyzxEmpLogin> listEl = qyzxEmpLoginMapper
.selectList(new QueryWrapper<QyzxEmpLogin>().lambda().select(QyzxEmpLogin::getPhone));
listEl = listEl != null ? listEl.stream()
Integer orgCode = userBean.getOrgCode();
// 查询所有员工手机号
// List<QyzxEmpLogin> listEl = qyzxEmpLoginMapper
// .selectList(new QueryWrapper<QyzxEmpLogin>().lambda()
// .select(QyzxEmpLogin::getPhone));
List<YgglMainEmp> listMe = ygglMainEmpMapper
.selectList(new QueryWrapper<YgglMainEmp>().lambda()
.eq(YgglMainEmp::getOrgCode, orgCode)
.select(YgglMainEmp::getPhone,YgglMainEmp::getZjNum));
listMe = listMe != null ? listMe.stream()
.filter(o -> o != null && o.getPhone() != null).collect(Collectors.toList()) : null; .filter(o -> o != null && o.getPhone() != null).collect(Collectors.toList()) : null;
System.out.println(JSONUtil.parseObj(listEl));
// listEl.stream().filter(predicate)
// listEl.stream().filter(item -> objId.equals(item.getUpId())).forEach(zzglBmgwM -> {
// list.add(zzglBmgwM.getId());
// getDepts(list, zzglBmgwM.getId(), objs);
// });
// 抽取 登录表 的phone的集合 // 抽取 登录表 的phone的集合
List<String> listPhone = listEl.stream().map(QyzxEmpLogin::getPhone).collect(Collectors.toList()); List<String> listPhone = listMe.stream().map(YgglMainEmp::getPhone).collect(Collectors.toList());
// 抽取 登录表 的zjNum的集合
List<String> listzjNum = listMe.stream().map(YgglMainEmp::getZjNum).collect(Collectors.toList());
System.out.println(listPhone);
System.out.println(listzjNum);
List<YgglMainEmp> listYmp = new ArrayList<YgglMainEmp>();
List<AddygdaDto> list = listAddygdaDto.stream()
.filter(o -> o != null && !listPhone.contains(o.getPhone()) && !listzjNum.contains(o.getZjNum())).collect(Collectors.toList());
List<AddygdaDto> phoneRepetitions = listAddygdaDto.stream()
.filter(o -> o != null && listPhone.contains(o.getPhone())).collect(Collectors.toList());
List<AddygdaDto> IDCardRepetitions = listAddygdaDto.stream()
.filter(o -> o != null && listzjNum.contains(o.getZjNum())).collect(Collectors.toList());
System.out.println("list:"+list);
System.out.println("phoneRepetitions:"+phoneRepetitions);
System.out.println("IDCardRepetitions:"+IDCardRepetitions);
YgglMainEmp yme;
for (AddygdaDto ad : list) {
String name = ad.getName();
String phone = ad.getPhone();
Integer zjType = ad.getZjType();
String zjNum = ad.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 = ad.getJobType();
Date rzTime = ad.getRzTime() == null ? new Date() : ad.getRzTime();
Integer syq = ad.getSyq();
Integer sex = ad.getSex();
Integer bmgwId = ad.getBmgwId();
QyzxEmpLogin login = new LambdaQueryChainWrapper<QyzxEmpLogin>(qyzxEmpLoginMapper)
.eq(!StrUtil.hasBlank(phone), QyzxEmpLogin::getPhone, phone).one();
if (login == null) {
// 初始化密码 pwd
login = QyzxEmpLogin.builder().phone(phone).pw(Md5.md5(pwd))
.sts(CommonEnum.U_STS_ON.getType()).orgId(userBean.getOrgCode()).username(name).build();
if (!login.insert()) {
TransactionAspectSupport.currentTransactionStatus().setRollbackOnly();
return ResultUtil.error("添加员工登录表失败,请检查输入信息");
}
}
System.out.println(JSONUtil.parseObj(listPhone)); QyzxEmpEntAsso.builder().empNum(login.getId()).orgCode(orgCode)
listEl.stream().filter(i -> i != null).collect(Collectors.<QyzxEmpLogin>toList()); .userType(CommonEnum.U_TYPE_EMP.getType()).status(CommonEnum.U_STS_ON.getType()).build().insert();// usertype2普通员工 status1正常
return null; yme = YgglMainEmp.builder().name(name).phone(phone).zjType(zjType).zjNum(zjNum)
.jobType(jobType).jobStatus(YgEnumInterface.jobStatus.SHIYONG.getType()).rzTime(rzTime).syq(syq)
.sex(sex).empNum(login.getId()).orgCode(orgCode).bmgwId(bmgwId).build();
if (yme.insert()) {
listYmp.add(yme);
}
}
JSONObject obj = JSONUtil.createObj();
obj.set("empList", listYmp);
obj.set("phoneRepetitions", phoneRepetitions);
obj.set("IDCardRepetitions", IDCardRepetitions);
//listEl.stream().filter(i -> i != null).collect(Collectors.<QyzxEmpLogin>toList());
return ResultUtil.data(obj, "导入员工档案成功!");
} }
/** /**
...@@ -932,9 +1011,8 @@ public class YgglController { ...@@ -932,9 +1011,8 @@ public class YgglController {
@ApiOperation(value = "导出", httpMethod = "GET", notes = "接口发布说明") @ApiOperation(value = "导出", httpMethod = "GET", notes = "接口发布说明")
@ApiOperationSupport(order = 8) @ApiOperationSupport(order = 8)
public Result<List<YgglMainEmp>> selectygdas(@CurrentUser UserBean userBean) { public Result<List<YgglMainEmp>> selectygdas(@CurrentUser UserBean userBean) {
int[] jList = { 1, 2, 3 };
List<YgglMainEmp> list = new LambdaQueryChainWrapper<YgglMainEmp>(ygglMainEmpMapper) List<YgglMainEmp> list = new LambdaQueryChainWrapper<YgglMainEmp>(ygglMainEmpMapper)
.eq(YgglMainEmp::getOrgCode, userBean.getOrgCode()).in(YgglMainEmp::getJobStatus, jList).list(); .eq(YgglMainEmp::getOrgCode, userBean.getOrgCode()).in(YgglMainEmp::getJobStatus, 1,2,3).list();
return ResultUtil.data(list, "导出员工成功"); return ResultUtil.data(list, "导出员工成功");
} }
......
...@@ -55,7 +55,7 @@ public class AddygdaDto extends Page implements Serializable{ ...@@ -55,7 +55,7 @@ public class AddygdaDto extends Page implements Serializable{
@ApiModelProperty(value="工作性质 0全职、1实习生、2兼职、3劳务派遣、4劳务、5派遣、6外包、7退休返聘",example="0") @ApiModelProperty(value="工作性质 0全职、1实习生、2兼职、3劳务派遣、4劳务、5派遣、6外包、7退休返聘",example="0")
private Integer jobType; private Integer jobType;
@NotNull(message = ValidationMsg.NOTNULL) // @NotNull(message = ValidationMsg.NOTNULL)
@ApiModelProperty(value="入职日期 ",example="客户注册后的时间为入职时间") @ApiModelProperty(value="入职日期 ",example="客户注册后的时间为入职时间")
private Date rzTime; private Date rzTime;
......
...@@ -541,17 +541,18 @@ public class RouterUtils { ...@@ -541,17 +541,18 @@ public class RouterUtils {
for (Relation relation : listRelation) { for (Relation relation : listRelation) {
List<User> listUser2 = relation.getUsers(); List<User> listUser2 = relation.getUsers();
if (listUser2 != null) {
// 新增 执行人 // 新增 执行人
for (User user2 : listUser2) { for (User user2 : listUser2) {
SpmkExecutor executor = SpmkExecutor.builder() SpmkExecutor executor = SpmkExecutor.builder()
.approveExecuteRecordId(aer3.getId()) .approveExecuteRecordId(aer3.getId())
.empNum(Integer.parseInt(user2.getId())) .empNum(Integer.parseInt(user2.getId()))
.executorName(user2.getName()) .executorName(user2.getName())
.operatorHeaderUrl(user2.getHeadUrl()) .operatorHeaderUrl(user2.getHeadUrl())
.sts(ExecutorSts.AGREE.ordinal()) .sts(ExecutorSts.AGREE.ordinal())
.build(); .build();
executor.insert(); executor.insert();
}
} }
} }
......
package cn.timer.api.utils.router.business; 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.ObjectUtil;
import cn.hutool.core.util.StrUtil;
import cn.hutool.json.JSONObject; 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.dto.spmk.FromData;
import cn.timer.api.utils.DateUtil;
import lombok.Builder; import lombok.Builder;
/** /**
...@@ -14,8 +21,11 @@ import lombok.Builder; ...@@ -14,8 +21,11 @@ import lombok.Builder;
@Builder @Builder
public class EvectionBusiness extends SpmkAssoBusiness { public class EvectionBusiness extends SpmkAssoBusiness {
@Autowired
private KqglService kqglService;
@Override @Override
public void handleApprove(JSONObject jsonObj) { public void handleApprove(JSONObject jsonObj) throws ParseException {
// TODO Auto-generated method stub // TODO Auto-generated method stub
// 发起人企业id // 发起人企业id
String orgCode = ObjectUtil.isNull(jsonObj.get("orgCode",FromData.class)) ? null : jsonObj.get("orgCode",FromData.class).getValue(); 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 { ...@@ -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 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(); 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(); 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 { ...@@ -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(); 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)*60D)
.build();
// 调 考勤管理 业务-出差
kqglService.attevectionapproval(eaD);
} }
} }
package cn.timer.api.utils.router.business; 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.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.dto.spmk.FromData;
import cn.timer.api.utils.DateUtil;
import lombok.Builder;
/** /**
* 外出 * 外出-业务
* @author Tang * @author Tang
* *
*/ */
@Builder
public class GoOutBusiness extends SpmkAssoBusiness { public class GoOutBusiness extends SpmkAssoBusiness {
@Autowired
private KqglService kqglService;
@Override @Override
public void handleApprove(JSONObject jsonObj) throws Exception { public void handleApprove(JSONObject jsonObj) throws Exception {
// TODO Auto-generated method stub // TODO Auto-generated method stub
...@@ -19,6 +31,9 @@ public class GoOutBusiness extends SpmkAssoBusiness { ...@@ -19,6 +31,9 @@ public class GoOutBusiness extends SpmkAssoBusiness {
String id = jsonObj.get("id",FromData.class).getValue(); String id = jsonObj.get("id",FromData.class).getValue();
// 发起人名称 // 发起人名称
String initiator = jsonObj.get("initiator",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(); String startTime = jsonObj.get("__startTime",FromData.class).getValue();
// 结束时间 // 结束时间
...@@ -30,8 +45,17 @@ public class GoOutBusiness extends SpmkAssoBusiness { ...@@ -30,8 +45,17 @@ public class GoOutBusiness extends SpmkAssoBusiness {
// 上传文件 // 上传文件
String UploadAttachment = jsonObj.get("UploadAttachment",FromData.class).getValue(); 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)*60D)
.build();
// 调 考勤管理 业务-外出
kqglService.attevectionapproval(eaD);
} }
} }
package cn.timer.api.utils.router.business; 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.ObjectUtil;
import cn.hutool.json.JSONObject; 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.dto.spmk.FromData;
import cn.timer.api.utils.DateUtil;
import lombok.Builder; import lombok.Builder;
/** /**
...@@ -14,8 +23,11 @@ import lombok.Builder; ...@@ -14,8 +23,11 @@ import lombok.Builder;
@Builder @Builder
public class LeaveBusiness extends SpmkAssoBusiness { public class LeaveBusiness extends SpmkAssoBusiness {
@Autowired
private KqglService kqglService;
@Override @Override
public void handleApprove(JSONObject jsonObj) { public void handleApprove(JSONObject jsonObj) throws ParseException {
// TODO Auto-generated method stub // TODO Auto-generated method stub
// 发起人企业id // 发起人企业id
String orgCode = ObjectUtil.isNull(jsonObj.get("orgCode",FromData.class)) ? null : jsonObj.get("orgCode",FromData.class).getValue(); 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 { ...@@ -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(); 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(); 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 { ...@@ -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(); 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)*60D)
.build();
// 调 考勤管理 业务-请假
kqglService.attleaveapproval(laD);
} }
} }
package cn.timer.api.utils.router.business; 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.ObjectUtil;
import cn.hutool.json.JSONObject; 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.dto.spmk.FromData;
import cn.timer.api.utils.DateUtil;
import lombok.Builder; import lombok.Builder;
/** /**
...@@ -13,8 +21,11 @@ import lombok.Builder; ...@@ -13,8 +21,11 @@ import lombok.Builder;
@Builder @Builder
public class ReissueACardBusiness extends SpmkAssoBusiness { public class ReissueACardBusiness extends SpmkAssoBusiness {
@Autowired
private KqglService kqglService;
@Override @Override
public void handleApprove(JSONObject jsonObj) { public void handleApprove(JSONObject jsonObj) throws ParseException {
// TODO Auto-generated method stub // TODO Auto-generated method stub
// 发起人企业id // 发起人企业id
String orgCode = ObjectUtil.isNull(jsonObj.get("orgCode",FromData.class)) ? null : jsonObj.get("orgCode",FromData.class).getValue(); 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 { ...@@ -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(); 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 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 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(); 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 { ...@@ -35,6 +35,9 @@ public class SpmkAssoBusinessFactory {
case EVECTION: case EVECTION:
sat = EvectionBusiness.builder().build(); sat = EvectionBusiness.builder().build();
break; break;
case GO_OUT:
sat = GoOutBusiness.builder().build();
break;
case REISSUE_A_CARD: case REISSUE_A_CARD:
sat = ReissueACardBusiness.builder().build(); sat = ReissueACardBusiness.builder().build();
break; break;
......
package cn.timer.api.utils.router.business; 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.ObjectUtil;
import cn.hutool.json.JSONObject; 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.dto.spmk.FromData;
import cn.timer.api.utils.DateUtil;
import lombok.Builder; import lombok.Builder;
/** /**
...@@ -13,8 +21,11 @@ import lombok.Builder; ...@@ -13,8 +21,11 @@ import lombok.Builder;
@Builder @Builder
public class WorkOvertimeBusiness extends SpmkAssoBusiness { public class WorkOvertimeBusiness extends SpmkAssoBusiness {
@Autowired
private KqglService kqglService;
@Override @Override
public void handleApprove(JSONObject jsonObj) { public void handleApprove(JSONObject jsonObj) throws ParseException {
// TODO Auto-generated method stub // TODO Auto-generated method stub
// 发起人企业id // 发起人企业id
String orgCode = ObjectUtil.isNull(jsonObj.get("orgCode",FromData.class)) ? null : jsonObj.get("orgCode",FromData.class).getValue(); 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 { ...@@ -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(); 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(); 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 { ...@@ -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 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 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(); 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)*60D)
.compensate(Convert.toInt(compensate))
.build();
// 调 考勤管理 业务-加班
kqglService.attovertimeapproval(oaD);
} }
} }
...@@ -2,9 +2,9 @@ package cn.timer.api.utils.router.enums; ...@@ -2,9 +2,9 @@ package cn.timer.api.utils.router.enums;
public enum ApproveEnum { public enum ApproveEnum {
DEFAULT(0, "默认", 1), REGULARIZATION(1, "转正", 1), RESIGNATION(2, "离职", 1), TRANSFER_POSITION(3, "调岗", 1), DEFAULT(0, "默认", 1), REGULARIZATION(1, "转正", 1), RESIGNATION(2, "离职", 1), TRANSFER_POSITION(3, "调岗", 1),RECRUIT(4, "招聘", 1),
RECRUIT(4, "招聘", 1), WORK_OVERTIME(5, "加班", 2), LEAVE(6, "请假", 2), EVECTION(7, "出差", 2), REISSUE_A_CARD(8, "补卡", 2), WORK_OVERTIME(5, "加班", 2), LEAVE(6, "请假", 2), EVECTION(7, "出差", 2), GO_OUT(8, "外出", 2),REISSUE_A_CARD(9, "补卡", 2),
WAGE_ADJUSTMENT(9, "调薪", 3),; WAGE_ADJUSTMENT(10, "调薪", 3);
private Integer type; private Integer type;
......
...@@ -10,6 +10,7 @@ ...@@ -10,6 +10,7 @@
<result column="type" property="type" /> <result column="type" property="type" />
<result column="sts" property="sts" /> <result column="sts" property="sts" />
<result column="create_time" property="createTime" /> <result column="create_time" property="createTime" />
<result column="update_time" property="updateTime" />
</resultMap> </resultMap>
<resultMap id="BaseResultMapDto" type="cn.timer.api.bean.spmk.SpmkApproveExecuteRecord" > <resultMap id="BaseResultMapDto" type="cn.timer.api.bean.spmk.SpmkApproveExecuteRecord" >
...@@ -19,6 +20,7 @@ ...@@ -19,6 +20,7 @@
<result column="type" property="type" /> <result column="type" property="type" />
<result column="sts" property="sts" /> <result column="sts" property="sts" />
<result column="create_time" property="createTime" /> <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" <collection column="SpmkExecutor_id" property="spmkExecutors" ofType="cn.timer.api.bean.spmk.SpmkExecutor"
resultMap="cn.timer.api.dao.spmk.SpmkExecutorMapper.BaseResultMap" columnPrefix="SpmkExecutor_"> resultMap="cn.timer.api.dao.spmk.SpmkExecutorMapper.BaseResultMap" columnPrefix="SpmkExecutor_">
</collection> </collection>
...@@ -30,7 +32,8 @@ ...@@ -30,7 +32,8 @@
name, name,
type, type,
sts, sts,
create_time create_time,
update_time
</sql> </sql>
<sql id="Base_Column_List_a"> <sql id="Base_Column_List_a">
...@@ -39,7 +42,8 @@ ...@@ -39,7 +42,8 @@
a.name, a.name,
a.type, a.type,
a.sts, a.sts,
a.create_time a.create_time,
a.update_time
</sql> </sql>
<sql id="Base_Column_List_Alias_b"> <sql id="Base_Column_List_Alias_b">
...@@ -50,7 +54,8 @@ ...@@ -50,7 +54,8 @@
b.operator_header_url SpmkExecutor_operator_header_url, b.operator_header_url SpmkExecutor_operator_header_url,
b.opinion SpmkExecutor_opinion, b.opinion SpmkExecutor_opinion,
b.sts SpmkExecutor_sts, b.sts SpmkExecutor_sts,
b.create_time SpmkExecutor_create_time b.create_time SpmkExecutor_create_time,
b.update_time SpmkExecutor_update_time
</sql> </sql>
<sql id="Base_Column_List_Alias"> <sql id="Base_Column_List_Alias">
...@@ -59,7 +64,8 @@ ...@@ -59,7 +64,8 @@
name SpmkApproveExecuteRecord_name, name SpmkApproveExecuteRecord_name,
type SpmkApproveExecuteRecord_type, type SpmkApproveExecuteRecord_type,
sts SpmkApproveExecuteRecord_sts, sts SpmkApproveExecuteRecord_sts,
create_time SpmkApproveExecuteRecord_create_time create_time SpmkApproveExecuteRecord_create_time,
update_time SpmkApproveExecuteRecord_update_time
</sql> </sql>
...@@ -93,7 +99,10 @@ ...@@ -93,7 +99,10 @@
sts, sts,
</if> </if>
<if test ='null != createTime'> <if test ='null != createTime'>
create_time create_time,
</if>
<if test ='null != updateTime'>
update_time
</if> </if>
</trim> </trim>
<trim prefix="values (" suffix=")" suffixOverrides=","> <trim prefix="values (" suffix=")" suffixOverrides=",">
...@@ -111,6 +120,9 @@ ...@@ -111,6 +120,9 @@
</if> </if>
<if test ='null != createTime'> <if test ='null != createTime'>
#{createTime} #{createTime}
</if>,
<if test ='null != updateTime'>
#{updateTime}
</if> </if>
</trim> </trim>
</insert> </insert>
...@@ -127,7 +139,8 @@ ...@@ -127,7 +139,8 @@
<if test ='null != name'>name = #{name},</if> <if test ='null != name'>name = #{name},</if>
<if test ='null != type'>type = #{type},</if> <if test ='null != type'>type = #{type},</if>
<if test ='null != sts'>sts = #{sts},</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> </set>
WHERE id = #{id} WHERE id = #{id}
</update> </update>
......
...@@ -12,6 +12,7 @@ ...@@ -12,6 +12,7 @@
<result column="opinion" property="opinion" /> <result column="opinion" property="opinion" />
<result column="sts" property="sts" /> <result column="sts" property="sts" />
<result column="create_time" property="createTime" /> <result column="create_time" property="createTime" />
<result column="update_time" property="updateTime" />
</resultMap> </resultMap>
<sql id="Base_Column_List"> <sql id="Base_Column_List">
...@@ -22,7 +23,8 @@ ...@@ -22,7 +23,8 @@
operator_header_url, operator_header_url,
opinion, opinion,
sts, sts,
create_time create_time,
update_time
</sql> </sql>
<sql id="Base_Column_List_Alias"> <sql id="Base_Column_List_Alias">
...@@ -33,7 +35,8 @@ ...@@ -33,7 +35,8 @@
operator_header_url SpmkExecutor_operator_header_url, operator_header_url SpmkExecutor_operator_header_url,
opinion SpmkExecutor_opinion, opinion SpmkExecutor_opinion,
sts SpmkExecutor_sts, sts SpmkExecutor_sts,
create_time SpmkExecutor_create_time create_time SpmkExecutor_create_time,
update_time SpmkExecutor_update_time
</sql> </sql>
<!-- <!--
...@@ -60,7 +63,10 @@ ...@@ -60,7 +63,10 @@
sts, sts,
</if> </if>
<if test ='null != createTime'> <if test ='null != createTime'>
create_time create_time,
</if>
<if test ='null != updateTime'>
update_time
</if> </if>
</trim> </trim>
<trim prefix="values (" suffix=")" suffixOverrides=","> <trim prefix="values (" suffix=")" suffixOverrides=",">
...@@ -83,7 +89,10 @@ ...@@ -83,7 +89,10 @@
#{sts}, #{sts},
</if> </if>
<if test ='null != createTime'> <if test ='null != createTime'>
#{createTime} #{createTime},
</if>
<if test ='null != updateTime'>
#{updateTime}
</if> </if>
</trim> </trim>
</insert> </insert>
...@@ -102,7 +111,8 @@ ...@@ -102,7 +111,8 @@
<if test ='null != operatorHeaderUrl'>operator_header_url = #{operatorHeaderUrl},</if> <if test ='null != operatorHeaderUrl'>operator_header_url = #{operatorHeaderUrl},</if>
<if test ='null != opinion'>opinion = #{opinion},</if> <if test ='null != opinion'>opinion = #{opinion},</if>
<if test ='null != sts'>sts = #{sts},</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> </set>
WHERE id = #{id} WHERE id = #{id}
</update> </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