Commit afb73daa authored by lvzhuangzhuang's avatar lvzhuangzhuang

清除历史代码(流程部分)

parent cdaa694f
package com.ruoyi.activiti.controller;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import com.ruoyi.activiti.service.IProcessService;
import com.ruoyi.common.core.domain.entity.SysDept;
import com.ruoyi.common.core.domain.entity.SysUser;
import com.ruoyi.system.service.ISysDeptService;
import com.ruoyi.system.service.ISysDictDataService;
import com.ruoyi.system.service.ISysUserService;
import lombok.AllArgsConstructor;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import com.ruoyi.common.annotation.Log;
import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.common.enums.BusinessType;
import com.ruoyi.activiti.domain.BizEmployeReport;
import com.ruoyi.activiti.service.IBizEmployeReportService;
import com.ruoyi.common.utils.poi.ExcelUtil;
import com.ruoyi.common.core.page.TableDataInfo;
/**
* 员工花名册审批业务Controller
*
* @author ruoyi
* @date 2021-12-06
*/
@RestController
@RequestMapping("/bizapprove/employee")
@AllArgsConstructor
public class BizEmployeReportController extends BaseController
{
private IProcessService processService;
@Autowired
private ISysDeptService deptService;
@Autowired
private ISysUserService userService;
@Autowired
private ISysDictDataService dictDataService;
@Autowired
private IBizEmployeReportService bizEmployeReportService;
/**
* 查询员工花名册审批业务列表
*/
@PreAuthorize("@ss.hasPermi('bizapprove:employee:list')")
@GetMapping("/list")
public TableDataInfo list(BizEmployeReport bizEmployeReport)
{
startPage();
List<BizEmployeReport> list = bizEmployeReportService.selectBizEmployeReportList(bizEmployeReport);
return getDataTable(list);
}
/**
* 导出员工花名册审批业务列表
*/
@PreAuthorize("@ss.hasPermi('bizapprove:employee:export')")
@Log(title = "员工花名册审批业务", businessType = BusinessType.EXPORT)
@GetMapping("/export")
public AjaxResult export(BizEmployeReport bizEmployeReport)
{
List<BizEmployeReport> list = bizEmployeReportService.selectBizEmployeReportList(bizEmployeReport);
ExcelUtil<BizEmployeReport> util = new ExcelUtil<BizEmployeReport>(BizEmployeReport.class);
return util.exportExcel(list, "员工花名册审批业务数据");
}
/**
* 获取员工花名册审批业务详细信息
*/
@PreAuthorize("@ss.hasPermi('bizapprove:employee:query')")
@GetMapping(value = "/{id}")
public AjaxResult getInfo(@PathVariable("id") Long id)
{
return AjaxResult.success(bizEmployeReportService.selectBizEmployeReportById(id));
}
/**
* 新增员工花名册审批业务
*/
@PreAuthorize("@ss.hasPermi('bizapprove:employee:add')")
@Log(title = "员工花名册审批业务", businessType = BusinessType.INSERT)
@PostMapping
public AjaxResult add(@RequestBody BizEmployeReport bizEmployeReport)
{
return toAjax(bizEmployeReportService.insertBizEmployeReport(bizEmployeReport));
}
/**
* 修改员工花名册审批业务
*/
@PreAuthorize("@ss.hasPermi('bizapprove:employee:edit')")
@Log(title = "员工花名册审批业务", businessType = BusinessType.UPDATE)
@PutMapping
public AjaxResult edit(@RequestBody BizEmployeReport bizEmployeReport)
{
return toAjax(bizEmployeReportService.updateBizEmployeReport(bizEmployeReport));
}
/**
* 删除员工花名册审批业务
*/
@PreAuthorize("@ss.hasPermi('bizapprove:employee:remove')")
@Log(title = "员工花名册审批业务", businessType = BusinessType.DELETE)
@DeleteMapping("/{ids}")
public AjaxResult remove(@PathVariable Long[] ids)
{
return toAjax(bizEmployeReportService.deleteBizEmployeReportByIds(ids));
}
/**
* 提交申请
*/
@Log(title = "员工审批", businessType = BusinessType.UPDATE)
@PostMapping( "/submitApply/{id}")
@ResponseBody
public AjaxResult submitApply(@PathVariable Long id) {
try {
BizEmployeReport bizEmployeReport = bizEmployeReportService.selectBizEmployeReportById(id);
// bkcarLeader bkwlLeader bkxxLeader
SysDept dept = deptService.selectDeptById(bizEmployeReport.getApplyDeptId());
// List<SysUser> userList = userService.selectDeptLeader(dept.getDeptId(),"jthr");
// if(userList.size() == 0){
// return error("未设置集团人力审核人员!");
// }
//上级领导审批
//https://ask.csdn.net/questions/757022
//${deptLeaderId}
Map<String, Object> variables = new HashMap<>();
//variables.put("approveUserId",userList.get(0).getUserName());
processService.submitApply(bizEmployeReport, "employeapprove", variables);
bizEmployeReportService.updateBizEmployeReport(bizEmployeReport);
} catch (Exception e) {
e.printStackTrace();
return error("提交申请出错:" + e.getMessage());
}
return success();
}
}
package com.ruoyi.activiti.controller;
import java.util.List;
import com.ruoyi.activiti.service.IProcessService;
import com.ruoyi.common.annotation.DataScope;
import lombok.AllArgsConstructor;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.*;
import com.ruoyi.common.annotation.Log;
import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.common.enums.BusinessType;
import com.ruoyi.activiti.domain.BizLeave;
import com.ruoyi.activiti.service.IBizLeaveService;
import com.ruoyi.common.utils.poi.ExcelUtil;
import com.ruoyi.common.core.page.TableDataInfo;
import static com.ruoyi.common.core.domain.AjaxResult.error;
import static com.ruoyi.common.core.domain.AjaxResult.success;
/**
* 请假Controller
*
* @author 一只闲鹿
*/
@RestController
@RequestMapping("/leave/leave")
@AllArgsConstructor
public class BizLeaveController extends BaseController
{
private IBizLeaveService bizLeaveService;
private IProcessService processService;
/**
* 查询请假列表
*/
@PreAuthorize("@ss.hasPermi('leave:leave:list')")
@GetMapping("/list")
public TableDataInfo list(BizLeave bizLeave)
{
startPage();
List<BizLeave> list = bizLeaveService.selectBizLeaveList(bizLeave);
return getDataTable(list);
}
/**
* 导出请假列表
*/
@PreAuthorize("@ss.hasPermi('leave:leave:export')")
@Log(title = "请假", businessType = BusinessType.EXPORT)
@GetMapping("/export")
public AjaxResult export(BizLeave bizLeave)
{
List<BizLeave> list = bizLeaveService.selectBizLeaveList(bizLeave);
ExcelUtil<BizLeave> util = new ExcelUtil<BizLeave>(BizLeave.class);
return util.exportExcel(list, "leave");
}
/**
* 获取请假详细信息
*/
@PreAuthorize("@ss.hasPermi('leave:leave:query')")
@GetMapping(value = "/{id}")
public AjaxResult getInfo(@PathVariable("id") Long id)
{
return AjaxResult.success(bizLeaveService.selectBizLeaveById(id));
}
/**
* 新增请假
*/
@PreAuthorize("@ss.hasPermi('leave:leave:add')")
@Log(title = "请假", businessType = BusinessType.INSERT)
@PostMapping
public AjaxResult add(@RequestBody BizLeave bizLeave)
{
return toAjax(bizLeaveService.insertBizLeave(bizLeave));
}
/**
* 修改请假
*/
@PreAuthorize("@ss.hasPermi('leave:leave:edit')")
@Log(title = "请假", businessType = BusinessType.UPDATE)
@PutMapping
public AjaxResult edit(@RequestBody BizLeave bizLeave)
{
return toAjax(bizLeaveService.updateBizLeave(bizLeave));
}
/**
* 删除请假
*/
@PreAuthorize("@ss.hasPermi('leave:leave:remove')")
@Log(title = "请假", businessType = BusinessType.DELETE)
@DeleteMapping("/{ids}")
public AjaxResult remove(@PathVariable Long[] ids)
{
return toAjax(bizLeaveService.deleteBizLeaveByIds(ids));
}
/**
* 提交申请
*/
@Log(title = "请假业务", businessType = BusinessType.UPDATE)
@PostMapping( "/submitApply/{id}")
@ResponseBody
public AjaxResult submitApply(@PathVariable Long id) {
try {
BizLeave bizLeave = bizLeaveService.selectBizLeaveById(id);
processService.submitApply(bizLeave, "leave");
bizLeaveService.updateBizLeave(bizLeave);
} catch (Exception e) {
e.printStackTrace();
return error("提交申请出错:" + e.getMessage());
}
return success();
}
}
package com.ruoyi.activiti.domain;
import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;
/**
* 考核评分审批对象 biz_credit_report
*
* @author ruoyi
* @date 2021-11-24
*/
public class BizCreditReport extends ProcessEntity
{
private static final long serialVersionUID = 1L;
/** 主键ID */
private Long id;
/** 申请人ID */
@Excel(name = "申请人ID")
private String applyUserId;
/** 申请人code */
@Excel(name = "申请人code")
private String applyUserName;
/** 申请人昵称 */
@Excel(name = "申请人昵称")
private String applyUserNickName;
/** 申请人部门ID */
@Excel(name = "申请人部门ID")
private Long applyDeptId;
/** 申请人部门名称 */
@Excel(name = "申请人部门名称")
private String applyDeptName;
/** 板块类型 */
@Excel(name = "板块类型")
private String busiType;
/** 报送ID */
@Excel(name = "报送ID")
private String reportId;
/** 报送类型 */
@Excel(name = "报送类型")
private String reportType;
/** 报送年月 */
@Excel(name = "报送年月")
private String reportCode;
/** 报送状态 */
@Excel(name = "报送状态")
private String reportStatus;
/** 申请时间 */
@JsonFormat(pattern = "yyyy-MM-dd")
@Excel(name = "申请时间", width = 30, dateFormat = "yyyy-MM-dd")
private Date applyTime;
/** 结束时间 */
@JsonFormat(pattern = "yyyy-MM-dd")
@Excel(name = "结束时间", width = 30, dateFormat = "yyyy-MM-dd")
private Date finishTime;
/** 流程实例ID */
@Excel(name = "流程实例ID")
private String instanceId;
/** 流程定义key */
@Excel(name = "流程定义key")
private String processKey;
/** 删除标志(0代表存在 2代表删除) */
private String delFlag;
public void setId(Long id)
{
this.id = id;
}
public Long getId()
{
return id;
}
public void setApplyUserId(String applyUserId)
{
this.applyUserId = applyUserId;
}
public String getApplyUserId()
{
return applyUserId;
}
public void setApplyUserName(String applyUserName)
{
this.applyUserName = applyUserName;
}
public String getApplyUserName()
{
return applyUserName;
}
public void setApplyUserNickName(String applyUserNickName)
{
this.applyUserNickName = applyUserNickName;
}
public String getApplyUserNickName()
{
return applyUserNickName;
}
public void setApplyDeptId(Long applyDeptId)
{
this.applyDeptId = applyDeptId;
}
public Long getApplyDeptId()
{
return applyDeptId;
}
public void setApplyDeptName(String applyDeptName)
{
this.applyDeptName = applyDeptName;
}
public String getApplyDeptName()
{
return applyDeptName;
}
public void setBusiType(String busiType)
{
this.busiType = busiType;
}
public String getBusiType()
{
return busiType;
}
public void setReportId(String reportId)
{
this.reportId = reportId;
}
public String getReportId()
{
return reportId;
}
public String getReportType() {
return reportType;
}
public void setReportType(String reportType) {
this.reportType = reportType;
}
public void setReportCode(String reportCode)
{
this.reportCode = reportCode;
}
public String getReportCode()
{
return reportCode;
}
public void setReportStatus(String reportStatus)
{
this.reportStatus = reportStatus;
}
public String getReportStatus()
{
return reportStatus;
}
public void setApplyTime(Date applyTime)
{
this.applyTime = applyTime;
}
public Date getApplyTime()
{
return applyTime;
}
public void setFinishTime(Date finishTime)
{
this.finishTime = finishTime;
}
public Date getFinishTime()
{
return finishTime;
}
public void setInstanceId(String instanceId)
{
this.instanceId = instanceId;
}
public String getInstanceId()
{
return instanceId;
}
public void setProcessKey(String processKey)
{
this.processKey = processKey;
}
public String getProcessKey()
{
return processKey;
}
public void setDelFlag(String delFlag)
{
this.delFlag = delFlag;
}
public String getDelFlag()
{
return delFlag;
}
@Override
public String toString() {
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
.append("id", getId())
.append("applyUserId", getApplyUserId())
.append("applyUserName", getApplyUserName())
.append("applyUserNickName", getApplyUserNickName())
.append("applyDeptId", getApplyDeptId())
.append("applyDeptName", getApplyDeptName())
.append("busiType", getBusiType())
.append("reportId", getReportId())
.append("reportCode", getReportCode())
.append("reportStatus", getReportStatus())
.append("applyTime", getApplyTime())
.append("finishTime", getFinishTime())
.append("instanceId", getInstanceId())
.append("processKey", getProcessKey())
.append("delFlag", getDelFlag())
.append("createBy", getCreateBy())
.append("createTime", getCreateTime())
.append("updateBy", getUpdateBy())
.append("updateTime", getUpdateTime())
.append("remark", getRemark())
.toString();
}
}
package com.ruoyi.activiti.domain;
import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.annotation.Excel;
/**
* 请假对象 biz_leave
*
* @author 一只闲鹿
* @date 2020-11-29
*/
public class BizLeave extends ProcessEntity
{
private static final long serialVersionUID = 1L;
/** 主键ID */
private Long id;
/** 请假类型 */
@Excel(name = "请假类型")
private String type;
/** 标题 */
@Excel(name = "标题")
private String title;
/** 原因 */
@Excel(name = "原因")
private String reason;
/** 开始时间 */
@JsonFormat(pattern = "yyyy-MM-dd")
@Excel(name = "开始时间", width = 30, dateFormat = "yyyy-MM-dd")
private Date leaveStartTime;
/** 结束时间 */
@JsonFormat(pattern = "yyyy-MM-dd")
@Excel(name = "结束时间", width = 30, dateFormat = "yyyy-MM-dd")
private Date leaveEndTime;
/** 请假时长,单位秒 */
@Excel(name = "请假时长,单位秒")
private Long totalTime;
/** 实际开始时间 */
@JsonFormat(pattern = "yyyy-MM-dd")
@Excel(name = "实际开始时间", width = 30, dateFormat = "yyyy-MM-dd")
private Date realityStartTime;
/** 实际结束时间 */
@JsonFormat(pattern = "yyyy-MM-dd")
@Excel(name = "实际结束时间", width = 30, dateFormat = "yyyy-MM-dd")
private Date realityEndTime;
/** 申请人 */
@Excel(name = "申请人")
private String applyUserId;
/** 申请人 */
@Excel(name = "申请人")
private String applyUserName;
/** 申请时间 */
@JsonFormat(pattern = "yyyy-MM-dd")
@Excel(name = "申请时间", width = 30, dateFormat = "yyyy-MM-dd")
private Date applyTime;
/** 流程实例ID */
@Excel(name = "流程实例ID")
private String instanceId;
/** 流程定义key */
@Excel(name = "流程定义key")
private String processKey;
/** 删除标志(0代表存在 2代表删除) */
private String delFlag;
public void setId(Long id)
{
this.id = id;
}
public Long getId()
{
return id;
}
public void setType(String type)
{
this.type = type;
}
public String getType()
{
return type;
}
public void setTitle(String title)
{
this.title = title;
}
public String getTitle()
{
return title;
}
public void setReason(String reason)
{
this.reason = reason;
}
public String getReason()
{
return reason;
}
public void setLeaveStartTime(Date leaveStartTime)
{
this.leaveStartTime = leaveStartTime;
}
public Date getLeaveStartTime()
{
return leaveStartTime;
}
public void setLeaveEndTime(Date leaveEndTime)
{
this.leaveEndTime = leaveEndTime;
}
public Date getLeaveEndTime()
{
return leaveEndTime;
}
public void setTotalTime(Long totalTime)
{
this.totalTime = totalTime;
}
public Long getTotalTime()
{
return totalTime;
}
public void setRealityStartTime(Date realityStartTime)
{
this.realityStartTime = realityStartTime;
}
public Date getRealityStartTime()
{
return realityStartTime;
}
public void setRealityEndTime(Date realityEndTime)
{
this.realityEndTime = realityEndTime;
}
public Date getRealityEndTime()
{
return realityEndTime;
}
public void setApplyUserId(String applyUserId)
{
this.applyUserId = applyUserId;
}
public String getApplyUserId()
{
return applyUserId;
}
public void setApplyUserName(String applyUserName)
{
this.applyUserName = applyUserName;
}
public String getApplyUserName()
{
return applyUserName;
}
public void setApplyTime(Date applyTime)
{
this.applyTime = applyTime;
}
public Date getApplyTime()
{
return applyTime;
}
public void setInstanceId(String instanceId)
{
this.instanceId = instanceId;
}
public String getInstanceId()
{
return instanceId;
}
public void setProcessKey(String processKey)
{
this.processKey = processKey;
}
public String getProcessKey()
{
return processKey;
}
public void setDelFlag(String delFlag)
{
this.delFlag = delFlag;
}
public String getDelFlag()
{
return delFlag;
}
@Override
public String toString() {
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
.append("id", getId())
.append("type", getType())
.append("title", getTitle())
.append("reason", getReason())
.append("leaveStartTime", getLeaveStartTime())
.append("leaveEndTime", getLeaveEndTime())
.append("totalTime", getTotalTime())
.append("realityStartTime", getRealityStartTime())
.append("realityEndTime", getRealityEndTime())
.append("applyUserId", getApplyUserId())
.append("applyUserName", getApplyUserName())
.append("applyTime", getApplyTime())
.append("instanceId", getInstanceId())
.append("processKey", getProcessKey())
.append("delFlag", getDelFlag())
.append("createBy", getCreateBy())
.append("createTime", getCreateTime())
.append("updateBy", getUpdateBy())
.append("updateTime", getUpdateTime())
.append("remark", getRemark())
.toString();
}
}
package com.ruoyi.activiti.domain;
import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;
/**
* 工资报送审批对象 biz_salary_report
*
* @author ruoyi
* @date 2021-11-17
*/
public class BizSalaryReport extends ProcessEntity
{
private static final long serialVersionUID = 1L;
/** 主键ID */
private Long id;
/** 申请人ID */
@Excel(name = "申请人ID")
private String applyUserId;
/** 申请人code */
@Excel(name = "申请人code")
private String applyUserName;
/** 申请人昵称 */
@Excel(name = "申请人昵称")
private String applyUserNickName;
/** 申请人部门ID */
@Excel(name = "申请人部门ID")
private Long applyDeptId;
/** 申请人部门名称 */
@Excel(name = "申请人部门名称")
private String applyDeptName;
/** 板块类型 */
@Excel(name = "板块类型")
private String busiType;
/** 报送ID */
@Excel(name = "报送ID")
private Long reportId;
/** 报送年月 */
@Excel(name = "报送年月")
private String reportCode;
/** 报送状态 */
@Excel(name = "报送状态")
private String reportStatus;
/** 申请时间 */
@JsonFormat(pattern = "yyyy-MM-dd")
@Excel(name = "申请时间", width = 30, dateFormat = "yyyy-MM-dd")
private Date applyTime;
/** 结束时间 */
@JsonFormat(pattern = "yyyy-MM-dd")
@Excel(name = "结束时间", width = 30, dateFormat = "yyyy-MM-dd")
private Date finishTime;
/** 流程实例ID */
@Excel(name = "流程实例ID")
private String instanceId;
/** 流程定义key */
@Excel(name = "流程定义key")
private String processKey;
/** 删除标志(0代表存在 2代表删除) */
private String delFlag;
public void setId(Long id)
{
this.id = id;
}
public Long getId()
{
return id;
}
public void setApplyUserId(String applyUserId)
{
this.applyUserId = applyUserId;
}
public String getApplyUserId()
{
return applyUserId;
}
public void setApplyUserName(String applyUserName)
{
this.applyUserName = applyUserName;
}
public String getApplyUserName()
{
return applyUserName;
}
public void setApplyUserNickName(String applyUserNickName)
{
this.applyUserNickName = applyUserNickName;
}
public String getApplyUserNickName()
{
return applyUserNickName;
}
public void setApplyDeptId(Long applyDeptId)
{
this.applyDeptId = applyDeptId;
}
public Long getApplyDeptId()
{
return applyDeptId;
}
public void setApplyDeptName(String applyDeptName)
{
this.applyDeptName = applyDeptName;
}
public String getApplyDeptName()
{
return applyDeptName;
}
public void setBusiType(String busiType)
{
this.busiType = busiType;
}
public String getBusiType()
{
return busiType;
}
public void setReportId(Long reportId)
{
this.reportId = reportId;
}
public Long getReportId()
{
return reportId;
}
public void setReportCode(String reportCode)
{
this.reportCode = reportCode;
}
public String getReportCode()
{
return reportCode;
}
public void setReportStatus(String reportStatus)
{
this.reportStatus = reportStatus;
}
public String getReportStatus()
{
return reportStatus;
}
public void setApplyTime(Date applyTime)
{
this.applyTime = applyTime;
}
public Date getApplyTime()
{
return applyTime;
}
public void setFinishTime(Date finishTime)
{
this.finishTime = finishTime;
}
public Date getFinishTime()
{
return finishTime;
}
public void setInstanceId(String instanceId)
{
this.instanceId = instanceId;
}
public String getInstanceId()
{
return instanceId;
}
public void setProcessKey(String processKey)
{
this.processKey = processKey;
}
public String getProcessKey()
{
return processKey;
}
public void setDelFlag(String delFlag)
{
this.delFlag = delFlag;
}
public String getDelFlag()
{
return delFlag;
}
@Override
public String toString() {
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
.append("id", getId())
.append("applyUserId", getApplyUserId())
.append("applyUserName", getApplyUserName())
.append("applyUserNickName", getApplyUserNickName())
.append("applyDeptId", getApplyDeptId())
.append("applyDeptName", getApplyDeptName())
.append("busiType", getBusiType())
.append("reportId", getReportId())
.append("reportCode", getReportCode())
.append("reportStatus", getReportStatus())
.append("applyTime", getApplyTime())
.append("finishTime", getFinishTime())
.append("instanceId", getInstanceId())
.append("processKey", getProcessKey())
.append("delFlag", getDelFlag())
.append("createBy", getCreateBy())
.append("createTime", getCreateTime())
.append("updateBy", getUpdateBy())
.append("updateTime", getUpdateTime())
.append("remark", getRemark())
.toString();
}
}
\ No newline at end of file
package com.ruoyi.activiti.listener;
import com.ruoyi.activiti.domain.BizEmployeReport;
import com.ruoyi.activiti.service.IBizEmployeReportService;
import com.ruoyi.common.utils.DateUtils;
import org.activiti.engine.delegate.DelegateExecution;
import org.activiti.engine.delegate.ExecutionListener;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
/**
* 流程开始前执行监听器 demo
* @author 一只闲鹿
*/
@Component
public class BizEmployeReportApprovedBackListener implements ExecutionListener {
private static final long serialVersionUID = 1L;
@Autowired
IBizEmployeReportService bizEmployeReportService;
@Override
public void notify(DelegateExecution execution) {
String eventName = execution.getEventName();
if(this.EVENTNAME_START.equals(eventName)){
if(execution.hasVariable("pass")){
Boolean pass = (Boolean) execution.getVariable("pass");
BizEmployeReport bizEmployeReport = bizEmployeReportService.selectBizEmployeReportById(new Long(execution.getProcessInstanceBusinessKey()));
//addapply leaveapply updateapply delapply transferapply
if (!pass) {//如果是审批退回,则更新业务表状态 已退回
if("addapply".equals(bizEmployeReport.getApproveType())){ //新增申请
bizEmployeReport.setApproveStatus("3"); //审核退回
bizEmployeReport.setFinishTime(DateUtils.getNowDate());
bizEmployeReport.setUpdateTime(DateUtils.getNowDate());
bizEmployeReportService.updateBizEmployeReport(bizEmployeReport);
}else if("leaveapply".equals(bizEmployeReport.getApproveType())){ //离职申请
bizEmployeReport.setApproveStatus("3"); //审核退回
bizEmployeReport.setFinishTime(DateUtils.getNowDate());
bizEmployeReport.setUpdateTime(DateUtils.getNowDate());
bizEmployeReportService.updateBizEmployeReport(bizEmployeReport);
}else if("delapply".equals(bizEmployeReport.getApproveType())){ //删除申请
bizEmployeReport.setApproveStatus("3"); //审核退回
bizEmployeReport.setFinishTime(DateUtils.getNowDate());
bizEmployeReport.setUpdateTime(DateUtils.getNowDate());
bizEmployeReportService.updateBizEmployeReport(bizEmployeReport);
}else if("transferapply".equals(bizEmployeReport.getApproveType())){ //调动申请
bizEmployeReport.setApproveStatus("3"); //审核退回
bizEmployeReport.setFinishTime(DateUtils.getNowDate());
bizEmployeReport.setUpdateTime(DateUtils.getNowDate());
bizEmployeReportService.updateBizEmployeReport(bizEmployeReport);
}
}
}
}
}
}
package com.ruoyi.activiti.listener;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONObject;
import com.ruoyi.activiti.domain.BizLeave;
import com.ruoyi.activiti.service.IBizLeaveService;
import org.activiti.engine.delegate.DelegateTask;
import org.activiti.engine.delegate.TaskListener;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import org.springframework.transaction.annotation.Transactional;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.Map;
/**
* <b>监听器使用范例</b>:销假后处理器
* <p>
* 设置销假时间
* </p>
* <p>
* 使用Spring代理,可以注入Bean,管理事物
* </p>
*
* @author HenryYan
*/
@Component
@Transactional
public class ReportBackEndProcessor implements TaskListener {
private static final long serialVersionUID = 1L;
@Autowired
IBizLeaveService bizLeaveService;
/*
* (non-Javadoc)
*
* @see
* org.activiti.engine.delegate.TaskListener#notify(org.activiti.engine.delegate
* .DelegateTask)
*/
public void notify(DelegateTask delegateTask) {
try {
System.out.println("执行了监听器 ReportBackEndProcessor");
BizLeave leave = bizLeaveService.selectBizLeaveById(new Long(delegateTask.getExecution().getProcessInstanceBusinessKey()));
JSONObject formData = (JSONObject) delegateTask.getVariable("formData");
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
leave.setRealityStartTime(sdf.parse(formData.get("realityStartTime").toString() + " 00:00:00"));
leave.setRealityEndTime((sdf.parse(formData.get("realityEndTime").toString() + " 00:00:00")));
bizLeaveService.updateBizLeave(leave);
} catch (ParseException e) {
e.printStackTrace();
}
}
}
package com.ruoyi.activiti.mapper;
import java.util.List;
import com.ruoyi.activiti.domain.BizCreditReport;
/**
* 考核评分审批Mapper接口
*
* @author ruoyi
* @date 2021-11-24
*/
public interface BizCreditReportMapper
{
/**
* 查询考核评分审批
*
* @param id 考核评分审批ID
* @return 考核评分审批
*/
public BizCreditReport selectBizCreditReportById(Long id);
/**
* 查询考核评分审批
*
* @param reportId 考核评分审批ID
* @return 考核评分审批
*/
public BizCreditReport selectBizCreditReportByUUId(String reportId);
/**
* 查询考核评分审批列表
*
* @param bizCreditReport 考核评分审批
* @return 考核评分审批集合
*/
public List<BizCreditReport> selectBizCreditReportList(BizCreditReport bizCreditReport);
/**
* 新增考核评分审批
*
* @param bizCreditReport 考核评分审批
* @return 结果
*/
public int insertBizCreditReport(BizCreditReport bizCreditReport);
/**
* 修改考核评分审批
*
* @param bizCreditReport 考核评分审批
* @return 结果
*/
public int updateBizCreditReport(BizCreditReport bizCreditReport);
/**
* 删除考核评分审批
*
* @param id 考核评分审批ID
* @return 结果
*/
public int deleteBizCreditReportById(Long id);
/**
* 批量删除考核评分审批
*
* @param ids 需要删除的数据ID
* @return 结果
*/
public int deleteBizCreditReportByIds(Long[] ids);
}
package com.ruoyi.activiti.mapper;
import java.util.List;
import com.ruoyi.activiti.domain.BizEmployeReport;
/**
* 员工花名册审批业务Mapper接口
*
* @author ruoyi
* @date 2021-12-06
*/
public interface BizEmployeReportMapper
{
/**
* 查询员工花名册审批业务
*
* @param id 员工花名册审批业务ID
* @return 员工花名册审批业务
*/
public BizEmployeReport selectBizEmployeReportById(Long id);
/**
* 查询员工花名册审批业务
*
* @param employeId 员工ID
* @return 员工花名册审批业务
*/
public BizEmployeReport selectBizEmployeByEmployeId(Long employeId);
/**
* 查询员工花名册审批业务列表
*
* @param bizEmployeReport 员工花名册审批业务
* @return 员工花名册审批业务集合
*/
public List<BizEmployeReport> selectBizEmployeReportList(BizEmployeReport bizEmployeReport);
/**
* 新增员工花名册审批业务
*
* @param bizEmployeReport 员工花名册审批业务
* @return 结果
*/
public int insertBizEmployeReport(BizEmployeReport bizEmployeReport);
/**
* 修改员工花名册审批业务
*
* @param bizEmployeReport 员工花名册审批业务
* @return 结果
*/
public int updateBizEmployeReport(BizEmployeReport bizEmployeReport);
/**
* 删除员工花名册审批业务
*
* @param id 员工花名册审批业务ID
* @return 结果
*/
public int deleteBizEmployeReportById(Long id);
/**
* 批量删除员工花名册审批业务
*
* @param ids 需要删除的数据ID
* @return 结果
*/
public int deleteBizEmployeReportByIds(Long[] ids);
}
package com.ruoyi.activiti.mapper;
import java.util.List;
import com.ruoyi.activiti.domain.BizLeave;
/**
* 请假Mapper接口
*
* @author 一只闲鹿
* @date 2020-11-29
*/
public interface BizLeaveMapper
{
/**
* 查询请假
*
* @param id 请假ID
* @return 请假
*/
public BizLeave selectBizLeaveById(Long id);
/**
* 查询请假列表
*
* @param bizLeave 请假
* @return 请假集合
*/
public List<BizLeave> selectBizLeaveList(BizLeave bizLeave);
/**
* 新增请假
*
* @param bizLeave 请假
* @return 结果
*/
public int insertBizLeave(BizLeave bizLeave);
/**
* 修改请假
*
* @param bizLeave 请假
* @return 结果
*/
public int updateBizLeave(BizLeave bizLeave);
/**
* 删除请假
*
* @param id 请假ID
* @return 结果
*/
public int deleteBizLeaveById(Long id);
/**
* 批量删除请假
*
* @param ids 需要删除的数据ID
* @return 结果
*/
public int deleteBizLeaveByIds(Long[] ids);
}
package com.ruoyi.activiti.mapper;
import java.util.List;
import com.ruoyi.activiti.domain.BizSalaryReport;
/**
* 工资报送审批Mapper接口
*
* @author ruoyi
* @date 2021-11-17
*/
public interface BizSalaryReportMapper
{
/**
* 查询工资报送审批
*
* @param id 工资报送审批ID
* @return 工资报送审批
*/
public BizSalaryReport selectBizSalaryReportById(Long id);
/**
* 查询工资报送审批列表
*
* @param bizSalaryReport 工资报送审批
* @return 工资报送审批集合
*/
public List<BizSalaryReport> selectBizSalaryReportList(BizSalaryReport bizSalaryReport);
/**
* 新增工资报送审批
*
* @param bizSalaryReport 工资报送审批
* @return 结果
*/
public int insertBizSalaryReport(BizSalaryReport bizSalaryReport);
/**
* 修改工资报送审批
*
* @param bizSalaryReport 工资报送审批
* @return 结果
*/
public int updateBizSalaryReport(BizSalaryReport bizSalaryReport);
/**
* 删除工资报送审批
*
* @param id 工资报送审批ID
* @return 结果
*/
public int deleteBizSalaryReportById(Long id);
/**
* 批量删除工资报送审批
*
* @param ids 需要删除的数据ID
* @return 结果
*/
public int deleteBizSalaryReportByIds(Long[] ids);
}
\ No newline at end of file
package com.ruoyi.activiti.service;
import java.util.List;
import com.ruoyi.activiti.domain.BizEmployeReport;
/**
* 员工花名册审批业务Service接口
*
* @author ruoyi
* @date 2021-12-06
*/
public interface IBizEmployeReportService
{
/**
* 查询员工花名册审批业务
*
* @param id 员工花名册审批业务ID
* @return 员工花名册审批业务
*/
public BizEmployeReport selectBizEmployeReportById(Long id);
/**
* 查询员工花名册审批业务
*
* @param employeId 员工ID
* @return 员工花名册审批业务
*/
public BizEmployeReport selectBizEmployeByEmployeId(Long employeId);
/**
* 查询员工花名册审批业务列表
*
* @param bizEmployeReport 员工花名册审批业务
* @return 员工花名册审批业务集合
*/
public List<BizEmployeReport> selectBizEmployeReportList(BizEmployeReport bizEmployeReport);
/**
* 新增员工花名册审批业务
*
* @param bizEmployeReport 员工花名册审批业务
* @return 结果
*/
public int insertBizEmployeReport(BizEmployeReport bizEmployeReport);
/**
* 修改员工花名册审批业务
*
* @param bizEmployeReport 员工花名册审批业务
* @return 结果
*/
public int updateBizEmployeReport(BizEmployeReport bizEmployeReport);
/**
* 批量删除员工花名册审批业务
*
* @param ids 需要删除的员工花名册审批业务ID
* @return 结果
*/
public int deleteBizEmployeReportByIds(Long[] ids);
/**
* 删除员工花名册审批业务信息
*
* @param id 员工花名册审批业务ID
* @return 结果
*/
public int deleteBizEmployeReportById(Long id);
}
package com.ruoyi.activiti.service;
import java.util.List;
import com.ruoyi.activiti.domain.BizLeave;
/**
* 请假Service接口
*
* @author 一只闲鹿
* @date 2020-11-29
*/
public interface IBizLeaveService
{
/**
* 查询请假
*
* @param id 请假ID
* @return 请假
*/
public BizLeave selectBizLeaveById(Long id);
/**
* 查询请假列表
*
* @param bizLeave 请假
* @return 请假集合
*/
public List<BizLeave> selectBizLeaveList(BizLeave bizLeave);
/**
* 新增请假
*
* @param bizLeave 请假
* @return 结果
*/
public int insertBizLeave(BizLeave bizLeave);
/**
* 修改请假
*
* @param bizLeave 请假
* @return 结果
*/
public int updateBizLeave(BizLeave bizLeave);
/**
* 批量删除请假
*
* @param ids 需要删除的请假ID
* @return 结果
*/
public int deleteBizLeaveByIds(Long[] ids);
/**
* 删除请假信息
*
* @param id 请假ID
* @return 结果
*/
public int deleteBizLeaveById(Long id);
}
package com.ruoyi.activiti.service.impl;
import java.util.List;
import com.ruoyi.common.annotation.DataScope;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.activiti.mapper.BizEmployeReportMapper;
import com.ruoyi.activiti.domain.BizEmployeReport;
import com.ruoyi.activiti.service.IBizEmployeReportService;
/**
* 员工花名册审批业务Service业务层处理
*
* @author ruoyi
* @date 2021-12-06
*/
@Service
public class BizEmployeReportServiceImpl implements IBizEmployeReportService
{
@Autowired
private BizEmployeReportMapper bizEmployeReportMapper;
/**
* 查询员工花名册审批业务
*
* @param id 员工花名册审批业务ID
* @return 员工花名册审批业务
*/
@Override
public BizEmployeReport selectBizEmployeReportById(Long id)
{
return bizEmployeReportMapper.selectBizEmployeReportById(id);
}
/**
* 查询员工花名册审批业务
*
* @param employeId 员工ID
* @return 员工花名册审批业务
*/
@Override
public BizEmployeReport selectBizEmployeByEmployeId(Long employeId){
return bizEmployeReportMapper.selectBizEmployeByEmployeId(employeId);
}
/**
* 查询员工花名册审批业务列表
*
* @param bizEmployeReport 员工花名册审批业务
* @return 员工花名册审批业务
*/
@Override
@DataScope(deptAlias = "d")
public List<BizEmployeReport> selectBizEmployeReportList(BizEmployeReport bizEmployeReport)
{
return bizEmployeReportMapper.selectBizEmployeReportList(bizEmployeReport);
}
/**
* 新增员工花名册审批业务
*
* @param bizEmployeReport 员工花名册审批业务
* @return 结果
*/
@Override
public int insertBizEmployeReport(BizEmployeReport bizEmployeReport)
{
bizEmployeReport.setCreateTime(DateUtils.getNowDate());
return bizEmployeReportMapper.insertBizEmployeReport(bizEmployeReport);
}
/**
* 修改员工花名册审批业务
*
* @param bizEmployeReport 员工花名册审批业务
* @return 结果
*/
@Override
public int updateBizEmployeReport(BizEmployeReport bizEmployeReport)
{
bizEmployeReport.setUpdateTime(DateUtils.getNowDate());
return bizEmployeReportMapper.updateBizEmployeReport(bizEmployeReport);
}
/**
* 批量删除员工花名册审批业务
*
* @param ids 需要删除的员工花名册审批业务ID
* @return 结果
*/
@Override
public int deleteBizEmployeReportByIds(Long[] ids)
{
return bizEmployeReportMapper.deleteBizEmployeReportByIds(ids);
}
/**
* 删除员工花名册审批业务信息
*
* @param id 员工花名册审批业务ID
* @return 结果
*/
@Override
public int deleteBizEmployeReportById(Long id)
{
return bizEmployeReportMapper.deleteBizEmployeReportById(id);
}
}
package com.ruoyi.activiti.service.impl;
import java.util.List;
import com.ruoyi.activiti.service.IProcessService;
import com.ruoyi.common.annotation.DataScope;
import com.ruoyi.common.utils.DateUtils;
import com.ruoyi.common.utils.SecurityUtils;
import lombok.AllArgsConstructor;
import org.springframework.stereotype.Service;
import com.ruoyi.activiti.mapper.BizLeaveMapper;
import com.ruoyi.activiti.domain.BizLeave;
import com.ruoyi.activiti.service.IBizLeaveService;
import org.springframework.util.CollectionUtils;
/**
* 请假Service业务层处理
*
* @author 一只闲鹿
* @date 2020-11-29
*/
@Service
@AllArgsConstructor
public class BizLeaveServiceImpl implements IBizLeaveService
{
private BizLeaveMapper bizLeaveMapper;
private IProcessService processService;
/**
* 查询请假
*
* @param id 请假ID
* @return 请假
*/
@Override
public BizLeave selectBizLeaveById(Long id)
{
return bizLeaveMapper.selectBizLeaveById(id);
}
/**
* 查询请假列表
*
* @param bizLeave 请假
* @return 请假
*/
@Override
public List<BizLeave> selectBizLeaveList(BizLeave bizLeave)
{
if (!SecurityUtils.isAdmin(SecurityUtils.getLoginUser().getUser().getUserId())) {
bizLeave.setCreateBy(SecurityUtils.getUsername());
}
List<BizLeave> list = bizLeaveMapper.selectBizLeaveList(bizLeave);
if (!CollectionUtils.isEmpty(list)) {
list.forEach(item -> {
try {
processService.richProcessField(item);
} catch (Exception e) {
e.printStackTrace();
}
});
}
return list;
}
/**
* 新增请假
*
* @param bizLeave 请假
* @return 结果
*/
@Override
public int insertBizLeave(BizLeave bizLeave)
{
bizLeave.setCreateBy(SecurityUtils.getUsername());
bizLeave.setCreateTime(DateUtils.getNowDate());
return bizLeaveMapper.insertBizLeave(bizLeave);
}
/**
* 修改请假
*
* @param bizLeave 请假
* @return 结果
*/
@Override
public int updateBizLeave(BizLeave bizLeave)
{
bizLeave.setUpdateTime(DateUtils.getNowDate());
return bizLeaveMapper.updateBizLeave(bizLeave);
}
/**
* 批量删除请假
*
* @param ids 需要删除的请假ID
* @return 结果
*/
@Override
public int deleteBizLeaveByIds(Long[] ids)
{
return bizLeaveMapper.deleteBizLeaveByIds(ids);
}
/**
* 删除请假信息
*
* @param id 请假ID
* @return 结果
*/
@Override
public int deleteBizLeaveById(Long id)
{
return bizLeaveMapper.deleteBizLeaveById(id);
}
}
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.ruoyi.activiti.mapper.BizCreditReportMapper">
<resultMap type="BizCreditReport" id="BizCreditReportResult">
<result property="id" column="id" />
<result property="applyUserId" column="apply_user_id" />
<result property="applyUserName" column="apply_user_name" />
<result property="applyUserNickName" column="apply_user_nick_name" />
<result property="applyDeptId" column="apply_dept_id" />
<result property="applyDeptName" column="apply_dept_name" />
<result property="busiType" column="busi_type" />
<result property="reportId" column="report_id" />
<result property="reportType" column="report_type" />
<result property="reportCode" column="report_code" />
<result property="reportStatus" column="report_status" />
<result property="applyTime" column="apply_time" />
<result property="finishTime" column="finish_time" />
<result property="instanceId" column="instance_id" />
<result property="processKey" column="process_key" />
<result property="delFlag" column="del_flag" />
<result property="createBy" column="create_by" />
<result property="createTime" column="create_time" />
<result property="updateBy" column="update_by" />
<result property="updateTime" column="update_time" />
<result property="remark" column="remark" />
</resultMap>
<sql id="selectBizCreditReportVo">
select id, apply_user_id, apply_user_name, apply_user_nick_name, apply_dept_id, apply_dept_name, busi_type, report_id, report_type, report_code, report_status, apply_time, finish_time, instance_id, process_key, del_flag, create_by, create_time, update_by, update_time, remark from biz_credit_report
</sql>
<select id="selectBizCreditReportList" parameterType="BizCreditReport" resultMap="BizCreditReportResult">
<include refid="selectBizCreditReportVo"/>
<where>
<if test="applyUserId != null and applyUserId != ''"> and apply_user_id = #{applyUserId}</if>
<if test="applyUserName != null and applyUserName != ''"> and apply_user_name like concat('%', #{applyUserName}, '%')</if>
<if test="applyUserNickName != null and applyUserNickName != ''"> and apply_user_nick_name like concat('%', #{applyUserNickName}, '%')</if>
<if test="applyDeptId != null "> and apply_dept_id = #{applyDeptId}</if>
<if test="applyDeptName != null and applyDeptName != ''"> and apply_dept_name like concat('%', #{applyDeptName}, '%')</if>
<if test="busiType != null and busiType != ''"> and busi_type = #{busiType}</if>
<if test="reportId != null "> and report_id = #{reportId}</if>
<if test="reportType != null and reportType != ''"> and report_type = #{reportType}</if>
<if test="reportCode != null and reportCode != ''"> and report_code = #{reportCode}</if>
<if test="reportStatus != null and reportStatus != ''"> and report_status = #{reportStatus}</if>
<if test="applyTime != null "> and apply_time = #{applyTime}</if>
<if test="finishTime != null "> and finish_time = #{finishTime}</if>
<if test="instanceId != null and instanceId != ''"> and instance_id = #{instanceId}</if>
<if test="processKey != null and processKey != ''"> and process_key = #{processKey}</if>
</where>
order by id desc
</select>
<select id="selectBizCreditReportById" parameterType="Long" resultMap="BizCreditReportResult">
<include refid="selectBizCreditReportVo"/>
where id = #{id}
</select>
<select id="selectBizCreditReportByUUId" parameterType="String" resultMap="BizCreditReportResult">
<include refid="selectBizCreditReportVo"/>
where report_id = #{reportId}
</select>
<insert id="insertBizCreditReport" parameterType="BizCreditReport" useGeneratedKeys="true" keyProperty="id">
insert into biz_credit_report
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="applyUserId != null">apply_user_id,</if>
<if test="applyUserName != null">apply_user_name,</if>
<if test="applyUserNickName != null">apply_user_nick_name,</if>
<if test="applyDeptId != null">apply_dept_id,</if>
<if test="applyDeptName != null">apply_dept_name,</if>
<if test="busiType != null">busi_type,</if>
<if test="reportId != null">report_id,</if>
<if test="reportType != null">report_type,</if>
<if test="reportCode != null">report_code,</if>
<if test="reportStatus != null">report_status,</if>
<if test="applyTime != null">apply_time,</if>
<if test="finishTime != null">finish_time,</if>
<if test="instanceId != null">instance_id,</if>
<if test="processKey != null">process_key,</if>
<if test="delFlag != null">del_flag,</if>
<if test="createBy != null">create_by,</if>
<if test="createTime != null">create_time,</if>
<if test="updateBy != null">update_by,</if>
<if test="updateTime != null">update_time,</if>
<if test="remark != null">remark,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="applyUserId != null">#{applyUserId},</if>
<if test="applyUserName != null">#{applyUserName},</if>
<if test="applyUserNickName != null">#{applyUserNickName},</if>
<if test="applyDeptId != null">#{applyDeptId},</if>
<if test="applyDeptName != null">#{applyDeptName},</if>
<if test="busiType != null">#{busiType},</if>
<if test="reportId != null">#{reportId},</if>
<if test="reportType != null">#{reportType},</if>
<if test="reportCode != null">#{reportCode},</if>
<if test="reportStatus != null">#{reportStatus},</if>
<if test="applyTime != null">#{applyTime},</if>
<if test="finishTime != null">#{finishTime},</if>
<if test="instanceId != null">#{instanceId},</if>
<if test="processKey != null">#{processKey},</if>
<if test="delFlag != null">#{delFlag},</if>
<if test="createBy != null">#{createBy},</if>
<if test="createTime != null">#{createTime},</if>
<if test="updateBy != null">#{updateBy},</if>
<if test="updateTime != null">#{updateTime},</if>
<if test="remark != null">#{remark},</if>
</trim>
</insert>
<update id="updateBizCreditReport" parameterType="BizCreditReport">
update biz_credit_report
<trim prefix="SET" suffixOverrides=",">
<if test="applyUserId != null">apply_user_id = #{applyUserId},</if>
<if test="applyUserName != null">apply_user_name = #{applyUserName},</if>
<if test="applyUserNickName != null">apply_user_nick_name = #{applyUserNickName},</if>
<if test="applyDeptId != null">apply_dept_id = #{applyDeptId},</if>
<if test="applyDeptName != null">apply_dept_name = #{applyDeptName},</if>
<if test="busiType != null">busi_type = #{busiType},</if>
<if test="reportId != null">report_id = #{reportId},</if>
<if test="reportType != null">report_type = #{reportType},</if>
<if test="reportCode != null">report_code = #{reportCode},</if>
<if test="reportStatus != null">report_status = #{reportStatus},</if>
<if test="applyTime != null">apply_time = #{applyTime},</if>
<if test="finishTime != null">finish_time = #{finishTime},</if>
<if test="instanceId != null">instance_id = #{instanceId},</if>
<if test="processKey != null">process_key = #{processKey},</if>
<if test="delFlag != null">del_flag = #{delFlag},</if>
<if test="createBy != null">create_by = #{createBy},</if>
<if test="createTime != null">create_time = #{createTime},</if>
<if test="updateBy != null">update_by = #{updateBy},</if>
<if test="updateTime != null">update_time = #{updateTime},</if>
<if test="remark != null">remark = #{remark},</if>
</trim>
where id = #{id}
</update>
<delete id="deleteBizCreditReportById" parameterType="Long">
delete from biz_credit_report where id = #{id}
</delete>
<delete id="deleteBizCreditReportByIds" parameterType="String">
delete from biz_credit_report where id in
<foreach item="id" collection="array" open="(" separator="," close=")">
#{id}
</foreach>
</delete>
</mapper>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.ruoyi.activiti.mapper.BizLeaveMapper">
<resultMap type="BizLeave" id="BizLeaveResult">
<result property="id" column="id" />
<result property="type" column="type" />
<result property="title" column="title" />
<result property="reason" column="reason" />
<result property="leaveStartTime" column="leave_start_time" />
<result property="leaveEndTime" column="leave_end_time" />
<result property="totalTime" column="total_time" />
<result property="realityStartTime" column="reality_start_time" />
<result property="realityEndTime" column="reality_end_time" />
<result property="applyUserId" column="apply_user_id" />
<result property="applyUserName" column="apply_user_name" />
<result property="applyTime" column="apply_time" />
<result property="instanceId" column="instance_id" />
<result property="processKey" column="process_key" />
<result property="delFlag" column="del_flag" />
<result property="createBy" column="create_by" />
<result property="createTime" column="create_time" />
<result property="updateBy" column="update_by" />
<result property="updateTime" column="update_time" />
<result property="remark" column="remark" />
</resultMap>
<sql id="selectBizLeaveVo">
select id, type, title, reason, leave_start_time, leave_end_time, total_time, reality_start_time, reality_end_time, apply_user_id, apply_user_name, apply_time, instance_id, process_key, del_flag, create_by, create_time, update_by, update_time, remark from biz_leave
</sql>
<select id="selectBizLeaveList" parameterType="BizLeave" resultMap="BizLeaveResult">
<include refid="selectBizLeaveVo"/>
where 1=1
<if test="type != null and type != ''"> and type = #{type}</if>
<if test="title != null and title != ''"> and title = #{title}</if>
<if test="leaveStartTime != null "> and leave_start_time = #{leaveStartTime}</if>
<if test="leaveEndTime != null "> and leave_end_time = #{leaveEndTime}</if>
<if test="applyUserId != null and applyUserId != ''"> and apply_user_id = #{applyUserId}</if>
<if test="applyUserName != null and applyUserName != ''"> and apply_user_name like concat('%', #{applyUserName}, '%')</if>
<if test="applyTime != null "> and apply_time = #{applyTime}</if>
<if test="instanceId != null and instanceId != ''"> and instance_id = #{instanceId}</if>
<if test="createBy != null and createBy != ''"> and create_by = #{createBy}</if>
order by id desc
</select>
<select id="selectBizLeaveById" parameterType="Long" resultMap="BizLeaveResult">
<include refid="selectBizLeaveVo"/>
where id = #{id}
</select>
<insert id="insertBizLeave" parameterType="BizLeave" useGeneratedKeys="true" keyProperty="id">
insert into biz_leave
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="type != null">type,</if>
<if test="title != null">title,</if>
<if test="reason != null">reason,</if>
<if test="leaveStartTime != null">leave_start_time,</if>
<if test="leaveEndTime != null">leave_end_time,</if>
<if test="totalTime != null">total_time,</if>
<if test="realityStartTime != null">reality_start_time,</if>
<if test="realityEndTime != null">reality_end_time,</if>
<if test="applyUserId != null">apply_user_id,</if>
<if test="applyUserName != null">apply_user_name,</if>
<if test="applyTime != null">apply_time,</if>
<if test="instanceId != null">instance_id,</if>
<if test="processKey != null">process_key,</if>
<if test="delFlag != null">del_flag,</if>
<if test="createBy != null">create_by,</if>
<if test="createTime != null">create_time,</if>
<if test="updateBy != null">update_by,</if>
<if test="updateTime != null">update_time,</if>
<if test="remark != null">remark,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="type != null">#{type},</if>
<if test="title != null">#{title},</if>
<if test="reason != null">#{reason},</if>
<if test="leaveStartTime != null">#{leaveStartTime},</if>
<if test="leaveEndTime != null">#{leaveEndTime},</if>
<if test="totalTime != null">#{totalTime},</if>
<if test="realityStartTime != null">#{realityStartTime},</if>
<if test="realityEndTime != null">#{realityEndTime},</if>
<if test="applyUserId != null">#{applyUserId},</if>
<if test="applyUserName != null">#{applyUserName},</if>
<if test="applyTime != null">#{applyTime},</if>
<if test="instanceId != null">#{instanceId},</if>
<if test="processKey != null">#{processKey},</if>
<if test="delFlag != null">#{delFlag},</if>
<if test="createBy != null">#{createBy},</if>
<if test="createTime != null">#{createTime},</if>
<if test="updateBy != null">#{updateBy},</if>
<if test="updateTime != null">#{updateTime},</if>
<if test="remark != null">#{remark},</if>
</trim>
</insert>
<update id="updateBizLeave" parameterType="BizLeave">
update biz_leave
<trim prefix="SET" suffixOverrides=",">
<if test="type != null">type = #{type},</if>
<if test="title != null">title = #{title},</if>
<if test="reason != null">reason = #{reason},</if>
<if test="leaveStartTime != null">leave_start_time = #{leaveStartTime},</if>
<if test="leaveEndTime != null">leave_end_time = #{leaveEndTime},</if>
<if test="totalTime != null">total_time = #{totalTime},</if>
<if test="realityStartTime != null">reality_start_time = #{realityStartTime},</if>
<if test="realityEndTime != null">reality_end_time = #{realityEndTime},</if>
<if test="applyUserId != null">apply_user_id = #{applyUserId},</if>
<if test="applyUserName != null">apply_user_name = #{applyUserName},</if>
<if test="applyTime != null">apply_time = #{applyTime},</if>
<if test="instanceId != null">instance_id = #{instanceId},</if>
<if test="processKey != null">process_key = #{processKey},</if>
<if test="delFlag != null">del_flag = #{delFlag},</if>
<if test="createBy != null">create_by = #{createBy},</if>
<if test="createTime != null">create_time = #{createTime},</if>
<if test="updateBy != null">update_by = #{updateBy},</if>
<if test="updateTime != null">update_time = #{updateTime},</if>
<if test="remark != null">remark = #{remark},</if>
</trim>
where id = #{id}
</update>
<delete id="deleteBizLeaveById" parameterType="Long">
delete from biz_leave where id = #{id}
</delete>
<delete id="deleteBizLeaveByIds" parameterType="String">
delete from biz_leave where id in
<foreach item="id" collection="array" open="(" separator="," close=")">
#{id}
</foreach>
</delete>
</mapper>
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.ruoyi.activiti.mapper.BizSalaryReportMapper">
<resultMap type="BizSalaryReport" id="BizSalaryReportResult">
<result property="id" column="id" />
<result property="applyUserId" column="apply_user_id" />
<result property="applyUserName" column="apply_user_name" />
<result property="applyUserNickName" column="apply_user_nick_name" />
<result property="applyDeptId" column="apply_dept_id" />
<result property="applyDeptName" column="apply_dept_name" />
<result property="busiType" column="busi_type" />
<result property="reportId" column="report_id" />
<result property="reportCode" column="report_code" />
<result property="reportStatus" column="report_status" />
<result property="applyTime" column="apply_time" />
<result property="finishTime" column="finish_time" />
<result property="instanceId" column="instance_id" />
<result property="processKey" column="process_key" />
<result property="delFlag" column="del_flag" />
<result property="createBy" column="create_by" />
<result property="createTime" column="create_time" />
<result property="updateBy" column="update_by" />
<result property="updateTime" column="update_time" />
<result property="remark" column="remark" />
</resultMap>
<sql id="selectBizSalaryReportVo">
select id, apply_user_id, apply_user_name, apply_user_nick_name, apply_dept_id, apply_dept_name, busi_type, report_id, report_code, report_status, apply_time, finish_time, instance_id, process_key, del_flag, create_by, create_time, update_by, update_time, remark from biz_salary_report
</sql>
<select id="selectBizSalaryReportList" parameterType="BizSalaryReport" resultMap="BizSalaryReportResult">
<include refid="selectBizSalaryReportVo"/>
<where>
<if test="applyUserId != null "> and apply_user_id = #{applyUserId}</if>
<if test="applyUserName != null and applyUserName != ''"> and apply_user_name like concat('%', #{applyUserName}, '%')</if>
<if test="applyUserNickName != null and applyUserNickName != ''"> and apply_user_nick_name like concat('%', #{applyUserNickName}, '%')</if>
<if test="applyDeptId != null "> and apply_dept_id = #{applyDeptId}</if>
<if test="applyDeptName != null and applyDeptName != ''"> and apply_dept_name like concat('%', #{applyDeptName}, '%')</if>
<if test="busiType != null and busiType != ''"> and busi_type = #{busiType}</if>
<if test="reportId != null "> and report_id = #{reportId}</if>
<if test="reportCode != null and reportCode != ''"> and report_code = #{reportCode}</if>
<if test="reportStatus != null and reportStatus != ''"> and report_status = #{reportStatus}</if>
<if test="applyTime != null "> and apply_time = #{applyTime}</if>
<if test="finishTime != null "> and finish_time = #{finishTime}</if>
<if test="instanceId != null and instanceId != ''"> and instance_id = #{instanceId}</if>
<if test="processKey != null and processKey != ''"> and process_key = #{processKey}</if>
</where>
</select>
<select id="selectBizSalaryReportById" parameterType="Long" resultMap="BizSalaryReportResult">
<include refid="selectBizSalaryReportVo"/>
where id = #{id}
</select>
<insert id="insertBizSalaryReport" parameterType="BizSalaryReport" useGeneratedKeys="true" keyProperty="id">
insert into biz_salary_report
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="applyUserId != null">apply_user_id,</if>
<if test="applyUserName != null">apply_user_name,</if>
<if test="applyUserNickName != null">apply_user_nick_name,</if>
<if test="applyDeptId != null">apply_dept_id,</if>
<if test="applyDeptName != null">apply_dept_name,</if>
<if test="busiType != null">busi_type,</if>
<if test="reportId != null">report_id,</if>
<if test="reportCode != null">report_code,</if>
<if test="reportStatus != null">report_status,</if>
<if test="applyTime != null">apply_time,</if>
<if test="finishTime != null">finish_time,</if>
<if test="instanceId != null">instance_id,</if>
<if test="processKey != null">process_key,</if>
<if test="delFlag != null">del_flag,</if>
<if test="createBy != null">create_by,</if>
<if test="createTime != null">create_time,</if>
<if test="updateBy != null">update_by,</if>
<if test="updateTime != null">update_time,</if>
<if test="remark != null">remark,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="applyUserId != null">#{applyUserId},</if>
<if test="applyUserName != null">#{applyUserName},</if>
<if test="applyUserNickName != null">#{applyUserNickName},</if>
<if test="applyDeptId != null">#{applyDeptId},</if>
<if test="applyDeptName != null">#{applyDeptName},</if>
<if test="busiType != null">#{busiType},</if>
<if test="reportId != null">#{reportId},</if>
<if test="reportCode != null">#{reportCode},</if>
<if test="reportStatus != null">#{reportStatus},</if>
<if test="applyTime != null">#{applyTime},</if>
<if test="finishTime != null">#{finishTime},</if>
<if test="instanceId != null">#{instanceId},</if>
<if test="processKey != null">#{processKey},</if>
<if test="delFlag != null">#{delFlag},</if>
<if test="createBy != null">#{createBy},</if>
<if test="createTime != null">#{createTime},</if>
<if test="updateBy != null">#{updateBy},</if>
<if test="updateTime != null">#{updateTime},</if>
<if test="remark != null">#{remark},</if>
</trim>
</insert>
<update id="updateBizSalaryReport" parameterType="BizSalaryReport">
update biz_salary_report
<trim prefix="SET" suffixOverrides=",">
<if test="applyUserId != null">apply_user_id = #{applyUserId},</if>
<if test="applyUserName != null">apply_user_name = #{applyUserName},</if>
<if test="applyUserNickName != null">apply_user_nick_name = #{applyUserNickName},</if>
<if test="applyDeptId != null">apply_dept_id = #{applyDeptId},</if>
<if test="applyDeptName != null">apply_dept_name = #{applyDeptName},</if>
<if test="busiType != null">busi_type = #{busiType},</if>
<if test="reportId != null">report_id = #{reportId},</if>
<if test="reportCode != null">report_code = #{reportCode},</if>
<if test="reportStatus != null">report_status = #{reportStatus},</if>
<if test="applyTime != null">apply_time = #{applyTime},</if>
<if test="finishTime != null">finish_time = #{finishTime},</if>
<if test="instanceId != null">instance_id = #{instanceId},</if>
<if test="processKey != null">process_key = #{processKey},</if>
<if test="delFlag != null">del_flag = #{delFlag},</if>
<if test="createBy != null">create_by = #{createBy},</if>
<if test="createTime != null">create_time = #{createTime},</if>
<if test="updateBy != null">update_by = #{updateBy},</if>
<if test="updateTime != null">update_time = #{updateTime},</if>
<if test="remark != null">remark = #{remark},</if>
</trim>
where id = #{id}
</update>
<delete id="deleteBizSalaryReportById" parameterType="Long">
delete from biz_salary_report where id = #{id}
</delete>
<delete id="deleteBizSalaryReportByIds" parameterType="String">
delete from biz_salary_report where id in
<foreach item="id" collection="array" open="(" separator="," close=")">
#{id}
</foreach>
</delete>
</mapper>
\ No newline at end of file
......@@ -4,7 +4,7 @@ spring:
type: com.alibaba.druid.pool.DruidDataSource
driverClassName: com.mysql.cj.jdbc.Driver
druid:
# 主库数据源 114.115.162.32 127.0.0.1 hbghgz jDkrSt5Ts77zXWCJ
# 主库数据源
master:
url: jdbc:mysql://192.168.111.222:3306/ry-vue?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8&nullCatalogMeansCurrent=true
username: root
......
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