Commit 049df7bf by tangzhaoqian

审批 转正、调岗、离职 业务对接、bug修复

parent 6a564afb
...@@ -12,6 +12,7 @@ import com.baomidou.mybatisplus.annotation.TableField; ...@@ -12,6 +12,7 @@ import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId; import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.extension.activerecord.Model; import com.baomidou.mybatisplus.extension.activerecord.Model;
import cn.timer.api.config.swagger.IgnoreSwaggerParameter;
import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty; import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor; import lombok.AllArgsConstructor;
...@@ -85,5 +86,17 @@ public class SpmkApproveSummary extends Model<SpmkApproveSummary> { ...@@ -85,5 +86,17 @@ public class SpmkApproveSummary extends Model<SpmkApproveSummary> {
@ApiModelProperty(value = "摘要 ", example = "摘要") @ApiModelProperty(value = "摘要 ", example = "摘要")
private String digest; private String digest;
@ApiModelProperty(value = "岗位名称", example = "摘要")
private String gwName;
@ApiModelProperty(value = "岗位名称", example = "摘要")
private String bmId;
@ApiModelProperty(value = "岗位名称", example = "摘要")
private String bmName;
} }
\ No newline at end of file
...@@ -113,6 +113,10 @@ public interface YgEnumInterface { ...@@ -113,6 +113,10 @@ public interface YgEnumInterface {
public static String tranTime(String index) { public static String tranTime(String index) {
//String str ="2013/11/12"; //String str ="2013/11/12";
if (index == null) {
return null;
}
String p = "年|月|日|号|时|/|//-"; String p = "年|月|日|号|时|/|//-";
String result = index.replaceAll(p, "-"); String result = index.replaceAll(p, "-");
String p2 = "-$"; String p2 = "-$";
......
...@@ -25,6 +25,7 @@ import org.springframework.web.bind.annotation.RestController; ...@@ -25,6 +25,7 @@ import org.springframework.web.bind.annotation.RestController;
import com.alibaba.fastjson.JSONObject; import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
import com.baomidou.mybatisplus.extension.conditions.query.LambdaQueryChainWrapper; import com.baomidou.mybatisplus.extension.conditions.query.LambdaQueryChainWrapper;
import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport; import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
...@@ -426,8 +427,15 @@ public class LoginController { ...@@ -426,8 +427,15 @@ public class LoginController {
qyzxEmpLogin1.setPw(Md5.md5("123456"));// 密码初始化 qyzxEmpLogin1.setPw(Md5.md5("123456"));// 密码初始化
qyzxEmpLogin1.updateById(); qyzxEmpLogin1.updateById();
//员工信息 手机号修改
YgglMainEmp.builder().phone(phone).build().update(new UpdateWrapper<YgglMainEmp>().lambda().eq(YgglMainEmp::getEmpNum, qyzxEmpLogin1.getId()));
return ResultUtil.success("修改手机号/用户名成功"); return ResultUtil.success("修改手机号/用户名成功");
} }
return ResultUtil.error("修改手机号/用户名失败"); return ResultUtil.error("修改手机号/用户名失败");
} }
......
...@@ -72,7 +72,6 @@ import cn.timer.api.utils.router.business.SpmkAssoBusinessFactory; ...@@ -72,7 +72,6 @@ import cn.timer.api.utils.router.business.SpmkAssoBusinessFactory;
import cn.timer.api.utils.router.enums.ApproveEnum; import cn.timer.api.utils.router.enums.ApproveEnum;
import io.swagger.annotations.Api; import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation; import io.swagger.annotations.ApiOperation;
import io.swagger.models.auth.In;
@Api(tags = "3.0审批模块") @Api(tags = "3.0审批模块")
@RestController @RestController
...@@ -84,18 +83,26 @@ public class SpmkController { ...@@ -84,18 +83,26 @@ public class SpmkController {
@Autowired @Autowired
private SpmkApprovalTemplateGMapper spmkApprovalTemplateGMapper; private SpmkApprovalTemplateGMapper spmkApprovalTemplateGMapper;
@Autowired @Autowired
private SpmkApprovalTemplateMapper spmkApprovalTemplateMapper; private SpmkApprovalTemplateMapper spmkApprovalTemplateMapper;
@Autowired @Autowired
private SpmkApprovalGMapper spmkApprovalGMapper; private SpmkApprovalGMapper spmkApprovalGMapper;
@Autowired @Autowired
private SpmkCustomApprovalMapper spmkCustomApprovalMapper; private SpmkCustomApprovalMapper spmkCustomApprovalMapper;
@Autowired @Autowired
private ZzglBmgwMService zzglBmgwMService; private ZzglBmgwMService zzglBmgwMService;
@Autowired
private SpmkApproveSummaryMapper spmkApproveSummaryMapper;
@Autowired
private SpmkApproveDetailMapper spmkApproveDetailMapper;
@Autowired
private SpmkApproveExecuteRecordMapper spmkApproveExecuteRecordMapper;
@Autowired
private SpmkExecutorMapper spmkExecutorMapper;
@Autowired
private SpmkInitiatorConfigMapper spmkInitiatorConfigMapper;
private boolean ISFIRST = true; // 第一次启动审批流程
...@@ -108,7 +115,8 @@ public class SpmkController { ...@@ -108,7 +115,8 @@ public class SpmkController {
@ApiOperationSupport(order = 1) @ApiOperationSupport(order = 1)
public Result<Object> saveAtg(@RequestBody SpmkApprovalTemplateG spmkApprovalTemplateG){ public Result<Object> saveAtg(@RequestBody SpmkApprovalTemplateG spmkApprovalTemplateG){
return spmkApprovalTemplateG.insertOrUpdate() ? ResultUtil.data(spmkApprovalTemplateG, "操作成功!") : ResultUtil.error("操作失败!"); return spmkApprovalTemplateG.insertOrUpdate() ?
ResultUtil.data(spmkApprovalTemplateG, "操作成功!") : ResultUtil.error("操作失败!");
} }
...@@ -124,7 +132,8 @@ public class SpmkController { ...@@ -124,7 +132,8 @@ public class SpmkController {
return ResultUtil.error("审批模板组存在 模板,不可直接删除!"); return ResultUtil.error("审批模板组存在 模板,不可直接删除!");
return SpmkApprovalTemplateG.builder().id(id).build().deleteById() ? ResultUtil.success("操作成功!") : ResultUtil.error("没有找到该对象"); return SpmkApprovalTemplateG.builder().id(id).build().deleteById() ?
ResultUtil.success("操作成功!") : ResultUtil.error("没有找到该对象");
} }
...@@ -298,7 +307,7 @@ public class SpmkController { ...@@ -298,7 +307,7 @@ public class SpmkController {
@ApiOperation(value = "13.新增或编辑-自定义审批", httpMethod = "POST", notes = "新增或编辑-自定义审批") @ApiOperation(value = "13.新增或编辑-自定义审批", httpMethod = "POST", notes = "新增或编辑-自定义审批")
@ApiOperationSupport(order = 13) @ApiOperationSupport(order = 13)
@Transactional(rollbackFor = Exception.class) @Transactional(rollbackFor = Exception.class)
public Result<Object> saveCa(@Valid @RequestBody SpmkCustomApprovalDto spmkCustomApprovalDto,BindingResult bindingResult) throws Exception{ public Result<Object> saveCa(@RequestBody SpmkCustomApprovalDto spmkCustomApprovalDto) throws Exception{
Integer approvalGId = spmkCustomApprovalDto.getApprovalGId(); Integer approvalGId = spmkCustomApprovalDto.getApprovalGId();
if (ObjectUtil.isNull(approvalGId)) if (ObjectUtil.isNull(approvalGId))
return ResultUtil.error("操作失败!-1"); return ResultUtil.error("操作失败!-1");
...@@ -396,19 +405,6 @@ public class SpmkController { ...@@ -396,19 +405,6 @@ public class SpmkController {
return spmkCustomApprovalMapper.updateListRandsById(list) ? ResultUtil.success("操作成功!") : ResultUtil.error("操作失败!"); return spmkCustomApprovalMapper.updateListRandsById(list) ? ResultUtil.success("操作成功!") : ResultUtil.error("操作失败!");
} }
@Autowired
private SpmkApproveSummaryMapper spmkApproveSummaryMapper;
@Autowired
private SpmkApproveDetailMapper spmkApproveDetailMapper;
@Autowired
private SpmkApproveExecuteRecordMapper spmkApproveExecuteRecordMapper;
@Autowired
private SpmkExecutorMapper spmkExecutorMapper;
@Autowired
private SpmkInitiatorConfigMapper spmkInitiatorConfigMapper;
private boolean ISFIRST = true; // 第一次启动审批流程
// TODO 审批汇总(发起审批) // TODO 审批汇总(发起审批)
/** /**
* 发起审批 * 发起审批
...@@ -477,6 +473,11 @@ public class SpmkController { ...@@ -477,6 +473,11 @@ public class SpmkController {
} }
//TODO 审批汇总 //TODO 审批汇总
/**
* 审批汇总
* @param summaryQueryDto
* @return
*/
@PostMapping(value = "/select_approve_summary") @PostMapping(value = "/select_approve_summary")
@ApiOperation(value = "18.审批汇总", httpMethod = "POST", notes = "审批汇总") @ApiOperation(value = "18.审批汇总", httpMethod = "POST", notes = "审批汇总")
@ApiOperationSupport(order = 18) @ApiOperationSupport(order = 18)
...@@ -533,20 +534,6 @@ public class SpmkController { ...@@ -533,20 +534,6 @@ public class SpmkController {
return ResultUtil.data(adD, "操作成功!"); return ResultUtil.data(adD, "操作成功!");
} }
//TODO 撤销审批
/**
* 撤销审批
*/
@PutMapping(value = "/revoke_approval/{id}")
@ApiOperation(value = "22.撤销审批", httpMethod = "PUT", notes = "撤销审批")
@Transactional(rollbackFor = Exception.class)
@ApiOperationSupport(order = 22)
public Result<Object> revokeApproval(@PathVariable Integer id) throws Exception {
return SpmkApproveSummary.builder().id(id).endTime(new Date()).sts(1).build().updateById() ?
ResultUtil.success("操作成功!") : ResultUtil.error("操作失败!");
}
//TODO 审批人审批 //TODO 审批人审批
/** /**
* 审批人审批 * 审批人审批
...@@ -644,8 +631,53 @@ public class SpmkController { ...@@ -644,8 +631,53 @@ public class SpmkController {
return ResultUtil.data(pageAs, listAs, "操作成功!"); return ResultUtil.data(pageAs, listAs, "操作成功!");
} }
//TODO 撤销审批
/**
* 撤销审批
*/
@PutMapping(value = "/revoke_approval/{id}")
@ApiOperation(value = "22.撤销审批", httpMethod = "PUT", notes = "撤销审批")
@Transactional(rollbackFor = Exception.class)
@ApiOperationSupport(order = 22)
public Result<Object> revokeApproval(@PathVariable Integer id) throws Exception {
SpmkApproveSummary as = spmkApproveSummaryMapper.selectOne(new QueryWrapper<SpmkApproveSummary>()
.lambda()
.select(SpmkApproveSummary::getSts)
.eq(SpmkApproveSummary::getId, id));
return as != null && as.getSts() != 2 ? (SpmkApproveSummary.builder().id(id).endTime(new Date()).sts(1).build().updateById() ?
ResultUtil.success("操作成功!") : ResultUtil.error("操作失败_1!")) : ResultUtil.error("操作失败_2!");
}
/**
* 删除-审批(发起的审批)-根据审批汇总id
*/
@DeleteMapping(value = "/delete_approval/{id}")
@ApiOperation(value = "23.删除-审批(发起的审批)-根据审批汇总id", httpMethod = "DELETE", notes = "删除-审批(发起的审批)-根据审批汇总id")
@ApiOperationSupport(order = 23)
public Result<Object> deleteApprovalData(@PathVariable Integer id){
List<SpmkApproveExecuteRecord> listAer = spmkApproveExecuteRecordMapper.selectList(new QueryWrapper<SpmkApproveExecuteRecord>()
.lambda()
.select(SpmkApproveExecuteRecord::getId)
.eq(SpmkApproveExecuteRecord::getApproveSummaryId, id));
if (listAer != null) {
for (SpmkApproveExecuteRecord aer : listAer) {
spmkExecutorMapper.delete(new QueryWrapper<SpmkExecutor>().lambda().eq(SpmkExecutor::getApproveExecuteRecordId, aer.getId()));
}
}
spmkApproveExecuteRecordMapper.delete(new QueryWrapper<SpmkApproveExecuteRecord>().lambda().eq(SpmkApproveExecuteRecord::getApproveSummaryId, id));
spmkApproveDetailMapper.delete(new QueryWrapper<SpmkApproveDetail>().lambda().eq(SpmkApproveDetail::getApproveSummaryId, id));
spmkApproveSummaryMapper.delete(new QueryWrapper<SpmkApproveSummary>().lambda().eq(SpmkApproveSummary::getId, id));
return ResultUtil.data(null, "操作成功!");
}
/** /**
* 删除-审批汇总、审批详情、审批执行记录、审批执行人记录 所有数据 * 删除-审批组、自定义审批、审批汇总、审批详情、审批执行记录、审批执行人记录 所有数据
*/ */
@DeleteMapping(value = "/delete_approval_data") @DeleteMapping(value = "/delete_approval_data")
@ApiOperation(value = "90.(开发使用)删除-审批数据", httpMethod = "DELETE", notes = "审批汇总、审批详情、审批执行记录、审批执行人记录 所有数据") @ApiOperation(value = "90.(开发使用)删除-审批数据", httpMethod = "DELETE", notes = "审批汇总、审批详情、审批执行记录、审批执行人记录 所有数据")
......
...@@ -70,6 +70,7 @@ import cn.timer.api.config.annotation.CurrentUser; ...@@ -70,6 +70,7 @@ import cn.timer.api.config.annotation.CurrentUser;
import cn.timer.api.config.annotation.UserBean; 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.controller.yggl.service.YgglService;
import cn.timer.api.dao.qyzx.QyzxEmpLoginMapper; import cn.timer.api.dao.qyzx.QyzxEmpLoginMapper;
import cn.timer.api.dao.yggl.YgAreaDtoMapper; import cn.timer.api.dao.yggl.YgAreaDtoMapper;
import cn.timer.api.dao.yggl.YgCityDtoMapper; import cn.timer.api.dao.yggl.YgCityDtoMapper;
...@@ -422,12 +423,20 @@ public class YgglController { ...@@ -422,12 +423,20 @@ public class YgglController {
@PostMapping(value = "/updateygda") @PostMapping(value = "/updateygda")
@ApiOperation(value = "修改员工档案", httpMethod = "POST", notes = "接口发布说明") @ApiOperation(value = "修改员工档案", httpMethod = "POST", notes = "接口发布说明")
@ApiOperationSupport(order = 5) @ApiOperationSupport(order = 5)
public Result<Object> updateygda(@CurrentUser UserBean userBean, @RequestBody YgglMainEmp ygglMainEmp) { public Result<Object> updateygda(@CurrentUser UserBean userBean, @RequestBody YgglMainEmp ygglMainEmp) throws Exception{
if (ygglMainEmp.getEmpNum() != null) { if (ygglMainEmp.getEmpNum() != null) {
UpdateWrapper<YgglMainEmp> updateWrapper = new UpdateWrapper<YgglMainEmp>(); UpdateWrapper<YgglMainEmp> updateWrapper = new UpdateWrapper<YgglMainEmp>();
updateWrapper.eq("org_code", userBean.getOrgCode()).eq("emp_num", ygglMainEmp.getEmpNum()); updateWrapper.eq("org_code", userBean.getOrgCode()).eq("emp_num", ygglMainEmp.getEmpNum());
ygglMainEmp.update(updateWrapper); ygglMainEmp.update(updateWrapper);
// Integer count = qyzxEmpLoginMapper.selectCount(new QueryWrapper<QyzxEmpLogin>().lambda().eq(QyzxEmpLogin::getPhone, ygglMainEmp.getPhone()));
// if (count >= 1) {
// return ResultUtil.error("手机号已被使用!");
// }
//
// QyzxEmpLogin.builder().phone(ygglMainEmp.getPhone()).build()
// .update(new QueryWrapper<QyzxEmpLogin>().lambda().eq(QyzxEmpLogin::getId, userBean.getEmpNum()));
return ResultUtil.data(ygglMainEmp, "修改成功"); return ResultUtil.data(ygglMainEmp, "修改成功");
} }
return ResultUtil.error("请确认该员工是否存在!"); return ResultUtil.error("请确认该员工是否存在!");
...@@ -483,6 +492,7 @@ public class YgglController { ...@@ -483,6 +492,7 @@ public class YgglController {
@ApiOperation(value = "导入威力加强版", httpMethod = "POST", notes = "接口发布说明") @ApiOperation(value = "导入威力加强版", httpMethod = "POST", notes = "接口发布说明")
@ApiOperationSupport(order = 7) @ApiOperationSupport(order = 7)
public Result<List<YgDrjqbDto>> ygdr(@CurrentUser UserBean userBean, @RequestBody YgDrsDto drList) { public Result<List<YgDrjqbDto>> ygdr(@CurrentUser UserBean userBean, @RequestBody YgDrsDto drList) {
drList.setErrorList(new ArrayList<YgDrjqbDto>());
drList.setOrgCode(userBean.getOrgCode()); drList.setOrgCode(userBean.getOrgCode());
YgDrsDto tofList = errorFilter(drList);// 滤嘴,过滤信息 YgDrsDto tofList = errorFilter(drList);// 滤嘴,过滤信息
if (tofList.getDrList().size() == 0) if (tofList.getDrList().size() == 0)
...@@ -784,7 +794,7 @@ public class YgglController { ...@@ -784,7 +794,7 @@ public class YgglController {
// 员工状态(最大优化) // 员工状态(最大优化)
d.setJobStatus(YgEnumInterface.jobStatus.isZhen(jobStatus)); d.setJobStatus(YgEnumInterface.jobStatus.isZhen(jobStatus));
// 入职日期(最大优化) // 入职日期(最大优化)
d.setRzTime(YgEnumInterface.rzTime.tranTime2(YgEnumInterface.rzTime.tranTime(rzTime))); d.setRzTime(rzTime != null ? YgEnumInterface.rzTime.tranTime2(YgEnumInterface.rzTime.tranTime(rzTime)) : null);
// 试用期(最大优化) // 试用期(最大优化)
d.setSyq(YgEnumInterface.syq.choose(syq)); d.setSyq(YgEnumInterface.syq.choose(syq));
} }
...@@ -1521,8 +1531,11 @@ public class YgglController { ...@@ -1521,8 +1531,11 @@ public class YgglController {
@ApiOperation(value = "添加离职计划", httpMethod = "POST", notes = "接口发布说明") @ApiOperation(value = "添加离职计划", httpMethod = "POST", notes = "接口发布说明")
@ApiOperationSupport(order = 54) @ApiOperationSupport(order = 54)
public Result<YgglMainLzb> addjhlz(@CurrentUser UserBean userBean, @RequestBody LzygQueryDto lzygQueryDto) { public Result<YgglMainLzb> addjhlz(@CurrentUser UserBean userBean, @RequestBody LzygQueryDto lzygQueryDto) {
Integer empNum = lzygQueryDto.getEmpNum();
QueryWrapper<YgglMainEmp> queryWrapper = new QueryWrapper<YgglMainEmp>(); QueryWrapper<YgglMainEmp> queryWrapper = new QueryWrapper<YgglMainEmp>();
queryWrapper.eq("emp_num", lzygQueryDto.getEmpNum()).eq("org_code", userBean.getOrgCode()); queryWrapper.eq("emp_num", empNum).eq("org_code", userBean.getOrgCode());
YgglMainEmp ygglMainEmp = YgglMainEmp.builder().build().selectOne(queryWrapper); YgglMainEmp ygglMainEmp = YgglMainEmp.builder().build().selectOne(queryWrapper);
YgglMainLzb ygglMainLzb = YgglMainLzb.builder().empNum(lzygQueryDto.getEmpNum()).build(); YgglMainLzb ygglMainLzb = YgglMainLzb.builder().empNum(lzygQueryDto.getEmpNum()).build();
// 移动员工表数据到离职表 // 移动员工表数据到离职表
...@@ -1530,17 +1543,13 @@ public class YgglController { ...@@ -1530,17 +1543,13 @@ public class YgglController {
ygglMainLzb.insert(); ygglMainLzb.insert();
UpdateWrapper<YgglMainEmp> updateWrapper = new UpdateWrapper<YgglMainEmp>(); UpdateWrapper<YgglMainEmp> updateWrapper = new UpdateWrapper<YgglMainEmp>();
updateWrapper.eq("emp_num", lzygQueryDto.getEmpNum()); updateWrapper.eq("emp_num", empNum);
UpdateWrapper<YgglMainLzb> updateWrapper1 = new UpdateWrapper<YgglMainLzb>(); UpdateWrapper<YgglMainLzb> updateWrapper1 = new UpdateWrapper<YgglMainLzb>();
updateWrapper1.eq("emp_num", lzygQueryDto.getEmpNum()); updateWrapper1.eq("emp_num", empNum);
YgglMainEmp.builder().empNum(lzygQueryDto.getEmpNum()).jobStatus(3).build().update(updateWrapper); YgglMainEmp.builder().empNum(lzygQueryDto.getEmpNum()).jobStatus(3).build().update(updateWrapper);
YgglMainLzb.builder().jobStatus(YgEnumInterface.jobStatus.LIZHIZHONG.getType()).lzTime(lzygQueryDto.getLzTime()) YgglMainLzb.builder().jobStatus(YgEnumInterface.jobStatus.LIZHIZHONG.getType()).lzTime(lzygQueryDto.getLzTime())
.lzyy(lzygQueryDto.getLzyy()).lzbz(lzygQueryDto.getLzbz()).build().update(updateWrapper1); .lzyy(lzygQueryDto.getLzyy()).lzbz(lzygQueryDto.getLzbz()).build().update(updateWrapper1);
// 删除员工表
// ygglMainEmp.deleteById();
// 删除员工登陆表
// QyzxEmpLogin qyzxEmpLogin = QyzxEmpLogin.builder().id(ygglMainLzb.getEmpNum()).build();
// qyzxEmpLogin.deleteById();
return ResultUtil.data(ygglMainLzb, "添加待离职员工成功"); return ResultUtil.data(ygglMainLzb, "添加待离职员工成功");
} }
...@@ -1554,22 +1563,29 @@ public class YgglController { ...@@ -1554,22 +1563,29 @@ public class YgglController {
@ApiOperation(value = "确认离职", httpMethod = "POST", notes = "接口发布说明") @ApiOperation(value = "确认离职", httpMethod = "POST", notes = "接口发布说明")
@ApiOperationSupport(order = 55) @ApiOperationSupport(order = 55)
public Result<Void> addlzb(@CurrentUser UserBean userBean, @RequestBody LzygQueryDto lzygQueryDto) { public Result<Void> addlzb(@CurrentUser UserBean userBean, @RequestBody LzygQueryDto lzygQueryDto) {
Integer empNum = lzygQueryDto.getEmpNum();
QueryWrapper<YgglMainEmp> queryWrapper = new QueryWrapper<YgglMainEmp>(); QueryWrapper<YgglMainEmp> queryWrapper = new QueryWrapper<YgglMainEmp>();
queryWrapper.eq("emp_num", lzygQueryDto.getEmpNum()); queryWrapper.eq("emp_num", empNum);
UpdateWrapper<YgglMainEmp> updateWrapper = new UpdateWrapper<YgglMainEmp>(); UpdateWrapper<YgglMainEmp> updateWrapper = new UpdateWrapper<YgglMainEmp>();
updateWrapper.eq("emp_num", lzygQueryDto.getEmpNum()); updateWrapper.eq("emp_num", empNum);
UpdateWrapper<YgglMainLzb> updateWrapper1 = new UpdateWrapper<YgglMainLzb>(); UpdateWrapper<YgglMainLzb> updateWrapper1 = new UpdateWrapper<YgglMainLzb>();
updateWrapper1.eq("emp_num", lzygQueryDto.getEmpNum()); updateWrapper1.eq("emp_num", empNum);
YgglMainEmp.builder().empNum(lzygQueryDto.getEmpNum()).jobStatus(YgEnumInterface.jobStatus.YILIZHI.getType()) YgglMainEmp.builder().empNum(empNum).jobStatus(YgEnumInterface.jobStatus.YILIZHI.getType())
.build().update(updateWrapper); .build().update(updateWrapper);
YgglMainLzb.builder().empNum(lzygQueryDto.getEmpNum()).jobStatus(YgEnumInterface.jobStatus.YILIZHI.getType()) YgglMainLzb.builder().empNum(empNum).jobStatus(YgEnumInterface.jobStatus.YILIZHI.getType())
.sjlzTime(new Date()).build().update(updateWrapper1); .sjlzTime(new Date()).build().update(updateWrapper1);
// 查询该员工的关联表 // 查询该员工的关联表
QueryWrapper<QyzxEmpEntAsso> queryWrapper1 = new QueryWrapper<QyzxEmpEntAsso>(); QueryWrapper<QyzxEmpEntAsso> queryWrapper1 = new QueryWrapper<QyzxEmpEntAsso>();
queryWrapper1.eq("emp_num", lzygQueryDto.getEmpNum()); queryWrapper1.eq("emp_num", empNum);
// 确认离职 删除员工关联表 // 确认离职 删除员工关联表
QyzxEmpEntAsso qyzxEmpEntAsso = QyzxEmpEntAsso.builder().empNum(lzygQueryDto.getEmpNum()).build(); QyzxEmpEntAsso qyzxEmpEntAsso = QyzxEmpEntAsso.builder().empNum(lzygQueryDto.getEmpNum()).build();
qyzxEmpEntAsso.delete(queryWrapper1); qyzxEmpEntAsso.delete(queryWrapper1);
// 初始化 部门主管
zzglBmgwMMapper.update(ZzglBmgwM.builder().leader(null).build(), new UpdateWrapper<ZzglBmgwM>()
.lambda()
.eq(ZzglBmgwM::getLeader, empNum));
return ResultUtil.success("确认离职员工成功"); return ResultUtil.success("确认离职员工成功");
} }
......
package cn.timer.api.controller.yggl.service;
import cn.timer.api.dto.yggl.LzygQueryDto;
import cn.timer.api.dto.yggl.YgzzDto;
public interface YgglService {
void applicationResignation(LzygQueryDto lzygQueryDto);
void applicationRegularization(YgzzDto ygzzDto);
}
package cn.timer.api.controller.yggl.service;
import java.util.Date;
import org.springframework.stereotype.Service;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
import cn.hutool.core.bean.BeanUtil;
import cn.timer.api.bean.yggl.YgglMainEmp;
import cn.timer.api.bean.yggl.YgglMainLzb;
import cn.timer.api.config.enuminterface.YgEnumInterface;
import cn.timer.api.dto.yggl.LzygQueryDto;
import cn.timer.api.dto.yggl.YgzzDto;
@Service
public class YgglServiceImpl implements YgglService {
@Override
public void applicationResignation(LzygQueryDto lzygQueryDto) {
// TODO Auto-generated method stub
Integer empNum = lzygQueryDto.getEmpNum();
QueryWrapper<YgglMainEmp> queryWrapper = new QueryWrapper<YgglMainEmp>();
queryWrapper.eq("emp_num", empNum).eq("org_code", lzygQueryDto.getOrgCode());
YgglMainEmp ygglMainEmp = YgglMainEmp.builder().build().selectOne(queryWrapper);
YgglMainLzb ygglMainLzb = YgglMainLzb.builder().empNum(lzygQueryDto.getEmpNum()).build();
// 移动员工表数据到离职表
BeanUtil.copyProperties(ygglMainEmp, ygglMainLzb);
ygglMainLzb.insert();
UpdateWrapper<YgglMainEmp> updateWrapper = new UpdateWrapper<YgglMainEmp>();
updateWrapper.eq("emp_num", empNum);
UpdateWrapper<YgglMainLzb> updateWrapper1 = new UpdateWrapper<YgglMainLzb>();
updateWrapper1.eq("emp_num", empNum);
YgglMainEmp.builder().empNum(lzygQueryDto.getEmpNum()).jobStatus(YgEnumInterface.jobStatus.YILIZHI.getType()).build().update(updateWrapper);
YgglMainLzb.builder().jobStatus(YgEnumInterface.jobStatus.LIZHIZHONG.getType()).lzTime(lzygQueryDto.getLzTime())
.lzyy(lzygQueryDto.getLzyy()).lzbz(lzygQueryDto.getLzbz()).build().update(updateWrapper1);
}
@Override
public void applicationRegularization(YgzzDto ygzzDto) {
// TODO Auto-generated method stub
YgglMainEmp.builder()
.jobStatus(2)
.zzTime(ygzzDto.getZzTime())
.sjzzTime(new Date())
.zzRemark(ygzzDto.getZzRemark())
.build().update(new UpdateWrapper<YgglMainEmp>().lambda().eq(YgglMainEmp::getEmpNum, ygzzDto.getEmpNum()));
}
}
...@@ -229,19 +229,19 @@ public class ZzglController { ...@@ -229,19 +229,19 @@ public class ZzglController {
// zzglLogDgjlMapper.insert // zzglLogDgjlMapper.insert
return ResultUtil.success(); return ResultUtil.success();
} }
//修改/删除员工部门(供审批管理使用) //修改/删除员工部门(供审批管理使用)
public void updatelistempdeptforspgl (Integer empNum,Integer orgCode, UpEmpDeptDto upEmpDeptDto) { public void updatelistempdeptforspgl (Integer empNum,Integer orgCode, UpEmpDeptDto upEmpDeptDto) {
Integer dpetId = upEmpDeptDto.getDpetId(); Integer dpetId = upEmpDeptDto.getDpetId();
List<Integer> empNums = new ArrayList<Integer>(); List<Integer> empNums = new ArrayList<Integer>();
empNums.add(empNum); empNums.add(empNum);
YgglMainEmp ygglMainEmp = YgglMainEmp.builder().build(); YgglMainEmp ygglMainEmp = YgglMainEmp.builder().build();
// zzglLogDgjlMapper
UpdateWrapper<YgglMainEmp> updateWrapper = new UpdateWrapper<YgglMainEmp>(); UpdateWrapper<YgglMainEmp> updateWrapper = new UpdateWrapper<YgglMainEmp>();
updateWrapper.set("bmgw_id", dpetId).eq("org_code", orgCode).in("emp_num", empNum); updateWrapper.set("bmgw_id", dpetId).eq("org_code", orgCode).in("emp_num", empNum);
zzglLogDgjlMapper.insertbyaddemp(empNums, empNum, dpetId, orgCode, zzglLogDgjlMapper.insertbyaddemp(empNums, empNum, dpetId, orgCode,
dpetId == null || dpetId == 0 ? "岗位删除员工" : upEmpDeptDto.getIsdg() == null ? "岗位添加员工" : "员工调岗"); dpetId == null || dpetId == 0 ? "岗位删除员工" : upEmpDeptDto.getIsdg() == null ? "岗位添加员工" : "员工调岗");
ygglMainEmp.update(updateWrapper); ygglMainEmp.update(updateWrapper);
// zzglLogDgjlMapper.insert
} }
/** /**
......
...@@ -2,6 +2,8 @@ package cn.timer.api.controller.zzgl.service; ...@@ -2,6 +2,8 @@ package cn.timer.api.controller.zzgl.service;
import java.util.List; import java.util.List;
import cn.timer.api.dto.zzgl.UpEmpDeptDto;
/** /**
* 部门岗位 服务层 * 部门岗位 服务层
* *
...@@ -9,6 +11,8 @@ import java.util.List; ...@@ -9,6 +11,8 @@ import java.util.List;
*/ */
public interface ZzglBmgwMService { public interface ZzglBmgwMService {
public List<Integer> empNumupGetDepts(Integer orgCode,Integer empNum); List<Integer> empNumupGetDepts(Integer orgCode,Integer empNum);
void applicationTransferPosition(Integer empNum,Integer orgCode,UpEmpDeptDto upEmpDeptDto);
} }
package cn.timer.api.controller.zzgl.service; package cn.timer.api.controller.zzgl.service;
import java.util.ArrayList;
import java.util.HashSet; import java.util.HashSet;
import java.util.List; import java.util.List;
import java.util.Set; import java.util.Set;
...@@ -7,6 +8,7 @@ import java.util.Set; ...@@ -7,6 +8,7 @@ import java.util.Set;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
import com.baomidou.mybatisplus.extension.conditions.query.LambdaQueryChainWrapper; import com.baomidou.mybatisplus.extension.conditions.query.LambdaQueryChainWrapper;
import cn.hutool.core.collection.ListUtil; import cn.hutool.core.collection.ListUtil;
...@@ -14,6 +16,8 @@ import cn.timer.api.bean.yggl.YgglMainEmp; ...@@ -14,6 +16,8 @@ import cn.timer.api.bean.yggl.YgglMainEmp;
import cn.timer.api.bean.zzgl.ZzglBmgwM; import cn.timer.api.bean.zzgl.ZzglBmgwM;
import cn.timer.api.dao.yggl.YgglMainEmpMapper; import cn.timer.api.dao.yggl.YgglMainEmpMapper;
import cn.timer.api.dao.zzgl.ZzglBmgwMMapper; import cn.timer.api.dao.zzgl.ZzglBmgwMMapper;
import cn.timer.api.dao.zzgl.ZzglLogDgjlMapper;
import cn.timer.api.dto.zzgl.UpEmpDeptDto;
/** /**
* 部门岗位 服务逻辑层 * 部门岗位 服务逻辑层
...@@ -29,6 +33,9 @@ public class ZzglBmgwMServiceImpl implements ZzglBmgwMService { ...@@ -29,6 +33,9 @@ public class ZzglBmgwMServiceImpl implements ZzglBmgwMService {
@Autowired @Autowired
private YgglMainEmpMapper ygglMainEmpMapper; private YgglMainEmpMapper ygglMainEmpMapper;
@Autowired
private ZzglLogDgjlMapper zzglLogDgjlMapper;
//根据传来的empNum获取该人员的岗位,以及上面所有的部门id,返回integer数组 //根据传来的empNum获取该人员的岗位,以及上面所有的部门id,返回integer数组
@Override @Override
public List<Integer> empNumupGetDepts(Integer orgCode,Integer empNum) { public List<Integer> empNumupGetDepts(Integer orgCode,Integer empNum) {
...@@ -60,5 +67,23 @@ public class ZzglBmgwMServiceImpl implements ZzglBmgwMService { ...@@ -60,5 +67,23 @@ public class ZzglBmgwMServiceImpl implements ZzglBmgwMService {
} }
return lanzi; return lanzi;
} }
/**
* 调岗
*/
@Override
public void applicationTransferPosition(Integer empNum,Integer orgCode,UpEmpDeptDto upEmpDeptDto) {
// TODO Auto-generated method stub
Integer dpetId = upEmpDeptDto.getDpetId();
List<Integer> empNums = new ArrayList<Integer>();
empNums.add(empNum);
YgglMainEmp ygglMainEmp = YgglMainEmp.builder().build();
UpdateWrapper<YgglMainEmp> updateWrapper = new UpdateWrapper<YgglMainEmp>();
updateWrapper.set("bmgw_id", dpetId).eq("org_code", orgCode).in("emp_num", empNum);
zzglLogDgjlMapper.insertbyaddemp(empNums, empNum, dpetId, orgCode,
dpetId == null || dpetId == 0 ? "岗位删除员工" : upEmpDeptDto.getIsdg() == null ? "岗位添加员工" : "员工调岗");
ygglMainEmp.update(updateWrapper);
}
} }
package cn.timer.api.dao.spmk; package cn.timer.api.dao.spmk;
import java.util.List;
import org.apache.ibatis.annotations.Param; import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository; import org.springframework.stereotype.Repository;
import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.core.metadata.IPage;
import cn.timer.api.bean.dzht.DzhtAssoHtmb;
import cn.timer.api.bean.spmk.SpmkApproveSummary; import cn.timer.api.bean.spmk.SpmkApproveSummary;
import cn.timer.api.dto.spmk.MySummaryQueryDto; import cn.timer.api.dto.spmk.MySummaryQueryDto;
import cn.timer.api.dto.spmk.SummaryQueryDto; import cn.timer.api.dto.spmk.SummaryQueryDto;
......
...@@ -31,6 +31,10 @@ public class SpmkApproveSummaryDto{ ...@@ -31,6 +31,10 @@ public class SpmkApproveSummaryDto{
@ApiModelProperty(value = "审批名称 ", example = "审批名称", required = true) @ApiModelProperty(value = "审批名称 ", example = "审批名称", required = true)
private String approveName; private String approveName;
@NotBlank(message = "digest为空")
@ApiModelProperty(value = "摘要", example = "摘要", required = true)
private String digest;
@NotBlank(message = "initiator为空") @NotBlank(message = "initiator为空")
@ApiModelProperty(value = "发起人名称 ", example = "发起人名称", required = true) @ApiModelProperty(value = "发起人名称 ", example = "发起人名称", required = true)
private String initiator; private String initiator;
......
...@@ -49,6 +49,9 @@ public class LzygQueryDto extends Page implements Serializable{ ...@@ -49,6 +49,9 @@ public class LzygQueryDto extends Page implements Serializable{
@ApiModelProperty(value="员工工号",example="666") @ApiModelProperty(value="员工工号",example="666")
private Integer empNum; private Integer empNum;
@ApiModelProperty(value="企业id",example="666")
private Integer orgCode;
@ApiModelProperty(value="应离职时间",example="2019-12-12") @ApiModelProperty(value="应离职时间",example="2019-12-12")
private Date lzTime; private Date lzTime;
} }
package cn.timer.api.utils.router.business;
import cn.hutool.json.JSONObject;
import cn.timer.api.dto.spmk.FromData;
/**
* 外出
* @author Tang
*
*/
public class GoOutBusiness extends SpmkAssoBusiness {
@Override
public void handleApprove(JSONObject jsonObj) throws Exception {
// TODO Auto-generated method stub
// 发起人企业id
String orgCode = jsonObj.get("orgCode",FromData.class).getValue();
// 发起人id
String id = jsonObj.get("id",FromData.class).getValue();
// 发起人名称
String initiator = jsonObj.get("initiator",FromData.class).getValue();
// 开始时间
String startTime = jsonObj.get("__startTime",FromData.class).getValue();
// 结束时间
String endTime = jsonObj.get("__endTime",FromData.class).getValue();
// 时长
String longTime = jsonObj.get("__longTime",FromData.class).getValue();
// 出差事由
String businessTrip = jsonObj.get("__businessTrip",FromData.class).getValue();
// 上传文件
String UploadAttachment = jsonObj.get("UploadAttachment",FromData.class).getValue();
// 调 考勤管理 业务
}
}
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.json.JSONObject; import cn.hutool.json.JSONObject;
import cn.timer.api.controller.yggl.service.YgglService;
import cn.timer.api.dto.spmk.FromData; import cn.timer.api.dto.spmk.FromData;
import cn.timer.api.dto.yggl.YgzzDto;
import cn.timer.api.utils.DateFormatUtils;
import lombok.Builder; import lombok.Builder;
/** /**
...@@ -12,8 +19,11 @@ import lombok.Builder; ...@@ -12,8 +19,11 @@ import lombok.Builder;
@Builder @Builder
public class RegularizationBusiness extends SpmkAssoBusiness { public class RegularizationBusiness extends SpmkAssoBusiness {
@Autowired
private YgglService ygglService;
@Override @Override
public void handleApprove(JSONObject jsonObj) { public void handleApprove(JSONObject jsonObj) throws Exception {
// TODO Auto-generated method stub // TODO Auto-generated method stub
// 发起人企业id // 发起人企业id
String orgCode = jsonObj.get("orgCode",FromData.class).getValue(); String orgCode = jsonObj.get("orgCode",FromData.class).getValue();
...@@ -32,16 +42,23 @@ public class RegularizationBusiness extends SpmkAssoBusiness { ...@@ -32,16 +42,23 @@ public class RegularizationBusiness extends SpmkAssoBusiness {
// 发起人id // 发起人id
String id = jsonObj.get("id",FromData.class).getValue(); Integer id = Integer.parseInt(jsonObj.get("id",FromData.class).getValue());
// 计划转正时间
String confirmationTime = jsonObj.get("confirmationTime",FromData.class).getValue();
// 实际转正时间 // 实际转正时间
String newConfirmationTime = jsonObj.get("__newConfirmationTime",FromData.class).getValue(); String newConfirmationTime = jsonObj.get("__newConfirmationTime",FromData.class).getValue();
// 备注 // 备注
String Remarks = jsonObj.get("Remarks",FromData.class).getValue(); String Remarks = jsonObj.get("Remarks",FromData.class).getValue();
YgzzDto ygzzDto = YgzzDto.builder()
.empNum(id)
.zzTime(DateFormatUtils.getDateByString(confirmationTime))
.sjzzTime(DateFormatUtils.getDateByString(newConfirmationTime))
.zzRemark(Remarks)
.build();
// 调 员工管理 业务 // 调 员工管理 业务
ygglService.applicationRegularization(ygzzDto);
} }
} }
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.date.DateUtil;
import cn.hutool.json.JSONObject; import cn.hutool.json.JSONObject;
import cn.timer.api.controller.yggl.service.YgglService;
import cn.timer.api.dto.spmk.FromData; import cn.timer.api.dto.spmk.FromData;
import cn.timer.api.dto.yggl.LzygQueryDto;
import cn.timer.api.utils.DateFormatUtils;
import lombok.Builder; import lombok.Builder;
/** /**
...@@ -12,13 +18,16 @@ import lombok.Builder; ...@@ -12,13 +18,16 @@ import lombok.Builder;
@Builder @Builder
public class ResignationBusiness extends SpmkAssoBusiness { public class ResignationBusiness extends SpmkAssoBusiness {
@Autowired
private YgglService ygglService;
@Override @Override
public void handleApprove(JSONObject jsonObj) { public void handleApprove(JSONObject jsonObj) throws Exception {
// TODO Auto-generated method stub // TODO Auto-generated method stub
// 发起人企业id // 发起人企业id
String orgCode = jsonObj.get("orgCode",FromData.class).getValue(); Integer orgCode = Integer.parseInt(jsonObj.get("orgCode",FromData.class).getValue());
// 发起人id // 发起人id
String id = jsonObj.get("id",FromData.class).getValue(); Integer id = Integer.parseInt(jsonObj.get("id",FromData.class).getValue());
// 发起人名称 // 发起人名称
String initiator = jsonObj.get("initiator",FromData.class).getValue(); String initiator = jsonObj.get("initiator",FromData.class).getValue();
...@@ -30,10 +39,18 @@ public class ResignationBusiness extends SpmkAssoBusiness { ...@@ -30,10 +39,18 @@ public class ResignationBusiness extends SpmkAssoBusiness {
String ReasonForResignation = jsonObj.get("__ReasonForResignation",FromData.class).getValue(); String ReasonForResignation = jsonObj.get("__ReasonForResignation",FromData.class).getValue();
// 备注 // 备注
String Remarks = jsonObj.get("Remarks",FromData.class).getValue(); String Remarks = jsonObj.get("Remarks",FromData.class).getValue();
// 上传文件
String UploadAttachment = jsonObj.get("UploadAttachment",FromData.class).getValue();
LzygQueryDto dto = LzygQueryDto.builder()
.orgCode(orgCode)
.empNum(id)
.lzTime(DateFormatUtils.getDateByString(terminationDate))
.lzyy(ReasonForResignation)
.lzbz(Remarks)
.build();
// 调 员工管理 业务 // 调 员工管理 业务
ygglService.applicationResignation(dto);
} }
} }
...@@ -11,6 +11,6 @@ import lombok.Data; ...@@ -11,6 +11,6 @@ import lombok.Data;
@Data @Data
public abstract class SpmkAssoBusiness { public abstract class SpmkAssoBusiness {
public abstract void handleApprove(JSONObject jsonObj); public abstract void handleApprove(JSONObject jsonObj) throws Exception;
} }
package cn.timer.api.utils.router.business; package cn.timer.api.utils.router.business;
import org.springframework.beans.factory.annotation.Autowired;
import cn.hutool.json.JSONObject; import cn.hutool.json.JSONObject;
import cn.timer.api.controller.zzgl.service.ZzglBmgwMService;
import cn.timer.api.dto.spmk.FromData; import cn.timer.api.dto.spmk.FromData;
import cn.timer.api.dto.zzgl.UpEmpDeptDto;
import lombok.Builder; import lombok.Builder;
/** /**
...@@ -12,13 +16,16 @@ import lombok.Builder; ...@@ -12,13 +16,16 @@ import lombok.Builder;
@Builder @Builder
public class TransferPositionBusiness extends SpmkAssoBusiness { public class TransferPositionBusiness extends SpmkAssoBusiness {
@Autowired
ZzglBmgwMService zzglBmgwMService;
@Override @Override
public void handleApprove(JSONObject jsonObj) { public void handleApprove(JSONObject jsonObj) {
// TODO Auto-generated method stub // TODO Auto-generated method stub
// 发起人企业id // 发起人企业id
String orgCode = jsonObj.get("orgCode",FromData.class).getValue(); Integer orgCode = Integer.parseInt(jsonObj.get("orgCode",FromData.class).getValue());
// 发起人id // 发起人id
String id = jsonObj.get("id",FromData.class).getValue(); Integer id = Integer.parseInt(jsonObj.get("id",FromData.class).getValue());
// 发起人名称 // 发起人名称
String initiator = jsonObj.get("initiator",FromData.class).getValue(); String initiator = jsonObj.get("initiator",FromData.class).getValue();
...@@ -27,7 +34,7 @@ public class TransferPositionBusiness extends SpmkAssoBusiness { ...@@ -27,7 +34,7 @@ public class TransferPositionBusiness extends SpmkAssoBusiness {
// 申请原因 // 申请原因
String ReasonForApplication = jsonObj.get("__ReasonForApplication",FromData.class).getValue(); String ReasonForApplication = jsonObj.get("__ReasonForApplication",FromData.class).getValue();
// 调入部门 // 调入部门
String TransferInDepartment = jsonObj.get("__TransferInDepartment",FromData.class).getValue(); Integer TransferInDepartment = Integer.parseInt(jsonObj.get("__TransferInDepartment",FromData.class).getValue());
// 调入岗位 // 调入岗位
String TransferInPosition = jsonObj.get("__TransferInPosition",FromData.class).getValue(); String TransferInPosition = jsonObj.get("__TransferInPosition",FromData.class).getValue();
// 生效日期 // 生效日期
...@@ -37,7 +44,13 @@ public class TransferPositionBusiness extends SpmkAssoBusiness { ...@@ -37,7 +44,13 @@ public class TransferPositionBusiness extends SpmkAssoBusiness {
// 上传文件 // 上传文件
String UploadAttachment = jsonObj.get("UploadAttachment",FromData.class).getValue(); String UploadAttachment = jsonObj.get("UploadAttachment",FromData.class).getValue();
UpEmpDeptDto upEmpDeptDto = UpEmpDeptDto.builder()
.dpetId(TransferInDepartment)
.isdg(1)
.build();
// 调 员工管理 业务 // 调 员工管理 业务
zzglBmgwMService.applicationTransferPosition(id, orgCode, upEmpDeptDto);
} }
} }
...@@ -20,6 +20,28 @@ ...@@ -20,6 +20,28 @@
<result column="end_time" property="endTime" /> <result column="end_time" property="endTime" />
<result column="digest" property="digest" /> <result column="digest" property="digest" />
</resultMap> </resultMap>
<resultMap id="BaseResultMap_As" type="cn.timer.api.bean.spmk.SpmkApproveSummary" >
<id column="id" property="id" />
<result column="org_code" property="orgCode" />
<result column="emp_num" property="empNum" />
<result column="title" property="title" />
<result column="department_name" property="departmentName" />
<result column="initiator" property="initiator" />
<result column="create_time" property="createTime" />
<result column="approve_name" property="approveName" />
<result column="sts" property="sts" />
<result column="current_approver" property="currentApprover" />
<result column="history_approver" property="historyApprover" />
<result column="asso_type" property="assoType" />
<result column="update_time" property="updateTime" />
<result column="end_time" property="endTime" />
<result column="digest" property="digest" />
<result column="gw_name" property="gwName" />
<result column="bm_id" property="bmId" />
<result column="bm_name" property="bmName" />
</resultMap>
<sql id="Base_Column_List"> <sql id="Base_Column_List">
id, id,
...@@ -75,7 +97,7 @@ ...@@ -75,7 +97,7 @@
digest SpmkApproveSummary_digest digest SpmkApproveSummary_digest
</sql> </sql>
<select id="selectPageByQuery" resultMap="BaseResultMap" > <select id="selectPageByQuery" resultMap="BaseResultMap_As" >
SELECT SELECT
<include refid="Base_Column_List_a" />, <include refid="Base_Column_List_a" />,
(SELECT name FROM zzgl_bmgw_m WHERE id = (SELECT bmgw_id FROM yggl_main_emp WHERE a.emp_num = emp_num limit 1) limit 1) as gw_name, (SELECT name FROM zzgl_bmgw_m WHERE id = (SELECT bmgw_id FROM yggl_main_emp WHERE a.emp_num = emp_num limit 1) limit 1) as gw_name,
...@@ -90,9 +112,8 @@ ...@@ -90,9 +112,8 @@
a.id like CONCAT(#{param.query},'%') a.id like CONCAT(#{param.query},'%')
) )
</if> </if>
<if test="param.sts != null">
<if test="param.sts != null and param.sts != ''"> and a.sts = #{param.sts}
and a.sts = #{param.sts}
</if> </if>
<if test="param.startTime != null and param.startTime != ''"> <if test="param.startTime != null and param.startTime != ''">
and a.create_time <![CDATA[ >= ]]> #{param.startTime} and a.create_time <![CDATA[ >= ]]> #{param.startTime}
...@@ -112,7 +133,7 @@ ...@@ -112,7 +133,7 @@
</select> </select>
<select id="selectPageByQueryForEmpNum" resultMap="BaseResultMap" > <select id="selectPageByQueryForEmpNum" resultMap="BaseResultMap_As" >
SELECT SELECT
<include refid="Base_Column_List_a" />, <include refid="Base_Column_List_a" />,
(SELECT name FROM zzgl_bmgw_m WHERE id = (SELECT bmgw_id FROM yggl_main_emp WHERE a.emp_num = emp_num limit 1) limit 1) as gw_name, (SELECT name FROM zzgl_bmgw_m WHERE id = (SELECT bmgw_id FROM yggl_main_emp WHERE a.emp_num = emp_num limit 1) limit 1) as gw_name,
...@@ -133,7 +154,7 @@ ...@@ -133,7 +154,7 @@
and a.emp_num = #{param.empNum} and a.emp_num = #{param.empNum}
</if> </if>
<if test="param.sts != null and param.sts != ''"> <if test="param.sts != null">
and a.sts = #{param.sts} and a.sts = #{param.sts}
</if> </if>
<if test="param.query != null and param.query != ''"> <if test="param.query != null and param.query != ''">
......
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