Browse Source

Merge remote-tracking branch 'origin/master'

tags/24080901
CMM 1 year ago
parent
commit
63c74c9a29
24 changed files with 54 additions and 17 deletions
  1. +0
    -0
      kingbasesql/FLW_EV_DATABASECHANGELOGLOCK.sql
  2. +11
    -0
      kingbasesql/act_ge_bytearray.sql
  3. +0
    -0
      kingbasesql/deploy.sql
  4. +0
    -0
      kingbasesql/flw_ev_databasechangelog.sql
  5. +0
    -0
      kingbasesql/nd_wlfow_org_models.sql
  6. +0
    -0
      kingbasesql/nd_wlfow_org_models_historys.sql
  7. +0
    -0
      kingbasesql/project.sql
  8. +0
    -0
      kingbasesql/wflow_cc_tasks.sql
  9. +0
    -0
      kingbasesql/wflow_departments.sql
  10. +0
    -0
      kingbasesql/wflow_model_groups.sql
  11. +6
    -6
      kingbasesql/wflow_model_historys.sql
  12. +0
    -0
      kingbasesql/wflow_model_perms.sql
  13. +2
    -2
      kingbasesql/wflow_models.sql
  14. +0
    -0
      kingbasesql/wflow_notifys.sql
  15. +0
    -0
      kingbasesql/wflow_roles.sql
  16. +0
    -0
      kingbasesql/wflow_user_agents.sql
  17. +0
    -0
      kingbasesql/wflow_user_departments.sql
  18. +0
    -0
      kingbasesql/wflow_user_roles.sql
  19. +0
    -0
      kingbasesql/wflow_users.sql
  20. +0
    -0
      kingbasesql/wflowother.sql
  21. +1
    -1
      pmapi/src/main/java/com/ningdatech/pmapi/common/helper/basic/AbstractRegionCacheHelper.java
  22. +2
    -3
      pmapi/src/main/java/com/ningdatech/pmapi/projectlib/model/dto/ProjectDTO.java
  23. +6
    -5
      pmapi/src/main/java/com/ningdatech/pmapi/scheduler/task/InitProcessTask.java
  24. +26
    -0
      pmapi/src/test/java/com/ningdatech/pmapi/common/helper/RegionCacheHelperTest.java

pgsql/FLW_EV_DATABASECHANGELOGLOCK.sql → kingbasesql/FLW_EV_DATABASECHANGELOGLOCK.sql View File


+ 11
- 0
kingbasesql/act_ge_bytearray.sql View File

@@ -0,0 +1,11 @@
DROP TABLE IF EXISTS ACT_GE_BYTEARRAY;
CREATE TABLE PUBLIC.ACT_GE_BYTEARRAY (
ID_ VARCHAR(64) NOT NULL,
REV_ INT4,
NAME_ VARCHAR(255),
DEPLOYMENT_ID_ VARCHAR(64),
BYTES_ BLOB,
GENERATED_ INT4,
CONSTRAINT ACT_GE_BYTEARRAY_PKEY PRIMARY KEY (ID_)
);
CREATE UNIQUE INDEX "ACT_GE_BYTEARRAY_BYTES_DEPLOYMENT_ID_uindex" ON PUBLIC.ACT_GE_BYTEARRAY (BYTES_,DEPLOYMENT_ID_,ID_);

pgsql/deploy.sql → kingbasesql/deploy.sql View File


pgsql/flw_ev_databasechangelog.sql → kingbasesql/flw_ev_databasechangelog.sql View File


pgsql/nd_wlfow_org_models.sql → kingbasesql/nd_wlfow_org_models.sql View File


pgsql/nd_wlfow_org_models_historys.sql → kingbasesql/nd_wlfow_org_models_historys.sql View File


+ 0
- 0
kingbasesql/project.sql View File


pgsql/wflow_cc_tasks.sql → kingbasesql/wflow_cc_tasks.sql View File


pgsql/wflow_departments.sql → kingbasesql/wflow_departments.sql View File


pgsql/wflow_model_groups.sql → kingbasesql/wflow_model_groups.sql View File


pgsql/wflow_model_historys.sql → kingbasesql/wflow_model_historys.sql View File

@@ -5,16 +5,16 @@ CREATE TABLE wflow_model_historys (
form_id varchar(40) NOT NULL,
form_name varchar(40) NOT NULL,
version int4 NOT NULL DEFAULT 0,
logo json NOT NULL,
settings json NOT NULL,
group_id int8 NOT NULL,
form_items json NOT NULL,
process json NOT NULL,
logo text,
settings text,
group_id int8,
form_items text,
process text,
remark varchar(255),
created timestamp NULL DEFAULT NULL,
region_code varchar(50),
process_type int4,
node_map text,
CONSTRAINT "wflow_model_historys_pri" PRIMARY KEY ("id")
)
);
CREATE UNIQUE INDEX form_id_uk ON wflow_model_historys(form_id,version);

pgsql/wflow_model_perms.sql → kingbasesql/wflow_model_perms.sql View File


pgsql/wflow_models.sql → kingbasesql/wflow_models.sql View File

@@ -8,8 +8,8 @@ CREATE TABLE wflow_models (
logo text,
settings text,
group_id int8,
form_items text NOT NULL,
process text NOT NULL,
form_items text,
process text,
remark varchar(125),
sort int4 NOT NULL,
is_delete BOOL,

pgsql/wflow_notifys.sql → kingbasesql/wflow_notifys.sql View File


pgsql/wflow_roles.sql → kingbasesql/wflow_roles.sql View File


pgsql/wflow_user_agents.sql → kingbasesql/wflow_user_agents.sql View File


pgsql/wflow_user_departments.sql → kingbasesql/wflow_user_departments.sql View File


pgsql/wflow_user_roles.sql → kingbasesql/wflow_user_roles.sql View File


pgsql/wflow_users.sql → kingbasesql/wflow_users.sql View File


pgsql/wflowother.sql → kingbasesql/wflowother.sql View File


+ 1
- 1
pmapi/src/main/java/com/ningdatech/pmapi/common/helper/basic/AbstractRegionCacheHelper.java View File

@@ -63,7 +63,7 @@ public abstract class AbstractRegionCacheHelper implements InitializingBean {
return RegionConverter.toRegionDTO(region);
});
// 初始化所有区域数据到缓存
// initRegionCache();
initRegionCache();
}

}

+ 2
- 3
pmapi/src/main/java/com/ningdatech/pmapi/projectlib/model/dto/ProjectDTO.java View File

@@ -267,10 +267,9 @@ public class ProjectDTO implements Serializable {
@ApiModelProperty("流程状态")
private Integer processStatus;

@ApiModelProperty("动态表单 json")
private Map<String,Object> dynamicForm;

@ApiModelProperty("项目发起人")
private Long sponsor;

private Map<String,Object> dynamicForm;

}

+ 6
- 5
pmapi/src/main/java/com/ningdatech/pmapi/scheduler/task/InitProcessTask.java View File

@@ -50,14 +50,14 @@ public class InitProcessTask {

private final RegionCacheHelper regionCacheHelper;

@Scheduled(cron = "0 31 15 07 3 ?")
@Scheduled(cron = "0 14 16 07 3 ?")
public void doTask() throws UnknownHostException {
if (TaskContant.Host.HOST_ZPF.equals(InetAddress.getLocalHost().getHostName())) {
log.info("=========== 初始化丽水二期 系统表单和流程配置 ======== 任务开始");
StopWatch stopWatch = new StopWatch();
stopWatch.start();
//1.查出丽水市下的 区县 分别去初始化 表单和流程配置数据
List<RegionDTO> regions = regionCacheHelper.listChildren(RegionConst.RC_LS, RegionConst.RL_COUNTY);
List<RegionDTO> regions = regionCacheHelper.listChildren(RegionConst.RC_LS, RegionConst.RL_CITY);

if(CollUtil.isEmpty(regions)){
throw new BizException("丽水地区数据为空 任务结束!");
@@ -115,7 +115,7 @@ public class InitProcessTask {
// models.setFormId("wf" + IdUtil.objectId());
models.setVersion(1);
models.setGroupId(1);
// models.setProcessDefId("pd" + IdUtil.objectId());
models.setProcessDefId("pd" + IdUtil.objectId());
models.setFormName(formName);
models.setProcessType(processType);
models.setRegionCode(region.getRegionCode());
@@ -125,9 +125,10 @@ public class InitProcessTask {
models.setSettings("{\"sign\":false,\"admin\":[],\"notify\":{},\"commiter\":[]}");
models.setFormItems("[]");

if(StringUtils.isNotBlank(processModelService.saveProcess(models))){
String formId = processModelService.saveProcess(models);
if(StringUtils.isNotBlank(formId)){
//初始的流程在部署表也存一份,用来查询
if(StringUtils.isNotBlank(processModelService.deployProcess(models.getFormId(),null))){
if(StringUtils.isNotBlank(processModelService.deployProcess(formId,null))){
log.info("当前区域 【{}】 流程名[{}] 流程数据已经保存成功",region.getRegionName(),formName);
}else{
log.info("当前区域 【{}】 流程名[{}] 流程数据保存失败",region.getRegionName(),formName);


+ 26
- 0
pmapi/src/test/java/com/ningdatech/pmapi/common/helper/RegionCacheHelperTest.java View File

@@ -0,0 +1,26 @@
package com.ningdatech.pmapi.common.helper;

import com.ningdatech.pmapi.AppTests;
import org.junit.jupiter.api.Test;
import org.springframework.beans.factory.annotation.Autowired;

import static org.junit.jupiter.api.Assertions.*;

/**
* <p>
* RegionCacheHelperTest
* </p>
*
* @author WendyYang
* @since 15:52 2023/3/7
*/
class RegionCacheHelperTest extends AppTests {

@Autowired
private RegionCacheHelper regionCacheHelper;

@Test
void listChildren() {
regionCacheHelper.listChildren("331100", 2).forEach(System.out::println);
}
}

Loading…
Cancel
Save