Merge branch 'master' of http://git.homecommunity.cn/supervip/MicroCommunity
| | |
| | | package com.java110.dto.oaWorkflow; |
| | | |
| | | import com.java110.dto.PageDto; |
| | | |
| | | import java.io.Serializable; |
| | | import java.util.Date; |
| | | |
| | |
| | | **/ |
| | | public class OaWorkflowDto extends PageDto implements Serializable { |
| | | |
| | | public static final String STATE_WAIT = "W";//待部署 |
| | | public static final String STATE_COMPLAINT = "C";//部署完成 |
| | | |
| | | private String describle; |
| | | private String modelId; |
| | | private String flowKey; |
| | | private String storeId; |
| | | private String flowId; |
| | | private String flowName; |
| | | private String flowType; |
| | | private String processDefinitionKey; |
| | | private String modelId; |
| | | private String flowKey; |
| | | private String storeId; |
| | | private String flowId; |
| | | private String flowName; |
| | | private String flowType; |
| | | private String processDefinitionKey; |
| | | private String state; |
| | | |
| | | |
| | | private Date createTime; |
| | |
| | | public String getDescrible() { |
| | | return describle; |
| | | } |
| | | public void setDescrible(String describle) { |
| | | |
| | | public void setDescrible(String describle) { |
| | | this.describle = describle; |
| | | } |
| | | public String getModelId() { |
| | | |
| | | public String getModelId() { |
| | | return modelId; |
| | | } |
| | | public void setModelId(String modelId) { |
| | | |
| | | public void setModelId(String modelId) { |
| | | this.modelId = modelId; |
| | | } |
| | | public String getFlowKey() { |
| | | |
| | | public String getFlowKey() { |
| | | return flowKey; |
| | | } |
| | | public void setFlowKey(String flowKey) { |
| | | |
| | | public void setFlowKey(String flowKey) { |
| | | this.flowKey = flowKey; |
| | | } |
| | | public String getStoreId() { |
| | | |
| | | public String getStoreId() { |
| | | return storeId; |
| | | } |
| | | public void setStoreId(String storeId) { |
| | | |
| | | public void setStoreId(String storeId) { |
| | | this.storeId = storeId; |
| | | } |
| | | public String getFlowId() { |
| | | |
| | | public String getFlowId() { |
| | | return flowId; |
| | | } |
| | | public void setFlowId(String flowId) { |
| | | |
| | | public void setFlowId(String flowId) { |
| | | this.flowId = flowId; |
| | | } |
| | | public String getFlowName() { |
| | | |
| | | public String getFlowName() { |
| | | return flowName; |
| | | } |
| | | public void setFlowName(String flowName) { |
| | | |
| | | public void setFlowName(String flowName) { |
| | | this.flowName = flowName; |
| | | } |
| | | public String getFlowType() { |
| | | |
| | | public String getFlowType() { |
| | | return flowType; |
| | | } |
| | | public void setFlowType(String flowType) { |
| | | |
| | | public void setFlowType(String flowType) { |
| | | this.flowType = flowType; |
| | | } |
| | | public String getProcessDefinitionKey() { |
| | | |
| | | public String getProcessDefinitionKey() { |
| | | return processDefinitionKey; |
| | | } |
| | | public void setProcessDefinitionKey(String processDefinitionKey) { |
| | | |
| | | public void setProcessDefinitionKey(String processDefinitionKey) { |
| | | this.processDefinitionKey = processDefinitionKey; |
| | | } |
| | | |
| | |
| | | public void setStatusCd(String statusCd) { |
| | | this.statusCd = statusCd; |
| | | } |
| | | |
| | | public String getState() { |
| | | return state; |
| | | } |
| | | |
| | | public void setState(String state) { |
| | | this.state = state; |
| | | } |
| | | } |
| New file |
| | |
| | | package com.java110.dto.oaWorkflowXml; |
| | | |
| | | import com.java110.dto.PageDto; |
| | | |
| | | import java.io.Serializable; |
| | | import java.util.Date; |
| | | |
| | | /** |
| | | * @ClassName FloorDto |
| | | * @Description OA流程图数据层封装 |
| | | * @Author wuxw |
| | | * @Date 2019/4/24 8:52 |
| | | * @Version 1.0 |
| | | * add by wuxw 2019/4/24 |
| | | **/ |
| | | public class OaWorkflowXmlDto extends PageDto implements Serializable { |
| | | |
| | | private String xmlId; |
| | | private String storeId; |
| | | private String bpmnXml; |
| | | private String flowId; |
| | | private String svgXml; |
| | | |
| | | |
| | | private Date createTime; |
| | | |
| | | private String statusCd = "0"; |
| | | |
| | | |
| | | public String getXmlId() { |
| | | return xmlId; |
| | | } |
| | | |
| | | public void setXmlId(String xmlId) { |
| | | this.xmlId = xmlId; |
| | | } |
| | | |
| | | public String getStoreId() { |
| | | return storeId; |
| | | } |
| | | |
| | | public void setStoreId(String storeId) { |
| | | this.storeId = storeId; |
| | | } |
| | | |
| | | public String getBpmnXml() { |
| | | return bpmnXml; |
| | | } |
| | | |
| | | public void setBpmnXml(String bpmnXml) { |
| | | this.bpmnXml = bpmnXml; |
| | | } |
| | | |
| | | public String getFlowId() { |
| | | return flowId; |
| | | } |
| | | |
| | | public void setFlowId(String flowId) { |
| | | this.flowId = flowId; |
| | | } |
| | | |
| | | public String getSvgXml() { |
| | | return svgXml; |
| | | } |
| | | |
| | | public void setSvgXml(String svgXml) { |
| | | this.svgXml = svgXml; |
| | | } |
| | | |
| | | |
| | | public Date getCreateTime() { |
| | | return createTime; |
| | | } |
| | | |
| | | public void setCreateTime(Date createTime) { |
| | | this.createTime = createTime; |
| | | } |
| | | |
| | | public String getStatusCd() { |
| | | return statusCd; |
| | | } |
| | | |
| | | public void setStatusCd(String statusCd) { |
| | | this.statusCd = statusCd; |
| | | } |
| | | } |
| | |
| | | **/ |
| | | public class WorkflowModelDto implements Serializable { |
| | | |
| | | private String flowId; |
| | | |
| | | private String name; |
| | | |
| | | private String key; |
| | |
| | | private String description; |
| | | private String json_xml; |
| | | private String svg_xml; |
| | | private String storeId; |
| | | |
| | | private String deploymentId; |
| | | |
| | |
| | | public void setDeploymentId(String deploymentId) { |
| | | this.deploymentId = deploymentId; |
| | | } |
| | | |
| | | public String getFlowId() { |
| | | return flowId; |
| | | } |
| | | |
| | | public void setFlowId(String flowId) { |
| | | this.flowId = flowId; |
| | | } |
| | | |
| | | public String getStoreId() { |
| | | return storeId; |
| | | } |
| | | |
| | | public void setStoreId(String storeId) { |
| | | this.storeId = storeId; |
| | | } |
| | | } |
| | |
| | | package com.java110.po.oaWorkflow; |
| | | |
| | | import java.io.Serializable; |
| | | import java.util.Date; |
| | | |
| | | public class OaWorkflowPo implements Serializable { |
| | | |
| | | private String describle; |
| | | private String modelId; |
| | | private String statusCd = "0"; |
| | | private String flowKey; |
| | | private String storeId; |
| | | private String flowId; |
| | | private String flowName; |
| | | private String flowType; |
| | | private String processDefinitionKey; |
| | | public String getDescrible() { |
| | | private String modelId; |
| | | private String statusCd = "0"; |
| | | private String flowKey; |
| | | private String storeId; |
| | | private String flowId; |
| | | private String flowName; |
| | | private String flowType; |
| | | private String state; |
| | | private String processDefinitionKey; |
| | | |
| | | public String getDescrible() { |
| | | return describle; |
| | | } |
| | | public void setDescrible(String describle) { |
| | | |
| | | public void setDescrible(String describle) { |
| | | this.describle = describle; |
| | | } |
| | | public String getModelId() { |
| | | |
| | | public String getModelId() { |
| | | return modelId; |
| | | } |
| | | public void setModelId(String modelId) { |
| | | |
| | | public void setModelId(String modelId) { |
| | | this.modelId = modelId; |
| | | } |
| | | public String getStatusCd() { |
| | | |
| | | public String getStatusCd() { |
| | | return statusCd; |
| | | } |
| | | public void setStatusCd(String statusCd) { |
| | | |
| | | public void setStatusCd(String statusCd) { |
| | | this.statusCd = statusCd; |
| | | } |
| | | public String getFlowKey() { |
| | | |
| | | public String getFlowKey() { |
| | | return flowKey; |
| | | } |
| | | public void setFlowKey(String flowKey) { |
| | | |
| | | public void setFlowKey(String flowKey) { |
| | | this.flowKey = flowKey; |
| | | } |
| | | public String getStoreId() { |
| | | |
| | | public String getStoreId() { |
| | | return storeId; |
| | | } |
| | | public void setStoreId(String storeId) { |
| | | |
| | | public void setStoreId(String storeId) { |
| | | this.storeId = storeId; |
| | | } |
| | | public String getFlowId() { |
| | | |
| | | public String getFlowId() { |
| | | return flowId; |
| | | } |
| | | public void setFlowId(String flowId) { |
| | | |
| | | public void setFlowId(String flowId) { |
| | | this.flowId = flowId; |
| | | } |
| | | public String getFlowName() { |
| | | |
| | | public String getFlowName() { |
| | | return flowName; |
| | | } |
| | | public void setFlowName(String flowName) { |
| | | |
| | | public void setFlowName(String flowName) { |
| | | this.flowName = flowName; |
| | | } |
| | | public String getFlowType() { |
| | | |
| | | public String getFlowType() { |
| | | return flowType; |
| | | } |
| | | public void setFlowType(String flowType) { |
| | | |
| | | public void setFlowType(String flowType) { |
| | | this.flowType = flowType; |
| | | } |
| | | public String getProcessDefinitionKey() { |
| | | |
| | | public String getProcessDefinitionKey() { |
| | | return processDefinitionKey; |
| | | } |
| | | public void setProcessDefinitionKey(String processDefinitionKey) { |
| | | |
| | | public void setProcessDefinitionKey(String processDefinitionKey) { |
| | | this.processDefinitionKey = processDefinitionKey; |
| | | } |
| | | |
| | | public String getState() { |
| | | return state; |
| | | } |
| | | |
| | | |
| | | public void setState(String state) { |
| | | this.state = state; |
| | | } |
| | | } |
| New file |
| | |
| | | package com.java110.po.oaWorkflowXml; |
| | | |
| | | import java.io.Serializable; |
| | | import java.util.Date; |
| | | |
| | | public class OaWorkflowXmlPo implements Serializable { |
| | | |
| | | private String statusCd = "0"; |
| | | private String xmlId; |
| | | private String storeId; |
| | | private String bpmnXml; |
| | | private String flowId; |
| | | private String svgXml; |
| | | public String getStatusCd() { |
| | | return statusCd; |
| | | } |
| | | public void setStatusCd(String statusCd) { |
| | | this.statusCd = statusCd; |
| | | } |
| | | public String getXmlId() { |
| | | return xmlId; |
| | | } |
| | | public void setXmlId(String xmlId) { |
| | | this.xmlId = xmlId; |
| | | } |
| | | public String getStoreId() { |
| | | return storeId; |
| | | } |
| | | public void setStoreId(String storeId) { |
| | | this.storeId = storeId; |
| | | } |
| | | public String getBpmnXml() { |
| | | return bpmnXml; |
| | | } |
| | | public void setBpmnXml(String bpmnXml) { |
| | | this.bpmnXml = bpmnXml; |
| | | } |
| | | public String getFlowId() { |
| | | return flowId; |
| | | } |
| | | public void setFlowId(String flowId) { |
| | | this.flowId = flowId; |
| | | } |
| | | public String getSvgXml() { |
| | | return svgXml; |
| | | } |
| | | public void setSvgXml(String svgXml) { |
| | | this.svgXml = svgXml; |
| | | } |
| | | |
| | | |
| | | |
| | | } |
| | |
| | | |
| | | public static final String CODE_PREFIX_backId = "78"; |
| | | public static final String CODE_PREFIX_monthId = "79"; |
| | | public static final String CODE_PREFIX_xmlId = "79"; |
| | | |
| | | |
| | | |
| | |
| | | AND ppr.status_cd = '0' |
| | | ) |
| | | </if> |
| | | order by t.m_id desc |
| | | order by t.seq |
| | | <if test="page != -1 and page != null "> |
| | | limit #{page}, #{row} |
| | | </if> |
| | |
| | | <!-- 保存OA工作流信息 add by wuxw 2018-07-03 --> |
| | | <insert id="saveOaWorkflowInfo" parameterType="Map"> |
| | | insert into oa_workflow( |
| | | describle,model_id,flow_key,store_id,flow_id,flow_name,flow_type,process_definition_key |
| | | describle,model_id,flow_key,store_id,flow_id,flow_name,flow_type,process_definition_key,state |
| | | ) values ( |
| | | #{describle},#{modelId},#{flowKey},#{storeId},#{flowId},#{flowName},#{flowType},#{processDefinitionKey} |
| | | #{describle},#{modelId},#{flowKey},#{storeId},#{flowId},#{flowName},#{flowType},#{processDefinitionKey},#{state} |
| | | ) |
| | | </insert> |
| | | |
| | |
| | | select t.describle,t.model_id,t.model_id modelId,t.status_cd,t.status_cd statusCd,t.flow_key,t.flow_key |
| | | flowKey,t.store_id,t.store_id storeId,t.flow_id,t.flow_id flowId,t.flow_name,t.flow_name |
| | | flowName,t.flow_type,t.flow_type flowType,t.process_definition_key,t.process_definition_key processDefinitionKey, |
| | | t.create_time createTime |
| | | t.create_time createTime,t.state |
| | | from oa_workflow t |
| | | where 1 =1 |
| | | <if test="describle !=null and describle != ''"> |
| | |
| | | </if> |
| | | <if test="flowName !=null and flowName != ''"> |
| | | and t.flow_name= #{flowName} |
| | | </if> |
| | | <if test="state !=null and state != ''"> |
| | | and t.state= #{state} |
| | | </if> |
| | | <if test="flowType !=null and flowType != ''"> |
| | | and t.flow_type= #{flowType} |
| | |
| | | </if> |
| | | <if test="flowKey !=null and flowKey != ''"> |
| | | , t.flow_key= #{flowKey} |
| | | </if> |
| | | <if test="state !=null and state != ''"> |
| | | , t.state= #{state} |
| | | </if> |
| | | |
| | | <if test="flowName !=null and flowName != ''"> |
| | |
| | | <if test="flowId !=null and flowId != ''"> |
| | | and t.flow_id= #{flowId} |
| | | </if> |
| | | <if test="state !=null and state != ''"> |
| | | and t.state= #{state} |
| | | </if> |
| | | <if test="flowName !=null and flowName != ''"> |
| | | and t.flow_name= #{flowName} |
| | | </if> |
| New 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="oaWorkflowXmlServiceDaoImpl"> |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | <!-- 保存OA流程图信息 add by wuxw 2018-07-03 --> |
| | | <insert id="saveOaWorkflowXmlInfo" parameterType="Map"> |
| | | insert into oa_workflow_xml( |
| | | xml_id,store_id,bpmn_xml,flow_id,svg_xml |
| | | ) values ( |
| | | #{xmlId},#{storeId},#{bpmnXml},#{flowId},#{svgXml} |
| | | ) |
| | | </insert> |
| | | |
| | | |
| | | |
| | | <!-- 查询OA流程图信息 add by wuxw 2018-07-03 --> |
| | | <select id="getOaWorkflowXmlInfo" parameterType="Map" resultType="Map"> |
| | | select t.status_cd,t.status_cd statusCd,t.xml_id,t.xml_id xmlId,t.store_id,t.store_id storeId,t.bpmn_xml,t.bpmn_xml bpmnXml,t.flow_id,t.flow_id flowId,t.svg_xml,t.svg_xml svgXml |
| | | from oa_workflow_xml t |
| | | where 1 =1 |
| | | <if test="statusCd !=null and statusCd != ''"> |
| | | and t.status_cd= #{statusCd} |
| | | </if> |
| | | <if test="xmlId !=null and xmlId != ''"> |
| | | and t.xml_id= #{xmlId} |
| | | </if> |
| | | <if test="storeId !=null and storeId != ''"> |
| | | and t.store_id= #{storeId} |
| | | </if> |
| | | <if test="bpmnXml !=null and bpmnXml != ''"> |
| | | and t.bpmn_xml= #{bpmnXml} |
| | | </if> |
| | | <if test="flowId !=null and flowId != ''"> |
| | | and t.flow_id= #{flowId} |
| | | </if> |
| | | <if test="svgXml !=null and svgXml != ''"> |
| | | and t.svg_xml= #{svgXml} |
| | | </if> |
| | | order by t.create_time desc |
| | | <if test="page != -1 and page != null "> |
| | | limit #{page}, #{row} |
| | | </if> |
| | | |
| | | </select> |
| | | |
| | | |
| | | |
| | | |
| | | <!-- 修改OA流程图信息 add by wuxw 2018-07-03 --> |
| | | <update id="updateOaWorkflowXmlInfo" parameterType="Map"> |
| | | update oa_workflow_xml t set t.status_cd = #{statusCd} |
| | | <if test="newBId != null and newBId != ''"> |
| | | ,t.b_id = #{newBId} |
| | | </if> |
| | | <if test="storeId !=null and storeId != ''"> |
| | | , t.store_id= #{storeId} |
| | | </if> |
| | | <if test="bpmnXml !=null and bpmnXml != ''"> |
| | | , t.bpmn_xml= #{bpmnXml} |
| | | </if> |
| | | <if test="flowId !=null and flowId != ''"> |
| | | , t.flow_id= #{flowId} |
| | | </if> |
| | | <if test="svgXml !=null and svgXml != ''"> |
| | | , t.svg_xml= #{svgXml} |
| | | </if> |
| | | where 1=1 <if test="xmlId !=null and xmlId != ''"> |
| | | and t.xml_id= #{xmlId} |
| | | </if> |
| | | |
| | | </update> |
| | | |
| | | <!-- 查询OA流程图数量 add by wuxw 2018-07-03 --> |
| | | <select id="queryOaWorkflowXmlsCount" parameterType="Map" resultType="Map"> |
| | | select count(1) count |
| | | from oa_workflow_xml t |
| | | where 1 =1 |
| | | <if test="statusCd !=null and statusCd != ''"> |
| | | and t.status_cd= #{statusCd} |
| | | </if> |
| | | <if test="xmlId !=null and xmlId != ''"> |
| | | and t.xml_id= #{xmlId} |
| | | </if> |
| | | <if test="storeId !=null and storeId != ''"> |
| | | and t.store_id= #{storeId} |
| | | </if> |
| | | <if test="bpmnXml !=null and bpmnXml != ''"> |
| | | and t.bpmn_xml= #{bpmnXml} |
| | | </if> |
| | | <if test="flowId !=null and flowId != ''"> |
| | | and t.flow_id= #{flowId} |
| | | </if> |
| | | <if test="svgXml !=null and svgXml != ''"> |
| | | and t.svg_xml= #{svgXml} |
| | | </if> |
| | | |
| | | |
| | | </select> |
| | | |
| | | </mapper> |
| | |
| | | { |
| | | "autoMove": true, |
| | | "id": "flowId", |
| | | "name": "oaWorkflow", |
| | | "desc": "OA工作流", |
| | | "id": "xmlId", |
| | | "name": "oaWorkflowXml", |
| | | "desc": "OA流程图", |
| | | "shareParam": "storeId", |
| | | "shareColumn": "store_id", |
| | | "shareName": "oa", |
| | | "tableName": "oa_workflow", |
| | | "tableName": "oa_workflow_xml", |
| | | "param": { |
| | | "xmlId": "xml_id", |
| | | "flowId": "flow_id", |
| | | "flowName": "flow_name", |
| | | "describle": "describle", |
| | | "storeId": "store_id", |
| | | "flowType": "flow_type", |
| | | "modelId": "model_id", |
| | | "flowKey": "flow_key", |
| | | "processDefinitionKey": "process_definition_key", |
| | | "bpmnXml": "bpmn_xml", |
| | | "svgXml": "svg_xml", |
| | | "statusCd": "status_cd" |
| | | }, |
| | | "required": [ |
| | | { |
| | | "code": "flowName", |
| | | "msg": "流程名称不能为空" |
| | | "code": "flowId", |
| | | "msg": "流程不能为空" |
| | | }, |
| | | { |
| | | "code": "flowType", |
| | | "msg": "流程类型不能为空" |
| | | "code": "bpmnXml", |
| | | "msg": "流程图不能为空" |
| | | } |
| | | ] |
| | | } |
| New file |
| | |
| | | package com.java110.intf.oa; |
| | | |
| | | import com.java110.config.feign.FeignConfiguration; |
| | | import com.java110.dto.oaWorkflowXml.OaWorkflowXmlDto; |
| | | import com.java110.po.oaWorkflowXml.OaWorkflowXmlPo; |
| | | import org.springframework.cloud.openfeign.FeignClient; |
| | | import org.springframework.web.bind.annotation.RequestBody; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RequestMethod; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * @ClassName IOaWorkflowXmlInnerServiceSMO |
| | | * @Description OA流程图接口类 |
| | | * @Author wuxw |
| | | * @Date 2019/4/24 9:04 |
| | | * @Version 1.0 |
| | | * add by wuxw 2019/4/24 |
| | | **/ |
| | | @FeignClient(name = "oa-service", configuration = {FeignConfiguration.class}) |
| | | @RequestMapping("/oaWorkflowXmlApi") |
| | | public interface IOaWorkflowXmlInnerServiceSMO { |
| | | |
| | | |
| | | @RequestMapping(value = "/saveOaWorkflowXml", method = RequestMethod.POST) |
| | | public int saveOaWorkflowXml(@RequestBody OaWorkflowXmlPo oaWorkflowXmlPo); |
| | | |
| | | @RequestMapping(value = "/updateOaWorkflowXml", method = RequestMethod.POST) |
| | | public int updateOaWorkflowXml(@RequestBody OaWorkflowXmlPo oaWorkflowXmlPo); |
| | | |
| | | @RequestMapping(value = "/deleteOaWorkflowXml", method = RequestMethod.POST) |
| | | public int deleteOaWorkflowXml(@RequestBody OaWorkflowXmlPo oaWorkflowXmlPo); |
| | | |
| | | /** |
| | | * <p>查询小区楼信息</p> |
| | | * |
| | | * |
| | | * @param oaWorkflowXmlDto 数据对象分享 |
| | | * @return OaWorkflowXmlDto 对象数据 |
| | | */ |
| | | @RequestMapping(value = "/queryOaWorkflowXmls", method = RequestMethod.POST) |
| | | List<OaWorkflowXmlDto> queryOaWorkflowXmls(@RequestBody OaWorkflowXmlDto oaWorkflowXmlDto); |
| | | |
| | | /** |
| | | * 查询<p>小区楼</p>总记录数 |
| | | * |
| | | * @param oaWorkflowXmlDto 数据对象分享 |
| | | * @return 小区下的小区楼记录数 |
| | | */ |
| | | @RequestMapping(value = "/queryOaWorkflowXmlsCount", method = RequestMethod.POST) |
| | | int queryOaWorkflowXmlsCount(@RequestBody OaWorkflowXmlDto oaWorkflowXmlDto); |
| | | } |
| | |
| | | "com.java110.intf.community", |
| | | "com.java110.intf.job", |
| | | "com.java110.intf.order", |
| | | "com.java110.intf.oa", |
| | | "com.java110.intf.report" |
| | | }) |
| | | public class CommonServiceApplicationStart { |
| | |
| | | /** |
| | | * 更新流程 |
| | | * |
| | | * @param reqJson 模型ID |
| | | * @param reqString 模型ID |
| | | * @ServiceCode /workflow/saveModel |
| | | */ |
| | | @RequestMapping(value = "/saveModel", method = RequestMethod.POST) |
| | | @ResponseStatus(value = HttpStatus.OK) |
| | | public ResponseEntity<String> saveModel(@RequestBody JSONObject reqJson) { |
| | | public ResponseEntity<String> saveModel( |
| | | @RequestBody String reqString) { |
| | | JSONObject reqJson = JSONObject.parseObject(reqString); |
| | | WorkflowModelDto workflowModelDto = BeanConvertUtil.covertBean(reqJson, WorkflowModelDto.class); |
| | | try { |
| | | Model model = repositoryService.getModel(workflowModelDto.getModelId()); |
| | | ObjectNode modelJson = (ObjectNode) objectMapper.readTree(model.getMetaInfo()); |
| | | modelJson.put(MODEL_NAME, workflowModelDto.getName()); |
| | | modelJson.put(MODEL_DESCRIPTION, workflowModelDto.getDescription()); |
| | | modelJson.put(ModelDataJsonConstants.MODEL_REVISION, model.getVersion() + 1); |
| | | model.setMetaInfo(modelJson.toString()); |
| | | model.setName(workflowModelDto.getName()); |
| | | repositoryService.saveModel(model); |
| | | repositoryService.addModelEditorSource(model.getId(), workflowModelDto.getJson_xml().getBytes("utf-8")); |
| | | |
| | | InputStream svgStream = new ByteArrayInputStream(workflowModelDto.getSvg_xml().getBytes("utf-8")); |
| | | TranscoderInput input = new TranscoderInput(svgStream); |
| | | //部署model |
| | | return queryWorkFlowFirstStaffBMOImpl.saveModel(workflowModelDto); |
| | | |
| | | 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); |
| | | } |
| | | /** |
| | | * 部署流程 |
| | | * |
| | | * @param reqString 模型ID |
| | | * @ServiceCode /workflow/deployModel |
| | | */ |
| | | @RequestMapping(value = "/deployModel", method = RequestMethod.POST) |
| | | @ResponseStatus(value = HttpStatus.OK) |
| | | public ResponseEntity<String> deployModel( |
| | | @RequestBody String reqString) { |
| | | JSONObject reqJson = JSONObject.parseObject(reqString); |
| | | WorkflowModelDto workflowModelDto = BeanConvertUtil.covertBean(reqJson, WorkflowModelDto.class); |
| | | |
| | | //部署model |
| | | return queryWorkFlowFirstStaffBMOImpl.deployModel(workflowModelDto); |
| | |
| | | ResponseEntity<String> query(WorkflowDto workflowDto); |
| | | |
| | | ResponseEntity<String> deployModel(WorkflowModelDto workflowModelDto); |
| | | |
| | | ResponseEntity<String> saveModel(WorkflowModelDto workflowModelDto); |
| | | } |
| | |
| | | package com.java110.common.bmo.workflow.impl; |
| | | |
| | | import com.fasterxml.jackson.databind.JsonNode; |
| | | import com.fasterxml.jackson.databind.ObjectMapper; |
| | | import com.fasterxml.jackson.databind.node.ObjectNode; |
| | | import com.java110.common.bmo.workflow.IQueryWorkFlowFirstStaffBMO; |
| | | import com.java110.common.dao.IWorkflowServiceDao; |
| | | import com.java110.common.dao.IWorkflowStepServiceDao; |
| | | import com.java110.common.dao.IWorkflowStepStaffServiceDao; |
| | | import com.java110.core.annotation.Java110Transactional; |
| | | import com.java110.core.factory.GenerateCodeFactory; |
| | | import com.java110.dto.oaWorkflow.OaWorkflowDto; |
| | | import com.java110.dto.oaWorkflowXml.OaWorkflowXmlDto; |
| | | import com.java110.dto.org.OrgDto; |
| | | import com.java110.dto.workflow.WorkflowDto; |
| | | import com.java110.dto.workflow.WorkflowModelDto; |
| | | import com.java110.intf.oa.IOaWorkflowInnerServiceSMO; |
| | | import com.java110.intf.oa.IOaWorkflowXmlInnerServiceSMO; |
| | | import com.java110.intf.user.IOrgInnerServiceSMO; |
| | | import com.java110.po.oaWorkflow.OaWorkflowPo; |
| | | import com.java110.po.oaWorkflowXml.OaWorkflowXmlPo; |
| | | import com.java110.utils.util.Assert; |
| | | import com.java110.utils.util.Base64Convert; |
| | | import com.java110.utils.util.BeanConvertUtil; |
| | | import com.java110.utils.util.StringUtil; |
| | | import com.java110.vo.ResultVo; |
| | | import org.activiti.bpmn.converter.BpmnXMLConverter; |
| | | import org.activiti.bpmn.model.BpmnModel; |
| | | import org.activiti.editor.constants.ModelDataJsonConstants; |
| | | import org.activiti.editor.language.json.converter.BpmnJsonConverter; |
| | | import org.activiti.engine.ActivitiException; |
| | | import org.activiti.engine.ProcessEngine; |
| | | import org.activiti.engine.ProcessEngines; |
| | | import org.activiti.engine.RepositoryService; |
| | | import org.activiti.engine.repository.Deployment; |
| | | import org.activiti.engine.repository.Model; |
| | | import org.activiti.engine.repository.ProcessDefinition; |
| | | 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.ResponseEntity; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import java.io.ByteArrayInputStream; |
| | | import java.io.ByteArrayOutputStream; |
| | | import java.io.InputStream; |
| | | import java.util.HashMap; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | @Service("queryWorkFlowFirstStaffServiceImpl") |
| | | public class QueryWorkFlowFirstStaffBMOImpl implements IQueryWorkFlowFirstStaffBMO { |
| | | |
| | | private static final Logger logger = LoggerFactory.getLogger(QueryWorkFlowFirstStaffBMOImpl.class); |
| | | @Autowired |
| | | private IWorkflowServiceDao workflowServiceDaoImpl; |
| | | |
| | |
| | | |
| | | @Autowired |
| | | private IOaWorkflowInnerServiceSMO oaWorkflowInnerServiceSMOImpl; |
| | | |
| | | @Autowired |
| | | private IOaWorkflowXmlInnerServiceSMO oaWorkflowXmlInnerServiceSMOImpl; |
| | | |
| | | @Autowired |
| | | private RepositoryService repositoryService; |
| | | |
| | | @Autowired |
| | | private ObjectMapper objectMapper; |
| | | |
| | | |
| | | String MODEL_ID = "modelId"; |
| | | String MODEL_NAME = "name"; |
| | | String MODEL_REVISION = "revision"; |
| | | String MODEL_DESCRIPTION = "description"; |
| | | |
| | | |
| | | @Override |
| | | public ResponseEntity<String> query(WorkflowDto workflowDto) { |
| | |
| | | try { |
| | | Model modelData = repositoryService.getModel(workflowModelDto.getModelId()); |
| | | byte[] bpmnBytes = null; |
| | | JsonNode editorNode = new ObjectMapper().readTree(repositoryService.getModelEditorSource(workflowModelDto.getModelId())); |
| | | BpmnJsonConverter jsonConverter = new BpmnJsonConverter(); |
| | | BpmnModel model = jsonConverter.convertToBpmnModel(editorNode); |
| | | bpmnBytes = new BpmnXMLConverter().convertToXML(model); |
| | | //JsonNode editorNode = new ObjectMapper().readTree(repositoryService.getModelEditorSource(workflowModelDto.getModelId())); |
| | | //BpmnJsonConverter jsonConverter = new BpmnJsonConverter(); |
| | | //BpmnModel model = jsonConverter.convertToBpmnModel(editorNode); |
| | | //bpmnBytes = new BpmnXMLConverter().convertToXML(model); |
| | | bpmnBytes = repositoryService.getModelEditorSource(workflowModelDto.getModelId()); |
| | | String encoded = Base64Convert.byteToBase64(bpmnBytes); |
| | | byte[] decoded = Base64Convert.base64ToByte(encoded); |
| | | String xml = new String(decoded); |
| | |
| | | .addInputStream(processName, in).deploy(); |
| | | deploymentid = deployment.getId(); |
| | | } catch (Exception e) { |
| | | System.out.println(e); |
| | | throw new IllegalArgumentException(e); |
| | | } |
| | | Assert.isTrue(!StringUtil.isEmpty(deploymentid), "流程部署出错"); |
| | | ProcessDefinition processDefinition = repositoryService |
| | |
| | | oaWorkflowPo.setFlowId(oaWorkflowDtos.get(0).getFlowId()); |
| | | oaWorkflowPo.setStoreId(oaWorkflowDtos.get(0).getStoreId()); |
| | | oaWorkflowPo.setProcessDefinitionKey(deploymentid); |
| | | oaWorkflowPo.setState(OaWorkflowDto.STATE_COMPLAINT); |
| | | oaWorkflowInnerServiceSMOImpl.updateOaWorkflow(oaWorkflowPo); |
| | | // //部署历史表 |
| | | // List<DeployHistoryEntity> deployHistoryEntities = deployHistoryRepository.getDeployHistoryByDeptWithProcessKeyId(deptWithProcessKeyId); |
| | |
| | | return ResultVo.success(); |
| | | } |
| | | |
| | | @Override |
| | | @Java110Transactional |
| | | public ResponseEntity<String> saveModel(WorkflowModelDto workflowModelDto) { |
| | | //根据 |
| | | OaWorkflowDto oaWorkflowDto = new OaWorkflowDto(); |
| | | oaWorkflowDto.setModelId(workflowModelDto.getModelId()); |
| | | List<OaWorkflowDto> oaWorkflowDtos = oaWorkflowInnerServiceSMOImpl.queryOaWorkflows(oaWorkflowDto); |
| | | |
| | | Assert.listOnlyOne(oaWorkflowDtos, "未包含流程"); |
| | | |
| | | OaWorkflowXmlPo oaWorkflowXmlPo = new OaWorkflowXmlPo(); |
| | | oaWorkflowXmlPo.setStoreId(oaWorkflowDtos.get(0).getStoreId()); |
| | | oaWorkflowXmlPo.setBpmnXml(workflowModelDto.getJson_xml()); |
| | | oaWorkflowXmlPo.setFlowId(oaWorkflowDtos.get(0).getFlowId()); |
| | | oaWorkflowXmlPo.setSvgXml(workflowModelDto.getSvg_xml()); |
| | | //查询部署 |
| | | |
| | | OaWorkflowXmlDto oaWorkflowXmlDto = new OaWorkflowXmlDto(); |
| | | oaWorkflowXmlDto.setFlowId(oaWorkflowDtos.get(0).getFlowId()); |
| | | oaWorkflowXmlDto.setStoreId(oaWorkflowDtos.get(0).getStoreId()); |
| | | |
| | | List<OaWorkflowXmlDto> oaWorkflowXmlDtos = oaWorkflowXmlInnerServiceSMOImpl.queryOaWorkflowXmls(oaWorkflowXmlDto); |
| | | int flag = 0; |
| | | if (oaWorkflowXmlDtos == null || oaWorkflowXmlDtos.size() < 1) { |
| | | oaWorkflowXmlPo.setXmlId(GenerateCodeFactory.getGeneratorId(GenerateCodeFactory.CODE_PREFIX_xmlId)); |
| | | flag = oaWorkflowXmlInnerServiceSMOImpl.saveOaWorkflowXml(oaWorkflowXmlPo); |
| | | } else { |
| | | oaWorkflowXmlPo.setXmlId(oaWorkflowXmlDtos.get(0).getXmlId()); |
| | | flag = oaWorkflowXmlInnerServiceSMOImpl.updateOaWorkflowXml(oaWorkflowXmlPo); |
| | | } |
| | | if (flag < 1) { |
| | | throw new IllegalArgumentException("流程图处理失败"); |
| | | } |
| | | |
| | | try { |
| | | Model model = repositoryService.getModel(workflowModelDto.getModelId()); |
| | | ObjectNode modelJson = (ObjectNode) objectMapper.readTree(model.getMetaInfo()); |
| | | modelJson.put(MODEL_NAME, oaWorkflowDtos.get(0).getFlowName()); |
| | | modelJson.put(MODEL_DESCRIPTION, oaWorkflowDtos.get(0).getDescrible()); |
| | | modelJson.put(ModelDataJsonConstants.MODEL_REVISION, model.getVersion() + 1); |
| | | model.setMetaInfo(modelJson.toString()); |
| | | model.setName(oaWorkflowDtos.get(0).getFlowName()); |
| | | repositoryService.saveModel(model); |
| | | repositoryService.addModelEditorSource(model.getId(), workflowModelDto.getJson_xml().getBytes("utf-8")); |
| | | |
| | | InputStream svgStream = new ByteArrayInputStream(workflowModelDto.getSvg_xml().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); |
| | | } |
| | | |
| | | return ResultVo.success(); |
| | | } |
| | | |
| | | } |
| | |
| | | * 更新流程 |
| | | * |
| | | * @param modelId 模型ID |
| | | * @param name 流程模型名称 |
| | | * @param description |
| | | * @param json_xml 流程文件 |
| | | * @param svg_xml 图片 |
| | | * @param xmlJson 流程模型名称 |
| | | */ |
| | | @RequestMapping(value = "/model/{modelId}/save", method = RequestMethod.POST) |
| | | public ResponseEntity<String> saveModel(@PathVariable String modelId |
| | | , String name, String description |
| | | , String json_xml, String svg_xml) { |
| | | |
| | | , @RequestBody String xmlJson) { |
| | | JSONObject paramJson = JSONObject.parseObject(xmlJson); |
| | | WorkflowModelDto workflowModelDto = new WorkflowModelDto(); |
| | | workflowModelDto.setDescription(description); |
| | | workflowModelDto.setJson_xml(json_xml); |
| | | workflowModelDto.setSvg_xml(svg_xml); |
| | | workflowModelDto.setName(name); |
| | | workflowModelDto.setJson_xml(paramJson.getString("xml")); |
| | | workflowModelDto.setSvg_xml(paramJson.getString("svg")); |
| | | workflowModelDto.setModelId(modelId); |
| | | return modelSMOImpl.saveModel(workflowModelDto); |
| | | } |
| | | } |
| | |
| | | import com.java110.dto.RoomDto; |
| | | import com.java110.dto.assetImportLog.AssetImportLogDto; |
| | | import com.java110.dto.assetImportLogDetail.AssetImportLogDetailDto; |
| | | import com.java110.entity.assetImport.ImportFee; |
| | | import com.java110.entity.assetImport.ImportFloor; |
| | | import com.java110.entity.assetImport.ImportOwner; |
| | | import com.java110.entity.assetImport.ImportParkingSpace; |
| | | import com.java110.entity.assetImport.ImportRoom; |
| | | import com.java110.entity.assetImport.*; |
| | | import com.java110.entity.component.ComponentValidateResult; |
| | | import com.java110.front.smo.assetImport.IAssetImportSMO; |
| | | import com.java110.utils.constant.ServiceConstant; |
| | | import com.java110.utils.util.Assert; |
| | | import com.java110.utils.util.CommonUtil; |
| | | import com.java110.utils.util.DateUtil; |
| | | import com.java110.utils.util.ImportExcelUtils; |
| | | import com.java110.utils.util.StringUtil; |
| | | import com.java110.utils.util.*; |
| | | import com.java110.vo.ResultVo; |
| | | import org.apache.poi.ss.usermodel.Sheet; |
| | | import org.apache.poi.ss.usermodel.Workbook; |
| | | import org.slf4j.Logger; |
| | |
| | | AssetImportLogDetailDto assetImportLogDetailDto = null; |
| | | try { |
| | | for (ImportParkingSpace parkingSpace : parkingSpaces) { |
| | | responseEntity = new ResponseEntity<String>("成功", HttpStatus.OK); |
| | | responseEntity = ResultVo.success(); |
| | | JSONObject savedParkingAreaInfo = getExistsParkingArea(pd, result, parkingSpace); |
| | | paramIn = new JSONObject(); |
| | | // 如果不存在,才插入 |
| | |
| | | } |
| | | assetImportLogDetailDto.setObjName(parkingSpace.getPaNum()); |
| | | assetImportLogDetailDtos.add(assetImportLogDetailDto); |
| | | failCount +=1; |
| | | successCount = successCount >0? successCount -1:successCount; |
| | | failCount += 1; |
| | | successCount = successCount > 0 ? successCount - 1 : successCount; |
| | | assetImportLogDto.setSuccessCount(successCount); |
| | | assetImportLogDto.setErrorCount(failCount); |
| | | continue; |
| | |
| | | assetImportLogDetailDtos.add(assetImportLogDetailDto); |
| | | assetImportLogDto.setSuccessCount(successCount); |
| | | assetImportLogDto.setErrorCount(failCount); |
| | | failCount +=1; |
| | | successCount = successCount >0? successCount -1:successCount; |
| | | failCount += 1; |
| | | successCount = successCount > 0 ? successCount - 1 : successCount; |
| | | assetImportLogDto.setSuccessCount(successCount); |
| | | assetImportLogDto.setErrorCount(failCount); |
| | | continue; |
| | |
| | | } |
| | | assetImportLogDetailDto.setObjName(parkingSpace.getCarNum()); |
| | | assetImportLogDetailDtos.add(assetImportLogDetailDto); |
| | | failCount +=1; |
| | | successCount = successCount >0? successCount -1:successCount; |
| | | failCount += 1; |
| | | successCount = successCount > 0 ? successCount - 1 : successCount; |
| | | assetImportLogDto.setSuccessCount(successCount); |
| | | assetImportLogDto.setErrorCount(failCount); |
| | | } else { |
| | |
| | | assetImportLogDetailDto.setMessage(body.getString("msg")); |
| | | assetImportLogDetailDto.setObjName(parkingSpace.getCarNum()); |
| | | assetImportLogDetailDtos.add(assetImportLogDetailDto); |
| | | failCount +=1; |
| | | successCount = successCount >0? successCount -1:successCount; |
| | | failCount += 1; |
| | | successCount = successCount > 0 ? successCount - 1 : successCount; |
| | | assetImportLogDto.setSuccessCount(successCount); |
| | | assetImportLogDto.setErrorCount(failCount); |
| | | } |
| | | } |
| | | } |
| | | } catch (Exception e) { |
| | | logger.error("导入车位异常", e); |
| | | saveTransactionLogSMOImpl.saveAssetImportLog(assetImportLogDto); |
| | | |
| | | throw e; |
| | | } |
| | | |
| | | return responseEntity; |
| | |
| | | } |
| | | assetImportLogDetailDto.setObjName(room.getRoomNum() + "室"); |
| | | assetImportLogDetailDtos.add(assetImportLogDetailDto); |
| | | failCount +=1; |
| | | successCount = successCount >0? successCount -1:successCount; |
| | | failCount += 1; |
| | | successCount = successCount > 0 ? successCount - 1 : successCount; |
| | | assetImportLogDto.setSuccessCount(successCount); |
| | | assetImportLogDto.setErrorCount(failCount); |
| | | } else { |
| | |
| | | assetImportLogDetailDto.setMessage(body.getString("msg")); |
| | | assetImportLogDetailDto.setObjName(room.getRoomNum() + "室"); |
| | | assetImportLogDetailDtos.add(assetImportLogDetailDto); |
| | | failCount +=1; |
| | | successCount = successCount >0? successCount -1:successCount; |
| | | failCount += 1; |
| | | successCount = successCount > 0 ? successCount - 1 : successCount; |
| | | assetImportLogDto.setSuccessCount(successCount); |
| | | assetImportLogDto.setErrorCount(failCount); |
| | | } |
| | |
| | | } |
| | | assetImportLogDetailDto.setObjName(importFloor.getFloorNum() + "栋" + importFloor.getUnitNum() + "单元"); |
| | | assetImportLogDetailDtos.add(assetImportLogDetailDto); |
| | | failCount +=1; |
| | | successCount = successCount >0? successCount -1:successCount; |
| | | failCount += 1; |
| | | successCount = successCount > 0 ? successCount - 1 : successCount; |
| | | assetImportLogDto.setSuccessCount(successCount); |
| | | assetImportLogDto.setErrorCount(failCount); |
| | | } else { |
| | |
| | | assetImportLogDetailDto.setMessage(body.getString("msg")); |
| | | assetImportLogDetailDto.setObjName(importFloor.getFloorNum() + "栋" + importFloor.getUnitNum() + "单元"); |
| | | assetImportLogDetailDtos.add(assetImportLogDetailDto); |
| | | failCount +=1; |
| | | successCount = successCount >0? successCount -1:successCount; |
| | | failCount += 1; |
| | | successCount = successCount > 0 ? successCount - 1 : successCount; |
| | | assetImportLogDto.setSuccessCount(successCount); |
| | | assetImportLogDto.setErrorCount(failCount); |
| | | } |
| | |
| | | |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.java110.dto.oaWorkflow.OaWorkflowDto; |
| | | import com.java110.dto.oaWorkflowXml.OaWorkflowXmlDto; |
| | | import com.java110.oa.bmo.oaWorkflow.IDeleteOaWorkflowBMO; |
| | | import com.java110.oa.bmo.oaWorkflow.IGetOaWorkflowBMO; |
| | | import com.java110.oa.bmo.oaWorkflow.ISaveOaWorkflowBMO; |
| | | import com.java110.oa.bmo.oaWorkflow.IUpdateOaWorkflowBMO; |
| | | import com.java110.oa.bmo.oaWorkflowXml.IDeleteOaWorkflowXmlBMO; |
| | | import com.java110.oa.bmo.oaWorkflowXml.IGetOaWorkflowXmlBMO; |
| | | import com.java110.oa.bmo.oaWorkflowXml.ISaveOaWorkflowXmlBMO; |
| | | import com.java110.oa.bmo.oaWorkflowXml.IUpdateOaWorkflowXmlBMO; |
| | | import com.java110.po.oaWorkflow.OaWorkflowPo; |
| | | import com.java110.po.oaWorkflowXml.OaWorkflowXmlPo; |
| | | import com.java110.utils.util.Assert; |
| | | import com.java110.utils.util.BeanConvertUtil; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | |
| | | |
| | | @Autowired |
| | | private IGetOaWorkflowBMO getOaWorkflowBMOImpl; |
| | | |
| | | @Autowired |
| | | private ISaveOaWorkflowXmlBMO saveOaWorkflowXmlBMOImpl; |
| | | @Autowired |
| | | private IUpdateOaWorkflowXmlBMO updateOaWorkflowXmlBMOImpl; |
| | | @Autowired |
| | | private IDeleteOaWorkflowXmlBMO deleteOaWorkflowXmlBMOImpl; |
| | | |
| | | @Autowired |
| | | private IGetOaWorkflowXmlBMO getOaWorkflowXmlBMOImpl; |
| | | |
| | | /** |
| | | * 微信保存消息模板 |
| | |
| | | */ |
| | | @RequestMapping(value = "/deleteOaWorkflow", method = RequestMethod.POST) |
| | | public ResponseEntity<String> deleteOaWorkflow(@RequestBody JSONObject reqJson) { |
| | | Assert.hasKeyAndValue(reqJson, "communityId", "小区ID不能为空"); |
| | | |
| | | Assert.hasKeyAndValue(reqJson, "flowId", "flowId不能为空"); |
| | | |
| | |
| | | */ |
| | | @RequestMapping(value = "/queryOaWorkflow", method = RequestMethod.GET) |
| | | public ResponseEntity<String> queryOaWorkflow(@RequestHeader(value = "store-id") String storeId, |
| | | @RequestParam(value="flowId",required = false) String flowId, |
| | | @RequestParam(value = "page") int page, |
| | | @RequestParam(value = "row") int row) { |
| | | OaWorkflowDto oaWorkflowDto = new OaWorkflowDto(); |
| | | oaWorkflowDto.setPage(page); |
| | | oaWorkflowDto.setRow(row); |
| | | oaWorkflowDto.setStoreId(storeId); |
| | | oaWorkflowDto.setFlowId(flowId); |
| | | return getOaWorkflowBMOImpl.get(oaWorkflowDto); |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | /** |
| | | * 微信保存消息模板 |
| | | * |
| | | * @param reqJson |
| | | * @return |
| | | * @serviceCode /oaWorkflow/saveOaWorkflowXml |
| | | * @path /app/oaWorkflow/saveOaWorkflowXml |
| | | */ |
| | | @RequestMapping(value = "/saveOaWorkflowXml", method = RequestMethod.POST) |
| | | public ResponseEntity<String> saveOaWorkflowXml(@RequestHeader(value = "store-id") String storeId, |
| | | @RequestBody JSONObject reqJson) { |
| | | |
| | | Assert.hasKeyAndValue(reqJson, "flowId", "请求报文中未包含flowId"); |
| | | Assert.hasKeyAndValue(reqJson, "bpmnXml", "请求报文中未包含bpmnXml"); |
| | | |
| | | |
| | | OaWorkflowXmlPo oaWorkflowXmlPo = BeanConvertUtil.covertBean(reqJson, OaWorkflowXmlPo.class); |
| | | oaWorkflowXmlPo.setStoreId(storeId); |
| | | return saveOaWorkflowXmlBMOImpl.save(oaWorkflowXmlPo); |
| | | } |
| | | |
| | | /** |
| | | * 微信修改消息模板 |
| | | * |
| | | * @param reqJson |
| | | * @return |
| | | * @serviceCode /oaWorkflow/updateOaWorkflowXml |
| | | * @path /app/oaWorkflow/updateOaWorkflowXml |
| | | */ |
| | | @RequestMapping(value = "/updateOaWorkflowXml", method = RequestMethod.POST) |
| | | public ResponseEntity<String> updateOaWorkflowXml(@RequestHeader(value = "store-id") String storeId, |
| | | @RequestBody JSONObject reqJson) { |
| | | |
| | | Assert.hasKeyAndValue(reqJson, "flowId", "请求报文中未包含flowId"); |
| | | Assert.hasKeyAndValue(reqJson, "bpmnXml", "请求报文中未包含bpmnXml"); |
| | | Assert.hasKeyAndValue(reqJson, "xmlId", "xmlId不能为空"); |
| | | |
| | | |
| | | OaWorkflowXmlPo oaWorkflowXmlPo = BeanConvertUtil.covertBean(reqJson, OaWorkflowXmlPo.class); |
| | | oaWorkflowXmlPo.setStoreId(storeId); |
| | | return updateOaWorkflowXmlBMOImpl.update(oaWorkflowXmlPo); |
| | | } |
| | | |
| | | /** |
| | | * 微信删除消息模板 |
| | | * |
| | | * @param reqJson |
| | | * @return |
| | | * @serviceCode /oaWorkflow/deleteOaWorkflowXml |
| | | * @path /app/oaWorkflow/deleteOaWorkflowXml |
| | | */ |
| | | @RequestMapping(value = "/deleteOaWorkflowXml", method = RequestMethod.POST) |
| | | public ResponseEntity<String> deleteOaWorkflowXml(@RequestHeader(value = "store-id") String storeId, |
| | | @RequestBody JSONObject reqJson) { |
| | | |
| | | Assert.hasKeyAndValue(reqJson, "xmlId", "xmlId不能为空"); |
| | | |
| | | |
| | | OaWorkflowXmlPo oaWorkflowXmlPo = BeanConvertUtil.covertBean(reqJson, OaWorkflowXmlPo.class); |
| | | oaWorkflowXmlPo.setStoreId(storeId); |
| | | return deleteOaWorkflowXmlBMOImpl.delete(oaWorkflowXmlPo); |
| | | } |
| | | |
| | | /** |
| | | * 微信删除消息模板 |
| | | * |
| | | * @param storeId 小区ID |
| | | * @return |
| | | * @serviceCode /oaWorkflow/queryOaWorkflowXml |
| | | * @path /app/oaWorkflow/queryOaWorkflowXml |
| | | */ |
| | | @RequestMapping(value = "/queryOaWorkflowXml", method = RequestMethod.GET) |
| | | public ResponseEntity<String> queryOaWorkflowXml(@RequestHeader(value = "store-id") String storeId, |
| | | @RequestParam(value="flowId") String flowId, |
| | | @RequestParam(value = "page") int page, |
| | | @RequestParam(value = "row") int row) { |
| | | OaWorkflowXmlDto oaWorkflowXmlDto = new OaWorkflowXmlDto(); |
| | | oaWorkflowXmlDto.setPage(page); |
| | | oaWorkflowXmlDto.setRow(row); |
| | | oaWorkflowXmlDto.setStoreId(storeId); |
| | | oaWorkflowXmlDto.setFlowId(flowId); |
| | | return getOaWorkflowXmlBMOImpl.get(oaWorkflowXmlDto); |
| | | } |
| | | } |
| | |
| | | |
| | | import com.java110.core.annotation.Java110Transactional; |
| | | import com.java110.core.factory.GenerateCodeFactory; |
| | | import com.java110.dto.oaWorkflow.OaWorkflowDto; |
| | | import com.java110.dto.workflow.WorkflowModelDto; |
| | | import com.java110.intf.common.IWorkflowInnerServiceSMO; |
| | | import com.java110.intf.oa.IOaWorkflowInnerServiceSMO; |
| | |
| | | |
| | | oaWorkflowPo.setModelId(workflowModelDto.getModelId()); |
| | | oaWorkflowPo.setFlowKey(workflowModelDto.getKey()); |
| | | oaWorkflowPo.setState(OaWorkflowDto.STATE_WAIT); |
| | | int flag = oaWorkflowInnerServiceSMOImpl.saveOaWorkflow(oaWorkflowPo); |
| | | |
| | | if (flag > 0) { |
| | |
| | | package com.java110.oa.bmo.oaWorkflow.impl; |
| | | |
| | | import com.java110.core.annotation.Java110Transactional; |
| | | import com.java110.dto.oaWorkflow.OaWorkflowDto; |
| | | import com.java110.intf.oa.IOaWorkflowInnerServiceSMO; |
| | | import com.java110.oa.bmo.oaWorkflow.IUpdateOaWorkflowBMO; |
| | | import com.java110.po.oaWorkflow.OaWorkflowPo; |
| | |
| | | */ |
| | | @Java110Transactional |
| | | public ResponseEntity<String> update(OaWorkflowPo oaWorkflowPo) { |
| | | |
| | | //只要已修改 就 状态刷为待部署 |
| | | oaWorkflowPo.setState(OaWorkflowDto.STATE_WAIT); |
| | | int flag = oaWorkflowInnerServiceSMOImpl.updateOaWorkflow(oaWorkflowPo); |
| | | |
| | | if (flag > 0) { |
| New file |
| | |
| | | package com.java110.oa.bmo.oaWorkflowXml; |
| | | import com.java110.po.oaWorkflowXml.OaWorkflowXmlPo; |
| | | import org.springframework.http.ResponseEntity; |
| | | |
| | | public interface IDeleteOaWorkflowXmlBMO { |
| | | |
| | | |
| | | /** |
| | | * 修改OA流程图 |
| | | * add by wuxw |
| | | * @param oaWorkflowXmlPo |
| | | * @return |
| | | */ |
| | | ResponseEntity<String> delete(OaWorkflowXmlPo oaWorkflowXmlPo); |
| | | |
| | | |
| | | } |
| New file |
| | |
| | | package com.java110.oa.bmo.oaWorkflowXml; |
| | | import com.java110.dto.oaWorkflowXml.OaWorkflowXmlDto; |
| | | import org.springframework.http.ResponseEntity; |
| | | public interface IGetOaWorkflowXmlBMO { |
| | | |
| | | |
| | | /** |
| | | * 查询OA流程图 |
| | | * add by wuxw |
| | | * @param oaWorkflowXmlDto |
| | | * @return |
| | | */ |
| | | ResponseEntity<String> get(OaWorkflowXmlDto oaWorkflowXmlDto); |
| | | |
| | | |
| | | } |
| New file |
| | |
| | | package com.java110.oa.bmo.oaWorkflowXml; |
| | | |
| | | import com.java110.po.oaWorkflowXml.OaWorkflowXmlPo; |
| | | import org.springframework.http.ResponseEntity; |
| | | public interface ISaveOaWorkflowXmlBMO { |
| | | |
| | | |
| | | /** |
| | | * 添加OA流程图 |
| | | * add by wuxw |
| | | * @param oaWorkflowXmlPo |
| | | * @return |
| | | */ |
| | | ResponseEntity<String> save(OaWorkflowXmlPo oaWorkflowXmlPo); |
| | | |
| | | |
| | | } |
| New file |
| | |
| | | package com.java110.oa.bmo.oaWorkflowXml; |
| | | import com.java110.po.oaWorkflowXml.OaWorkflowXmlPo; |
| | | import org.springframework.http.ResponseEntity; |
| | | |
| | | public interface IUpdateOaWorkflowXmlBMO { |
| | | |
| | | |
| | | /** |
| | | * 修改OA流程图 |
| | | * add by wuxw |
| | | * @param oaWorkflowXmlPo |
| | | * @return |
| | | */ |
| | | ResponseEntity<String> update(OaWorkflowXmlPo oaWorkflowXmlPo); |
| | | |
| | | |
| | | } |
| New file |
| | |
| | | package com.java110.oa.bmo.oaWorkflowXml.impl; |
| | | |
| | | import com.java110.core.annotation.Java110Transactional; |
| | | import com.java110.intf.oa.IOaWorkflowXmlInnerServiceSMO; |
| | | import com.java110.oa.bmo.oaWorkflowXml.IDeleteOaWorkflowXmlBMO; |
| | | import com.java110.po.oaWorkflowXml.OaWorkflowXmlPo; |
| | | import com.java110.vo.ResultVo; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.http.ResponseEntity; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | @Service("deleteOaWorkflowXmlBMOImpl") |
| | | public class DeleteOaWorkflowXmlBMOImpl implements IDeleteOaWorkflowXmlBMO { |
| | | |
| | | @Autowired |
| | | private IOaWorkflowXmlInnerServiceSMO oaWorkflowXmlInnerServiceSMOImpl; |
| | | |
| | | /** |
| | | * @param oaWorkflowXmlPo 数据 |
| | | * @return 订单服务能够接受的报文 |
| | | */ |
| | | @Java110Transactional |
| | | public ResponseEntity<String> delete(OaWorkflowXmlPo oaWorkflowXmlPo) { |
| | | |
| | | int flag = oaWorkflowXmlInnerServiceSMOImpl.deleteOaWorkflowXml(oaWorkflowXmlPo); |
| | | |
| | | if (flag > 0) { |
| | | return ResultVo.createResponseEntity(ResultVo.CODE_OK, "保存成功"); |
| | | } |
| | | |
| | | return ResultVo.createResponseEntity(ResultVo.CODE_ERROR, "保存失败"); |
| | | } |
| | | |
| | | } |
| New file |
| | |
| | | package com.java110.oa.bmo.oaWorkflowXml.impl; |
| | | |
| | | import com.java110.dto.oaWorkflowXml.OaWorkflowXmlDto; |
| | | import com.java110.intf.oa.IOaWorkflowXmlInnerServiceSMO; |
| | | import com.java110.oa.bmo.oaWorkflowXml.IGetOaWorkflowXmlBMO; |
| | | import com.java110.vo.ResultVo; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.http.HttpStatus; |
| | | import org.springframework.http.ResponseEntity; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import java.util.ArrayList; |
| | | import java.util.List; |
| | | |
| | | @Service("getOaWorkflowXmlBMOImpl") |
| | | public class GetOaWorkflowXmlBMOImpl implements IGetOaWorkflowXmlBMO { |
| | | |
| | | @Autowired |
| | | private IOaWorkflowXmlInnerServiceSMO oaWorkflowXmlInnerServiceSMOImpl; |
| | | |
| | | /** |
| | | * @param oaWorkflowXmlDto |
| | | * @return 订单服务能够接受的报文 |
| | | */ |
| | | public ResponseEntity<String> get(OaWorkflowXmlDto oaWorkflowXmlDto) { |
| | | |
| | | |
| | | int count = oaWorkflowXmlInnerServiceSMOImpl.queryOaWorkflowXmlsCount(oaWorkflowXmlDto); |
| | | |
| | | List<OaWorkflowXmlDto> oaWorkflowXmlDtos = null; |
| | | if (count > 0) { |
| | | oaWorkflowXmlDtos = oaWorkflowXmlInnerServiceSMOImpl.queryOaWorkflowXmls(oaWorkflowXmlDto); |
| | | } else { |
| | | oaWorkflowXmlDtos = new ArrayList<>(); |
| | | } |
| | | |
| | | ResultVo resultVo = new ResultVo((int) Math.ceil((double) count / (double) oaWorkflowXmlDto.getRow()), count, oaWorkflowXmlDtos); |
| | | |
| | | ResponseEntity<String> responseEntity = new ResponseEntity<String>(resultVo.toString(), HttpStatus.OK); |
| | | |
| | | return responseEntity; |
| | | } |
| | | |
| | | } |
| New file |
| | |
| | | package com.java110.oa.bmo.oaWorkflowXml.impl; |
| | | |
| | | import com.java110.core.annotation.Java110Transactional; |
| | | import com.java110.core.factory.GenerateCodeFactory; |
| | | import com.java110.intf.oa.IOaWorkflowXmlInnerServiceSMO; |
| | | import com.java110.oa.bmo.oaWorkflowXml.ISaveOaWorkflowXmlBMO; |
| | | import com.java110.po.oaWorkflowXml.OaWorkflowXmlPo; |
| | | import com.java110.vo.ResultVo; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.http.ResponseEntity; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | @Service("saveOaWorkflowXmlBMOImpl") |
| | | public class SaveOaWorkflowXmlBMOImpl implements ISaveOaWorkflowXmlBMO { |
| | | |
| | | @Autowired |
| | | private IOaWorkflowXmlInnerServiceSMO oaWorkflowXmlInnerServiceSMOImpl; |
| | | |
| | | /** |
| | | * 添加小区信息 |
| | | * |
| | | * @param oaWorkflowXmlPo |
| | | * @return 订单服务能够接受的报文 |
| | | */ |
| | | @Java110Transactional |
| | | public ResponseEntity<String> save(OaWorkflowXmlPo oaWorkflowXmlPo) { |
| | | |
| | | oaWorkflowXmlPo.setXmlId(GenerateCodeFactory.getGeneratorId(GenerateCodeFactory.CODE_PREFIX_xmlId)); |
| | | int flag = oaWorkflowXmlInnerServiceSMOImpl.saveOaWorkflowXml(oaWorkflowXmlPo); |
| | | |
| | | if (flag > 0) { |
| | | return ResultVo.createResponseEntity(ResultVo.CODE_OK, "保存成功"); |
| | | } |
| | | |
| | | return ResultVo.createResponseEntity(ResultVo.CODE_ERROR, "保存失败"); |
| | | } |
| | | |
| | | } |
| New file |
| | |
| | | package com.java110.oa.bmo.oaWorkflowXml.impl; |
| | | |
| | | import com.java110.core.annotation.Java110Transactional; |
| | | import com.java110.intf.oa.IOaWorkflowXmlInnerServiceSMO; |
| | | import com.java110.oa.bmo.oaWorkflowXml.IUpdateOaWorkflowXmlBMO; |
| | | import com.java110.po.oaWorkflowXml.OaWorkflowXmlPo; |
| | | import com.java110.vo.ResultVo; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.http.ResponseEntity; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | @Service("updateOaWorkflowXmlBMOImpl") |
| | | public class UpdateOaWorkflowXmlBMOImpl implements IUpdateOaWorkflowXmlBMO { |
| | | |
| | | @Autowired |
| | | private IOaWorkflowXmlInnerServiceSMO oaWorkflowXmlInnerServiceSMOImpl; |
| | | |
| | | /** |
| | | * @param oaWorkflowXmlPo |
| | | * @return 订单服务能够接受的报文 |
| | | */ |
| | | @Java110Transactional |
| | | public ResponseEntity<String> update(OaWorkflowXmlPo oaWorkflowXmlPo) { |
| | | |
| | | int flag = oaWorkflowXmlInnerServiceSMOImpl.updateOaWorkflowXml(oaWorkflowXmlPo); |
| | | |
| | | if (flag > 0) { |
| | | return ResultVo.createResponseEntity(ResultVo.CODE_OK, "保存成功"); |
| | | } |
| | | |
| | | return ResultVo.createResponseEntity(ResultVo.CODE_ERROR, "保存失败"); |
| | | } |
| | | |
| | | } |
| New file |
| | |
| | | package com.java110.oa.dao; |
| | | |
| | | |
| | | import com.java110.utils.exception.DAOException; |
| | | import com.java110.entity.merchant.BoMerchant; |
| | | import com.java110.entity.merchant.BoMerchantAttr; |
| | | import com.java110.entity.merchant.Merchant; |
| | | import com.java110.entity.merchant.MerchantAttr; |
| | | |
| | | |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * OA流程图组件内部之间使用,没有给外围系统提供服务能力 |
| | | * OA流程图服务接口类,要求全部以字符串传输,方便微服务化 |
| | | * 新建客户,修改客户,删除客户,查询客户等功能 |
| | | * |
| | | * Created by wuxw on 2016/12/27. |
| | | */ |
| | | public interface IOaWorkflowXmlServiceDao { |
| | | |
| | | |
| | | /** |
| | | * 保存 OA流程图信息 |
| | | * @param info |
| | | * @throws DAOException DAO异常 |
| | | */ |
| | | void saveOaWorkflowXmlInfo(Map info) throws DAOException; |
| | | |
| | | |
| | | |
| | | |
| | | /** |
| | | * 查询OA流程图信息(instance过程) |
| | | * 根据bId 查询OA流程图信息 |
| | | * @param info bId 信息 |
| | | * @return OA流程图信息 |
| | | * @throws DAOException DAO异常 |
| | | */ |
| | | List<Map> getOaWorkflowXmlInfo(Map info) throws DAOException; |
| | | |
| | | |
| | | |
| | | /** |
| | | * 修改OA流程图信息 |
| | | * @param info 修改信息 |
| | | * @throws DAOException DAO异常 |
| | | */ |
| | | void updateOaWorkflowXmlInfo(Map info) throws DAOException; |
| | | |
| | | |
| | | /** |
| | | * 查询OA流程图总数 |
| | | * |
| | | * @param info OA流程图信息 |
| | | * @return OA流程图数量 |
| | | */ |
| | | int queryOaWorkflowXmlsCount(Map info); |
| | | |
| | | } |
| New file |
| | |
| | | package com.java110.oa.dao.impl; |
| | | |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.java110.utils.constant.ResponseConstant; |
| | | import com.java110.utils.exception.DAOException; |
| | | import com.java110.utils.util.DateUtil; |
| | | import com.java110.core.base.dao.BaseServiceDao; |
| | | import com.java110.oa.dao.IOaWorkflowXmlServiceDao; |
| | | import org.slf4j.Logger; |
| | | import org.slf4j.LoggerFactory; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * OA流程图服务 与数据库交互 |
| | | * Created by wuxw on 2017/4/5. |
| | | */ |
| | | @Service("oaWorkflowXmlServiceDaoImpl") |
| | | //@Transactional |
| | | public class OaWorkflowXmlServiceDaoImpl extends BaseServiceDao implements IOaWorkflowXmlServiceDao { |
| | | |
| | | private static Logger logger = LoggerFactory.getLogger(OaWorkflowXmlServiceDaoImpl.class); |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | /** |
| | | * 保存OA流程图信息 到 instance |
| | | * @param info bId 信息 |
| | | * @throws DAOException DAO异常 |
| | | */ |
| | | @Override |
| | | public void saveOaWorkflowXmlInfo(Map info) throws DAOException { |
| | | logger.debug("保存OA流程图信息Instance 入参 info : {}",info); |
| | | |
| | | int saveFlag = sqlSessionTemplate.insert("oaWorkflowXmlServiceDaoImpl.saveOaWorkflowXmlInfo",info); |
| | | |
| | | if(saveFlag < 1){ |
| | | throw new DAOException(ResponseConstant.RESULT_PARAM_ERROR,"保存OA流程图信息Instance数据失败:"+ JSONObject.toJSONString(info)); |
| | | } |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 查询OA流程图信息(instance) |
| | | * @param info bId 信息 |
| | | * @return List<Map> |
| | | * @throws DAOException DAO异常 |
| | | */ |
| | | @Override |
| | | public List<Map> getOaWorkflowXmlInfo(Map info) throws DAOException { |
| | | logger.debug("查询OA流程图信息 入参 info : {}",info); |
| | | |
| | | List<Map> businessOaWorkflowXmlInfos = sqlSessionTemplate.selectList("oaWorkflowXmlServiceDaoImpl.getOaWorkflowXmlInfo",info); |
| | | |
| | | return businessOaWorkflowXmlInfos; |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 修改OA流程图信息 |
| | | * @param info 修改信息 |
| | | * @throws DAOException DAO异常 |
| | | */ |
| | | @Override |
| | | public void updateOaWorkflowXmlInfo(Map info) throws DAOException { |
| | | logger.debug("修改OA流程图信息Instance 入参 info : {}",info); |
| | | |
| | | int saveFlag = sqlSessionTemplate.update("oaWorkflowXmlServiceDaoImpl.updateOaWorkflowXmlInfo",info); |
| | | |
| | | if(saveFlag < 1){ |
| | | throw new DAOException(ResponseConstant.RESULT_PARAM_ERROR,"修改OA流程图信息Instance数据失败:"+ JSONObject.toJSONString(info)); |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * 查询OA流程图数量 |
| | | * @param info OA流程图信息 |
| | | * @return OA流程图数量 |
| | | */ |
| | | @Override |
| | | public int queryOaWorkflowXmlsCount(Map info) { |
| | | logger.debug("查询OA流程图数据 入参 info : {}",info); |
| | | |
| | | List<Map> businessOaWorkflowXmlInfos = sqlSessionTemplate.selectList("oaWorkflowXmlServiceDaoImpl.queryOaWorkflowXmlsCount", info); |
| | | if (businessOaWorkflowXmlInfos.size() < 1) { |
| | | return 0; |
| | | } |
| | | |
| | | return Integer.parseInt(businessOaWorkflowXmlInfos.get(0).get("count").toString()); |
| | | } |
| | | |
| | | |
| | | } |
| New file |
| | |
| | | package com.java110.oa.smo.impl; |
| | | |
| | | |
| | | import com.java110.core.base.smo.BaseServiceSMO; |
| | | import com.java110.dto.PageDto; |
| | | import com.java110.dto.oaWorkflowXml.OaWorkflowXmlDto; |
| | | import com.java110.intf.oa.IOaWorkflowXmlInnerServiceSMO; |
| | | import com.java110.oa.dao.IOaWorkflowXmlServiceDao; |
| | | import com.java110.po.oaWorkflowXml.OaWorkflowXmlPo; |
| | | import com.java110.utils.util.BeanConvertUtil; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.RequestBody; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * @ClassName FloorInnerServiceSMOImpl |
| | | * @Description OA流程图内部服务实现类 |
| | | * @Author wuxw |
| | | * @Date 2019/4/24 9:20 |
| | | * @Version 1.0 |
| | | * add by wuxw 2019/4/24 |
| | | **/ |
| | | @RestController |
| | | public class OaWorkflowXmlInnerServiceSMOImpl extends BaseServiceSMO implements IOaWorkflowXmlInnerServiceSMO { |
| | | |
| | | @Autowired |
| | | private IOaWorkflowXmlServiceDao oaWorkflowXmlServiceDaoImpl; |
| | | |
| | | |
| | | @Override |
| | | public int saveOaWorkflowXml(@RequestBody OaWorkflowXmlPo oaWorkflowXmlPo) { |
| | | int saveFlag = 1; |
| | | oaWorkflowXmlServiceDaoImpl.saveOaWorkflowXmlInfo(BeanConvertUtil.beanCovertMap(oaWorkflowXmlPo)); |
| | | return saveFlag; |
| | | } |
| | | |
| | | @Override |
| | | public int updateOaWorkflowXml(@RequestBody OaWorkflowXmlPo oaWorkflowXmlPo) { |
| | | int saveFlag = 1; |
| | | oaWorkflowXmlServiceDaoImpl.updateOaWorkflowXmlInfo(BeanConvertUtil.beanCovertMap(oaWorkflowXmlPo)); |
| | | return saveFlag; |
| | | } |
| | | |
| | | @Override |
| | | public int deleteOaWorkflowXml(@RequestBody OaWorkflowXmlPo oaWorkflowXmlPo) { |
| | | int saveFlag = 1; |
| | | oaWorkflowXmlPo.setStatusCd("1"); |
| | | oaWorkflowXmlServiceDaoImpl.updateOaWorkflowXmlInfo(BeanConvertUtil.beanCovertMap(oaWorkflowXmlPo)); |
| | | return saveFlag; |
| | | } |
| | | |
| | | @Override |
| | | public List<OaWorkflowXmlDto> queryOaWorkflowXmls(@RequestBody OaWorkflowXmlDto oaWorkflowXmlDto) { |
| | | |
| | | //校验是否传了 分页信息 |
| | | |
| | | int page = oaWorkflowXmlDto.getPage(); |
| | | |
| | | if (page != PageDto.DEFAULT_PAGE) { |
| | | oaWorkflowXmlDto.setPage((page - 1) * oaWorkflowXmlDto.getRow()); |
| | | } |
| | | |
| | | List<OaWorkflowXmlDto> oaWorkflowXmls = BeanConvertUtil.covertBeanList(oaWorkflowXmlServiceDaoImpl.getOaWorkflowXmlInfo(BeanConvertUtil.beanCovertMap(oaWorkflowXmlDto)), OaWorkflowXmlDto.class); |
| | | |
| | | return oaWorkflowXmls; |
| | | } |
| | | |
| | | |
| | | @Override |
| | | public int queryOaWorkflowXmlsCount(@RequestBody OaWorkflowXmlDto oaWorkflowXmlDto) { |
| | | return oaWorkflowXmlServiceDaoImpl.queryOaWorkflowXmlsCount(BeanConvertUtil.beanCovertMap(oaWorkflowXmlDto)); |
| | | } |
| | | |
| | | public IOaWorkflowXmlServiceDao getOaWorkflowXmlServiceDaoImpl() { |
| | | return oaWorkflowXmlServiceDaoImpl; |
| | | } |
| | | |
| | | public void setOaWorkflowXmlServiceDaoImpl(IOaWorkflowXmlServiceDao oaWorkflowXmlServiceDaoImpl) { |
| | | this.oaWorkflowXmlServiceDaoImpl = oaWorkflowXmlServiceDaoImpl; |
| | | } |
| | | } |