1.枚举类增加婚丧/育儿假,小假流程
2.以上流程图增加 3.监控器分管领导方法增加婚丧/育儿假,小假为副所长 4.请假增加switch判断
This commit is contained in:
parent
a87e931e29
commit
52d1d75346
@ -417,10 +417,10 @@ public class MyTaskListener implements TaskListener {
|
||||
private String setBranchLeader(activitiEnum.activitiClass aClass, String name, Long id) {
|
||||
AdminDocumentManagement management = documentManagementService.selectById(id);
|
||||
switch (aClass) {
|
||||
case leaveMin:
|
||||
case leaveCountry: //婚丧/育儿假分管领导是副所长(与请假天数无关)
|
||||
case postDocumentCgPj: //公文管理(发文管理)->成果评价->分管领导由所长改为副所长,且删除所长节点
|
||||
return "depDirector";
|
||||
case postDocumentDysw: //公文管理(发文管理)->对外事务->删除部门主任节点,且分管领导为副所长
|
||||
return "depDirector";
|
||||
case receivedDocument://公文管(收文款里) 分管领导为副所长,此处并未修改,只是删除了所长节点
|
||||
return "depDirector";
|
||||
/*case postDocument:
|
||||
|
@ -95,6 +95,15 @@ public class activitiEnum {
|
||||
@ApiModelProperty("请假流程审批")
|
||||
leave("请假流程审批"),
|
||||
|
||||
//婚丧/育儿假 (无关多少时间)
|
||||
//事假/年休假/陪护假/育儿1天以上、病假3天以上
|
||||
//(新)
|
||||
@ApiModelProperty("请假流程审批")
|
||||
leaveCountry("请假流程审批"),
|
||||
|
||||
//小假 1、事假/年休假/陪护假/育儿假1天、病假3天以内:申请人-部门主任
|
||||
@ApiModelProperty("请假流程审批")
|
||||
leaveMin("请假流程审批"),
|
||||
//协会
|
||||
//请假时间在三天以内:申请人(填单)——部门主任(审核)
|
||||
//请假时间在三天以上:申请人(填单)——部门主任(审核)——副秘书长(审核)
|
||||
@ -513,6 +522,11 @@ public class activitiEnum {
|
||||
|
||||
@ApiModelProperty("请假")
|
||||
leave("请假"),
|
||||
@ApiModelProperty("请假(婚丧/产假)")
|
||||
leaveCountry("请假(婚丧/产假) "),
|
||||
|
||||
@ApiModelProperty("请假(小假)")
|
||||
leaveMin("请假(小假) "),
|
||||
/* @ApiModelProperty("请假")
|
||||
leaveXh("请假"),*/
|
||||
@ApiModelProperty("出国")
|
||||
|
@ -24,11 +24,18 @@ import com.xqopen.kehui.util.MailUtil;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.BeanUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.util.ObjectUtils;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.time.LocalDate;
|
||||
import java.time.LocalDateTime;
|
||||
import java.time.LocalTime;
|
||||
import java.time.temporal.ChronoUnit;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
|
||||
/**
|
||||
* <p> 人员事件管理 前端控制器 </p>
|
||||
@ -99,7 +106,6 @@ public class PersonalEventsController implements PersonalEventsApi {
|
||||
personalEventsService.insert(personalEvents);
|
||||
|
||||
|
||||
|
||||
activitiEnum.activitiType aType = null;
|
||||
/**
|
||||
* 添加审批时,查询人员信息,判断是否协会交叉业务人员
|
||||
@ -111,9 +117,63 @@ public class PersonalEventsController implements PersonalEventsApi {
|
||||
}else{*/
|
||||
//添加审批
|
||||
switch (aClass) {
|
||||
case leave:
|
||||
case leave: //请假
|
||||
if (!ObjectUtils.isEmpty(personalEventsReq)) {
|
||||
JSONObject ext = personalEventsReq.getExt();
|
||||
Date beginDate = personalEventsReq.getBeginDate(); //请假日期
|
||||
Date endDate = personalEventsReq.getEndDate(); //结束日期
|
||||
SimpleDateFormat formatter = new SimpleDateFormat("yyyy-MM-dd");
|
||||
if (!ObjectUtils.isEmpty(ext)) {
|
||||
String beginM = String.valueOf(ext.get("beginM"));//请假时间
|
||||
String endM = String.valueOf(ext.get("endM")); //结束时间
|
||||
if (ext.containsKey("leaveType")) {
|
||||
String leaveType = String.valueOf(ext.get("leaveType"));
|
||||
switch (leaveType) {
|
||||
case "marriageLeave": //婚丧假
|
||||
case "maternityLeave": //产假
|
||||
aType = activitiEnum.activitiType.leaveCountry;
|
||||
break;
|
||||
case "leave"://事假
|
||||
case "annualLeave"://年休假
|
||||
case "paternityLeave"://陪护假
|
||||
case "parentalLeave"://育儿假
|
||||
case "sickLeave": //病假
|
||||
LocalDate start = LocalDate.parse(formatter.format(beginDate));
|
||||
LocalDate end = LocalDate.parse(formatter.format(endDate));
|
||||
LocalTime beginTime = LocalTime.parse(beginM);
|
||||
LocalTime endTime = LocalTime.parse(endM);
|
||||
LocalDateTime startDateTime = LocalDateTime.of(start, beginTime);
|
||||
LocalDateTime endDateTime = LocalDateTime.of(end, endTime);
|
||||
long days = ChronoUnit.DAYS.between(startDateTime, endDateTime);
|
||||
if(!"sickLeave".equals(leaveType)){
|
||||
if(days>=1){
|
||||
aType = activitiEnum.activitiType.leaveCountry;
|
||||
break;
|
||||
}
|
||||
else{
|
||||
aType = activitiEnum.activitiType.leaveMin;
|
||||
break;
|
||||
}
|
||||
}
|
||||
else{
|
||||
if(days>=3){
|
||||
aType = activitiEnum.activitiType.leaveCountry;
|
||||
break;
|
||||
}
|
||||
else{
|
||||
aType = activitiEnum.activitiType.leaveMin;
|
||||
break;
|
||||
}
|
||||
}
|
||||
default:
|
||||
aType = activitiEnum.activitiType.leave;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
// aType = activitiEnum.activitiType.leave;
|
||||
break;
|
||||
case foreignVisit:
|
||||
aType = activitiEnum.activitiType.foreignVisit;
|
||||
break;
|
||||
@ -202,7 +262,7 @@ public class PersonalEventsController implements PersonalEventsApi {
|
||||
mailUtil.sendEmail(
|
||||
"liulei@51kehui.com",
|
||||
"【销假通知】",
|
||||
"考勤员:您好!人事已为"+name+"销假!",
|
||||
"考勤员:您好!人事已为" + name + "销假!",
|
||||
"oa@51kehui.com",
|
||||
"Oa1234",
|
||||
mailUtil.EMAIL_SMTP_QQ_HOST);
|
||||
@ -300,7 +360,7 @@ public class PersonalEventsController implements PersonalEventsApi {
|
||||
String activitiStatus = eventsResp.getActivitiStatus();
|
||||
JSONObject ext_ = eventsResp.getExt();
|
||||
Integer salesLeave = 0;
|
||||
if (ext_!=null && ext_.containsKey("salesLeave")) {
|
||||
if (ext_ != null && ext_.containsKey("salesLeave")) {
|
||||
salesLeave = ext_.getInteger("salesLeave");
|
||||
}
|
||||
List<SystemRole> roles = roleService.getSystemRoleByRoleTagAUserId("personnel", userId);
|
||||
|
90
src/main/resources/processes/leaveCountry.bpmn
Normal file
90
src/main/resources/processes/leaveCountry.bpmn
Normal file
@ -0,0 +1,90 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<definitions xmlns="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlns:dc="http://www.omg.org/spec/DD/20100524/DC" xmlns:di="http://www.omg.org/spec/DD/20100524/DI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:activiti="http://activiti.org/bpmn" xmlns:tns="http://www.activiti.org/testm1525406093092" xmlns:xsd="http://www.w3.org/2001/XMLSchema" id="m1525406093092" name="" targetNamespace="http://www.activiti.org/testm1525406093092" exporter="Camunda Modeler" exporterVersion="5.25.0">
|
||||
<process id="leaveCountry" name="请假(婚丧/育儿假)" processType="None" isClosed="false" isExecutable="true">
|
||||
<startEvent id="start" name="StartEvent" />
|
||||
<userTask id="apply" name="申请人" activiti:assignee="${apply}" activiti:exclusive="true" />
|
||||
<userTask activiti:exclusive="true" id="business" name="部门主任">
|
||||
<extensionElements>
|
||||
<activiti:taskListener class="com.xqopen.kehui.flows.util.MyTaskListener" event="create"/>
|
||||
</extensionElements>
|
||||
</userTask>
|
||||
<sequenceFlow id="_6" sourceRef="start" targetRef="apply" />
|
||||
<sequenceFlow id="_7" sourceRef="apply" targetRef="business" />
|
||||
<userTask id="branchLeader" name="分管领导" activiti:exclusive="true">
|
||||
<extensionElements>
|
||||
<activiti:taskListener class="com.xqopen.kehui.flows.util.MyTaskListener" event="create" />
|
||||
</extensionElements>
|
||||
<outgoing>_2</outgoing>
|
||||
</userTask>
|
||||
<sequenceFlow id="_3" sourceRef="business" targetRef="branchLeader" />
|
||||
<endEvent id="end" name="EndEvent">
|
||||
<extensionElements>
|
||||
<activiti:executionListener class="com.xqopen.kehui.flows.util.MyExecutionListener" event="end" />
|
||||
</extensionElements>
|
||||
<incoming>_2</incoming>
|
||||
</endEvent>
|
||||
<sequenceFlow id="_2" sourceRef="branchLeader" targetRef="end" />
|
||||
</process>
|
||||
<bpmndi:BPMNDiagram id="Diagram-_1" name="New Diagram" documentation="background=#3C3F41;count=1;horizontalcount=1;orientation=0;width=842.4;height=1195.2;imageableWidth=832.4;imageableHeight=1185.2;imageableX=5.0;imageableY=5.0">
|
||||
<bpmndi:BPMNPlane bpmnElement="postDocumentCgPj">
|
||||
<bpmndi:BPMNShape id="Shape-start" bpmnElement="start">
|
||||
<dc:Bounds x="375" y="100" width="32" height="32" />
|
||||
<bpmndi:BPMNLabel>
|
||||
<dc:Bounds x="160" y="80" width="52" height="14" />
|
||||
</bpmndi:BPMNLabel>
|
||||
</bpmndi:BPMNShape>
|
||||
<bpmndi:BPMNShape id="Shape-apply" bpmnElement="apply">
|
||||
<dc:Bounds x="355" y="235" width="85" height="55" />
|
||||
<bpmndi:BPMNLabel>
|
||||
<dc:Bounds x="170" y="80" width="85" height="55" />
|
||||
</bpmndi:BPMNLabel>
|
||||
</bpmndi:BPMNShape>
|
||||
<bpmndi:BPMNShape id="Shape-business" bpmnElement="business">
|
||||
<dc:Bounds x="355" y="375" width="85" height="55" />
|
||||
<bpmndi:BPMNLabel>
|
||||
<dc:Bounds x="170" y="80" width="85" height="55" />
|
||||
</bpmndi:BPMNLabel>
|
||||
</bpmndi:BPMNShape>
|
||||
<bpmndi:BPMNShape id="Shape-end" bpmnElement="end">
|
||||
<dc:Bounds x="385" y="825" width="32" height="32" />
|
||||
<bpmndi:BPMNLabel>
|
||||
<dc:Bounds x="162" y="80" width="48" height="14" />
|
||||
</bpmndi:BPMNLabel>
|
||||
</bpmndi:BPMNShape>
|
||||
<bpmndi:BPMNShape id="Shape-branchLeader" bpmnElement="branchLeader">
|
||||
<dc:Bounds x="360" y="545" width="85" height="55" />
|
||||
<bpmndi:BPMNLabel>
|
||||
<dc:Bounds x="170" y="80" width="85" height="55" />
|
||||
</bpmndi:BPMNLabel>
|
||||
</bpmndi:BPMNShape>
|
||||
<bpmndi:BPMNEdge id="BPMNEdge__6" bpmnElement="_6" sourceElement="Shape-start" targetElement="Shape-apply">
|
||||
<di:waypoint x="391" y="132" />
|
||||
<di:waypoint x="391" y="235" />
|
||||
<bpmndi:BPMNLabel>
|
||||
<dc:Bounds x="0" y="0" width="0" height="0" />
|
||||
</bpmndi:BPMNLabel>
|
||||
</bpmndi:BPMNEdge>
|
||||
<bpmndi:BPMNEdge id="BPMNEdge__7" bpmnElement="_7" sourceElement="Shape-apply" targetElement="Shape-business">
|
||||
<di:waypoint x="397.5" y="290" />
|
||||
<di:waypoint x="397.5" y="375" />
|
||||
<bpmndi:BPMNLabel>
|
||||
<dc:Bounds x="0" y="0" width="0" height="0" />
|
||||
</bpmndi:BPMNLabel>
|
||||
</bpmndi:BPMNEdge>
|
||||
<bpmndi:BPMNEdge id="BPMNEdge__2" bpmnElement="_2">
|
||||
<di:waypoint x="402" y="600" />
|
||||
<di:waypoint x="400" y="825" />
|
||||
<bpmndi:BPMNLabel>
|
||||
<dc:Bounds x="0" y="0" width="0" height="0" />
|
||||
</bpmndi:BPMNLabel>
|
||||
</bpmndi:BPMNEdge>
|
||||
<bpmndi:BPMNEdge id="BPMNEdge__3" bpmnElement="_3" sourceElement="Shape-business" targetElement="Shape-branchLeader">
|
||||
<di:waypoint x="400" y="430" />
|
||||
<di:waypoint x="400" y="545" />
|
||||
<bpmndi:BPMNLabel>
|
||||
<dc:Bounds x="0" y="0" width="0" height="0" />
|
||||
</bpmndi:BPMNLabel>
|
||||
</bpmndi:BPMNEdge>
|
||||
</bpmndi:BPMNPlane>
|
||||
</bpmndi:BPMNDiagram>
|
||||
</definitions>
|
70
src/main/resources/processes/leaveMin.bpmn
Normal file
70
src/main/resources/processes/leaveMin.bpmn
Normal file
@ -0,0 +1,70 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<definitions xmlns="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlns:dc="http://www.omg.org/spec/DD/20100524/DC" xmlns:di="http://www.omg.org/spec/DD/20100524/DI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:activiti="http://activiti.org/bpmn" xmlns:tns="http://www.activiti.org/testm1525406093092" xmlns:xsd="http://www.w3.org/2001/XMLSchema" id="m1525406093092" name="" targetNamespace="http://www.activiti.org/testm1525406093092" exporter="Camunda Modeler" exporterVersion="5.25.0">
|
||||
<process id="leaveMin" name="请假(婚丧/育儿假)" processType="None" isClosed="false" isExecutable="true">
|
||||
<startEvent id="start" name="StartEvent" />
|
||||
<userTask id="apply" name="申请人" activiti:assignee="${apply}" activiti:exclusive="true" />
|
||||
<userTask id="business" name="部门主任" activiti:exclusive="true">
|
||||
<extensionElements>
|
||||
<activiti:taskListener class="com.xqopen.kehui.flows.util.MyTaskListener" event="create" />
|
||||
</extensionElements>
|
||||
</userTask>
|
||||
<sequenceFlow id="_6" sourceRef="start" targetRef="apply" />
|
||||
<sequenceFlow id="_7" sourceRef="apply" targetRef="business" />
|
||||
<sequenceFlow id="_3" sourceRef="business" targetRef="end" />
|
||||
<endEvent id="end" name="EndEvent">
|
||||
<extensionElements>
|
||||
<activiti:executionListener class="com.xqopen.kehui.flows.util.MyExecutionListener" event="end" />
|
||||
</extensionElements>
|
||||
<incoming>_3</incoming>
|
||||
</endEvent>
|
||||
</process>
|
||||
<bpmndi:BPMNDiagram id="Diagram-_1" name="New Diagram" documentation="background=#3C3F41;count=1;horizontalcount=1;orientation=0;width=842.4;height=1195.2;imageableWidth=832.4;imageableHeight=1185.2;imageableX=5.0;imageableY=5.0">
|
||||
<bpmndi:BPMNPlane bpmnElement="leaveCountry">
|
||||
<bpmndi:BPMNShape id="Shape-start" bpmnElement="start">
|
||||
<dc:Bounds x="375" y="100" width="32" height="32" />
|
||||
<bpmndi:BPMNLabel>
|
||||
<dc:Bounds x="160" y="80" width="52" height="14" />
|
||||
</bpmndi:BPMNLabel>
|
||||
</bpmndi:BPMNShape>
|
||||
<bpmndi:BPMNShape id="Shape-apply" bpmnElement="apply">
|
||||
<dc:Bounds x="355" y="235" width="85" height="55" />
|
||||
<bpmndi:BPMNLabel>
|
||||
<dc:Bounds x="170" y="80" width="85" height="55" />
|
||||
</bpmndi:BPMNLabel>
|
||||
</bpmndi:BPMNShape>
|
||||
<bpmndi:BPMNShape id="Shape-business" bpmnElement="business">
|
||||
<dc:Bounds x="355" y="375" width="85" height="55" />
|
||||
<bpmndi:BPMNLabel>
|
||||
<dc:Bounds x="170" y="80" width="85" height="55" />
|
||||
</bpmndi:BPMNLabel>
|
||||
</bpmndi:BPMNShape>
|
||||
<bpmndi:BPMNShape id="Shape-end" bpmnElement="end">
|
||||
<dc:Bounds x="385" y="825" width="32" height="32" />
|
||||
<bpmndi:BPMNLabel>
|
||||
<dc:Bounds x="162" y="80" width="48" height="14" />
|
||||
</bpmndi:BPMNLabel>
|
||||
</bpmndi:BPMNShape>
|
||||
<bpmndi:BPMNEdge id="BPMNEdge__6" bpmnElement="_6" sourceElement="Shape-start" targetElement="Shape-apply">
|
||||
<di:waypoint x="391" y="132" />
|
||||
<di:waypoint x="391" y="235" />
|
||||
<bpmndi:BPMNLabel>
|
||||
<dc:Bounds x="0" y="0" width="0" height="0" />
|
||||
</bpmndi:BPMNLabel>
|
||||
</bpmndi:BPMNEdge>
|
||||
<bpmndi:BPMNEdge id="BPMNEdge__7" bpmnElement="_7" sourceElement="Shape-apply" targetElement="Shape-business">
|
||||
<di:waypoint x="397.5" y="290" />
|
||||
<di:waypoint x="397.5" y="375" />
|
||||
<bpmndi:BPMNLabel>
|
||||
<dc:Bounds x="0" y="0" width="0" height="0" />
|
||||
</bpmndi:BPMNLabel>
|
||||
</bpmndi:BPMNEdge>
|
||||
<bpmndi:BPMNEdge id="BPMNEdge__3" bpmnElement="_3" sourceElement="Shape-business" targetElement="Shape-end">
|
||||
<di:waypoint x="400" y="430" />
|
||||
<di:waypoint x="400" y="825" />
|
||||
<bpmndi:BPMNLabel>
|
||||
<dc:Bounds x="0" y="0" width="0" height="0" />
|
||||
</bpmndi:BPMNLabel>
|
||||
</bpmndi:BPMNEdge>
|
||||
</bpmndi:BPMNPlane>
|
||||
</bpmndi:BPMNDiagram>
|
||||
</definitions>
|
Loading…
x
Reference in New Issue
Block a user