Selaa lähdekoodia

优化OAgongengn

java110 4 vuotta sitten
vanhempi
commit
b30be276d3

+ 0 - 43
service-oa/pom.xml

@@ -26,49 +26,6 @@
             <groupId>com.java110</groupId>
             <artifactId>java110-service</artifactId>
         </dependency>
-
-        <dependency>
-            <groupId>org.activiti</groupId>
-            <artifactId>activiti-bpmn-layout</artifactId>
-        </dependency>
-
-        <dependency>
-            <groupId>org.activiti</groupId>
-            <artifactId>activiti-spring-boot-starter-basic</artifactId>
-        </dependency>
-
-        <dependency>
-            <groupId>org.activiti</groupId>
-            <artifactId>activiti-json-converter</artifactId>
-            <version>6.0.0</version>
-            <exclusions>
-                <exclusion>
-                    <groupId>org.activiti</groupId>
-                    <artifactId>activiti-bpmn-model</artifactId>
-                </exclusion>
-            </exclusions>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.xmlgraphics</groupId>
-            <artifactId>batik-codec</artifactId>
-            <version>1.7</version>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.xmlgraphics</groupId>
-            <artifactId>batik-css</artifactId>
-            <version>1.7</version>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.xmlgraphics</groupId>
-            <artifactId>batik-svg-dom</artifactId>
-            <version>1.7</version>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.xmlgraphics</groupId>
-            <artifactId>batik-svggen</artifactId>
-            <version>1.7</version>
-        </dependency>
-
     </dependencies>
 
     <build>

+ 6 - 18
service-oa/src/main/java/com/java110/oa/OaServiceApplicationStart.java

@@ -44,28 +44,16 @@ import java.nio.charset.Charset;
  * @date 2016年8月6日
  * @tag
  */
-@SpringBootApplication(scanBasePackages = {
-        "com.java110.service",
-        "com.java110.common",
-        "com.java110.core",
-        "com.java110.config.properties.code",
-        "com.java110.db"},
-        exclude = {LiquibaseAutoConfiguration.class,
-                org.activiti.spring.boot.SecurityAutoConfiguration.class,
-                org.springframework.boot.autoconfigure.security.servlet.SecurityAutoConfiguration.class}
-        )
+@SpringBootApplication(scanBasePackages = {"com.java110.service", "com.java110.oa",
+        "com.java110.core", "com.java110.config.properties.code", "com.java110.db"})
 @EnableDiscoveryClient
 @Java110ListenerDiscovery(listenerPublishClass = BusinessServiceDataFlowEventPublishing.class,
         basePackages = {"com.java110.oa.listener"})
-@EnableFeignClients(basePackages = {
-        "com.java110.intf.user",
-        "com.java110.intf.store",
-        "com.java110.intf.fee",
-        "com.java110.intf.community",
-        "com.java110.intf.job",
+@EnableFeignClients(basePackages = {"com.java110.intf.user",
         "com.java110.intf.order",
-        "com.java110.intf.report"
-})
+        "com.java110.intf.community",
+        "com.java110.intf.common",
+        "com.java110.intf.store"})
 public class OaServiceApplicationStart {
 
     private static Logger logger = LoggerFactory.getLogger(OaServiceApplicationStart.class);

+ 0 - 91
service-oa/src/main/java/com/java110/oa/activity/ActivitiConfig.java

@@ -1,91 +0,0 @@
-package com.java110.oa.activity;
-
-import org.activiti.engine.HistoryService;
-import org.activiti.engine.RepositoryService;
-import org.activiti.engine.RuntimeService;
-import org.activiti.engine.TaskService;
-import org.activiti.spring.ProcessEngineFactoryBean;
-import org.activiti.spring.SpringProcessEngineConfiguration;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.context.annotation.Bean;
-import org.springframework.context.annotation.Configuration;
-import org.springframework.core.io.Resource;
-import org.springframework.core.io.support.PathMatchingResourcePatternResolver;
-import org.springframework.transaction.PlatformTransactionManager;
-
-import javax.sql.DataSource;
-import java.io.IOException;
-
-/**
- * @ClassName ActivitiConfig
- * @Description TODO
- * @Author wuxw
- * @Date 2019/10/22 21:55
- * @Version 1.0
- * add by wuxw 2019/10/22
- **/
-@Configuration
-public class ActivitiConfig  {
-
-
-    @Autowired
-    private DataSource dataSource;
-
-    @Autowired
-    private PlatformTransactionManager platformTransactionManager;
-
-   /* @Override
-    public void configure(SpringProcessEngineConfiguration springProcessEngineConfiguration) {
-        springProcessEngineConfiguration.setIdGenerator(new ActivityIdGenerator());
-    }*/
-
-
-    @Bean
-    public SpringProcessEngineConfiguration springProcessEngineConfiguration() {
-        SpringProcessEngineConfiguration spec = new SpringProcessEngineConfiguration();
-        spec.setDataSource(dataSource);
-        spec.setTransactionManager(platformTransactionManager);
-        spec.setDatabaseSchemaUpdate("true");
-        spec.setActivityFontName("宋体");
-        spec.setAnnotationFontName("宋体");
-        spec.setLabelFontName("宋体");
-        Resource[] resources = null;
-        // 启动自动部署流程
-        try {
-            resources = new PathMatchingResourcePatternResolver().getResources("classpath*:processes/*.bpmn");
-        } catch (IOException e) {
-            e.printStackTrace();
-        }
-        spec.setDeploymentResources(resources);
-        return spec;
-    }
-
-    @Bean
-    public ProcessEngineFactoryBean processEngine() {
-        ProcessEngineFactoryBean processEngineFactoryBean = new ProcessEngineFactoryBean();
-        processEngineFactoryBean.setProcessEngineConfiguration(springProcessEngineConfiguration());
-        return processEngineFactoryBean;
-    }
-
-
-    @Bean
-    public RepositoryService repositoryService() throws Exception {
-        return processEngine().getObject().getRepositoryService();
-    }
-
-    @Bean
-    public RuntimeService runtimeService() throws Exception {
-        return processEngine().getObject().getRuntimeService();
-    }
-
-    @Bean
-    public TaskService taskService() throws Exception {
-        return processEngine().getObject().getTaskService();
-    }
-
-    @Bean
-    public HistoryService historyService() throws Exception {
-        return processEngine().getObject().getHistoryService();
-    }
-
-}

+ 0 - 31
service-oa/src/main/java/com/java110/oa/activity/ActivityIdGenerator.java

@@ -1,31 +0,0 @@
-package com.java110.oa.activity;
-
-import org.activiti.engine.impl.cfg.IdGenerator;
-
-import java.util.UUID;
-
-/**
- * @ClassName ActivityIdGenerator
- * @Description TODO
- * @Author wuxw
- * @Date 2019/10/22 21:56
- * @Version 1.0
- * add by wuxw 2019/10/22
- **/
-public class ActivityIdGenerator implements IdGenerator {
-    /**
-     * 封装JDK自带的UUID, 通过Random数字生成, 中间无-分割.
-     */
-    public static String uuid() {
-        return UUID.randomUUID().toString().replaceAll("-", "");
-    }
-
-    /**
-     * Activiti ID 生成
-     */
-    @Override
-    public String getNextId() {
-        return uuid();
-    }
-
-}

+ 0 - 23
service-oa/src/main/java/com/java110/oa/activity/DeploymentActivity.java

@@ -1,23 +0,0 @@
-package com.java110.oa.activity;
-
-import com.java110.utils.factory.ApplicationContextFactory;
-import org.activiti.engine.ProcessEngine;
-import org.activiti.engine.RepositoryService;
-
-/**
- * 初始化 activity 流程信息
- */
-public class DeploymentActivity {
-
-    public static void deploymentProcess() {
-
-        ProcessEngine processEngine = ApplicationContextFactory.getBean("processEngine", ProcessEngine.class);
-
-        RepositoryService repositoryService = processEngine.getRepositoryService();
-        repositoryService.createDeployment()
-                .name("采购申请流程")
-                .addClasspathResource("processes/resourceEntryStore.bpmn").deploy();
-
-
-    }
-}

+ 58 - 0
service-oa/src/main/java/com/java110/oa/listener/advert/AbstractAdvertBusinessServiceDataFlowListener.java

@@ -0,0 +1,58 @@
+package com.java110.oa.listener.advert;
+
+import com.alibaba.fastjson.JSONObject;
+import com.java110.core.event.service.AbstractBusinessServiceDataFlowListener;
+import com.java110.entity.center.Business;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import java.util.Map;
+
+/**
+ * 广告信息 服务侦听 父类
+ * Created by wuxw on 2018/7/4.
+ */
+public abstract class AbstractAdvertBusinessServiceDataFlowListener extends AbstractBusinessServiceDataFlowListener {
+    private static Logger logger = LoggerFactory.getLogger(AbstractAdvertBusinessServiceDataFlowListener.class);
+
+
+    /**
+     * 刷新 businessAdvertInfo 数据
+     * 主要将 数据库 中字段和 接口传递字段建立关系
+     *
+     * @param businessAdvertInfo
+     */
+    protected void flushBusinessAdvertInfo(Map businessAdvertInfo, String statusCd) {
+        businessAdvertInfo.put("newBId", businessAdvertInfo.get("b_id"));
+        businessAdvertInfo.put("classify", businessAdvertInfo.get("classify"));
+        businessAdvertInfo.put("adName", businessAdvertInfo.get("ad_name"));
+        businessAdvertInfo.put("locationTypeCd", businessAdvertInfo.get("location_type_cd"));
+        businessAdvertInfo.put("adTypeCd", businessAdvertInfo.get("ad_type_cd"));
+        businessAdvertInfo.put("advertId", businessAdvertInfo.get("advert_id"));
+        businessAdvertInfo.put("operate", businessAdvertInfo.get("operate"));
+        businessAdvertInfo.put("startTime", businessAdvertInfo.get("start_time"));
+        businessAdvertInfo.put("state", businessAdvertInfo.get("state"));
+        businessAdvertInfo.put("endTime", businessAdvertInfo.get("end_time"));
+        businessAdvertInfo.put("communityId", businessAdvertInfo.get("community_id"));
+        businessAdvertInfo.put("locationObjId", businessAdvertInfo.get("location_obj_id"));
+        businessAdvertInfo.put("seq", businessAdvertInfo.get("seq"));
+        businessAdvertInfo.put("viewType", businessAdvertInfo.get("view_type"));
+        businessAdvertInfo.put("advertType", businessAdvertInfo.get("advert_type"));
+        businessAdvertInfo.put("pageUrl", businessAdvertInfo.get("page_url"));
+        businessAdvertInfo.remove("bId");
+        businessAdvertInfo.put("statusCd", statusCd);
+    }
+
+
+    /**
+     * 当修改数据时,查询instance表中的数据 自动保存删除数据到business中
+     *
+     * @param businessAdvert 广告信息信息
+     */
+    protected void autoSaveDelBusinessAdvert(Business business, JSONObject businessAdvert) {
+//自动插入DEL
+
+    }
+
+
+}