@ -0,0 +1,43 @@ |
|||
------------------------------------------2019-11-27----------------------------------------------- |
|||
ALTER TABLE esua_epdc_news.epdc_banner DROP COLUMN `STREET`; |
|||
ALTER TABLE esua_epdc_news.epdc_banner DROP COLUMN `STREET_ID`; |
|||
ALTER TABLE esua_epdc_news.epdc_banner DROP COLUMN `COMMUNITY`; |
|||
ALTER TABLE esua_epdc_news.epdc_banner DROP COLUMN `COMMUNITY_ID`; |
|||
ALTER TABLE esua_epdc_news.epdc_banner DROP COLUMN `GRID`; |
|||
ALTER TABLE esua_epdc_news.epdc_banner DROP COLUMN `GRID_ID`; |
|||
ALTER TABLE esua_epdc_news.epdc_banner ADD PARENT_DEPT_IDS VARCHAR(1024) NULL COMMENT '父所有部门'; |
|||
ALTER TABLE esua_epdc_news.epdc_banner ADD PARENT_DEPT_NAMES VARCHAR(1024) NULL COMMENT '父所有部门'; |
|||
ALTER TABLE esua_epdc_news.epdc_banner ADD ALL_DEPT_IDS varchar(512) NULL COMMENT '所有部门ID'; |
|||
ALTER TABLE esua_epdc_news.epdc_banner ADD ALL_DEPT_NAMES varchar(512) NULL COMMENT '所有部门名称'; |
|||
|
|||
|
|||
ALTER TABLE esua_epdc_news.epdc_news DROP COLUMN `STREET`; |
|||
ALTER TABLE esua_epdc_news.epdc_news DROP COLUMN `STREET_ID`; |
|||
ALTER TABLE esua_epdc_news.epdc_news DROP COLUMN `COMMUNITY`; |
|||
ALTER TABLE esua_epdc_news.epdc_news DROP COLUMN `COMMUNITY_ID`; |
|||
ALTER TABLE esua_epdc_news.epdc_news DROP COLUMN `GRID`; |
|||
ALTER TABLE esua_epdc_news.epdc_news DROP COLUMN `GRID_ID`; |
|||
ALTER TABLE esua_epdc_news.epdc_news ADD PARENT_DEPT_IDS VARCHAR(1024) NULL COMMENT '父所有部门'; |
|||
ALTER TABLE esua_epdc_news.epdc_news ADD PARENT_DEPT_NAMES VARCHAR(1024) NULL COMMENT '父所有部门'; |
|||
ALTER TABLE esua_epdc_news.epdc_news ADD ALL_DEPT_IDS varchar(512) NULL COMMENT '所有部门ID'; |
|||
ALTER TABLE esua_epdc_news.epdc_news ADD ALL_DEPT_NAMES varchar(512) NULL COMMENT '所有部门名称'; |
|||
|
|||
ALTER TABLE esua_epdc_news.epdc_news_statistics DROP COLUMN `STREET_ID`; |
|||
ALTER TABLE esua_epdc_news.epdc_news_statistics DROP COLUMN `COMMUNITY_ID`; |
|||
ALTER TABLE esua_epdc_news.epdc_news_statistics ADD PARENT_DEPT_IDS VARCHAR(1024) NULL COMMENT '父所有部门'; |
|||
ALTER TABLE esua_epdc_news.epdc_news_statistics ADD PARENT_DEPT_NAMES VARCHAR(1024) NULL COMMENT '父所有部门'; |
|||
ALTER TABLE esua_epdc_news.epdc_news_statistics ADD ALL_DEPT_IDS varchar(512) NULL COMMENT '所有部门ID'; |
|||
ALTER TABLE esua_epdc_news.epdc_news_statistics ADD ALL_DEPT_NAMES varchar(512) NULL COMMENT '所有部门名称'; |
|||
|
|||
ALTER TABLE esua_epdc_news.epdc_notice DROP COLUMN `STREET`; |
|||
ALTER TABLE esua_epdc_news.epdc_notice DROP COLUMN `STREET_ID`; |
|||
ALTER TABLE esua_epdc_news.epdc_notice DROP COLUMN `COMMUNITY`; |
|||
ALTER TABLE esua_epdc_news.epdc_notice DROP COLUMN `COMMUNITY_ID`; |
|||
ALTER TABLE esua_epdc_news.epdc_notice DROP COLUMN `GRID`; |
|||
ALTER TABLE esua_epdc_news.epdc_notice DROP COLUMN `GRID_ID`; |
|||
ALTER TABLE esua_epdc_news.epdc_notice ADD PARENT_DEPT_IDS VARCHAR(1024) NULL COMMENT '父所有部门'; |
|||
ALTER TABLE esua_epdc_news.epdc_notice ADD PARENT_DEPT_NAMES VARCHAR(1024) NULL COMMENT '父所有部门'; |
|||
ALTER TABLE esua_epdc_news.epdc_notice ADD ALL_DEPT_IDS varchar(512) NULL COMMENT '所有部门ID'; |
|||
ALTER TABLE esua_epdc_news.epdc_notice ADD ALL_DEPT_NAMES varchar(512) NULL COMMENT '所有部门名称'; |
|||
|
|||
------------------------------------------2019-11-27----------------------------------------------- |
@ -0,0 +1,42 @@ |
|||
------------------------------------------2019-11-27----------------------------------------------- |
|||
ALTER TABLE esua_epdc_user.epdc_party_authentication_failed DROP COLUMN `STREET_NAME`; |
|||
ALTER TABLE esua_epdc_user.epdc_party_authentication_failed DROP COLUMN `STREET_ID`; |
|||
ALTER TABLE esua_epdc_user.epdc_party_authentication_failed DROP COLUMN `COMMUNITY_NAME`; |
|||
ALTER TABLE esua_epdc_user.epdc_party_authentication_failed DROP COLUMN `COMMUNITY_ID`; |
|||
ALTER TABLE esua_epdc_user.epdc_party_authentication_failed ADD PARENT_DEPT_IDS VARCHAR(512) NULL COMMENT '父所有部门'; |
|||
ALTER TABLE esua_epdc_user.epdc_party_authentication_failed ADD PARENT_DEPT_NAMES VARCHAR(512) NULL COMMENT '父所有部门'; |
|||
ALTER TABLE esua_epdc_user.epdc_party_authentication_failed ADD ALL_DEPT_IDS varchar(512) NULL COMMENT '所有部门ID'; |
|||
ALTER TABLE esua_epdc_user.epdc_party_authentication_failed ADD ALL_DEPT_NAMES varchar(512) NULL COMMENT '所有部门名称'; |
|||
|
|||
ALTER TABLE esua_epdc_user.epdc_party_members DROP COLUMN `STREET_NAME`; |
|||
ALTER TABLE esua_epdc_user.epdc_party_members DROP COLUMN `STREET_ID`; |
|||
ALTER TABLE esua_epdc_user.epdc_party_members DROP COLUMN `COMMUNITY_NAME`; |
|||
ALTER TABLE esua_epdc_user.epdc_party_members DROP COLUMN `COMMUNITY_ID`; |
|||
ALTER TABLE esua_epdc_user.epdc_party_members ADD PARENT_DEPT_IDS VARCHAR(512) NULL COMMENT '父所有部门'; |
|||
ALTER TABLE esua_epdc_user.epdc_party_members ADD PARENT_DEPT_NAMES VARCHAR(512) NULL COMMENT '父所有部门'; |
|||
ALTER TABLE esua_epdc_user.epdc_party_members ADD ALL_DEPT_IDS varchar(512) NULL COMMENT '所有部门ID'; |
|||
ALTER TABLE esua_epdc_user.epdc_party_members ADD ALL_DEPT_NAMES varchar(512) NULL COMMENT '所有部门名称'; |
|||
|
|||
ALTER TABLE esua_epdc_user.epdc_user DROP COLUMN `DISTRICT`; |
|||
ALTER TABLE esua_epdc_user.epdc_user DROP COLUMN `DISTRICT_ID`; |
|||
ALTER TABLE esua_epdc_user.epdc_user DROP COLUMN `STREET`; |
|||
ALTER TABLE esua_epdc_user.epdc_user DROP COLUMN `STREET_ID`; |
|||
ALTER TABLE esua_epdc_user.epdc_user DROP COLUMN `COMMUNITY`; |
|||
ALTER TABLE esua_epdc_user.epdc_user DROP COLUMN `COMMUNITY_ID`; |
|||
ALTER TABLE esua_epdc_user.epdc_user ADD PARENT_DEPT_IDS VARCHAR(512) NULL COMMENT '父所有部门'; |
|||
ALTER TABLE esua_epdc_user.epdc_user ADD PARENT_DEPT_NAMES VARCHAR(512) NULL COMMENT '父所有部门'; |
|||
ALTER TABLE esua_epdc_user.epdc_user ADD ALL_DEPT_IDS varchar(512) NULL COMMENT '所有部门ID'; |
|||
ALTER TABLE esua_epdc_user.epdc_user ADD ALL_DEPT_NAMES varchar(512) NULL COMMENT '所有部门名称'; |
|||
|
|||
ALTER TABLE esua_epdc_user.epdc_user_grid_relation DROP COLUMN `DISTRICT`; |
|||
ALTER TABLE esua_epdc_user.epdc_user_grid_relation DROP COLUMN `DISTRICT_ID`; |
|||
ALTER TABLE esua_epdc_user.epdc_user_grid_relation DROP COLUMN `STREET_ID`; |
|||
ALTER TABLE esua_epdc_user.epdc_user_grid_relation DROP COLUMN `STREET`; |
|||
ALTER TABLE esua_epdc_user.epdc_user_grid_relation DROP COLUMN `COMMUNITY`; |
|||
ALTER TABLE esua_epdc_user.epdc_user_grid_relation DROP COLUMN `COMMUNITY_ID`; |
|||
ALTER TABLE esua_epdc_user.epdc_user_grid_relation ADD PARENT_DEPT_IDS VARCHAR(512) NULL COMMENT '父所有部门'; |
|||
ALTER TABLE esua_epdc_user.epdc_user_grid_relation ADD PARENT_DEPT_NAMES VARCHAR(512) NULL COMMENT '父所有部门'; |
|||
ALTER TABLE esua_epdc_user.epdc_user_grid_relation ADD ALL_DEPT_IDS varchar(512) NULL COMMENT '所有部门ID'; |
|||
ALTER TABLE esua_epdc_user.epdc_user_grid_relation ADD ALL_DEPT_NAMES varchar(512) NULL COMMENT '所有部门名称'; |
|||
|
|||
------------------------------------------2019-11-27----------------------------------------------- |
@ -1,69 +0,0 @@ |
|||
<?xml version="1.0" encoding="UTF-8" standalone="yes"?> |
|||
<definitions xmlns="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:activiti="http://activiti.org/bpmn" 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:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" expressionLanguage="http://www.w3.org/1999/XPath" id="m1567478636229" name="" targetNamespace="http://www.activiti.org/testm1567478636229" typeLanguage="http://www.w3.org/2001/XMLSchema"> |
|||
<process id="demoTask" isClosed="false" isExecutable="true" name="测试任务流程" processType="None"> |
|||
<startEvent id="_2" name="StartEvent"/> |
|||
<endEvent id="_3" name="EndEvent"/> |
|||
<userTask activiti:assignee="${deptId}" activiti:exclusive="true" id="_4" name="初次审核"> |
|||
<extensionElements> |
|||
<activiti:executionListener event="end" expression="审核完成"/> |
|||
</extensionElements> |
|||
</userTask> |
|||
<userTask activiti:assignee="${deptId}" activiti:exclusive="true" id="_5" name="二次审核"> |
|||
<extensionElements> |
|||
<activiti:executionListener event="end" expression="审核完成"/> |
|||
</extensionElements> |
|||
</userTask> |
|||
<sequenceFlow id="_6" sourceRef="_2" targetRef="_4"/> |
|||
<sequenceFlow id="_7" sourceRef="_4" targetRef="_5"/> |
|||
<sequenceFlow id="_8" sourceRef="_5" targetRef="_3"/> |
|||
</process> |
|||
<bpmndi:BPMNDiagram documentation="background=#FFFFFF;count=1;horizontalcount=1;orientation=0;width=842.4;height=1195.2;imageableWidth=832.4;imageableHeight=1185.2;imageableX=5.0;imageableY=5.0" id="Diagram-_1" name="New Diagram"> |
|||
<bpmndi:BPMNPlane bpmnElement="demoTask"> |
|||
<bpmndi:BPMNShape bpmnElement="_2" id="Shape-_2"> |
|||
<dc:Bounds height="32.0" width="32.0" x="370.0" y="60.0"/> |
|||
<bpmndi:BPMNLabel> |
|||
<dc:Bounds height="32.0" width="32.0" x="0.0" y="0.0"/> |
|||
</bpmndi:BPMNLabel> |
|||
</bpmndi:BPMNShape> |
|||
<bpmndi:BPMNShape bpmnElement="_3" id="Shape-_3"> |
|||
<dc:Bounds height="32.0" width="32.0" x="375.0" y="640.0"/> |
|||
<bpmndi:BPMNLabel> |
|||
<dc:Bounds height="32.0" width="32.0" x="0.0" y="0.0"/> |
|||
</bpmndi:BPMNLabel> |
|||
</bpmndi:BPMNShape> |
|||
<bpmndi:BPMNShape bpmnElement="_4" id="Shape-_4"> |
|||
<dc:Bounds height="55.0" width="85.0" x="350.0" y="225.0"/> |
|||
<bpmndi:BPMNLabel> |
|||
<dc:Bounds height="55.0" width="85.0" x="0.0" y="0.0"/> |
|||
</bpmndi:BPMNLabel> |
|||
</bpmndi:BPMNShape> |
|||
<bpmndi:BPMNShape bpmnElement="_5" id="Shape-_5"> |
|||
<dc:Bounds height="55.0" width="85.0" x="355.0" y="415.0"/> |
|||
<bpmndi:BPMNLabel> |
|||
<dc:Bounds height="55.0" width="85.0" x="0.0" y="0.0"/> |
|||
</bpmndi:BPMNLabel> |
|||
</bpmndi:BPMNShape> |
|||
<bpmndi:BPMNEdge bpmnElement="_6" id="BPMNEdge__6" sourceElement="_2" targetElement="_4"> |
|||
<di:waypoint x="386.0" y="92.0"/> |
|||
<di:waypoint x="386.0" y="225.0"/> |
|||
<bpmndi:BPMNLabel> |
|||
<dc:Bounds height="0.0" width="0.0" x="0.0" y="0.0"/> |
|||
</bpmndi:BPMNLabel> |
|||
</bpmndi:BPMNEdge> |
|||
<bpmndi:BPMNEdge bpmnElement="_7" id="BPMNEdge__7" sourceElement="_4" targetElement="_5"> |
|||
<di:waypoint x="395.0" y="280.0"/> |
|||
<di:waypoint x="395.0" y="415.0"/> |
|||
<bpmndi:BPMNLabel> |
|||
<dc:Bounds height="0.0" width="0.0" x="0.0" y="0.0"/> |
|||
</bpmndi:BPMNLabel> |
|||
</bpmndi:BPMNEdge> |
|||
<bpmndi:BPMNEdge bpmnElement="_8" id="BPMNEdge__8" sourceElement="_5" targetElement="_3"> |
|||
<di:waypoint x="391.0" y="470.0"/> |
|||
<di:waypoint x="391.0" y="640.0"/> |
|||
<bpmndi:BPMNLabel> |
|||
<dc:Bounds height="0.0" width="0.0" x="0.0" y="0.0"/> |
|||
</bpmndi:BPMNLabel> |
|||
</bpmndi:BPMNEdge> |
|||
</bpmndi:BPMNPlane> |
|||
</bpmndi:BPMNDiagram> |
|||
</definitions> |
@ -1,50 +0,0 @@ |
|||
<?xml version="1.0" encoding="UTF-8" standalone="yes"?> |
|||
<definitions xmlns="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:activiti="http://activiti.org/bpmn" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlns:omgdc="http://www.omg.org/spec/DD/20100524/DC" xmlns:omgdi="http://www.omg.org/spec/DD/20100524/DI" xmlns:tns="http://www.activiti.org/test" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" expressionLanguage="http://www.w3.org/1999/XPath" id="m1566628843418" name="" targetNamespace="http://www.activiti.org/test" typeLanguage="http://www.w3.org/2001/XMLSchema"> |
|||
<process id="myProcess_1" isClosed="false" isExecutable="true" processType="None"> |
|||
<startEvent id="_2" name="testTaskStart"/> |
|||
<endEvent id="_6" name="testTaskEnd"/> |
|||
<userTask activiti:exclusive="true" id="_11" name="UserTask"> |
|||
<extensionElements> |
|||
<activiti:executionListener event="start" expression="test"/> |
|||
</extensionElements> |
|||
</userTask> |
|||
<sequenceFlow id="_13" sourceRef="_2" targetRef="_11"/> |
|||
<sequenceFlow id="_14" sourceRef="_11" targetRef="_6"/> |
|||
</process> |
|||
<bpmndi:BPMNDiagram 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" id="Diagram-_1" name="New Diagram"> |
|||
<bpmndi:BPMNPlane bpmnElement="myProcess_1"> |
|||
<bpmndi:BPMNShape bpmnElement="_2" id="Shape-_2"> |
|||
<omgdc:Bounds height="32.0" width="32.0" x="290.0" y="55.0"/> |
|||
<bpmndi:BPMNLabel> |
|||
<omgdc:Bounds height="32.0" width="32.0" x="0.0" y="0.0"/> |
|||
</bpmndi:BPMNLabel> |
|||
</bpmndi:BPMNShape> |
|||
<bpmndi:BPMNShape bpmnElement="_6" id="Shape-_6"> |
|||
<omgdc:Bounds height="32.0" width="32.0" x="285.0" y="515.0"/> |
|||
<bpmndi:BPMNLabel> |
|||
<omgdc:Bounds height="32.0" width="32.0" x="0.0" y="0.0"/> |
|||
</bpmndi:BPMNLabel> |
|||
</bpmndi:BPMNShape> |
|||
<bpmndi:BPMNShape bpmnElement="_11" id="Shape-_11"> |
|||
<omgdc:Bounds height="55.0" width="85.0" x="530.0" y="240.0"/> |
|||
<bpmndi:BPMNLabel> |
|||
<omgdc:Bounds height="55.0" width="85.0" x="0.0" y="0.0"/> |
|||
</bpmndi:BPMNLabel> |
|||
</bpmndi:BPMNShape> |
|||
<bpmndi:BPMNEdge bpmnElement="_13" id="BPMNEdge__13" sourceElement="_2" targetElement="_11"> |
|||
<omgdi:waypoint x="322.0" y="71.0"/> |
|||
<omgdi:waypoint x="530.0" y="267.5"/> |
|||
<bpmndi:BPMNLabel> |
|||
<omgdc:Bounds height="0.0" width="0.0" x="0.0" y="0.0"/> |
|||
</bpmndi:BPMNLabel> |
|||
</bpmndi:BPMNEdge> |
|||
<bpmndi:BPMNEdge bpmnElement="_14" id="BPMNEdge__14" sourceElement="_11" targetElement="_6"> |
|||
<omgdi:waypoint x="530.0" y="267.5"/> |
|||
<omgdi:waypoint x="317.0" y="531.0"/> |
|||
<bpmndi:BPMNLabel> |
|||
<omgdc:Bounds height="0.0" width="0.0" x="0.0" y="0.0"/> |
|||
</bpmndi:BPMNLabel> |
|||
</bpmndi:BPMNEdge> |
|||
</bpmndi:BPMNPlane> |
|||
</bpmndi:BPMNDiagram> |
|||
</definitions> |
@ -1,66 +0,0 @@ |
|||
package com.elink.esua.epdc.controller; |
|||
|
|||
import com.elink.esua.epdc.commons.tools.annotation.LogOperation; |
|||
import com.elink.esua.epdc.commons.tools.constant.Constant; |
|||
import com.elink.esua.epdc.commons.tools.page.PageData; |
|||
import com.elink.esua.epdc.commons.tools.utils.Result; |
|||
import com.elink.esua.epdc.dto.form.ActGroupFormDto; |
|||
import com.elink.esua.epdc.dto.form.ActUserFormDto; |
|||
import com.elink.esua.epdc.exception.ModuleErrorCode; |
|||
import com.elink.esua.epdc.service.ActIdService; |
|||
import com.elink.esua.epdc.service.ActProcessService; |
|||
import io.swagger.annotations.Api; |
|||
import io.swagger.annotations.ApiImplicitParam; |
|||
import io.swagger.annotations.ApiImplicitParams; |
|||
import io.swagger.annotations.ApiOperation; |
|||
import org.apache.commons.io.IOUtils; |
|||
import org.springframework.beans.factory.annotation.Autowired; |
|||
import org.springframework.web.bind.annotation.*; |
|||
import org.springframework.web.multipart.MultipartFile; |
|||
import springfox.documentation.annotations.ApiIgnore; |
|||
|
|||
import javax.servlet.http.HttpServletResponse; |
|||
import java.io.IOException; |
|||
import java.io.InputStream; |
|||
import java.util.Map; |
|||
|
|||
/** |
|||
* 用户和用户组控制类 |
|||
* |
|||
* @author rongchao |
|||
* @Date 19-9-6 |
|||
*/ |
|||
@RestController |
|||
@RequestMapping("actId") |
|||
public class ActIdController { |
|||
|
|||
@Autowired |
|||
private ActIdService actIdService; |
|||
|
|||
/** |
|||
* 添加流程用户 |
|||
* |
|||
* @param actUserFormDto |
|||
* @return com.elink.esua.epdc.commons.tools.utils.Result<java.lang.String> |
|||
* @author rongchao |
|||
* @since 2019-09-06 |
|||
*/ |
|||
@PostMapping("addUser") |
|||
public Result<String> addUser(ActUserFormDto actUserFormDto) { |
|||
return actIdService.saveUser(actUserFormDto); |
|||
} |
|||
|
|||
/** |
|||
* 添加用户组 |
|||
* |
|||
* @param actGroupFormDto |
|||
* @return com.elink.esua.epdc.commons.tools.utils.Result<java.lang.String> |
|||
* @author rongchao |
|||
* @since 2019-09-06 |
|||
*/ |
|||
@PostMapping("addGroup") |
|||
public Result<String> addGroup(ActGroupFormDto actGroupFormDto) { |
|||
return actIdService.saveGroup(actGroupFormDto); |
|||
} |
|||
|
|||
} |
@ -0,0 +1,92 @@ |
|||
/** |
|||
* Copyright (c) 2018 人人开源 All rights reserved. |
|||
* |
|||
* https://www.renren.io
|
|||
* |
|||
* 版权所有,侵权必究! |
|||
*/ |
|||
|
|||
package com.elink.esua.epdc.controller; |
|||
|
|||
import com.elink.esua.epdc.commons.tools.annotation.LogOperation; |
|||
import com.elink.esua.epdc.commons.tools.constant.Constant; |
|||
import com.elink.esua.epdc.commons.tools.page.PageData; |
|||
import com.elink.esua.epdc.commons.tools.utils.Result; |
|||
import com.elink.esua.epdc.commons.tools.validator.ValidatorUtils; |
|||
import com.elink.esua.epdc.dto.ModelDTO; |
|||
import com.elink.esua.epdc.service.ActModelService; |
|||
import io.swagger.annotations.Api; |
|||
import io.swagger.annotations.ApiImplicitParam; |
|||
import io.swagger.annotations.ApiImplicitParams; |
|||
import io.swagger.annotations.ApiOperation; |
|||
import org.activiti.engine.repository.Model; |
|||
import org.springframework.beans.factory.annotation.Autowired; |
|||
import org.springframework.web.bind.annotation.*; |
|||
import springfox.documentation.annotations.ApiIgnore; |
|||
|
|||
import javax.servlet.http.HttpServletResponse; |
|||
import java.util.Map; |
|||
|
|||
/** |
|||
* 模型管理 |
|||
* |
|||
* @author Mark sunlightcs@gmail.com |
|||
*/ |
|||
@RestController |
|||
@RequestMapping("model") |
|||
@Api(tags="模型管理") |
|||
public class ActModelController { |
|||
@Autowired |
|||
private ActModelService actModelService; |
|||
|
|||
@GetMapping("page") |
|||
@ApiOperation("分页") |
|||
@ApiImplicitParams({ |
|||
@ApiImplicitParam(name = Constant.PAGE, value = "当前页码,从1开始", paramType = "query", required = true, dataType="int") , |
|||
@ApiImplicitParam(name = Constant.LIMIT, value = "每页显示记录数", paramType = "query",required = true, dataType="int") , |
|||
@ApiImplicitParam(name = "key", value = "key", paramType = "query", dataType="String"), |
|||
@ApiImplicitParam(name = "name", value = "name", paramType = "query", dataType="String") |
|||
}) |
|||
public Result<PageData<Model>> page(@ApiIgnore @RequestParam Map<String, Object> params){ |
|||
PageData<Model> page = actModelService.page(params); |
|||
|
|||
return new Result<PageData<Model>>().ok(page); |
|||
} |
|||
|
|||
@PostMapping |
|||
@ApiOperation("新增模型") |
|||
@LogOperation("新增模型") |
|||
public Result save(@RequestBody ModelDTO dto) throws Exception{ |
|||
//效验数据
|
|||
ValidatorUtils.validateEntity(dto); |
|||
|
|||
actModelService.save(dto.getName(), dto.getKey(), dto.getDescription()); |
|||
|
|||
return new Result(); |
|||
} |
|||
|
|||
@PostMapping("deploy/{id}") |
|||
@ApiOperation("部署") |
|||
@LogOperation("部署") |
|||
public Result deploy(@PathVariable("id") String id) { |
|||
actModelService.deploy(id); |
|||
return new Result(); |
|||
} |
|||
|
|||
@GetMapping("export/{id}") |
|||
@ApiOperation("导出") |
|||
@LogOperation("导出") |
|||
public void export(@PathVariable("id") String id, @ApiIgnore HttpServletResponse response) { |
|||
actModelService.export(id, response); |
|||
} |
|||
|
|||
@DeleteMapping |
|||
@ApiOperation("删除") |
|||
@LogOperation("删除") |
|||
public Result delete(@RequestBody String[] ids) { |
|||
for(String id : ids) { |
|||
actModelService.delete(id); |
|||
} |
|||
return new Result(); |
|||
} |
|||
} |
@ -1,23 +0,0 @@ |
|||
package com.elink.esua.epdc.dto.form; |
|||
|
|||
import lombok.Data; |
|||
|
|||
/** |
|||
* 流程用户组表单DTO |
|||
* |
|||
* @author rongchao |
|||
* @Date 19-9-6 |
|||
*/ |
|||
@Data |
|||
public class ActGroupFormDto { |
|||
|
|||
/** |
|||
* 用户组ID |
|||
*/ |
|||
private long groupId; |
|||
|
|||
/** |
|||
* 用户组名 |
|||
*/ |
|||
private String groupName; |
|||
} |
@ -1,23 +0,0 @@ |
|||
package com.elink.esua.epdc.dto.form; |
|||
|
|||
import lombok.Data; |
|||
|
|||
/** |
|||
* 流程用户表单DTO |
|||
* |
|||
* @author rongchao |
|||
* @Date 19-9-6 |
|||
*/ |
|||
@Data |
|||
public class ActUserFormDto { |
|||
|
|||
/** |
|||
* 用户ID |
|||
*/ |
|||
private long userId; |
|||
|
|||
/** |
|||
* 用户名 |
|||
*/ |
|||
private String userName; |
|||
} |
@ -0,0 +1,38 @@ |
|||
/** |
|||
* Copyright (c) 2018 人人开源 All rights reserved. |
|||
* |
|||
* https://www.renren.io
|
|||
* |
|||
* 版权所有,侵权必究! |
|||
*/ |
|||
|
|||
package com.elink.esua.epdc.editor.main; |
|||
|
|||
import org.activiti.engine.ActivitiException; |
|||
import org.apache.commons.io.IOUtils; |
|||
import org.springframework.web.bind.annotation.RequestMapping; |
|||
import org.springframework.web.bind.annotation.RequestMethod; |
|||
import org.springframework.web.bind.annotation.ResponseBody; |
|||
import org.springframework.web.bind.annotation.RestController; |
|||
|
|||
import java.io.InputStream; |
|||
|
|||
/** |
|||
* Stencilset |
|||
* |
|||
* @author Mark sunlightcs@gmail.com |
|||
*/ |
|||
@RestController |
|||
@RequestMapping("service") |
|||
public class StencilsetRestResource { |
|||
|
|||
@RequestMapping(value="/editor/stencilset", method = RequestMethod.GET, produces = "application/json;charset=utf-8") |
|||
public @ResponseBody String getStencilset() { |
|||
InputStream stencilsetStream = this.getClass().getClassLoader().getResourceAsStream("stencilset.json"); |
|||
try { |
|||
return IOUtils.toString(stencilsetStream, "utf-8"); |
|||
} catch (Exception e) { |
|||
throw new ActivitiException("Error while loading stencil set", e); |
|||
} |
|||
} |
|||
} |
@ -0,0 +1,69 @@ |
|||
/** |
|||
* Copyright (c) 2018 人人开源 All rights reserved. |
|||
* <p> |
|||
* https://www.renren.io
|
|||
* <p> |
|||
* 版权所有,侵权必究! |
|||
*/ |
|||
|
|||
package com.elink.esua.epdc.editor.model; |
|||
|
|||
import com.fasterxml.jackson.databind.ObjectMapper; |
|||
import com.fasterxml.jackson.databind.node.ObjectNode; |
|||
import org.activiti.editor.constants.ModelDataJsonConstants; |
|||
import org.activiti.engine.ActivitiException; |
|||
import org.activiti.engine.RepositoryService; |
|||
import org.activiti.engine.repository.Model; |
|||
import org.apache.commons.lang3.StringUtils; |
|||
import org.slf4j.Logger; |
|||
import org.slf4j.LoggerFactory; |
|||
import org.springframework.beans.factory.annotation.Autowired; |
|||
import org.springframework.web.bind.annotation.PathVariable; |
|||
import org.springframework.web.bind.annotation.RequestMapping; |
|||
import org.springframework.web.bind.annotation.RequestMethod; |
|||
import org.springframework.web.bind.annotation.RestController; |
|||
|
|||
/** |
|||
* Model Editor |
|||
* |
|||
* @author Mark sunlightcs@gmail.com |
|||
*/ |
|||
@RestController |
|||
@RequestMapping("service") |
|||
public class ModelEditorJsonRestResource implements ModelDataJsonConstants { |
|||
|
|||
protected static final Logger LOGGER = LoggerFactory.getLogger(ModelEditorJsonRestResource.class); |
|||
|
|||
@Autowired |
|||
private RepositoryService repositoryService; |
|||
|
|||
@Autowired |
|||
private ObjectMapper objectMapper; |
|||
|
|||
@RequestMapping(value = "/model/{modelId}/json", method = RequestMethod.GET, produces = "application/json") |
|||
public ObjectNode getEditorJson(@PathVariable String modelId) { |
|||
ObjectNode modelNode = null; |
|||
|
|||
Model model = repositoryService.getModel(modelId); |
|||
|
|||
if (model != null) { |
|||
try { |
|||
if (StringUtils.isNotEmpty(model.getMetaInfo())) { |
|||
modelNode = (ObjectNode) objectMapper.readTree(model.getMetaInfo()); |
|||
} else { |
|||
modelNode = objectMapper.createObjectNode(); |
|||
modelNode.put(MODEL_NAME, model.getName()); |
|||
} |
|||
modelNode.put(MODEL_ID, model.getId()); |
|||
ObjectNode editorJsonNode = (ObjectNode) objectMapper.readTree( |
|||
new String(repositoryService.getModelEditorSource(model.getId()), "utf-8")); |
|||
modelNode.set("model", editorJsonNode); |
|||
|
|||
} catch (Exception e) { |
|||
LOGGER.error("Error creating model JSON", e); |
|||
throw new ActivitiException("Error creating model JSON", e); |
|||
} |
|||
} |
|||
return modelNode; |
|||
} |
|||
} |
@ -0,0 +1,90 @@ |
|||
/** |
|||
* Copyright (c) 2018 人人开源 All rights reserved. |
|||
* <p> |
|||
* https://www.renren.io
|
|||
* <p> |
|||
* 版权所有,侵权必究! |
|||
*/ |
|||
|
|||
package com.elink.esua.epdc.editor.model; |
|||
|
|||
import com.elink.esua.epdc.commons.tools.xss.XssHttpServletRequestWrapper; |
|||
import com.fasterxml.jackson.databind.ObjectMapper; |
|||
import com.fasterxml.jackson.databind.node.ObjectNode; |
|||
import org.activiti.editor.constants.ModelDataJsonConstants; |
|||
import org.activiti.engine.ActivitiException; |
|||
import org.activiti.engine.RepositoryService; |
|||
import org.activiti.engine.repository.Model; |
|||
import org.apache.batik.transcoder.TranscoderInput; |
|||
import org.apache.batik.transcoder.TranscoderOutput; |
|||
import org.apache.batik.transcoder.image.PNGTranscoder; |
|||
import org.slf4j.Logger; |
|||
import org.slf4j.LoggerFactory; |
|||
import org.springframework.beans.factory.annotation.Autowired; |
|||
import org.springframework.http.HttpStatus; |
|||
import org.springframework.web.bind.annotation.*; |
|||
|
|||
import javax.servlet.http.HttpServletRequest; |
|||
import java.io.ByteArrayInputStream; |
|||
import java.io.ByteArrayOutputStream; |
|||
import java.io.InputStream; |
|||
|
|||
/** |
|||
* Model Rest |
|||
* |
|||
* @author Mark sunlightcs@gmail.com |
|||
*/ |
|||
@RestController |
|||
@RequestMapping("service") |
|||
public class ModelSaveRestResource implements ModelDataJsonConstants { |
|||
protected static final Logger LOGGER = LoggerFactory.getLogger(ModelSaveRestResource.class); |
|||
|
|||
@Autowired |
|||
private RepositoryService repositoryService; |
|||
@Autowired |
|||
private ObjectMapper objectMapper; |
|||
|
|||
@RequestMapping(value = "/model/{modelId}/save", method = RequestMethod.PUT) |
|||
@ResponseStatus(value = HttpStatus.OK) |
|||
public void saveModel(@PathVariable String modelId, HttpServletRequest request) { |
|||
try { |
|||
HttpServletRequest orgRequest = XssHttpServletRequestWrapper.getOrgRequest(request); |
|||
String name = orgRequest.getParameter("name"); |
|||
String description = orgRequest.getParameter("description"); |
|||
String jsonXml = orgRequest.getParameter("json_xml"); |
|||
String svgXml = orgRequest.getParameter("svg_xml"); |
|||
|
|||
Model model = repositoryService.getModel(modelId); |
|||
|
|||
ObjectNode modelJson = (ObjectNode) objectMapper.readTree(model.getMetaInfo()); |
|||
|
|||
modelJson.put(MODEL_NAME, name); |
|||
modelJson.put(MODEL_DESCRIPTION, description); |
|||
model.setMetaInfo(modelJson.toString()); |
|||
model.setName(name); |
|||
|
|||
repositoryService.saveModel(model); |
|||
|
|||
repositoryService.addModelEditorSource(model.getId(), jsonXml.getBytes("utf-8")); |
|||
|
|||
InputStream svgStream = new ByteArrayInputStream(svgXml.getBytes("utf-8")); |
|||
TranscoderInput input = new TranscoderInput(svgStream); |
|||
|
|||
PNGTranscoder transcoder = new PNGTranscoder(); |
|||
// Setup output
|
|||
ByteArrayOutputStream outStream = new ByteArrayOutputStream(); |
|||
TranscoderOutput output = new TranscoderOutput(outStream); |
|||
|
|||
// Do the transformation
|
|||
transcoder.transcode(input, output); |
|||
final byte[] result = outStream.toByteArray(); |
|||
repositoryService.addModelEditorSourceExtra(model.getId(), result); |
|||
outStream.close(); |
|||
|
|||
} catch (Exception e) { |
|||
LOGGER.error("Error saving model", e); |
|||
throw new ActivitiException("Error saving model", e); |
|||
} |
|||
} |
|||
|
|||
} |
@ -1,45 +0,0 @@ |
|||
package com.elink.esua.epdc.service; |
|||
|
|||
import com.elink.esua.epdc.commons.tools.utils.Result; |
|||
import com.elink.esua.epdc.dto.form.ActGroupFormDto; |
|||
import com.elink.esua.epdc.dto.form.ActUserFormDto; |
|||
|
|||
/** |
|||
* 流程用户服务接口类 |
|||
* |
|||
* @author rongchao |
|||
* @Date 19-9-6 |
|||
*/ |
|||
public interface ActIdService { |
|||
|
|||
/** |
|||
* 添加用户 |
|||
* |
|||
* @param actUserFormDto 用户名 |
|||
* @return boolean |
|||
* @author rongchao |
|||
* @since 2019-09-06 |
|||
*/ |
|||
Result<String> saveUser(ActUserFormDto actUserFormDto); |
|||
|
|||
/** |
|||
* 添加用户组 |
|||
* |
|||
* @param actGroupFormDto 用户组名 |
|||
* @return boolean |
|||
* @author rongchao |
|||
* @since 2019-09-06 |
|||
*/ |
|||
Result<String> saveGroup(ActGroupFormDto actGroupFormDto); |
|||
|
|||
/** |
|||
* 修改用户组名 |
|||
* |
|||
* @param newGroupName |
|||
* @return boolean |
|||
* @author rongchao |
|||
* @since 2019-09-06 |
|||
*/ |
|||
Result<String> modifyGroupName(String newGroupName); |
|||
|
|||
} |
@ -1,24 +0,0 @@ |
|||
package com.elink.esua.epdc.service; |
|||
|
|||
/** |
|||
* activiti工作流 |
|||
* |
|||
* @author yujintao |
|||
* @email yujintao@elink-cn.com |
|||
* @date 2019/9/3 11:18 |
|||
*/ |
|||
public interface ActWorkflowCommonService { |
|||
|
|||
/** |
|||
* 启动流程并绑定任务 |
|||
* |
|||
* @param processKey 流程ID |
|||
* @param businessKey 任务ID |
|||
* @param deptId 部门ID(通过部门ID,判断是否有权限审核任务) |
|||
* @return boolean |
|||
* @author yujintao |
|||
* @date 2019/9/3 13:58 |
|||
*/ |
|||
boolean startProcess(String processKey, String businessKey, String deptId); |
|||
|
|||
} |
@ -1,37 +0,0 @@ |
|||
package com.elink.esua.epdc.service.impl; |
|||
|
|||
import com.elink.esua.epdc.commons.tools.utils.Result; |
|||
import com.elink.esua.epdc.dto.form.ActGroupFormDto; |
|||
import com.elink.esua.epdc.dto.form.ActUserFormDto; |
|||
import com.elink.esua.epdc.service.ActIdService; |
|||
import org.activiti.engine.IdentityService; |
|||
import org.springframework.beans.factory.annotation.Autowired; |
|||
import org.springframework.stereotype.Service; |
|||
|
|||
/** |
|||
* 流程用户服务实现类 |
|||
* |
|||
* @author rongchao |
|||
* @Date 19-9-6 |
|||
*/ |
|||
@Service |
|||
public class ActIdServiceImpl implements ActIdService { |
|||
|
|||
@Autowired |
|||
private IdentityService identityService; |
|||
|
|||
@Override |
|||
public Result<String> saveUser(ActUserFormDto actUserFormDto) { |
|||
return null; |
|||
} |
|||
|
|||
@Override |
|||
public Result<String> saveGroup(ActGroupFormDto actGroupFormDto) { |
|||
return null; |
|||
} |
|||
|
|||
@Override |
|||
public Result<String> modifyGroupName(String newGroupName) { |
|||
return new Result<String>().ok("success"); |
|||
} |
|||
} |
@ -1,50 +0,0 @@ |
|||
package com.elink.esua.epdc.service.impl; |
|||
|
|||
import com.elink.esua.epdc.service.ActWorkflowCommonService; |
|||
import com.google.common.collect.Maps; |
|||
import org.activiti.engine.HistoryService; |
|||
import org.activiti.engine.RepositoryService; |
|||
import org.activiti.engine.RuntimeService; |
|||
import org.activiti.engine.TaskService; |
|||
import org.activiti.engine.runtime.ProcessInstance; |
|||
import org.springframework.beans.factory.annotation.Autowired; |
|||
import org.springframework.stereotype.Service; |
|||
import org.springframework.web.context.ContextLoader; |
|||
import org.springframework.web.context.WebApplicationContext; |
|||
|
|||
import java.util.HashMap; |
|||
import java.util.Map; |
|||
|
|||
|
|||
/** |
|||
* @author yujintao |
|||
* @email yujintao@elink-cn.com |
|||
* @date 2019/9/3 11:19 |
|||
*/ |
|||
@Service |
|||
public class ActWorkflowCommonServiceImpl implements ActWorkflowCommonService { |
|||
|
|||
@Autowired |
|||
private RepositoryService repositoryService; |
|||
|
|||
@Autowired |
|||
private RuntimeService runtimeService; |
|||
|
|||
@Autowired |
|||
private TaskService taskService; |
|||
|
|||
@Autowired |
|||
private HistoryService historyService; |
|||
|
|||
@Override |
|||
public boolean startProcess(String processKey, String businessKey, String deptId) { |
|||
Map<String, Object> map = Maps.newHashMap(); |
|||
map.put("deptId", deptId); |
|||
map.put("activityId", "_2"); |
|||
//使用正在执行对象表中的一个字段BUSINESS_KEY(Activiti提供的一个字段),让启动的流程(流程实例)关联业务
|
|||
runtimeService.startProcessInstanceByKey(processKey, businessKey, map); |
|||
return true; |
|||
} |
|||
|
|||
|
|||
} |
Before Width: | Height: | Size: 4.2 KiB |
Before Width: | Height: | Size: 3.3 KiB After Width: | Height: | Size: 3.3 KiB |
Before Width: | Height: | Size: 580 B After Width: | Height: | Size: 580 B |
Before Width: | Height: | Size: 108 B After Width: | Height: | Size: 108 B |
Before Width: | Height: | Size: 438 B After Width: | Height: | Size: 438 B |
Before Width: | Height: | Size: 227 B After Width: | Height: | Size: 227 B |
Before Width: | Height: | Size: 1.3 KiB After Width: | Height: | Size: 1.3 KiB |
Before Width: | Height: | Size: 830 B After Width: | Height: | Size: 830 B |
Before Width: | Height: | Size: 3.2 KiB After Width: | Height: | Size: 3.2 KiB |
Before Width: | Height: | Size: 410 B After Width: | Height: | Size: 410 B |
Before Width: | Height: | Size: 367 B After Width: | Height: | Size: 367 B |
Before Width: | Height: | Size: 344 B After Width: | Height: | Size: 344 B |
Before Width: | Height: | Size: 601 B After Width: | Height: | Size: 601 B |
Before Width: | Height: | Size: 361 B After Width: | Height: | Size: 361 B |
Before Width: | Height: | Size: 1.4 KiB After Width: | Height: | Size: 1.4 KiB |
Before Width: | Height: | Size: 953 B After Width: | Height: | Size: 953 B |
Before Width: | Height: | Size: 687 B After Width: | Height: | Size: 687 B |
Before Width: | Height: | Size: 6.1 KiB After Width: | Height: | Size: 6.1 KiB |
Before Width: | Height: | Size: 775 B After Width: | Height: | Size: 775 B |