* 'dev' of http://221.0.232.152:9393/ability-center/share-platform:
  ..
  1、修改获取基础设施-视频资源的相关sql操作的表为cache表
  发起者终止流程
  存在欺诈行为?
  npe
  删除所有运行中的流程接口
  ...
  npe
  屮
  ..
  。。。
  ???
  用户主动终止流程
  1.编目更新 2.工作台部门待办列表查询增加申请人姓名bugfix
  通过实例id 终止流程
  1、修改因为合并代码出现的基础设施-视频资源,点击左侧树报错的问题,原因是sql语句去组织cache表中查询了
  Merge branch 'dev' of http://221.0.232.152:9393/ability-center/share-platform into dev
  ..
  超级管理员挂载能力时 无部门id问题

# Conflicts:
#	renren-admin/src/main/java/io/renren/modules/gateway/service/MonitorServiceV2.java
This commit is contained in:
huangweixiong 2022-08-03 14:27:30 +08:00
commit 259f1b757a
89 changed files with 2030 additions and 2202 deletions

View File

@ -5,7 +5,6 @@ import io.renren.common.annotation.ActivitiNoticeOperation;
import io.renren.modules.notice.dto.SysNoticeDTO; import io.renren.modules.notice.dto.SysNoticeDTO;
import io.renren.modules.notice.enums.NoticeStatusEnum; import io.renren.modules.notice.enums.NoticeStatusEnum;
import io.renren.modules.notice.service.SysNoticeService; import io.renren.modules.notice.service.SysNoticeService;
import io.renren.modules.resource.dto.ResourceDTO;
import io.renren.modules.resource.service.ResourceService; import io.renren.modules.resource.service.ResourceService;
import io.renren.modules.sys.dto.SysDeptDTO; import io.renren.modules.sys.dto.SysDeptDTO;
import io.renren.modules.sys.dto.SysRoleDTO; import io.renren.modules.sys.dto.SysRoleDTO;
@ -127,7 +126,7 @@ public class ActivitiNoticeAspect {
*/ */
private void task_complete_notice(final DelegateTask delegateTask, final ActivitiNoticeOperation activitiNoticeOperation) { private void task_complete_notice(final DelegateTask delegateTask, final ActivitiNoticeOperation activitiNoticeOperation) {
Map<String, Object> kv = delegateTask.getVariables(); Map<String, Object> kv = delegateTask.getVariables();
LOGGER.error("表单:" + JSON.toJSONString(kv)); LOGGER.error("表单:{}", JSON.toJSONString(kv));
if (work.contains(TaskListener.EVENTNAME_COMPLETE + kv.get("id").toString())) { if (work.contains(TaskListener.EVENTNAME_COMPLETE + kv.get("id").toString())) {
LOGGER.error("------------出现重放------------"); LOGGER.error("------------出现重放------------");
return; return;
@ -145,25 +144,21 @@ public class ActivitiNoticeAspect {
try { try {
String result; String result;
Boolean termination = Boolean.valueOf(kv.get("termination") != null ? kv.get("termination").toString() : Boolean.FALSE.toString()); // 直接终结 Boolean termination = Boolean.valueOf(kv.get("termination") != null ? kv.get("termination").toString() : Boolean.FALSE.toString()); // 直接终结
Boolean endByUser = Boolean.valueOf(kv.get("endByUser") != null ? kv.get("endByUser").toString() : Boolean.FALSE.toString()); // 用户终止
Boolean reject = Boolean.valueOf(kv.get("reject") != null ? kv.get("reject").toString() : Boolean.FALSE.toString()); // 被拒绝 Boolean reject = Boolean.valueOf(kv.get("reject") != null ? kv.get("reject").toString() : Boolean.FALSE.toString()); // 被拒绝
if (termination) { if (Boolean.TRUE.equals(endByUser)) {
result = "终止被拒"; result = " 发起者终止";
} else if (Boolean.TRUE.equals(termination)) {
result = " 终止被拒";
} else if (reject) { } else if (reject) {
result = "被拒"; result = " 被拒";
} else { } else {
result = "通过"; result = " 通过";
} }
String finalCreator = creator; String finalCreator = creator;
String finalResult = result; String finalResult = result;
CompletableFuture.runAsync(() -> { // 发起人 CompletableFuture.runAsync(() -> { // 发起人
SysUserDTO userDTO = sysUserService.get(Long.valueOf(finalCreator)); SysUserDTO userDTO = sysUserService.get(Long.valueOf(finalCreator));
Long resourceId = null;
if (kv.containsKey("resourceId")) {
resourceId = Long.valueOf(kv.get("resourceId").toString());
} else if (kv.containsKey("id")) {
resourceId = Long.valueOf(kv.get("id").toString());
}
Optional<ResourceDTO> resourceDTO = Optional.ofNullable(resourceService.get(resourceId));
kv.get("resourceId"); kv.get("resourceId");
kv.get("id"); kv.get("id");
String content = "【通知】" + userDTO.getRealName() + ",您发起的" + activitiNoticeOperation.process() + " " + activitiNoticeOperation.value() + "节点" + finalResult; String content = "【通知】" + userDTO.getRealName() + ",您发起的" + activitiNoticeOperation.process() + " " + activitiNoticeOperation.value() + "节点" + finalResult;
@ -205,7 +200,7 @@ public class ActivitiNoticeAspect {
*/ */
private void end_notice(final DelegateExecution execution, final ActivitiNoticeOperation activitiNoticeOperation) { private void end_notice(final DelegateExecution execution, final ActivitiNoticeOperation activitiNoticeOperation) {
Map<String, Object> kv = execution.getVariables(); Map<String, Object> kv = execution.getVariables();
LOGGER.error("表单:" + JSON.toJSONString(kv)); LOGGER.error("表单:{}", JSON.toJSONString(kv));
if (work.contains(ExecutionListener.EVENTNAME_END + kv.get("id").toString())) { if (work.contains(ExecutionListener.EVENTNAME_END + kv.get("id").toString())) {
LOGGER.error("------------出现重放------------"); LOGGER.error("------------出现重放------------");
return; return;
@ -223,25 +218,19 @@ public class ActivitiNoticeAspect {
try { try {
String result; String result;
Boolean termination = Boolean.valueOf(kv.get("termination") != null ? kv.get("termination").toString() : Boolean.FALSE.toString()); // 直接终结 Boolean termination = Boolean.valueOf(kv.get("termination") != null ? kv.get("termination").toString() : Boolean.FALSE.toString()); // 直接终结
Boolean endByUser = Boolean.valueOf(kv.get("endByUser") != null ? kv.get("endByUser").toString() : Boolean.FALSE.toString()); // 用户终止
Boolean reject = Boolean.valueOf(kv.get("reject") != null ? kv.get("reject").toString() : Boolean.FALSE.toString()); // 被拒绝 Boolean reject = Boolean.valueOf(kv.get("reject") != null ? kv.get("reject").toString() : Boolean.FALSE.toString()); // 被拒绝
if (termination) { if (Boolean.TRUE.equals(endByUser)) {
result = " 发起者终止";
} else if (Boolean.TRUE.equals(termination)) {
result = "终止被拒"; result = "终止被拒";
} else if (reject) { } else if (Boolean.TRUE.equals(reject)) {
result = "被拒"; result = "被拒";
} else { } else {
result = "通过"; result = "通过";
} }
String finalCreator = creator; String finalCreator = creator;
String finalResult = result; String finalResult = result;
Long resourceId = null;
if (kv.containsKey("resourceId") && kv.get("resourceId") != null) {
resourceId = Long.valueOf(kv.get("resourceId").toString());
} else if (kv.containsKey("id") && kv.get("id") != null && !kv.get("id").toString().contains("-")) {
resourceId = Long.valueOf(kv.get("id").toString());
} else {
resourceId = 0L;
}
Optional<ResourceDTO> resourceDTO = Optional.ofNullable(resourceService.get(resourceId));
CompletableFuture.runAsync(() -> { // 发起人 CompletableFuture.runAsync(() -> { // 发起人
SysUserDTO userDTO = sysUserService.get(Long.valueOf(finalCreator)); SysUserDTO userDTO = sysUserService.get(Long.valueOf(finalCreator));
kv.get("resourceId"); kv.get("resourceId");
@ -261,11 +250,11 @@ public class ActivitiNoticeAspect {
dto.setFrom("通知"); dto.setFrom("通知");
sysNoticeService.save(dto); sysNoticeService.save(dto);
}, EXECUTOR).thenRunAsync(() -> { }, EXECUTOR).thenRunAsync(() -> {
LOGGER.error("大数据局名称:" + bigDateDeptName); LOGGER.error("大数据局名称:{}", bigDateDeptName);
SysDeptDTO deptDTO = sysDeptService.getByName(bigDateDeptName); SysDeptDTO deptDTO = sysDeptService.getByName(bigDateDeptName);
LOGGER.error("deptDTOId:" + deptDTO.getId()); LOGGER.error("deptDTOId:{}", deptDTO.getId());
SysRoleDTO roleDTO = sysRoleService.getByName(roleName); SysRoleDTO roleDTO = sysRoleService.getByName(roleName);
LOGGER.error("roleDTOId:" + roleDTO.getId()); LOGGER.error("roleDTOId:{}", roleDTO.getId());
Optional<SysUserDTO> userDTO = Optional.ofNullable(sysUserService.getByDeptIdAndRoleId(deptDTO.getId(), roleDTO.getId())); Optional<SysUserDTO> userDTO = Optional.ofNullable(sysUserService.getByDeptIdAndRoleId(deptDTO.getId(), roleDTO.getId()));
userDTO.ifPresent(user -> { userDTO.ifPresent(user -> {
SysUserDTO creatorDTO = sysUserService.get(Long.valueOf(finalCreator)); SysUserDTO creatorDTO = sysUserService.get(Long.valueOf(finalCreator));
@ -310,7 +299,7 @@ public class ActivitiNoticeAspect {
*/ */
private void assignment_notice(final DelegateTask delegateTask, final ActivitiNoticeOperation activitiNoticeOperation) { private void assignment_notice(final DelegateTask delegateTask, final ActivitiNoticeOperation activitiNoticeOperation) {
Map<String, Object> kv = delegateTask.getVariables(); Map<String, Object> kv = delegateTask.getVariables();
LOGGER.error("表单:" + JSON.toJSONString(kv)); LOGGER.error("表单:{}", JSON.toJSONString(kv));
if (work.contains(TaskListener.EVENTNAME_ASSIGNMENT + kv.get("id").toString())) { if (work.contains(TaskListener.EVENTNAME_ASSIGNMENT + kv.get("id").toString())) {
LOGGER.error("------------出现重放------------"); LOGGER.error("------------出现重放------------");
return; return;
@ -330,9 +319,9 @@ public class ActivitiNoticeAspect {
CompletableFuture.runAsync(() -> { // 发起人 CompletableFuture.runAsync(() -> { // 发起人
try { try {
SysUserDTO assignee = sysUserService.get(Long.valueOf(delegateTask.getAssignee())); SysUserDTO assignee = sysUserService.get(Long.valueOf(delegateTask.getAssignee()));
LOGGER.error("审核人:" + assignee.getId()); LOGGER.error("审核人:{}", assignee.getId());
String content = "【通知】您发起的流程 " + activitiNoticeOperation.process() + " 当前审核节点为:" + activitiNoticeOperation.value() + ";当前审核人为:\"" + assignee.getDeptName() + "\"审核负责人\"" + assignee.getRealName() + "\""; String content = "【通知】您发起的流程 " + activitiNoticeOperation.process() + " 当前审核节点为:" + activitiNoticeOperation.value() + ";当前审核人为:\"" + assignee.getDeptName() + "\"审核负责人\"" + assignee.getRealName() + "\"";
LOGGER.info("通知内容:" + content); LOGGER.info("通知内容:{}", content);
SysNoticeDTO dto = new SysNoticeDTO(); SysNoticeDTO dto = new SysNoticeDTO();
dto.setType(2); dto.setType(2);
dto.setTitle("流程流转系统通知"); dto.setTitle("流程流转系统通知");

View File

@ -36,7 +36,7 @@ public class DataFilterAspect {
@Before("dataFilterCut()") @Before("dataFilterCut()")
public void dataFilter(JoinPoint point) { public void dataFilter(JoinPoint point) {
Object params = point.getArgs()[0]; Object params = point.getArgs()[0];
if(params != null && params instanceof Map){ if(params instanceof Map){
UserDetail user = SecurityUser.getUser(); UserDetail user = SecurityUser.getUser();
//如果是超级管理员则不进行数据过滤 //如果是超级管理员则不进行数据过滤

View File

@ -33,7 +33,6 @@ public class LogOperationAspect {
@Pointcut("@annotation(io.renren.common.annotation.LogOperation)") @Pointcut("@annotation(io.renren.common.annotation.LogOperation)")
public void logPointCut() { public void logPointCut() {
} }
@Around("logPointCut()") @Around("logPointCut()")

View File

@ -34,15 +34,5 @@ public class MybatisPlusConfig {
return new PaginationInterceptor(); return new PaginationInterceptor();
} }
// @Bean
// @Order(0)
// public MybatisPlusInterceptor mybatisPlusInterceptor(){
// MybatisPlusInterceptor interceptor = new MybatisPlusInterceptor();
// //添加分页插件
// interceptor.addInnerInterceptor(new PaginationInnerInterceptor(DbType.MYSQL));
// //添加乐观锁插件
// interceptor.addInnerInterceptor(new OptimisticLockerInnerInterceptor());
// return interceptor;
// }
} }

View File

@ -31,10 +31,6 @@ public class RestTemplateConfig {
factory.setReadTimeout(30 * 000);//单位为ms factory.setReadTimeout(30 * 000);//单位为ms
factory.setConnectTimeout(5 * 1000);//单位为ms factory.setConnectTimeout(5 * 1000);//单位为ms
factory.setOutputStreaming(false); factory.setOutputStreaming(false);
// SocketAddress address = new InetSocketAddress("127.0.0.1", 8888);
// Proxy proxy = new Proxy(Proxy.Type.HTTP, address);
// factory.setProxy(proxy);
return factory; return factory;
} }
} }

View File

@ -62,12 +62,12 @@ public class AbilityCenterController {
private final CodeGenerationUtils codeGenerationUtils = CodeGenerationUtils.getInstance(); private final CodeGenerationUtils codeGenerationUtils = CodeGenerationUtils.getInstance();
private static final String key = "abilityprocess"; private static final String KEY = "abilityprocess";
private static Map<String, Object> params = new HashMap<String, Object>() { private static final Map<String, Object> params = new HashMap<String, Object>() {
{ {
put("isLatestVersion", true); // 取最新版本 put("isLatestVersion", true); // 取最新版本
put("key", key); // 限定 put("key", KEY); // 限定
} }
}; };
@ -87,7 +87,6 @@ public class AbilityCenterController {
if (page.getTotal() <= 0) { // if (page.getTotal() <= 0) { //
return new Result().error("联系管理员添加流程"); return new Result().error("联系管理员添加流程");
} }
// String applyNumber = codeGenerationUtils.getApplyNumber("NLSY");
return new Result().ok(abilityBatchApplicationDTO.getSystem().stream().map(index -> { return new Result().ok(abilityBatchApplicationDTO.getSystem().stream().map(index -> {
if (index.get("resourceId") == null) { if (index.get("resourceId") == null) {
logger.error("未携带资源id"); logger.error("未携带资源id");
@ -98,7 +97,6 @@ public class AbilityCenterController {
return null; return null;
} }
TAbilityApplicationDTO tAbilityApplicationDTO = new TAbilityApplicationDTO(); TAbilityApplicationDTO tAbilityApplicationDTO = new TAbilityApplicationDTO();
// tAbilityApplicationDTO.setApplyNumber(applyNumber);
tAbilityApplicationDTO.setArea(abilityBatchApplicationDTO.getArea()); tAbilityApplicationDTO.setArea(abilityBatchApplicationDTO.getArea());
tAbilityApplicationDTO.setAttachment(abilityBatchApplicationDTO.getAttachment()); tAbilityApplicationDTO.setAttachment(abilityBatchApplicationDTO.getAttachment());
tAbilityApplicationDTO.setBasis(abilityBatchApplicationDTO.getBasis()); tAbilityApplicationDTO.setBasis(abilityBatchApplicationDTO.getBasis());
@ -121,13 +119,13 @@ public class AbilityCenterController {
if (tAbilityApplicationDTO.getId() == null) { if (tAbilityApplicationDTO.getId() == null) {
return null; return null;
} }
codeGenerationUtils.setApplyNumber("NLSY", Arrays.asList(tAbilityApplicationDTO.getId()), jdbcTemplate); codeGenerationUtils.setApplyNumber("NLSY", Collections.singletonList(tAbilityApplicationDTO.getId()), jdbcTemplate);
tAbilityApplicationDTO.setCompleteEntry(Boolean.TRUE); tAbilityApplicationDTO.setCompleteEntry(Boolean.TRUE);
// 仿照请求接口 /act/running/startOfBusinessKey // 仿照请求接口 /act/running/startOfBusinessKey
ProcessStartDTO processStartDTO = new ProcessStartDTO(); ProcessStartDTO processStartDTO = new ProcessStartDTO();
processStartDTO.setBusinessKey(tAbilityApplicationDTO.getId().toString()); processStartDTO.setBusinessKey(tAbilityApplicationDTO.getId().toString());
processStartDTO.setProcessDefinitionKey(key); //限定 processStartDTO.setProcessDefinitionKey(KEY); //限定
Map<String, Object> variables = oMapper.convertValue(tAbilityApplicationDTO, Map.class); Map<String, Object> variables = oMapper.convertValue(tAbilityApplicationDTO, Map.class);
processStartDTO.setVariables(variables); processStartDTO.setVariables(variables);
ProcessInstanceDTO dto = actRunningService.startOfBusinessKey(processStartDTO); ProcessInstanceDTO dto = actRunningService.startOfBusinessKey(processStartDTO);
@ -139,7 +137,7 @@ public class AbilityCenterController {
} }
}, executor); }, executor);
return dto; return dto;
}).filter(index -> ObjectUtil.isNotNull(index)).collect(Collectors.toList())); }).filter(ObjectUtil::isNotNull).collect(Collectors.toList()));
} }

View File

@ -75,12 +75,12 @@ public class AbilityCenterControllerV2 {
@Value("${big_date.name}") @Value("${big_date.name}")
private String bigDateDeptName; // 大数据局名称 private String bigDateDeptName; // 大数据局名称
private static final String key = "abilityprocess_v2"; private static final String KEY = "abilityprocess_v2";
private static Map<String, Object> params = new HashMap<String, Object>() { private static final Map<String, Object> params = new HashMap<String, Object>() {
{ {
put("isLatestVersion", true); // 取最新版本 put("isLatestVersion", true); // 取最新版本
put("key", key); // 限定 put("key", KEY); // 限定
} }
}; };
@ -184,7 +184,7 @@ public class AbilityCenterControllerV2 {
codeGenerationUtils.setApplyNumber("NLSY", tAbilityApplicationDTOList.stream().map(TAbilityApplicationDTO::getId).collect(Collectors.toList()), jdbcTemplate); codeGenerationUtils.setApplyNumber("NLSY", tAbilityApplicationDTOList.stream().map(TAbilityApplicationDTO::getId).collect(Collectors.toList()), jdbcTemplate);
Map<Long, List<TAbilityApplicationDTO>> temp = tAbilityApplicationDTOList.stream() Map<Long, List<TAbilityApplicationDTO>> temp = tAbilityApplicationDTOList.stream()
.filter(index -> index != null) .filter(Objects::nonNull)
.filter(index -> StringUtils.isNotEmpty(index.getResourceId())) .filter(index -> StringUtils.isNotEmpty(index.getResourceId()))
.collect(Collectors.groupingBy(t -> { .collect(Collectors.groupingBy(t -> {
ResourceDTO resourceDTO = resourceService.get(Long.valueOf(t.getResourceId())); ResourceDTO resourceDTO = resourceService.get(Long.valueOf(t.getResourceId()));
@ -207,12 +207,12 @@ public class AbilityCenterControllerV2 {
List<TAbilityApplicationDTO> dtoList = temp.get(deptId); List<TAbilityApplicationDTO> dtoList = temp.get(deptId);
CompletableFuture.runAsync(() -> { CompletableFuture.runAsync(() -> {
String[] sqls_ = dtoList.stream().map(index -> String.format("UPDATE t_ability_application SET resource_owner_dept = '%s' WHERE id = %s", JSON.toJSONString(sysDeptDTO), index.getId())).collect(Collectors.toList()).toArray(new String[dtoList.size()]); String[] sqls = dtoList.stream().map(index -> String.format("UPDATE t_ability_application SET resource_owner_dept = '%s' WHERE id = %s", JSON.toJSONString(sysDeptDTO), index.getId())).collect(Collectors.toList()).toArray(new String[dtoList.size()]);
jdbcTemplate.batchUpdate(sqls_); // 批量更新资源所属部门信息 jdbcTemplate.batchUpdate(sqls); // 批量更新资源所属部门信息
logger.info("批量更新申请的资源的部门信息完成"); logger.info("批量更新申请的资源的部门信息完成");
}, executor); }, executor);
Boolean basic_facilities = dtoList.stream().map(index -> { Boolean basicFacilities = dtoList.stream().map(index -> {
Optional<ResourceDTO> resourceDTOOptional = Optional.ofNullable(resourceService.get(Long.valueOf(index.getResourceId()))); Optional<ResourceDTO> resourceDTOOptional = Optional.ofNullable(resourceService.get(Long.valueOf(index.getResourceId())));
if (!resourceDTOOptional.isPresent()) { // 从本库内查不到 视为其它平台的基础设施资源 if (!resourceDTOOptional.isPresent()) { // 从本库内查不到 视为其它平台的基础设施资源
return true; return true;
@ -222,14 +222,14 @@ public class AbilityCenterControllerV2 {
} }
return false; return false;
}).filter(index -> index).findAny().orElse(Boolean.FALSE); }).filter(index -> index).findAny().orElse(Boolean.FALSE);
logger.error("--------------------是否全是基础设施{}----------------------------------------------", basic_facilities); logger.error("--------------------是否全是基础设施{}----------------------------------------------", basicFacilities);
final List<Long> ids = dtoList.stream().map(TAbilityApplicationDTO::getId).collect(Collectors.toList()); // 发起申请的表单id final List<Long> ids = dtoList.stream().map(TAbilityApplicationDTO::getId).collect(Collectors.toList()); // 发起申请的表单id
// 仿照请求接口 /act/running/startOfBusinessKey // 仿照请求接口 /act/running/startOfBusinessKey
ProcessStartDTO processStartDTO = new ProcessStartDTO(); ProcessStartDTO processStartDTO = new ProcessStartDTO();
processStartDTO.setBusinessKey(basic_facilities ? tAbilityApplicationDTOList.stream().filter(index -> StringUtils.isNotEmpty(index.getResourceId())) processStartDTO.setBusinessKey(Boolean.TRUE.equals(basicFacilities) ? tAbilityApplicationDTOList.stream().filter(index -> StringUtils.isNotEmpty(index.getResourceId()))
.map(TAbilityApplicationDTO::getResourceId).findFirst().orElse(null) : .map(TAbilityApplicationDTO::getResourceId).findFirst().orElse(null) :
JSON.toJSONString(ids.stream().limit(5).collect(Collectors.toList()))); // 申请的id列表 json字符 做businesskey JSON.toJSONString(ids.stream().limit(5).collect(Collectors.toList()))); // 申请的id列表 json字符 做businesskey
processStartDTO.setProcessDefinitionKey(key); //限定 processStartDTO.setProcessDefinitionKey(KEY); //限定
AuditingBaseDTO auditingBaseDTO = new AuditingBaseDTO(); AuditingBaseDTO auditingBaseDTO = new AuditingBaseDTO();
auditingBaseDTO.setCompleteEntry(Boolean.TRUE); // 首次录入 auditingBaseDTO.setCompleteEntry(Boolean.TRUE); // 首次录入
@ -244,7 +244,7 @@ public class AbilityCenterControllerV2 {
put("id", applyFlag); //申请id put("id", applyFlag); //申请id
put("creator", user == null ? null : user.getId().toString()); // 创建人 put("creator", user == null ? null : user.getId().toString()); // 创建人
put("userId", user == null ? null : user.getId().toString()); // 创建人 put("userId", user == null ? null : user.getId().toString()); // 创建人
put("basic_facilities", basic_facilities); // 是否为基础设施 put("basic_facilities", basicFacilities); // 是否为基础设施
} }
}); });

View File

@ -35,8 +35,8 @@ import java.util.stream.Collectors;
@RequestMapping("/census/center") @RequestMapping("/census/center")
public class CensusController { public class CensusController {
private static final Logger logger = LoggerFactory.getLogger(CensusController.class); private static final Logger logger = LoggerFactory.getLogger(CensusController.class);
private static Integer cpuNUm = Runtime.getRuntime().availableProcessors(); private static final Integer CPUNUM = Runtime.getRuntime().availableProcessors();
private static final ExecutorService executor = Executors.newFixedThreadPool(cpuNUm); private static final ExecutorService executor = Executors.newFixedThreadPool(CPUNUM);
@Autowired @Autowired
private ResourceService resourceService; private ResourceService resourceService;
@ -80,7 +80,7 @@ public class CensusController {
}; };
finalDbAmount.add(nullMap); finalDbAmount.add(nullMap);
}); });
Long sum = finalDbAmount.stream().mapToLong(index -> Long.valueOf(index.get("amount").toString())).sum(); Long sum = finalDbAmount.stream().mapToLong(index -> Long.parseLong(index.get("amount").toString())).sum();
Map<String, Object> sumMap = new HashMap<String, Object>() { Map<String, Object> sumMap = new HashMap<String, Object>() {
{ {
put("amount", sum); put("amount", sum);
@ -100,59 +100,48 @@ public class CensusController {
CompletableFuture<Void> resourceAmount = CompletableFuture.supplyAsync(() -> { // 获取资源汇聚总量 CompletableFuture<Void> resourceAmount = CompletableFuture.supplyAsync(() -> { // 获取资源汇聚总量
Map map = (Map) resourceService.selectTotal(); Map map = (Map) resourceService.selectTotal();
List<Map<String, Object>> dbAmount = (List<Map<String, Object>>) map.get("total"); List<Map<String, Object>> dbAmount = (List<Map<String, Object>>) map.get("total");
Long sum = dbAmount.stream().mapToLong(index -> Long.parseLong(index.get("count").toString())).sum(); return dbAmount.stream().mapToLong(index -> Long.parseLong(index.get("count").toString())).sum();
return sum; }, executor).thenAccept(sum -> result.add(new HashMap<String, Object>() {
}, executor).thenAccept(sum -> {
result.add(new HashMap<String, Object>() {
{ {
put("amount", sum); put("amount", sum);
put("type", "资源汇聚总量"); put("type", "资源汇聚总量");
} }
}); }));
});
CompletableFuture<Void> userAmount = CompletableFuture.supplyAsync(() -> { // 获取平台用户总数 CompletableFuture<Void> userAmount = CompletableFuture.supplyAsync(() -> { // 获取平台用户总数
return sysUserService.countAllUser(); return sysUserService.countAllUser();
}, executor).thenAccept(sum -> { }, executor).thenAccept(sum -> result.add(new HashMap<String, Object>() {
result.add(new HashMap<String, Object>() {
{ {
put("amount", sum); put("amount", sum);
put("type", "用户量"); put("type", "用户量");
} }
}); }));
});
CompletableFuture<Void> applyAmount = CompletableFuture.supplyAsync(() -> { // 资源申请量 CompletableFuture<Void> applyAmount = CompletableFuture.supplyAsync(() -> { // 资源申请量
return tAbilityApplicationService.countApplyAll(); return tAbilityApplicationService.countApplyAll();
}, executor).thenAccept(sum -> { }, executor).thenAccept(sum -> result.add(new HashMap<String, Object>() {
result.add(new HashMap<String, Object>() {
{ {
put("amount", sum); put("amount", sum);
put("type", "资源申请量"); put("type", "资源申请量");
} }
}); }));
});
CompletableFuture<Void> deptAmount = CompletableFuture.supplyAsync(() -> { // 覆盖部门量 CompletableFuture<Void> deptAmount = CompletableFuture.supplyAsync(() -> { // 覆盖部门量
return resourceService.countAllDept(); return resourceService.countAllDept();
}, executor).thenAccept(sum -> { }, executor).thenAccept(sum -> result.add(new HashMap<String, Object>() {
result.add(new HashMap<String, Object>() {
{ {
put("amount", sum); put("amount", sum);
put("type", "覆盖部门量"); put("type", "覆盖部门量");
} }
}); }));
});
CompletableFuture<Void> pvAmount = CompletableFuture.supplyAsync(() -> { // 平台访问量 CompletableFuture<Void> pvAmount = CompletableFuture.supplyAsync(() -> { // 平台访问量
return resourceService.countAllVisits(); return resourceService.countAllVisits();
}, executor).thenAccept(sum -> { }, executor).thenAccept(sum -> result.add(new HashMap<String, Object>() {
result.add(new HashMap<String, Object>() {
{ {
put("amount", sum); put("amount", sum);
put("type", "平台访问量"); put("type", "平台访问量");
} }
}); }));
});
CompletableFuture<Void> all = CompletableFuture.allOf(resourceAmount, userAmount, applyAmount, deptAmount, pvAmount); CompletableFuture<Void> all = CompletableFuture.allOf(resourceAmount, userAmount, applyAmount, deptAmount, pvAmount);
all.join(); all.join();
result.sort(Comparator.comparing(x -> x.get("type").toString())); result.sort(Comparator.comparing(x -> x.get("type").toString()));
@ -204,7 +193,7 @@ public class CensusController {
List<Map> temp = resourceService.selectDeptProvideCount(n == null ? 24 : n); List<Map> temp = resourceService.selectDeptProvideCount(n == null ? 24 : n);
List<Map<String, Object>> result = Collections.synchronizedList(new ArrayList<>()); List<Map<String, Object>> result = Collections.synchronizedList(new ArrayList<>());
List<CompletableFuture> completableFutures = List<CompletableFuture> completableFutures =
temp.stream().mapToLong(index -> Long.valueOf(index.get("dept_id").toString())).mapToObj(deptId -> { temp.stream().mapToLong(index -> Long.parseLong(index.get("dept_id").toString())).mapToObj(deptId -> {
CompletableFuture<Void> task = CompletableFuture<Void> task =
CompletableFuture.supplyAsync(() -> { // 获取部门提供能力 CompletableFuture.supplyAsync(() -> { // 获取部门提供能力
List<String> db = resourceService.selectDeptProvide(deptId); List<String> db = resourceService.selectDeptProvide(deptId);
@ -240,7 +229,7 @@ public class CensusController {
throw new RuntimeException(e); throw new RuntimeException(e);
} }
} }
).reversed().thenComparing(i -> i.toString())); ).reversed().thenComparing(Object::toString));
return new Result<List<Map<String, Object>>>().ok(result); return new Result<List<Map<String, Object>>>().ok(result);
} }
@ -279,7 +268,7 @@ public class CensusController {
List<Map> temp = tAbilityApplicationService.selectDeptApplyCount(n == null ? 24 : n); List<Map> temp = tAbilityApplicationService.selectDeptApplyCount(n == null ? 24 : n);
List<Map<String, Object>> result = Collections.synchronizedList(new ArrayList<>()); List<Map<String, Object>> result = Collections.synchronizedList(new ArrayList<>());
List<CompletableFuture> completableFutures = List<CompletableFuture> completableFutures =
temp.stream().mapToLong(index -> Long.valueOf(index.get("dept_id").toString())).mapToObj(deptId -> { temp.stream().mapToLong(index -> Long.parseLong(index.get("dept_id").toString())).mapToObj(deptId -> {
CompletableFuture<Void> task = CompletableFuture<Void> task =
CompletableFuture.supplyAsync(() -> { // 获取资源汇聚总量 CompletableFuture.supplyAsync(() -> { // 获取资源汇聚总量
List<String> db = tAbilityApplicationService.selectDeptApply(deptId); List<String> db = tAbilityApplicationService.selectDeptApply(deptId);

View File

@ -1,6 +1,5 @@
package io.renren.common.controller; package io.renren.common.controller;
import com.alibaba.fastjson.JSON; import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONObject; import com.alibaba.fastjson.JSONObject;
import com.fasterxml.jackson.core.JsonProcessingException; import com.fasterxml.jackson.core.JsonProcessingException;
@ -37,7 +36,6 @@ import java.util.concurrent.CopyOnWriteArrayList;
import java.util.concurrent.TimeUnit; import java.util.concurrent.TimeUnit;
import java.util.stream.Collectors; import java.util.stream.Collectors;
/** /**
* 2022.6.19 版本 * 2022.6.19 版本
*/ */
@ -46,11 +44,11 @@ import java.util.stream.Collectors;
@RequestMapping("/census/center/v2") @RequestMapping("/census/center/v2")
public class CensusControllerV2 { public class CensusControllerV2 {
private static final Integer cpuNUm = Runtime.getRuntime().availableProcessors(); private static final Integer CPUNUM = Runtime.getRuntime().availableProcessors();
private static final OkHttpClient client = new OkHttpClient().newBuilder() private static final OkHttpClient client = new OkHttpClient().newBuilder()
.connectTimeout(1, TimeUnit.MINUTES) .connectTimeout(1, TimeUnit.MINUTES)
.readTimeout(1, TimeUnit.MINUTES) .readTimeout(1, TimeUnit.MINUTES)
.connectionPool(new ConnectionPool(cpuNUm * 2, 2, TimeUnit.MINUTES)) .connectionPool(new ConnectionPool(CPUNUM * 2, 2, TimeUnit.MINUTES))
.retryOnConnectionFailure(false) .retryOnConnectionFailure(false)
.build(); .build();
@ -88,25 +86,21 @@ public class CensusControllerV2 {
CompletableFuture<Void> userAmount = CompletableFuture.supplyAsync(() -> { // 获取平台用户总数 CompletableFuture<Void> userAmount = CompletableFuture.supplyAsync(() -> { // 获取平台用户总数
return sysUserService.countAllUser(); return sysUserService.countAllUser();
}).thenAccept(sum -> { }).thenAccept(sum -> result.add(new HashMap<String, Object>() {
result.add(new HashMap<String, Object>() {
{ {
put("amount", sum); put("amount", sum);
put("type", "用户量"); put("type", "用户量");
} }
}); }));
});
CompletableFuture<Void> pvAmount = CompletableFuture.supplyAsync(() -> { // 平台访问量 CompletableFuture<Void> pvAmount = CompletableFuture.supplyAsync(() -> { // 平台访问量
return resourceService.countAllVisits(); return resourceService.countAllVisits();
}).thenAccept(sum -> { }).thenAccept(sum -> result.add(new HashMap<String, Object>() {
result.add(new HashMap<String, Object>() {
{ {
put("amount", sum); put("amount", sum);
put("type", "平台访问量"); put("type", "平台访问量");
} }
}); }));
});
CompletableFuture<Void> all = CompletableFuture.allOf(userAmount, pvAmount); CompletableFuture<Void> all = CompletableFuture.allOf(userAmount, pvAmount);
all.join(); all.join();
result.sort(Comparator.comparing(x -> x.get("type").toString())); result.sort(Comparator.comparing(x -> x.get("type").toString()));
@ -135,14 +129,12 @@ public class CensusControllerV2 {
CompletableFuture<Void> allApplicationAmount = CompletableFuture.supplyAsync(() -> { // 获取平台总应用数目 CompletableFuture<Void> allApplicationAmount = CompletableFuture.supplyAsync(() -> { // 获取平台总应用数目
return jdbcTemplate.queryForObject("SELECT COUNT(id) FROM tb_data_resource WHERE type ='应用资源' AND del_flag = 0;", Long.class); return jdbcTemplate.queryForObject("SELECT COUNT(id) FROM tb_data_resource WHERE type ='应用资源' AND del_flag = 0;", Long.class);
}).thenAccept(sum -> { }).thenAccept(sum -> result.add(new HashMap<String, Object>() {
result.add(new HashMap<String, Object>() {
{ {
put("amount", sum); put("amount", sum);
put("type", "总应用数"); put("type", "总应用数");
} }
}); }));
});
CompletableFuture<Void> buildingApplicationAmount = CompletableFuture.supplyAsync(() -> { // 获取平台建设中数目 CompletableFuture<Void> buildingApplicationAmount = CompletableFuture.supplyAsync(() -> { // 获取平台建设中数目
return jdbcTemplate.queryForObject("SELECT COUNT(DISTINCT data_resource_id) FROM tb_data_attr WHERE EXISTS ( SELECT id FROM tb_data_resource WHERE tb_data_resource.id = tb_data_attr.data_resource_id AND tb_data_resource.del_flag = 0 ) AND attr_type = '应用状态' AND attr_value = '建设中';", Long.class); return jdbcTemplate.queryForObject("SELECT COUNT(DISTINCT data_resource_id) FROM tb_data_attr WHERE EXISTS ( SELECT id FROM tb_data_resource WHERE tb_data_resource.id = tb_data_attr.data_resource_id AND tb_data_resource.del_flag = 0 ) AND attr_type = '应用状态' AND attr_value = '建设中';", Long.class);
}).thenAccept(sum -> { }).thenAccept(sum -> {
@ -155,14 +147,12 @@ public class CensusControllerV2 {
}); });
CompletableFuture<Void> endApplicationAmount = CompletableFuture.supplyAsync(() -> { // 获取平台建设中数目 CompletableFuture<Void> endApplicationAmount = CompletableFuture.supplyAsync(() -> { // 获取平台建设中数目
return jdbcTemplate.queryForObject("SELECT COUNT(DISTINCT data_resource_id) FROM tb_data_attr WHERE EXISTS ( SELECT id FROM tb_data_resource WHERE tb_data_resource.id = tb_data_attr.data_resource_id AND tb_data_resource.del_flag = 0 ) AND attr_type = '应用状态' AND attr_value = '停用';", Long.class); return jdbcTemplate.queryForObject("SELECT COUNT(DISTINCT data_resource_id) FROM tb_data_attr WHERE EXISTS ( SELECT id FROM tb_data_resource WHERE tb_data_resource.id = tb_data_attr.data_resource_id AND tb_data_resource.del_flag = 0 ) AND attr_type = '应用状态' AND attr_value = '停用';", Long.class);
}).thenAccept(sum -> { }).thenAccept(sum -> result.add(new HashMap<String, Object>() {
result.add(new HashMap<String, Object>() {
{ {
put("amount", sum); put("amount", sum);
put("type", "停用应用数"); put("type", "停用应用数");
} }
}); }));
});
CompletableFuture<Void> all = CompletableFuture.allOf(allApplicationAmount, buildingApplicationAmount, endApplicationAmount); CompletableFuture<Void> all = CompletableFuture.allOf(allApplicationAmount, buildingApplicationAmount, endApplicationAmount);
all.join(); all.join();
return new Result().ok(result); return new Result().ok(result);
@ -213,7 +203,7 @@ public class CensusControllerV2 {
re.put("deptName", sysDeptService.get(Long.valueOf(index)).getName()); re.put("deptName", sysDeptService.get(Long.valueOf(index)).getName());
re.put("count", i.get(index).stream().mapToLong(index_ -> index_.values().stream().mapToLong(count_ -> count_).sum()).sum()); re.put("count", i.get(index).stream().mapToLong(index_ -> index_.values().stream().mapToLong(count_ -> count_).sum()).sum());
return re; return re;
}).filter(index -> ObjectUtils.allNotNull(index)).collect(Collectors.toList()); }).filter(ObjectUtils::allNotNull).collect(Collectors.toList());
result.sort(Comparator.comparing(x -> { result.sort(Comparator.comparing(x -> {
ObjectMapper mapper = new ObjectMapper(); ObjectMapper mapper = new ObjectMapper();
try { try {
@ -235,58 +225,48 @@ public class CensusControllerV2 {
List<Map<String, Object>> result = new CopyOnWriteArrayList<>(); List<Map<String, Object>> result = new CopyOnWriteArrayList<>();
CompletableFuture<Void> allAssemblyAmount = CompletableFuture.supplyAsync(() -> { // 获取平台总组件服务数目 CompletableFuture<Void> allAssemblyAmount = CompletableFuture.supplyAsync(() -> { // 获取平台总组件服务数目
return jdbcTemplate.queryForObject("SELECT COUNT(id) FROM tb_data_resource WHERE type ='组件服务' AND del_flag = 0;", Long.class); return jdbcTemplate.queryForObject("SELECT COUNT(id) FROM tb_data_resource WHERE type ='组件服务' AND del_flag = 0;", Long.class);
}).thenAccept(sum -> { }).thenAccept(sum -> result.add(new HashMap<String, Object>() {
result.add(new HashMap<String, Object>() {
{ {
put("amount", sum); put("amount", sum);
put("type", "上架总数"); put("type", "上架总数");
} }
}); }));
});
String sqlFormat = "SELECT COUNT( tda.data_resource_id ) FROM tb_data_attr tda JOIN tb_data_resource tdr ON tda.data_resource_id = tdr.id AND MATCH ( tda.attr_value) AGAINST ( '%s' IN BOOLEAN MODE) AND tda.attr_type = '组件类型' AND tda.del_flag = 0 AND tdr.del_flag = 0;"; String sqlFormat = "SELECT COUNT( tda.data_resource_id ) FROM tb_data_attr tda JOIN tb_data_resource tdr ON tda.data_resource_id = tdr.id AND MATCH ( tda.attr_value) AGAINST ( '%s' IN BOOLEAN MODE) AND tda.attr_type = '组件类型' AND tda.del_flag = 0 AND tdr.del_flag = 0;";
CompletableFuture<Void> aiAssemblyAmount = CompletableFuture.supplyAsync(() -> { // 获取平台智能算法组件服务数目 CompletableFuture<Void> aiAssemblyAmount = CompletableFuture.supplyAsync(() -> { // 获取平台智能算法组件服务数目
return jdbcTemplate.queryForObject(String.format(sqlFormat, "智能算法"), Long.class); return jdbcTemplate.queryForObject(String.format(sqlFormat, "智能算法"), Long.class);
}).thenAccept(sum -> { }).thenAccept(sum -> result.add(new HashMap<String, Object>() {
result.add(new HashMap<String, Object>() {
{ {
put("amount", sum); put("amount", sum);
put("type", "智能算法"); put("type", "智能算法");
} }
}); }));
});
CompletableFuture<Void> gisAssemblyAmount = CompletableFuture.supplyAsync(() -> { // 获取平台图层服务组件服务数目 CompletableFuture<Void> gisAssemblyAmount = CompletableFuture.supplyAsync(() -> { // 获取平台图层服务组件服务数目
return jdbcTemplate.queryForObject(String.format(sqlFormat, "图层服务"), Long.class); return jdbcTemplate.queryForObject(String.format(sqlFormat, "图层服务"), Long.class);
}).thenAccept(sum -> { }).thenAccept(sum -> result.add(new HashMap<String, Object>() {
result.add(new HashMap<String, Object>() {
{ {
put("amount", sum); put("amount", sum);
put("type", "图层服务"); put("type", "图层服务");
} }
}); }));
});
CompletableFuture<Void> busAssemblyAmount = CompletableFuture.supplyAsync(() -> { // 获取平台业务组件组件服务数目 CompletableFuture<Void> busAssemblyAmount = CompletableFuture.supplyAsync(() -> { // 获取平台业务组件组件服务数目
return jdbcTemplate.queryForObject(String.format(sqlFormat, "业务组件"), Long.class); return jdbcTemplate.queryForObject(String.format(sqlFormat, "业务组件"), Long.class);
}).thenAccept(sum -> { }).thenAccept(sum -> result.add(new HashMap<String, Object>() {
result.add(new HashMap<String, Object>() {
{ {
put("amount", sum); put("amount", sum);
put("type", "业务组件"); put("type", "业务组件");
} }
}); }));
});
CompletableFuture<Void> devAssemblyAmount = CompletableFuture.supplyAsync(() -> { // 获取平台业务组件组件服务数目 CompletableFuture<Void> devAssemblyAmount = CompletableFuture.supplyAsync(() -> { // 获取平台业务组件组件服务数目
return jdbcTemplate.queryForObject(String.format(sqlFormat, "开发组件"), Long.class); return jdbcTemplate.queryForObject(String.format(sqlFormat, "开发组件"), Long.class);
}).thenAccept(sum -> { }).thenAccept(sum -> result.add(new HashMap<String, Object>() {
result.add(new HashMap<String, Object>() {
{ {
put("amount", sum); put("amount", sum);
put("type", "开发组件"); put("type", "开发组件");
} }
}); }));
});
CompletableFuture<Void> all = CompletableFuture.allOf(allAssemblyAmount, aiAssemblyAmount, gisAssemblyAmount, busAssemblyAmount, devAssemblyAmount); CompletableFuture<Void> all = CompletableFuture.allOf(allAssemblyAmount, aiAssemblyAmount, gisAssemblyAmount, busAssemblyAmount, devAssemblyAmount);
all.join(); all.join();
return new Result().ok(result); return new Result().ok(result);
@ -299,24 +279,20 @@ public class CensusControllerV2 {
List<Map<String, Object>> result = new CopyOnWriteArrayList<>(); List<Map<String, Object>> result = new CopyOnWriteArrayList<>();
CompletableFuture<Void> allKnowledgeAmount = CompletableFuture.supplyAsync(() -> { // 获取平台总知识库数目 CompletableFuture<Void> allKnowledgeAmount = CompletableFuture.supplyAsync(() -> { // 获取平台总知识库数目
return jdbcTemplate.queryForObject("SELECT COUNT(id) FROM tb_data_resource WHERE type ='知识库' AND del_flag = 0;", Long.class); return jdbcTemplate.queryForObject("SELECT COUNT(id) FROM tb_data_resource WHERE type ='知识库' AND del_flag = 0;", Long.class);
}).thenAccept(sum -> { }).thenAccept(sum -> result.add(new HashMap<String, Object>() {
result.add(new HashMap<String, Object>() {
{ {
put("amount", sum); put("amount", sum);
put("type", "知识库上架总量"); put("type", "知识库上架总量");
} }
}); }));
});
CompletableFuture<Void> allKnowledgeVisitsAmount = CompletableFuture.supplyAsync(() -> { // 获取平台知识库浏览量 CompletableFuture<Void> allKnowledgeVisitsAmount = CompletableFuture.supplyAsync(() -> { // 获取平台知识库浏览量
return jdbcTemplate.queryForObject("SELECT IFNULL(SUM(visits),0) visits FROM tb_data_resource WHERE type ='知识库' AND del_flag = 0;", Long.class); return jdbcTemplate.queryForObject("SELECT IFNULL(SUM(visits),0) visits FROM tb_data_resource WHERE type ='知识库' AND del_flag = 0;", Long.class);
}).thenAccept(sum -> { }).thenAccept(sum -> result.add(new HashMap<String, Object>() {
result.add(new HashMap<String, Object>() {
{ {
put("amount", sum == null ? 0L : sum); put("amount", sum == null ? 0L : sum);
put("type", "知识库总浏览量"); put("type", "知识库总浏览量");
} }
}); }));
});
CompletableFuture<Void> all = CompletableFuture.allOf(allKnowledgeAmount, allKnowledgeVisitsAmount); CompletableFuture<Void> all = CompletableFuture.allOf(allKnowledgeAmount, allKnowledgeVisitsAmount);
all.join(); all.join();
return new Result().ok(result); return new Result().ok(result);
@ -400,8 +376,6 @@ public class CensusControllerV2 {
@LogOperation("能力云图-数据资源简况") @LogOperation("能力云图-数据资源简况")
public Result<List<Map<String, Object>>> dataResourceInfo() { public Result<List<Map<String, Object>>> dataResourceInfo() {
List<Map<String, Object>> result = new CopyOnWriteArrayList<>(); List<Map<String, Object>> result = new CopyOnWriteArrayList<>();
CompletableFuture<Void> allAmount = null;
CompletableFuture<Void> applyInfo = null; // 申请情况
switch (Constant.ProjectPlace.getByFlag(projectPlace)) { switch (Constant.ProjectPlace.getByFlag(projectPlace)) {
case BAOTOU: { // TODO 包头 case BAOTOU: { // TODO 包头
result.add(new HashMap<String, Object>() { result.add(new HashMap<String, Object>() {

View File

@ -77,7 +77,6 @@ public class CensusControllerV3 {
} }
String type = params.get("resourceType").toString(); String type = params.get("resourceType").toString();
List<Map<String, Object>> list = new ArrayList<>();
switch (type) { switch (type) {
case "组件服务": case "组件服务":
@ -87,10 +86,12 @@ public class CensusControllerV3 {
PageData<Map<String, Object>> pageData1 = resourceService.resourceApplicationDetails(params); PageData<Map<String, Object>> pageData1 = resourceService.resourceApplicationDetails(params);
return new Result<PageData<Map<String, Object>>>().ok(pageData1); return new Result<PageData<Map<String, Object>>>().ok(pageData1);
case "基础设施": case "基础设施":
PageData<Map<String, Object>> pageData2 = resourceService.resourceInfrastructureDetails(params); //PageData<Map<String, Object>> pageData2 = resourceService.resourceInfrastructureDetails(params);
PageData<Map<String, Object>> pageData2 = resourceService.resourceInstallationOrDataResourceDetails(params);
return new Result<PageData<Map<String, Object>>>().ok(pageData2); return new Result<PageData<Map<String, Object>>>().ok(pageData2);
case "数据资源": case "数据资源":
PageData<Map<String, Object>> pageData3 = resourceService.resourceDatasDetails(params); //PageData<Map<String, Object>> pageData3 = resourceService.resourceDatasDetails(params);
PageData<Map<String, Object>> pageData3 = resourceService.resourceInstallationOrDataResourceDetails(params);
return new Result<PageData<Map<String, Object>>>().ok(pageData3); return new Result<PageData<Map<String, Object>>>().ok(pageData3);
case "知识库": case "知识库":
PageData<Map<String, Object>> pageData4 = resourceService.resourceKnowledgeDetails(params); PageData<Map<String, Object>> pageData4 = resourceService.resourceKnowledgeDetails(params);
@ -124,22 +125,15 @@ public class CensusControllerV3 {
} }
String type = params.get("resourceType").toString(); String type = params.get("resourceType").toString();
List<Map<String, Object>> list = new ArrayList<>();
switch (type) { switch (type) {
case "组件服务": case "组件服务":
PageData<Map<String, Object>> pageData = resourceService.resourceBusinessUseDetails(params); PageData<Map<String, Object>> pageData = resourceService.resourceBusinessUseDetails(params);
return new Result<PageData<Map<String, Object>>>().ok(pageData); return new Result<PageData<Map<String, Object>>>().ok(pageData);
case "应用资源":
return null;
case "基础设施": case "基础设施":
case "数据资源":
PageData<Map<String, Object>> pageData1 = resourceService.resourceDatasUseDetails(params); PageData<Map<String, Object>> pageData1 = resourceService.resourceDatasUseDetails(params);
return new Result<PageData<Map<String, Object>>>().ok(pageData1); return new Result<PageData<Map<String, Object>>>().ok(pageData1);
case "数据资源":
PageData<Map<String, Object>> pageData2 = resourceService.resourceDatasUseDetails(params);
return new Result<PageData<Map<String, Object>>>().ok(pageData2);
case "知识库":
return null;
default: default:
return null; return null;
} }
@ -429,7 +423,7 @@ public class CensusControllerV3 {
@LogOperation("知识库分布情况") @LogOperation("知识库分布情况")
@ApiImplicitParam(name = "id", value = "行政部门编号", paramType = "query", dataType = "Long") @ApiImplicitParam(name = "id", value = "行政部门编号", paramType = "query", dataType = "Long")
public Result<List<Map<String, Object>>> knowledgeBaseDistriDetail(Long id) { public Result<List<Map<String, Object>>> knowledgeBaseDistriDetail(Long id) {
List<Map<String, Object>> result = new ArrayList<>(); List<Map<String, Object>> result;
Object[] ps = {id, id}; Object[] ps = {id, id};
result = jdbcTemplate.queryForList("SELECT COUNT(a.id) AS num,a.attr_value FROM tb_data_attr a INNER JOIN tb_data_resource b ON a.data_resource_id = b.id\n" + result = jdbcTemplate.queryForList("SELECT COUNT(a.id) AS num,a.attr_value FROM tb_data_attr a INNER JOIN tb_data_resource b ON a.data_resource_id = b.id\n" +
"INNER JOIN sys_dept c on b.dept_id = c.id WHERE a.attr_type = '文件类型' AND a.del_flag = 0 AND b.type = '知识库' AND b.del_flag = 0 AND \n" + "INNER JOIN sys_dept c on b.dept_id = c.id WHERE a.attr_type = '文件类型' AND a.del_flag = 0 AND b.type = '知识库' AND b.del_flag = 0 AND \n" +

View File

@ -1,6 +1,5 @@
package io.renren.common.controller; package io.renren.common.controller;
import io.renren.common.annotation.LogOperation; import io.renren.common.annotation.LogOperation;
import io.renren.common.page.PageData; import io.renren.common.page.PageData;
import io.renren.common.utils.CodeGenerationUtils; import io.renren.common.utils.CodeGenerationUtils;
@ -35,8 +34,8 @@ import java.util.concurrent.Executors;
@RestController @RestController
@RequestMapping("/comment/center") @RequestMapping("/comment/center")
public class CommentController { public class CommentController {
private static Integer cpuNUm = Runtime.getRuntime().availableProcessors(); private static final Integer CPUNUM = Runtime.getRuntime().availableProcessors();
private static final ExecutorService executor = Executors.newFixedThreadPool(cpuNUm); private static final ExecutorService executor = Executors.newFixedThreadPool(CPUNUM);
private static final ObjectMapper oMapper = new ObjectMapper(); private static final ObjectMapper oMapper = new ObjectMapper();
@Autowired @Autowired
@ -54,12 +53,12 @@ public class CommentController {
private static final Logger logger = LoggerFactory.getLogger(CommentController.class); private static final Logger logger = LoggerFactory.getLogger(CommentController.class);
private static final String key = "comment_review"; private static final String KEY = "comment_review";
private static Map<String, Object> params = new HashMap<String, Object>() { private static Map<String, Object> params = new HashMap<String, Object>() {
{ {
put("isLatestVersion", true); // 取最新版本 put("isLatestVersion", true); // 取最新版本
put("key", key); // 限定 put("key", KEY); // 限定
} }
}; };
@ -85,7 +84,6 @@ public class CommentController {
if (tDemandCommentDTO.getId() == null) { if (tDemandCommentDTO.getId() == null) {
return new Result().error("该评论不存在"); return new Result().error("该评论不存在");
} }
// tDemandCommentDTO.setApplyNumber(codeGenerationUtils.getApplyNumber("XQPL"));
tDemandCommentDTO.setDelFlag(2); // 待审核 tDemandCommentDTO.setDelFlag(2); // 待审核
tDemandCommentDTO.setCompleteEntry(Boolean.TRUE); tDemandCommentDTO.setCompleteEntry(Boolean.TRUE);
tDemandCommentService.update(tDemandCommentDTO); tDemandCommentService.update(tDemandCommentDTO);
@ -94,7 +92,7 @@ public class CommentController {
// 仿照请求接口 /act/running/startOfBusinessKey // 仿照请求接口 /act/running/startOfBusinessKey
ProcessStartDTO processStartDTO = new ProcessStartDTO(); ProcessStartDTO processStartDTO = new ProcessStartDTO();
processStartDTO.setBusinessKey(tDemandCommentDTO.getId().toString()); processStartDTO.setBusinessKey(tDemandCommentDTO.getId().toString());
processStartDTO.setProcessDefinitionKey(key); //限定 processStartDTO.setProcessDefinitionKey(KEY); //限定
Map<String, Object> variables = oMapper.convertValue(tDemandCommentDTO, Map.class); Map<String, Object> variables = oMapper.convertValue(tDemandCommentDTO, Map.class);
processStartDTO.setVariables(variables); processStartDTO.setVariables(variables);

View File

@ -1,6 +1,6 @@
package io.renren.common.controller; package io.renren.common.controller;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONObject; import com.alibaba.fastjson.JSONObject;
import io.renren.common.annotation.LogOperation; import io.renren.common.annotation.LogOperation;
import io.renren.common.page.PageData; import io.renren.common.page.PageData;
@ -51,12 +51,12 @@ public class DemandDataController {
private final CodeGenerationUtils codeGenerationUtils = CodeGenerationUtils.getInstance(); private final CodeGenerationUtils codeGenerationUtils = CodeGenerationUtils.getInstance();
private static final String key = "abilitydemandapply"; private static final String KEY = "abilitydemandapply";
private static Map<String, Object> params = new HashMap<String, Object>() { private static Map<String, Object> params = new HashMap<String, Object>() {
{ {
put("isLatestVersion", true); // 取最新版本 put("isLatestVersion", true); // 取最新版本
put("key", key); // 限定 能力资源上架 put("key", KEY); // 限定 能力资源上架
} }
}; };
@ -67,13 +67,12 @@ public class DemandDataController {
// 仿照请求接口 /act/process/lastestPage // 仿照请求接口 /act/process/lastestPage
PageData<Map<String, Object>> page = actProcessService.page(params); PageData<Map<String, Object>> page = actProcessService.page(params);
if (page.getTotal() <= 0) { // if (page.getTotal() <= 0) { //
return new Result().error("联系管理员添加流程:" + key); return new Result().error("联系管理员添加流程:" + KEY);
} }
logger.info("---------------------------------------------------"); logger.info("---------------------------------------------------");
logger.info(JSONObject.toJSONString(tDemandDataDTO)); logger.info(JSON.toJSONString(tDemandDataDTO));
logger.info("####################################################"); logger.info("####################################################");
tDemandDataDTO.setFlag(TDemandDataEntityFlag.UNDER_REVIEW.getFlag()); tDemandDataDTO.setFlag(TDemandDataEntityFlag.UNDER_REVIEW.getFlag());
// tDemandDataDTO.setApplyNumber(codeGenerationUtils.getApplyNumber("NLXQ"));
ValidatorUtils.validateEntity(tDemandDataDTO, AddGroup.class, DefaultGroup.class); ValidatorUtils.validateEntity(tDemandDataDTO, AddGroup.class, DefaultGroup.class);
tDemandDataService.save(tDemandDataDTO); tDemandDataService.save(tDemandDataDTO);
@ -86,18 +85,18 @@ public class DemandDataController {
// 仿照请求接口 /act/running/startOfBusinessKey // 仿照请求接口 /act/running/startOfBusinessKey
ProcessStartDTO processStartDTO = new ProcessStartDTO(); ProcessStartDTO processStartDTO = new ProcessStartDTO();
processStartDTO.setBusinessKey(tDemandDataDTO.getId().toString()); processStartDTO.setBusinessKey(tDemandDataDTO.getId().toString());
processStartDTO.setProcessDefinitionKey(key); // 限定资源上架 processStartDTO.setProcessDefinitionKey(KEY); // 限定资源上架
Map<String, Object> variables = oMapper.convertValue(tDemandDataDTO, Map.class); Map<String, Object> variables = oMapper.convertValue(tDemandDataDTO, Map.class);
processStartDTO.setVariables(variables); processStartDTO.setVariables(variables);
ProcessInstanceDTO dto = actRunningService.startOfBusinessKey(processStartDTO); ProcessInstanceDTO dto = actRunningService.startOfBusinessKey(processStartDTO);
logger.info("-------------------2.启动流程成功--------------------------"); logger.info("-------------------2.启动流程成功--------------------------");
logger.info("ProcessInstanceDTO.getBusinessKey:" + dto.getBusinessKey()); logger.info("ProcessInstanceDTO.getBusinessKey:{}", dto.getBusinessKey());
if (Long.valueOf(dto.getBusinessKey()) != null) { if (Long.valueOf(dto.getBusinessKey()) != null) {
// 仿照请求接口 /processForm/tabilityapplication/updateInstanceId // 仿照请求接口 /processForm/tabilityapplication/updateInstanceId
tDemandDataService.updateInstanceId(dto.getProcessInstanceId(), Long.valueOf(dto.getBusinessKey())); tDemandDataService.updateInstanceId(dto.getProcessInstanceId(), Long.valueOf(dto.getBusinessKey()));
logger.info("-------------------更新updateInstanceId.成功--------------------------"); logger.info("-------------------更新updateInstanceId.成功--------------------------");
logger.info("ProcessInstanceDTO.getProcessInstanceId:" + dto.getProcessInstanceId()); logger.info("ProcessInstanceDTO.getProcessInstanceId:{}", dto.getProcessInstanceId());
} }
return new Result<ProcessInstanceDTO>().ok(dto); return new Result<ProcessInstanceDTO>().ok(dto);

View File

@ -27,13 +27,13 @@ public class FileUploadController {
@Value("${resource.path}") @Value("${resource.path}")
private String uploadPath; private String uploadPath;
@Value("${resource.root_url}") @Value("${resource.root_url}")
private String root_url; private String rootUrl;
@Value("${server.servlet.context-path}") @Value("${server.servlet.context-path}")
private String context_path; private String contextPath;
private static final Logger logger = LoggerFactory.getLogger(FileUploadController.class); private static final Logger logger = LoggerFactory.getLogger(FileUploadController.class);
private static final SimpleDateFormat sdf = new SimpleDateFormat("yyyy/MM/dd/"); private static final SimpleDateFormat SIMPLE_DATE_FORMAT = new SimpleDateFormat("yyyy/MM/dd/");
@PostMapping("/upload") @PostMapping("/upload")
@ApiOperation("文件上传") @ApiOperation("文件上传")
@ -43,8 +43,8 @@ public class FileUploadController {
}) })
public Result<String> upload(@RequestParam("file") MultipartFile uploadFile, public Result<String> upload(@RequestParam("file") MultipartFile uploadFile,
HttpServletRequest request) { HttpServletRequest request) {
logger.info("上传文件:" + uploadFile.getOriginalFilename()); logger.info("上传文件:{}", uploadFile.getOriginalFilename());
String format = sdf.format(new Date()); String format = SIMPLE_DATE_FORMAT.format(new Date());
File folder = new File(uploadPath + "upload" + File.separator + format); File folder = new File(uploadPath + "upload" + File.separator + format);
logger.info(uploadPath + format); logger.info(uploadPath + format);
if (!folder.isDirectory()) { if (!folder.isDirectory()) {
@ -52,15 +52,15 @@ public class FileUploadController {
} }
// 对上传的文件重命名避免文件重名 // 对上传的文件重命名避免文件重名
String oldName = uploadFile.getOriginalFilename(); String oldName = uploadFile.getOriginalFilename();
String newName = UUID.randomUUID().toString() String newName = UUID.randomUUID()
+ oldName.substring(oldName.lastIndexOf("."), oldName.length()); + oldName.substring(oldName.lastIndexOf("."));
try { try {
// 文件保存 // 文件保存
uploadFile.transferTo(new File(folder, newName)); uploadFile.transferTo(new File(folder, newName));
// 返回上传文件的访问路径 // 返回上传文件的访问路径
String filePath = request.getScheme() + "://" + root_url String filePath = request.getScheme() + "://" + rootUrl
+ ":" + request.getServerPort() + context_path + "/upload/" + format + newName; + ":" + request.getServerPort() + contextPath + "/upload/" + format + newName;
return new Result<String>().ok(filePath); return new Result<String>().ok(filePath);
} catch (IOException e) { } catch (IOException e) {
return new Result<String>().error(e.getMessage()); return new Result<String>().error(e.getMessage());

View File

@ -25,7 +25,7 @@ import java.util.concurrent.atomic.AtomicReference;
@RestController @RestController
@RequestMapping("/reject/center") @RequestMapping("/reject/center")
public class RejectController { public class RejectController {
private static Logger logger = LoggerFactory.getLogger(RejectController.class); private static final Logger logger = LoggerFactory.getLogger(RejectController.class);
@Autowired @Autowired
protected TaskService taskService; protected TaskService taskService;
@Autowired @Autowired
@ -45,7 +45,6 @@ public class RejectController {
Optional<Task> taskOptional = Optional.ofNullable(taskService.createTaskQuery().taskId(taskId).includeProcessVariables().singleResult()); Optional<Task> taskOptional = Optional.ofNullable(taskService.createTaskQuery().taskId(taskId).includeProcessVariables().singleResult());
taskOptional.ifPresent(task -> { taskOptional.ifPresent(task -> {
Map<String, Object> combineResultMap = new LinkedHashMap<>(); Map<String, Object> combineResultMap = new LinkedHashMap<>();
// combineResultMap.putAll(task.getProcessVariables());
combineResultMap.putAll(params); combineResultMap.putAll(params);
if (combineResultMap.containsKey("parameterContent")) { // 上架申请特殊处理 if (combineResultMap.containsKey("parameterContent")) { // 上架申请特殊处理
combineResultMap.remove("parameterContent"); combineResultMap.remove("parameterContent");
@ -55,7 +54,7 @@ public class RejectController {
taskService.removeVariable(task.getId(), "parameterContent"); taskService.removeVariable(task.getId(), "parameterContent");
taskService.removeVariable(task.getId(), "resourceDTO"); taskService.removeVariable(task.getId(), "resourceDTO");
taskService.setVariables(task.getId(), combineResultMap); // 更新 taskService.setVariables(task.getId(), combineResultMap); // 更新
logger.error("-----------" + JSON.toJSONString(combineResultMap)); logger.error("-----------{}", JSON.toJSONString(combineResultMap));
taskService.setVariable(task.getId(), "backToFirst", Boolean.FALSE); // 标识驳回标签false taskService.setVariable(task.getId(), "backToFirst", Boolean.FALSE); // 标识驳回标签false
taskService.setVariable(task.getId(), "completeEntry", Boolean.FALSE); // 标志为非首次录入 taskService.setVariable(task.getId(), "completeEntry", Boolean.FALSE); // 标志为非首次录入
taskService.setVariable(task.getId(), "reject", Boolean.FALSE); // 标识流程中是否存在拒绝false taskService.setVariable(task.getId(), "reject", Boolean.FALSE); // 标识流程中是否存在拒绝false
@ -65,7 +64,7 @@ public class RejectController {
String name = userDTOOptional.isPresent() ? userDTOOptional.get().getRealName() : ""; String name = userDTOOptional.isPresent() ? userDTOOptional.get().getRealName() : "";
actTaskService.completeTask(task.getId(), name + "重新发起审核"); actTaskService.completeTask(task.getId(), name + "重新发起审核");
result.set(new Result().ok(name + "重新发起审核成功")); result.set(new Result().ok(name + "重新发起审核成功"));
logger.error(name + "重新发起审核成功"); logger.error("{}重新发起审核成功", name);
}); });
return result.get(); return result.get();
} }

View File

@ -1,8 +1,8 @@
package io.renren.common.controller; package io.renren.common.controller;
import cn.hutool.core.util.ObjectUtil; import cn.hutool.core.util.ObjectUtil;
import cn.hutool.crypto.SecureUtil; import cn.hutool.crypto.SecureUtil;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONObject; import com.alibaba.fastjson.JSONObject;
import io.renren.common.annotation.LogOperation; import io.renren.common.annotation.LogOperation;
import io.renren.common.page.PageData; import io.renren.common.page.PageData;
@ -23,17 +23,21 @@ import io.renren.modules.resourceMountApply.dto.TResourceMountApplyDTO;
import io.renren.modules.resourceMountApply.dto.TResourceUndercarriageApplyDTO; import io.renren.modules.resourceMountApply.dto.TResourceUndercarriageApplyDTO;
import io.renren.modules.resourceMountApply.service.TResourceMountApplyService; import io.renren.modules.resourceMountApply.service.TResourceMountApplyService;
import io.renren.modules.security.user.SecurityUser; import io.renren.modules.security.user.SecurityUser;
import io.renren.modules.sys.dto.SysDeptDTO;
import io.renren.modules.sys.dto.SysUserDTO; import io.renren.modules.sys.dto.SysUserDTO;
import io.renren.modules.sys.service.SysDeptService;
import io.renren.modules.sys.service.SysUserService; import io.renren.modules.sys.service.SysUserService;
import io.swagger.annotations.Api; import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation; import io.swagger.annotations.ApiOperation;
import org.activiti.engine.TaskService; import org.activiti.engine.TaskService;
import org.activiti.engine.task.Task; import org.activiti.engine.task.Task;
import org.activiti.engine.task.TaskQuery; import org.activiti.engine.task.TaskQuery;
import org.apache.commons.lang3.StringUtils;
import org.codehaus.jackson.map.ObjectMapper; import org.codehaus.jackson.map.ObjectMapper;
import org.slf4j.Logger; import org.slf4j.Logger;
import org.slf4j.LoggerFactory; import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.jdbc.core.JdbcTemplate; import org.springframework.jdbc.core.JdbcTemplate;
import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody; import org.springframework.web.bind.annotation.RequestBody;
@ -65,22 +69,27 @@ public class ResourceMountController {
protected TaskService taskService; protected TaskService taskService;
@Autowired @Autowired
private JdbcTemplate jdbcTemplate; private JdbcTemplate jdbcTemplate;
@Autowired
private SysDeptService sysDeptService;
private static final String apply_key = "resourcemountapply"; // 资源上架 @Value("${big_date.name}")
private String bigDateDeptName; // 大数据局名称
private static final String undercarriage_key = "resourcundercarriageapply"; // 资源下架 private static final String APPLY_KEY = "resourcemountapply"; // 资源上架
private static final String UNDERCARRIAGE_KEY = "resourcundercarriageapply"; // 资源下架
private static final Map<String, Object> apply_params = new HashMap<String, Object>() { private static final Map<String, Object> apply_params = new HashMap<String, Object>() {
{ {
put("isLatestVersion", true); // 取最新版本 put("isLatestVersion", true); // 取最新版本
put("key", apply_key); // 限定 能力资源上架 put("key", APPLY_KEY); // 限定 能力资源上架
} }
}; };
private static final Map<String, Object> undercarriage_params = new HashMap<String, Object>() { private static final Map<String, Object> undercarriage_params = new HashMap<String, Object>() {
{ {
put("isLatestVersion", true); // 取最新版本 put("isLatestVersion", true); // 取最新版本
put("key", undercarriage_key); // 限定 资源下架 put("key", UNDERCARRIAGE_KEY); // 限定 资源下架
} }
}; };
@ -103,17 +112,26 @@ public class ResourceMountController {
tResourceMountApplyDTO.setDeptId(tResourceBatchMountApplyDTO.getDeptId()); tResourceMountApplyDTO.setDeptId(tResourceBatchMountApplyDTO.getDeptId());
tResourceMountApplyDTO.setUserId(tResourceBatchMountApplyDTO.getUserId()); tResourceMountApplyDTO.setUserId(tResourceBatchMountApplyDTO.getUserId());
tResourceMountApplyDTO.setUserName(tResourceBatchMountApplyDTO.getUserName()); tResourceMountApplyDTO.setUserName(tResourceBatchMountApplyDTO.getUserName());
tResourceMountApplyDTO.setParameterContent(JSONObject.toJSONString(index)); tResourceMountApplyDTO.setParameterContent(JSON.toJSONString(index));
tResourceMountApplyDTO.setParameterContentMd5(SecureUtil.md5(JSONObject.toJSONString(index))); tResourceMountApplyDTO.setParameterContentMd5(SecureUtil.md5(JSON.toJSONString(index)));
tResourceMountApplyDTO.setResourceDTO(index); tResourceMountApplyDTO.setResourceDTO(index);
tResourceMountApplyDTO.setEnclosure(index.getEnclosure()); tResourceMountApplyDTO.setEnclosure(index.getEnclosure());
// tResourceMountApplyDTO.setApplyNumber(codeGenerationUtils.getApplyNumber("NLSJ"));
try { try {
tResourceMountApplyDTO.setResourceId(tResourceMountApplyDTO.getResourceDTO().getId()); tResourceMountApplyDTO.setResourceId(tResourceMountApplyDTO.getResourceDTO().getId());
} catch (Exception e) { } catch (Exception e) {
logger.error("资源上架异常", e); logger.error("资源上架异常", e);
} }
if (StringUtils.isEmpty(tResourceBatchMountApplyDTO.getDeptId())) {
Optional<SysUserDTO> userDTO = Optional.ofNullable(sysUserService.get(Long.valueOf(tResourceBatchMountApplyDTO.getUserId())));
userDTO.ifPresent(user -> {
if (user.getSuperAdmin() == 1) {
SysDeptDTO deptDTO = sysDeptService.getByName(bigDateDeptName);
tResourceMountApplyDTO.setDeptId(deptDTO.getId().toString());
}
});
}
ValidatorUtils.validateEntity(tResourceMountApplyDTO, AddGroup.class, DefaultGroup.class); ValidatorUtils.validateEntity(tResourceMountApplyDTO, AddGroup.class, DefaultGroup.class);
tResourceMountApplyService.save(tResourceMountApplyDTO); // 保存单条资源申请记录 tResourceMountApplyService.save(tResourceMountApplyDTO); // 保存单条资源申请记录
if (tResourceMountApplyDTO.getId() == null) { if (tResourceMountApplyDTO.getId() == null) {
@ -132,22 +150,22 @@ public class ResourceMountController {
// 仿照请求接口 /act/running/startOfBusinessKey // 仿照请求接口 /act/running/startOfBusinessKey
ProcessStartDTO processStartDTO = new ProcessStartDTO(); ProcessStartDTO processStartDTO = new ProcessStartDTO();
processStartDTO.setBusinessKey(tResourceMountApplyDTO.getId().toString()); processStartDTO.setBusinessKey(tResourceMountApplyDTO.getId().toString());
processStartDTO.setProcessDefinitionKey(apply_key); // 限定资源上架 processStartDTO.setProcessDefinitionKey(APPLY_KEY); // 限定资源上架
Map<String, Object> variables = oMapper.convertValue(tResourceMountApplyDTO, Map.class); Map<String, Object> variables = oMapper.convertValue(tResourceMountApplyDTO, Map.class);
processStartDTO.setVariables(variables); processStartDTO.setVariables(variables);
ProcessInstanceDTO dto = actRunningService.startOfBusinessKey(processStartDTO); ProcessInstanceDTO dto = actRunningService.startOfBusinessKey(processStartDTO);
logger.info("-------------------2.启动流程成功--------------------------"); logger.info("-------------------2.启动流程成功--------------------------");
logger.info("ProcessInstanceDTO.getBusinessKey:" + dto.getBusinessKey()); logger.info("ProcessInstanceDTO.getBusinessKey:{}", dto.getBusinessKey());
if (Long.valueOf(dto.getBusinessKey()) != null) { if (Long.valueOf(dto.getBusinessKey()) != null) {
// 仿照请求接口 /processForm/tabilityapplication/updateInstanceId // 仿照请求接口 /processForm/tabilityapplication/updateInstanceId
tResourceMountApplyService.updateInstanceId(dto.getProcessInstanceId(), Long.valueOf(dto.getBusinessKey())); tResourceMountApplyService.updateInstanceId(dto.getProcessInstanceId(), Long.valueOf(dto.getBusinessKey()));
logger.info("-------------------更新updateInstanceId.成功--------------------------"); logger.info("-------------------更新updateInstanceId.成功--------------------------");
logger.info("ProcessInstanceDTO.getProcessInstanceId:" + dto.getProcessInstanceId()); logger.info("ProcessInstanceDTO.getProcessInstanceId:{}", dto.getProcessInstanceId());
} }
return dto; return dto;
}).filter(index -> ObjectUtil.isNotNull(index)).collect(Collectors.toList())); }).filter(ObjectUtil::isNotNull).collect(Collectors.toList()));
} }
@PostMapping(value = "/undercarriage") @PostMapping(value = "/undercarriage")
@ -168,7 +186,7 @@ public class ResourceMountController {
Optional<ResourceDTO> resourceDTO = Optional.ofNullable(resourceService.get(resourceId)); Optional<ResourceDTO> resourceDTO = Optional.ofNullable(resourceService.get(resourceId));
if (resourceDTO.isPresent()) { if (resourceDTO.isPresent()) {
TaskQuery taskQuery = taskService.createTaskQuery(); TaskQuery taskQuery = taskService.createTaskQuery();
long task = taskQuery.active().processDefinitionKey(undercarriage_key).processInstanceBusinessKey(resourceId.toString()).count(); long task = taskQuery.active().processDefinitionKey(UNDERCARRIAGE_KEY).processInstanceBusinessKey(resourceId.toString()).count();
return task > 0; return task > 0;
} else { } else {
return true; return true;
@ -180,11 +198,10 @@ public class ResourceMountController {
return new Result().ok(tResourceUndercarriageApplyDTO.getResource().stream().map(index -> { return new Result().ok(tResourceUndercarriageApplyDTO.getResource().stream().map(index -> {
List<ProcessInstanceDTO> dtoList = new ArrayList<>(); List<ProcessInstanceDTO> dtoList = new ArrayList<>();
Long resourceId = Long.valueOf(index.get("resourceId")); Long resourceId = Long.valueOf(index.get("resourceId"));
// String resourceName = index.get("resourceName");
Optional<ResourceDTO> resourceDTO = Optional.ofNullable(resourceService.get(resourceId)); Optional<ResourceDTO> resourceDTO = Optional.ofNullable(resourceService.get(resourceId));
resourceDTO.ifPresent(dto -> { resourceDTO.ifPresent(dto -> {
TaskQuery taskQuery = taskService.createTaskQuery(); TaskQuery taskQuery = taskService.createTaskQuery();
long task = taskQuery.active().processDefinitionKey(undercarriage_key).processInstanceBusinessKey(resourceId.toString()).count(); long task = taskQuery.active().processDefinitionKey(UNDERCARRIAGE_KEY).processInstanceBusinessKey(resourceId.toString()).count();
if (task > 0) { if (task > 0) {
logger.error("该资源已发起下架"); logger.error("该资源已发起下架");
throw new RuntimeException("该资源已发起下架"); throw new RuntimeException("该资源已发起下架");
@ -207,13 +224,13 @@ public class ResourceMountController {
// 仿照请求接口 /act/running/startOfBusinessKey // 仿照请求接口 /act/running/startOfBusinessKey
ProcessStartDTO processStartDTO = new ProcessStartDTO(); ProcessStartDTO processStartDTO = new ProcessStartDTO();
processStartDTO.setBusinessKey(resourceId.toString()); processStartDTO.setBusinessKey(resourceId.toString());
processStartDTO.setProcessDefinitionKey(undercarriage_key); // 限定资源下架 processStartDTO.setProcessDefinitionKey(UNDERCARRIAGE_KEY); // 限定资源下架
Map<String, Object> variables = oMapper.convertValue(dto, Map.class); Map<String, Object> variables = oMapper.convertValue(dto, Map.class);
processStartDTO.setVariables(variables); processStartDTO.setVariables(variables);
ProcessInstanceDTO index_ = actRunningService.startOfBusinessKey(processStartDTO); ProcessInstanceDTO index_ = actRunningService.startOfBusinessKey(processStartDTO);
logger.info("-------------------2.启动流程成功--------------------------"); logger.info("-------------------2.启动流程成功--------------------------");
logger.info("ProcessInstanceDTO.getBusinessKey:" + index_.getBusinessKey()); logger.info("ProcessInstanceDTO.getBusinessKey:{}", index_.getBusinessKey());
dtoList.add(index_); dtoList.add(index_);
}); });
return dtoList.stream().findAny().orElse(null); return dtoList.stream().findAny().orElse(null);

View File

@ -1,12 +1,10 @@
package io.renren.common.domain; package io.renren.common.domain;
import lombok.Data; import lombok.Data;
import org.springframework.boot.context.properties.ConfigurationProperties; import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.context.annotation.PropertySource; import org.springframework.context.annotation.PropertySource;
import org.springframework.stereotype.Component; import org.springframework.stereotype.Component;
/** /**
* 包头区域配置项 * 包头区域配置项
*/ */

View File

@ -1,6 +1,5 @@
package io.renren.common.domain; package io.renren.common.domain;
import lombok.Data; import lombok.Data;
import org.springframework.boot.context.properties.ConfigurationProperties; import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.context.annotation.PropertySource; import org.springframework.context.annotation.PropertySource;

View File

@ -9,6 +9,8 @@ import java.io.Serializable;
*/ */
@Data @Data
public class AuditingBaseDTO implements Serializable { public class AuditingBaseDTO implements Serializable {
private static final long serialVersionUID = -6612029904210773020L;
/** /**
* 流程中是否存在拒绝 * 流程中是否存在拒绝
*/ */
@ -34,4 +36,9 @@ public class AuditingBaseDTO implements Serializable {
*/ */
private Boolean backPreviousTask = null; private Boolean backPreviousTask = null;
/**
* 发起者主动终止流程
*/
private Boolean endByUser = null;
} }

View File

@ -14,11 +14,11 @@ import java.util.Date;
*/ */
@Component @Component
public class FieldMetaObjectHandler implements MetaObjectHandler { public class FieldMetaObjectHandler implements MetaObjectHandler {
private final static String CREATE_DATE = "createDate"; private static final String CREATE_DATE = "createDate";
private final static String CREATOR = "creator"; private static final String CREATOR = "creator";
private final static String UPDATE_DATE = "updateDate"; private static final String UPDATE_DATE = "updateDate";
private final static String UPDATER = "updater"; private static final String UPDATER = "updater";
private final static String DEPT_ID = "deptId"; private static final String DEPT_ID = "deptId";
@Override @Override
public void insertFill(MetaObject metaObject) { public void insertFill(MetaObject metaObject) {

View File

@ -30,18 +30,16 @@ public class InitiatorDataEntryListener implements TaskListener {
@Override @Override
public void notify(DelegateTask delegateTask) { public void notify(DelegateTask delegateTask) {
logger.error("----------------------流程发起人录入表单节点---------------------------"); logger.error("----------------------流程发起人录入表单节点---------------------------");
logger.error("事件类型:" + delegateTask.getEventName()); logger.error("事件类型:{}", delegateTask.getEventName());
final String eventName = delegateTask.getEventName(); final String eventName = delegateTask.getEventName();
switch (eventName) { if (EVENTNAME_CREATE.equals(eventName)) {
case EVENTNAME_CREATE:
create(delegateTask); create(delegateTask);
break;
} }
} }
private void create(DelegateTask delegateTask) { private void create(DelegateTask delegateTask) {
Map<String, Object> kv = delegateTask.getVariables(); Map<String, Object> kv = delegateTask.getVariables();
logger.error("录入表单:" + kv.toString()); logger.error("录入表单:{}", kv.toString());
if (kv.containsKey("creator")) { // 表单存在创建者 if (kv.containsKey("creator")) { // 表单存在创建者
taskService.setAssignee(delegateTask.getId(), kv.get("creator").toString()); taskService.setAssignee(delegateTask.getId(), kv.get("creator").toString());
taskService.setOwner(delegateTask.getId(), kv.get("creator").toString()); // 指定流程所有人 taskService.setOwner(delegateTask.getId(), kv.get("creator").toString()); // 指定流程所有人
@ -58,13 +56,12 @@ public class InitiatorDataEntryListener implements TaskListener {
if (auditingBaseDTO.getBackToFirst() != null && auditingBaseDTO.getBackToFirst()) { if (auditingBaseDTO.getBackToFirst() != null && auditingBaseDTO.getBackToFirst()) {
logger.error("被驳回,需修改后重新提交"); logger.error("被驳回,需修改后重新提交");
} else { } else {
if (auditingBaseDTO.getCompleteEntry()) { if (Boolean.TRUE.equals(auditingBaseDTO.getCompleteEntry())) {
taskService.addComment(delegateTask.getId(), delegateTask.getProcessInstanceId(), "完成申请提交"); taskService.addComment(delegateTask.getId(), delegateTask.getProcessInstanceId(), "完成申请提交");
taskService.complete(delegateTask.getId(), delegateTask.getVariables()); taskService.complete(delegateTask.getId(), delegateTask.getVariables());
logger.error("首次录入,自动审核通过!"); logger.error("首次录入,自动审核通过!");
} }
} }
logger.error("----------完成录入表单-----------"); logger.error("----------完成录入表单-----------");
return;
} }
} }

View File

@ -31,7 +31,7 @@ public class CodeGenerationUtils {
*/ */
enum CodeGenerationUtilsEnum { enum CodeGenerationUtilsEnum {
INSTANCE; INSTANCE;
private CodeGenerationUtils codeGenerationUtils; private final CodeGenerationUtils codeGenerationUtils;
CodeGenerationUtilsEnum() { CodeGenerationUtilsEnum() {
codeGenerationUtils = new CodeGenerationUtils(); codeGenerationUtils = new CodeGenerationUtils();
@ -86,6 +86,8 @@ public class CodeGenerationUtils {
case "NLXJ": case "NLXJ":
tableName = "tb_data_resource"; tableName = "tb_data_resource";
break; break;
default:
break;
} }
lock.lock(); lock.lock();
String sql = "SELECT SUBSTR(apply_number, 5) FROM " + tableName + String sql = "SELECT SUBSTR(apply_number, 5) FROM " + tableName +
@ -99,7 +101,6 @@ public class CodeGenerationUtils {
String s = jdbcTemplate.queryForObject(sql, String.class); String s = jdbcTemplate.queryForObject(sql, String.class);
no = applyNumberPattern.substring(0, 4) + (Long.parseLong(s) + 1); no = applyNumberPattern.substring(0, 4) + (Long.parseLong(s) + 1);
} catch (Exception e) { } catch (Exception e) {
logger.error("流水号生成失败", e);
no = applyNumberPattern + "0001"; no = applyNumberPattern + "0001";
} finally { } finally {
try { try {

View File

@ -20,7 +20,5 @@ public class ProcessEngineConfig implements ProcessEngineConfigurationConfigurer
processEngineConfiguration.setJobExecutorActivate(false); processEngineConfiguration.setJobExecutorActivate(false);
processEngineConfiguration.setAsyncExecutorEnabled(false); processEngineConfiguration.setAsyncExecutorEnabled(false);
//自定义流程图样式
//processEngineConfiguration.setProcessDiagramGenerator(customProcessDiagramGenerator);
} }
} }

View File

@ -18,7 +18,6 @@ import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation; import io.swagger.annotations.ApiOperation;
import org.apache.commons.io.IOUtils; import org.apache.commons.io.IOUtils;
import org.apache.commons.lang3.StringUtils; import org.apache.commons.lang3.StringUtils;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*; import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.MultipartFile; import org.springframework.web.multipart.MultipartFile;
@ -145,9 +144,9 @@ public class ActProcessController {
InputStream resourceAsStream = actProcessService.getResourceAsStream(deploymentId, resourceName); InputStream resourceAsStream = actProcessService.getResourceAsStream(deploymentId, resourceName);
String[] fileNames = resourceName.split("\\."); String[] fileNames = resourceName.split("\\.");
if(fileNames.length>1){ if(fileNames.length>1){
if(fileNames[fileNames.length-1].toLowerCase().equals("png")){ if(fileNames[fileNames.length-1].equalsIgnoreCase("png")){
response.setHeader("Content-Type","image/png"); response.setHeader("Content-Type","image/png");
} else if(fileNames[fileNames.length-1].toLowerCase().equals("xml")){ } else if(fileNames[fileNames.length-1].equalsIgnoreCase("xml")){
response.setHeader("Content-Type", "text/xml"); response.setHeader("Content-Type", "text/xml");
response.setHeader("Content-Disposition", "attachment; filename=" + java.net.URLEncoder.encode(resourceName, "UTF-8")); response.setHeader("Content-Disposition", "attachment; filename=" + java.net.URLEncoder.encode(resourceName, "UTF-8"));
} }

View File

@ -11,34 +11,39 @@ import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam; import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams; import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation; import io.swagger.annotations.ApiOperation;
import org.activiti.engine.RuntimeService;
import org.activiti.engine.runtime.ProcessInstance;
import org.activiti.engine.runtime.ProcessInstanceQuery;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*; import org.springframework.web.bind.annotation.*;
import springfox.documentation.annotations.ApiIgnore; import springfox.documentation.annotations.ApiIgnore;
import java.util.List;
import java.util.Map; import java.util.Map;
/** /**
* 运行中的流程 * 运行中的流程
*
*/ */
@RestController @RestController
@RequestMapping("/act/running") @RequestMapping("/act/running")
@Api(tags="运行中的流程") @Api(tags = "运行中的流程")
public class ActRunningController { public class ActRunningController {
@Autowired @Autowired
private ActRunningService actRunningService; private ActRunningService actRunningService;
@Autowired
private RuntimeService runtimeService;
@GetMapping("page") @GetMapping("page")
@ApiOperation("运行中的流程-分页查询") @ApiOperation("运行中的流程-分页查询")
@LogOperation("运行中的流程-分页查询") @LogOperation("运行中的流程-分页查询")
@ApiImplicitParams({ @ApiImplicitParams({
@ApiImplicitParam(name = Constant.PAGE, value = "当前页码从1开始", paramType = "query", required = true, dataType="int") , @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 = Constant.LIMIT, value = "每页显示记录数", paramType = "query", required = true, dataType = "int"),
@ApiImplicitParam(name = "id", value = "实例ID", paramType = "query", dataType="String"), @ApiImplicitParam(name = "id", value = "实例ID", paramType = "query", dataType = "String"),
@ApiImplicitParam(name = "definitionKey", value = "definitionKey", paramType = "query", dataType="String") @ApiImplicitParam(name = "definitionKey", value = "definitionKey", paramType = "query", dataType = "String")
}) })
// @RequiresPermissions("sys:running:all") // @RequiresPermissions("sys:running:all")
public Result<PageData<Map<String, Object>>> page(@ApiIgnore @RequestParam Map<String, Object> params){ public Result<PageData<Map<String, Object>>> page(@ApiIgnore @RequestParam Map<String, Object> params) {
PageData<Map<String, Object>> page = actRunningService.page(params); PageData<Map<String, Object>> page = actRunningService.page(params);
return new Result<PageData<Map<String, Object>>>().ok(page); return new Result<PageData<Map<String, Object>>>().ok(page);
@ -48,18 +53,29 @@ public class ActRunningController {
@ApiOperation("删除运行中的流程") @ApiOperation("删除运行中的流程")
@LogOperation("删除运行中的流程") @LogOperation("删除运行中的流程")
// @RequiresPermissions("sys:running:all") // @RequiresPermissions("sys:running:all")
@ApiImplicitParam(name = "id", value = "ID", paramType = "query", dataType="String") @ApiImplicitParam(name = "id", value = "ID", paramType = "query", dataType = "String")
public Result deleteInstance(@PathVariable("id") String id) { public Result deleteInstance(@PathVariable("id") String id) {
actRunningService.delete(id); actRunningService.delete(id);
return new Result(); return new Result();
} }
@GetMapping("deleteAllInstance")
public Result deleteAllInstance() {
ProcessInstanceQuery processInstanceQuery = runtimeService.createProcessInstanceQuery();
List<ProcessInstance> processInstanceList = processInstanceQuery.list();
processInstanceList.stream().forEach(index -> {
actRunningService.delete(index.getId());
});
return new Result();
}
@PostMapping("start") @PostMapping("start")
@ApiOperation("启动流程实例依据流程定义KEY启动流程实例") @ApiOperation("启动流程实例依据流程定义KEY启动流程实例")
@LogOperation("启动流程实例依据流程定义KEY启动流程实例") @LogOperation("启动流程实例依据流程定义KEY启动流程实例")
@ApiImplicitParam(name = "key", value = "流程定义标识key", paramType = "query", dataType="String") @ApiImplicitParam(name = "key", value = "流程定义标识key", paramType = "query", dataType = "String")
// @RequiresPermissions("sys:running:all") // @RequiresPermissions("sys:running:all")
public Result<ProcessInstanceDTO> start(String key){ public Result<ProcessInstanceDTO> start(String key) {
ProcessInstanceDTO dto = actRunningService.startProcess(key); ProcessInstanceDTO dto = actRunningService.startProcess(key);
return new Result().ok(dto); return new Result().ok(dto);
} }
@ -68,7 +84,7 @@ public class ActRunningController {
@ApiOperation("启动流程实例依据流程定义ID和业务唯一标示启动实例") @ApiOperation("启动流程实例依据流程定义ID和业务唯一标示启动实例")
@LogOperation("启动流程实例依据流程定义ID和业务唯一标示启动实例") @LogOperation("启动流程实例依据流程定义ID和业务唯一标示启动实例")
// @RequiresPermissions("sys:running:all") // @RequiresPermissions("sys:running:all")
public Result<ProcessInstanceDTO> startOfBusinessKey(@RequestBody ProcessStartDTO processStartDTO){ public Result<ProcessInstanceDTO> startOfBusinessKey(@RequestBody ProcessStartDTO processStartDTO) {
ProcessInstanceDTO dto = actRunningService.startOfBusinessKey(processStartDTO); ProcessInstanceDTO dto = actRunningService.startOfBusinessKey(processStartDTO);
return new Result().ok(dto); return new Result().ok(dto);
} }

View File

@ -65,7 +65,7 @@ public class ActTaskController {
*/ */
@GetMapping("myToDoTaskPage") @GetMapping("myToDoTaskPage")
@ApiOperation("我的待办列表") @ApiOperation("我的待办列表")
@LogOperation("我的待办列表查询") // @LogOperation("我的待办列表查询")
@ApiImplicitParams({ @ApiImplicitParams({
@ApiImplicitParam(name = Constant.PAGE, value = "当前页码从1开始", paramType = "query", required = true, dataType = "int"), @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 = Constant.LIMIT, value = "每页显示记录数", paramType = "query", required = true, dataType = "int"),
@ -290,11 +290,18 @@ public class ActTaskController {
@LogOperation("终止流程(直接全拒绝)") @LogOperation("终止流程(直接全拒绝)")
@ApiImplicitParams({ @ApiImplicitParams({
@ApiImplicitParam(name = "taskId", value = "任务ID", paramType = "query", dataType = "String"), @ApiImplicitParam(name = "taskId", value = "任务ID", paramType = "query", dataType = "String"),
@ApiImplicitParam(name = "instanceId", value = "实例ID", paramType = "query", dataType = "String"),
@ApiImplicitParam(name = "comment", value = "终止审核意见", paramType = "query", dataType = "String") @ApiImplicitParam(name = "comment", value = "终止审核意见", paramType = "query", dataType = "String")
}) })
// @RequiresPermissions("sys:task:all") // @RequiresPermissions("sys:task:all")
public Result endProcess(String taskId, String comment) { public Result endProcess(String taskId, String instanceId, String comment) {
// final UserDetail user = SecurityUser.getUser();
if (!StringUtils.isEmpty(taskId)) { // 存在taskId
actTaskService.endProcess(taskId, comment); actTaskService.endProcess(taskId, comment);
}
if (StringUtils.isEmpty(taskId) && !StringUtils.isEmpty(instanceId)) { // 通过实例id
actTaskService.endProcessInstanceId(instanceId, comment);
}
return new Result(); return new Result();
} }

View File

@ -20,6 +20,7 @@ import javax.servlet.http.HttpServletRequest;
import java.io.ByteArrayInputStream; import java.io.ByteArrayInputStream;
import java.io.ByteArrayOutputStream; import java.io.ByteArrayOutputStream;
import java.io.InputStream; import java.io.InputStream;
import java.nio.charset.StandardCharsets;
/** /**
* Model Rest * Model Rest
@ -56,9 +57,9 @@ public class ModelSaveRestResource implements ModelDataJsonConstants {
repositoryService.saveModel(model); repositoryService.saveModel(model);
repositoryService.addModelEditorSource(model.getId(), jsonXml.getBytes("utf-8")); repositoryService.addModelEditorSource(model.getId(), jsonXml.getBytes(StandardCharsets.UTF_8));
InputStream svgStream = new ByteArrayInputStream(svgXml.getBytes("utf-8")); InputStream svgStream = new ByteArrayInputStream(svgXml.getBytes(StandardCharsets.UTF_8));
TranscoderInput input = new TranscoderInput(svgStream); TranscoderInput input = new TranscoderInput(svgStream);
PNGTranscoder transcoder = new PNGTranscoder(); PNGTranscoder transcoder = new PNGTranscoder();

View File

@ -204,9 +204,9 @@ public class ActHistoryService {
query.processDefinitionId((String) params.get("processDefinitionId")); query.processDefinitionId((String) params.get("processDefinitionId"));
} }
if (StringUtils.isNotEmpty((String) params.get("ended"))) { if (StringUtils.isNotEmpty((String) params.get("ended"))) {
if ("true".equals((String) params.get("ended"))) { if ("true".equals(params.get("ended"))) {
query.finished(); query.finished();
} else if ("false".equals((String) params.get("ended"))) { } else if ("false".equals(params.get("ended"))) {
query.unfinished(); query.unfinished();
} }
} }
@ -231,7 +231,7 @@ public class ActHistoryService {
if (!list.isEmpty()) { if (!list.isEmpty()) {
this.converHistoricProcessInstance(list, listInstance); this.converHistoricProcessInstance(list, listInstance);
} }
return new PageData<ProcessInstanceDTO>(listInstance, (int) query.count()); return new PageData<>(listInstance, (int) query.count());
} }
private void converHistoricProcessInstance(List<HistoricProcessInstance> list, List<ProcessInstanceDTO> listInstance) { private void converHistoricProcessInstance(List<HistoricProcessInstance> list, List<ProcessInstanceDTO> listInstance) {
@ -324,9 +324,7 @@ public class ActHistoryService {
dto.setResourceId(null); dto.setResourceId(null);
dto.setDemandCommentFlag(tDemandCommentDTO.getDelFlag()); dto.setDemandCommentFlag(tDemandCommentDTO.getDelFlag());
Optional<TDemandCommentEntityDelFlag> tDemandCommentEntityDelFlag = Optional.ofNullable(TDemandCommentEntityDelFlag.getByFlag(tDemandCommentDTO.getDelFlag())); Optional<TDemandCommentEntityDelFlag> tDemandCommentEntityDelFlag = Optional.ofNullable(TDemandCommentEntityDelFlag.getByFlag(tDemandCommentDTO.getDelFlag()));
if (tDemandCommentEntityDelFlag.isPresent()) { tDemandCommentEntityDelFlag.ifPresent(demandCommentEntityDelFlag -> dto.setDemandCommentFlagTip(demandCommentEntityDelFlag.getTip()));
dto.setDemandCommentFlagTip(tDemandCommentEntityDelFlag.get().getTip());
}
dto.setApplyNumber(tDemandCommentDTO.getApplyNumber()); dto.setApplyNumber(tDemandCommentDTO.getApplyNumber());
} else { } else {
TDemandDataDTO tDemandDataDTO = tDemandDataService.get(Long.valueOf(dto.getBusinessKey())); TDemandDataDTO tDemandDataDTO = tDemandDataService.get(Long.valueOf(dto.getBusinessKey()));
@ -335,9 +333,7 @@ public class ActHistoryService {
dto.setResourceId(null); dto.setResourceId(null);
dto.setDemandFlag(tDemandDataDTO.getFlag()); dto.setDemandFlag(tDemandDataDTO.getFlag());
Optional<TDemandDataEntityFlag> tDemandCommentEntityDelFlag = Optional.ofNullable(TDemandDataEntityFlag.getByFlag(tDemandDataDTO.getFlag())); Optional<TDemandDataEntityFlag> tDemandCommentEntityDelFlag = Optional.ofNullable(TDemandDataEntityFlag.getByFlag(tDemandDataDTO.getFlag()));
if (tDemandCommentEntityDelFlag.isPresent()) { tDemandCommentEntityDelFlag.ifPresent(tDemandDataEntityFlag -> dto.setDemandFlagTip(tDemandDataEntityFlag.getTip()));
dto.setDemandFlagTip(tDemandCommentEntityDelFlag.get().getTip());
}
dto.setApplyNumber(tDemandDataDTO.getApplyNumber()); dto.setApplyNumber(tDemandDataDTO.getApplyNumber());
} }
} }

View File

@ -113,7 +113,7 @@ public class ActModelService {
ByteArrayInputStream in = new ByteArrayInputStream(bpmnBytes); ByteArrayInputStream in = new ByteArrayInputStream(bpmnBytes);
Deployment deployment = repositoryService.createDeployment().name(model.getName()).addInputStream(processName, in).deploy(); Deployment deployment = repositoryService.createDeployment().name(model.getName()).addInputStream(processName, in).deploy();
List<ProcessDefinition> list = repositoryService.createProcessDefinitionQuery().deploymentId(deployment.getId()).list(); List<ProcessDefinition> list = repositoryService.createProcessDefinitionQuery().deploymentId(deployment.getId()).list();
if (list.size() == 0) { if (list.isEmpty()) {
throw new RenException(ErrorCode.ACT_DEPLOY_ERROR); throw new RenException(ErrorCode.ACT_DEPLOY_ERROR);
} }
} catch (Exception e) { } catch (Exception e) {
@ -156,7 +156,7 @@ public class ActModelService {
List<String> names = repositoryService.getDeploymentResourceNames(deploymentId); List<String> names = repositoryService.getDeploymentResourceNames(deploymentId);
String imageName = null; String imageName = null;
for (String name : names) { for (String name : names) {
if (name.indexOf(".png") >= 0) { if (name.contains(".png")) {
imageName = name; imageName = name;
break; break;
} }

View File

@ -123,7 +123,7 @@ public class ActProcessService {
if("zip".equalsIgnoreCase(extension) || "bar".equalsIgnoreCase(extension)) { if("zip".equalsIgnoreCase(extension) || "bar".equalsIgnoreCase(extension)) {
ZipInputStream zip = new ZipInputStream(file.getInputStream()); ZipInputStream zip = new ZipInputStream(file.getInputStream());
repositoryService.createDeployment().addZipInputStream(zip).deploy(); repositoryService.createDeployment().addZipInputStream(zip).deploy();
}else if(fileName.indexOf("bpmn20.xml") != -1){ }else if(fileName.contains("bpmn20.xml")){
repositoryService.createDeployment().addInputStream(fileName, file.getInputStream()).deploy(); repositoryService.createDeployment().addInputStream(fileName, file.getInputStream()).deploy();
}else if("bpmn".equalsIgnoreCase(extension)){ }else if("bpmn".equalsIgnoreCase(extension)){
repositoryService.createDeployment().addInputStream(fileName, file.getInputStream()).deploy(); repositoryService.createDeployment().addInputStream(fileName, file.getInputStream()).deploy();
@ -197,9 +197,7 @@ public class ActProcessService {
* @param resourceName 资源名称 * @param resourceName 资源名称
*/ */
public InputStream getResourceAsStream(String deploymentId, String resourceName) { public InputStream getResourceAsStream(String deploymentId, String resourceName) {
InputStream resourceAsStream = repositoryService.getResourceAsStream(deploymentId, resourceName); return repositoryService.getResourceAsStream(deploymentId, resourceName);
return resourceAsStream;
} }
} }

View File

@ -1,5 +1,7 @@
package io.renren.modules.activiti.service; package io.renren.modules.activiti.service;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.core.toolkit.IdWorker; import com.baomidou.mybatisplus.core.toolkit.IdWorker;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import io.renren.common.constant.Constant; import io.renren.common.constant.Constant;
@ -71,8 +73,8 @@ public class ActTaskService extends BaseServiceImpl {
private static final Logger logger = LoggerFactory.getLogger(ActTaskService.class); private static final Logger logger = LoggerFactory.getLogger(ActTaskService.class);
private static final ObjectMapper oMapper = new ObjectMapper(); private static final ObjectMapper oMapper = new ObjectMapper();
private static Integer cpuNUm = Runtime.getRuntime().availableProcessors(); private static final Integer CPUNUM = Runtime.getRuntime().availableProcessors();
private static final ExecutorService executor = Executors.newFixedThreadPool(cpuNUm); private static final ExecutorService executor = Executors.newFixedThreadPool(CPUNUM);
public static String Task_HANDLE_STATE = "handleState"; //任务节点处理状态key public static String Task_HANDLE_STATE = "handleState"; //任务节点处理状态key
public static String Task_HANDLE_STATE_AGREE = "agree"; //同意 public static String Task_HANDLE_STATE_AGREE = "agree"; //同意
@ -128,7 +130,7 @@ public class ActTaskService extends BaseServiceImpl {
taskQuery.taskAssignee(userId); taskQuery.taskAssignee(userId);
} }
if (StringUtils.isNotEmpty((String) params.get("taskName"))) { if (StringUtils.isNotEmpty((String) params.get("taskName"))) {
taskQuery.taskNameLike("%" + (String) params.get("taskName") + "%"); taskQuery.taskNameLike("%" + params.get("taskName") + "%");
} }
if (StringUtils.isNotEmpty((String) params.get("processDefinitionKey"))) { // 流程定义key if (StringUtils.isNotEmpty((String) params.get("processDefinitionKey"))) { // 流程定义key
taskQuery.processDefinitionKey((String) params.get("processDefinitionKey")); taskQuery.processDefinitionKey((String) params.get("processDefinitionKey"));
@ -186,20 +188,18 @@ public class ActTaskService extends BaseServiceImpl {
return completableFuture; return completableFuture;
}).collect(Collectors.toList()); }).collect(Collectors.toList());
CompletableFuture.allOf(completableFutureList.toArray(new CompletableFuture[completableFutureList.size()])).join(); CompletableFuture.allOf(completableFutureList.toArray(new CompletableFuture[completableFutureList.size()])).join();
Page<TaskDTO> page = new Page(curPage, limit); Page<TaskDTO> page = new Page<>(curPage, limit);
if (taskDtoList.isEmpty()) { if (taskDtoList.isEmpty()) {
page.setRecords(null); page.setRecords(null);
page.setTotal(0); page.setTotal(0);
} else { } else {
ArrayList<TaskDTO> recordLists = new ArrayList<>(); ArrayList<TaskDTO> recordLists = new ArrayList<>(taskDtoList.stream()
recordLists.addAll(taskDtoList.stream()
.distinct() .distinct()
.sorted(Comparator.comparing(TaskDTO::getCreateTime).reversed()) .sorted(Comparator.comparing(TaskDTO::getCreateTime).reversed())
.limit(limit) .limit(limit)
.collect(Collectors.toList()) .collect(Collectors.toList()));
);
page.setRecords(recordLists); page.setRecords(recordLists);
page.setTotal(count.stream().mapToLong(index -> index.longValue()).sum()); page.setTotal(count.stream().mapToLong(Long::longValue).sum());
} }
return page; return page;
} }
@ -210,6 +210,17 @@ public class ActTaskService extends BaseServiceImpl {
TaskDTO dto = new TaskDTO(); TaskDTO dto = new TaskDTO();
this.convertTaskInfo(task, dto); this.convertTaskInfo(task, dto);
Map<String, Object> processVariable = new LinkedHashMap<>(); Map<String, Object> processVariable = new LinkedHashMap<>();
if (task.getProcessVariables().containsKey("tAbilityApplicationDTOList")) {
processVariable.putAll(task.getProcessVariables());
dto.setParams(processVariable);
List<TAbilityApplicationDTO> dtoList = (List<TAbilityApplicationDTO>) task.getProcessVariables().get("tAbilityApplicationDTOList");
JSONObject jsonObject = JSON.parseObject(JSON.toJSONString(dtoList.get(0)));
if (jsonObject != null) {
dto.setUserName(jsonObject.containsKey("user") ? jsonObject.getString("user") : "");
}
listDto.add(dto);
continue;
}
if (dto.getBusinessKey().startsWith("{") || dto.getBusinessKey().startsWith("[")) { // 为json内容 (特殊处理批量) if (dto.getBusinessKey().startsWith("{") || dto.getBusinessKey().startsWith("[")) { // 为json内容 (特殊处理批量)
processVariable.putAll(task.getProcessVariables()); processVariable.putAll(task.getProcessVariables());
@ -430,6 +441,31 @@ public class ActTaskService extends BaseServiceImpl {
return flag; return flag;
} }
private boolean isMultiInstanceByInstanceId(String instanceId) {
boolean flag = false;
Task task = taskService.createTaskQuery().processInstanceId(instanceId).list().stream().sorted(
Comparator.comparing(x -> {
Task index = (Task) x;
return index.getCreateTime();
}).reversed()
).limit(1).findAny().orElse(null);
if (task != null) {
// 获取流程定义id
String processDefinitionId = task.getProcessDefinitionId();
ProcessDefinitionEntity processDefinitionEntity = (ProcessDefinitionEntity) repositoryService.getProcessDefinition(processDefinitionId);
// 根据活动id获取活动实例
ActivityImpl activityImpl = processDefinitionEntity.findActivity(task.getTaskDefinitionKey());
if ((activityImpl).getActivityBehavior() instanceof ParallelMultiInstanceBehavior) {
ParallelMultiInstanceBehavior behavior = (ParallelMultiInstanceBehavior) activityImpl.getActivityBehavior();
if (behavior != null && behavior.getCollectionExpression() != null) {
flag = true;
}
}
}
return flag;
}
/** /**
* 删除任务下的所有变量 * 删除任务下的所有变量
* *
@ -443,10 +479,10 @@ public class ActTaskService extends BaseServiceImpl {
public void deleteTaskVariable(String taskId, String variableName, String scope) { public void deleteTaskVariable(String taskId, String variableName, String scope) {
if (StringUtils.isNotEmpty(scope)) { if (StringUtils.isNotEmpty(scope)) {
if ("global".equals(scope.toLowerCase())) { if ("global".equalsIgnoreCase(scope)) {
Task task = taskService.createTaskQuery().taskId(taskId).singleResult(); Task task = taskService.createTaskQuery().taskId(taskId).singleResult();
runtimeService.removeVariable(task.getExecutionId(), variableName); runtimeService.removeVariable(task.getExecutionId(), variableName);
} else if ("local".equals(scope.toLowerCase())) { } else if ("local".equalsIgnoreCase(scope)) {
taskService.removeVariable(taskId, variableName); taskService.removeVariable(taskId, variableName);
} }
} else { } else {
@ -462,7 +498,7 @@ public class ActTaskService extends BaseServiceImpl {
*/ */
@Transactional(rollbackFor = Exception.class) @Transactional(rollbackFor = Exception.class)
public void doBackPreviousTask(String taskId, String comment) { public void doBackPreviousTask(String taskId, String comment) {
Map<String, Object> variables = null; Map<String, Object> variables;
HistoricTaskInstance currTask = historyService.createHistoricTaskInstanceQuery().taskId(taskId).singleResult(); HistoricTaskInstance currTask = historyService.createHistoricTaskInstanceQuery().taskId(taskId).singleResult();
if (this.isMultiInstance(taskId)) { if (this.isMultiInstance(taskId)) {
throw new RenException(ErrorCode.BACK_PROCESS_PARALLEL_ERROR); throw new RenException(ErrorCode.BACK_PROCESS_PARALLEL_ERROR);
@ -476,11 +512,8 @@ public class ActTaskService extends BaseServiceImpl {
if (canBackActivitys.isEmpty()) { if (canBackActivitys.isEmpty()) {
throw new RenException(ErrorCode.SUPERIOR_NOT_EXIST); throw new RenException(ErrorCode.SUPERIOR_NOT_EXIST);
} }
List<PvmTransition> originPvmTransitionList = new ArrayList<PvmTransition>();
List<PvmTransition> pvmTransitionList = currActivity.getOutgoingTransitions(); List<PvmTransition> pvmTransitionList = currActivity.getOutgoingTransitions();
for (PvmTransition pvmTransition : pvmTransitionList) { List<PvmTransition> originPvmTransitionList = new ArrayList<>(pvmTransitionList);
originPvmTransitionList.add(pvmTransition);
}
pvmTransitionList.clear(); pvmTransitionList.clear();
List<HistoricActivityInstance> historicActivityInstances = historyService List<HistoricActivityInstance> historicActivityInstances = historyService
.createHistoricActivityInstanceQuery().activityType("userTask") .createHistoricActivityInstanceQuery().activityType("userTask")
@ -595,12 +628,9 @@ public class ActTaskService extends BaseServiceImpl {
taskService.complete(taskId); taskService.complete(taskId);
} else { } else {
ActivityImpl currActivity = findActivitiImpl(taskId, null); ActivityImpl currActivity = findActivitiImpl(taskId, null);
List<PvmTransition> oriPvmTransitionList = new ArrayList<PvmTransition>();
List<PvmTransition> pvmTransitionList = currActivity List<PvmTransition> pvmTransitionList = currActivity
.getOutgoingTransitions(); .getOutgoingTransitions();
for (PvmTransition pvmTransition : pvmTransitionList) { List<PvmTransition> oriPvmTransitionList = new ArrayList<>(pvmTransitionList);
oriPvmTransitionList.add(pvmTransition);
}
pvmTransitionList.clear(); pvmTransitionList.clear();
TransitionImpl newTransition = currActivity.createOutgoingTransition(); TransitionImpl newTransition = currActivity.createOutgoingTransition();
ActivityImpl pointActivity = findActivitiImpl(taskId, endActivity.getId()); ActivityImpl pointActivity = findActivitiImpl(taskId, endActivity.getId());
@ -617,9 +647,64 @@ public class ActTaskService extends BaseServiceImpl {
pointActivity.getIncomingTransitions().remove(newTransition); pointActivity.getIncomingTransitions().remove(newTransition);
List<PvmTransition> pvmTransitionListC = currActivity.getOutgoingTransitions(); List<PvmTransition> pvmTransitionListC = currActivity.getOutgoingTransitions();
pvmTransitionListC.clear(); pvmTransitionListC.clear();
for (PvmTransition pvmTransition : oriPvmTransitionList) { pvmTransitionListC.addAll(oriPvmTransitionList);
pvmTransitionListC.add(pvmTransition);
} }
}
@Transactional(rollbackFor = Exception.class)
public void endProcessInstanceId(String instanceId, String comment) {
if (isMultiInstanceByInstanceId(instanceId)) {
throw new RenException(ErrorCode.END_PROCESS_PARALLEL_ERROR);
}
Task task = taskService.createTaskQuery().processInstanceId(instanceId).active().list().stream().sorted(
Comparator.comparing(x -> {
Task index = (Task) x;
return index.getCreateTime();
}).reversed()
).limit(1).findAny().orElse(null);
if (task == null) {
logger.error("查不到流程对应task");
return;
}
List<Task> tasks = taskService.createTaskQuery().processInstanceId(task.getProcessInstanceId()).active()
.taskDefinitionKey(task.getTaskDefinitionKey()).active().list();
if (tasks.size() > 1) {
throw new RenException(ErrorCode.END_PROCESS_HANDLEING_ERROR);
}
ActivityImpl endActivity = findActivitiImplByInstanceId(instanceId, "end");
if (endActivity == null) {
return;
}
if (StringUtils.isEmpty(endActivity.getId())) {
if (!StringUtils.isEmpty(task.getOwner())) {
taskService.resolveTask(task.getId());
}
taskService.addComment(task.getId(), task.getProcessInstanceId(), comment);
taskService.complete(task.getId());
} else {
ActivityImpl currActivity = findActivitiImplByInstanceId(instanceId, null);
List<PvmTransition> pvmTransitionList = currActivity
.getOutgoingTransitions();
List<PvmTransition> oriPvmTransitionList = new ArrayList<>(pvmTransitionList);
pvmTransitionList.clear();
TransitionImpl newTransition = currActivity.createOutgoingTransition();
ActivityImpl pointActivity = findActivitiImplByInstanceId(instanceId, endActivity.getId());
newTransition.setDestination(pointActivity);
if (StringUtils.isNotEmpty(task.getOwner())) {
taskService.resolveTask(task.getId());
}
String message = MessageUtils.getMessage(ErrorCode.END_PROCESS_MESSAGE);
comment = message + "[" + comment + "]";
taskService.addComment(task.getId(), task.getProcessInstanceId(), comment);
taskService.setVariable(task.getId(), Task_HANDLE_STATE, Task_HANDLE_STATE_STOP);
taskService.setVariable(task.getId(), "endByUser", Boolean.TRUE); // 主动终止流程
taskService.setVariable(task.getId(), "reject", Boolean.TRUE); // 存在被拒绝的批示
taskService.complete(task.getId());
pointActivity.getIncomingTransitions().remove(newTransition);
List<PvmTransition> pvmTransitionListC = currActivity.getOutgoingTransitions();
pvmTransitionListC.clear();
pvmTransitionListC.addAll(oriPvmTransitionList);
} }
} }
@ -636,7 +721,7 @@ public class ActTaskService extends BaseServiceImpl {
if (StringUtils.isEmpty(activityId)) { if (StringUtils.isEmpty(activityId)) {
activityId = task.getTaskDefinitionKey(); activityId = task.getTaskDefinitionKey();
} }
if ("END".equals(activityId.toUpperCase())) { if ("END".equalsIgnoreCase(activityId)) {
for (ActivityImpl activityImpl : processDefinition.getActivities()) { for (ActivityImpl activityImpl : processDefinition.getActivities()) {
String type = (String) activityImpl.getProperty("type"); String type = (String) activityImpl.getProperty("type");
if ("endEvent".equals(type)) { if ("endEvent".equals(type)) {
@ -644,9 +729,31 @@ public class ActTaskService extends BaseServiceImpl {
} }
} }
} }
ActivityImpl activityImpl = processDefinition.findActivity(activityId); return processDefinition.findActivity(activityId);
}
private ActivityImpl findActivitiImplByInstanceId(String instanceId, String activityId) {
Task task = taskService.createTaskQuery().processInstanceId(instanceId).list().stream().findAny().orElse(null);
if (task == null) {
return null;
}
ProcessDefinitionEntity processDefinition = (ProcessDefinitionEntity) ((RepositoryServiceImpl) repositoryService).getDeployedProcessDefinition(task.getProcessDefinitionId());
if (processDefinition == null) {
throw new RenException(ErrorCode.NONE_EXIST_PROCESS);
}
if (StringUtils.isEmpty(activityId)) {
activityId = task.getTaskDefinitionKey();
}
if ("END".equalsIgnoreCase(activityId)) {
for (ActivityImpl activityImpl : processDefinition.getActivities()) {
String type = (String) activityImpl.getProperty("type");
if ("endEvent".equals(type)) {
return activityImpl; return activityImpl;
} }
}
}
return processDefinition.findActivity(activityId);
}
/** /**
* 转换Task对象 * 转换Task对象
@ -685,7 +792,7 @@ public class ActTaskService extends BaseServiceImpl {
if (this.isMultiInstance(taskId)) { if (this.isMultiInstance(taskId)) {
throw new RenException(ErrorCode.REJECT_PROCESS_PARALLEL_ERROR); throw new RenException(ErrorCode.REJECT_PROCESS_PARALLEL_ERROR);
} }
Map variables = null; Map variables;
HistoricTaskInstance currTask = historyService.createHistoricTaskInstanceQuery().taskId(taskId).singleResult(); HistoricTaskInstance currTask = historyService.createHistoricTaskInstanceQuery().taskId(taskId).singleResult();
ProcessInstance processInstance = runtimeService.createProcessInstanceQuery().processInstanceId(currTask.getProcessInstanceId()).singleResult(); ProcessInstance processInstance = runtimeService.createProcessInstanceQuery().processInstanceId(currTask.getProcessInstanceId()).singleResult();
ProcessDefinitionEntity processDefinitionEntity = (ProcessDefinitionEntity) ((RepositoryServiceImpl) repositoryService) ProcessDefinitionEntity processDefinitionEntity = (ProcessDefinitionEntity) ((RepositoryServiceImpl) repositoryService)
@ -699,18 +806,15 @@ public class ActTaskService extends BaseServiceImpl {
throw new RenException(ErrorCode.REJECT_PROCESS_HANDLEING_ERROR); throw new RenException(ErrorCode.REJECT_PROCESS_HANDLEING_ERROR);
} }
ActivityImpl currActivity = processDefinitionEntity.findActivity(currTask.getTaskDefinitionKey()); ActivityImpl currActivity = processDefinitionEntity.findActivity(currTask.getTaskDefinitionKey());
List<PvmTransition> originPvmTransitionList = new ArrayList<>();
List<PvmTransition> pvmTransitionList = currActivity.getOutgoingTransitions(); List<PvmTransition> pvmTransitionList = currActivity.getOutgoingTransitions();
for (PvmTransition pvmTransition : pvmTransitionList) { List<PvmTransition> originPvmTransitionList = new ArrayList<>(pvmTransitionList);
originPvmTransitionList.add(pvmTransition);
}
pvmTransitionList.clear(); pvmTransitionList.clear();
List<HistoricActivityInstance> historicActivityInstances = historyService List<HistoricActivityInstance> historicActivityInstances = historyService
.createHistoricActivityInstanceQuery().activityType("userTask") .createHistoricActivityInstanceQuery().activityType("userTask")
.processInstanceId(processInstance.getId()) .processInstanceId(processInstance.getId())
.finished().orderByHistoricActivityInstanceEndTime().asc().list(); .finished().orderByHistoricActivityInstanceEndTime().asc().list();
TransitionImpl transitionImpl = null; TransitionImpl transitionImpl;
if (historicActivityInstances.size() > 0) { if (!historicActivityInstances.isEmpty()) {
ActivityImpl lastActivity = processDefinitionEntity.findActivity(historicActivityInstances.get(0).getActivityId()); ActivityImpl lastActivity = processDefinitionEntity.findActivity(historicActivityInstances.get(0).getActivityId());
transitionImpl = currActivity.createOutgoingTransition(); transitionImpl = currActivity.createOutgoingTransition();
transitionImpl.setDestination(lastActivity); transitionImpl.setDestination(lastActivity);
@ -729,9 +833,7 @@ public class ActTaskService extends BaseServiceImpl {
} }
currActivity.getOutgoingTransitions().remove(transitionImpl); currActivity.getOutgoingTransitions().remove(transitionImpl);
for (PvmTransition pvmTransition : originPvmTransitionList) { pvmTransitionList.addAll(originPvmTransitionList);
pvmTransitionList.add(pvmTransition);
}
} }
public void completeTaskByVariables(TaskDTO taskDTO) { public void completeTaskByVariables(TaskDTO taskDTO) {

View File

@ -19,8 +19,7 @@ public class ProcessBizRouteServiceImpl extends BaseServiceImpl<ProcessBizRoute
@Override @Override
public ProcessBizRouteDTO getProcDefBizRoute(String id) { public ProcessBizRouteDTO getProcDefBizRoute(String id) {
ProcessBizRouteEntity entity = baseDao.getProcDefBizRoute(id); ProcessBizRouteEntity entity = baseDao.getProcDefBizRoute(id);
ProcessBizRouteDTO dto = ConvertUtils.sourceToTarget(entity, ProcessBizRouteDTO.class); return ConvertUtils.sourceToTarget(entity, ProcessBizRouteDTO.class);
return dto;
} }
@Override @Override

View File

@ -69,7 +69,7 @@ public class TDemandDataController {
@GetMapping("/selectFlagCountByDepts") @GetMapping("/selectFlagCountByDepts")
@ApiOperation("按照业务标志统计本部门能力需求") @ApiOperation("按照业务标志统计本部门能力需求")
@LogOperation("按照业务标志统计本部门能力需求") @LogOperation("按照业务标志统计本部门能力需求")
public Result selectFlagCountByDepts(){ public Result selectFlagCountByDepts() {
return new Result().ok(tDemandDataService.selectFlagCountByDepts()); return new Result().ok(tDemandDataService.selectFlagCountByDepts());
} }
@ -79,7 +79,9 @@ public class TDemandDataController {
// @RequiresPermissions("demanData:tdemanddata:info") // @RequiresPermissions("demanData:tdemanddata:info")
public Result<TDemandDataDTO> get(@PathVariable("id") Long id) { public Result<TDemandDataDTO> get(@PathVariable("id") Long id) {
TDemandDataDTO data = tDemandDataService.get(id); TDemandDataDTO data = tDemandDataService.get(id);
if (data != null) {
data.setCommentCount(tDemandCommentService.commentCount(id)); data.setCommentCount(tDemandCommentService.commentCount(id));
}
return new Result<TDemandDataDTO>().ok(data); return new Result<TDemandDataDTO>().ok(data);
} }

View File

@ -1,5 +1,6 @@
package io.renren.modules.demanData.listener; package io.renren.modules.demanData.listener;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONObject; import com.alibaba.fastjson.JSONObject;
import com.google.gson.Gson; import com.google.gson.Gson;
import com.google.gson.GsonBuilder; import com.google.gson.GsonBuilder;
@ -40,7 +41,7 @@ import java.util.Optional;
*/ */
@Component @Component
public class DemandDataListener implements TaskListener, ExecutionListener, ActivitiEventListener, JavaDelegate { public class DemandDataListener implements TaskListener, ExecutionListener, ActivitiEventListener, JavaDelegate {
private static Logger logger = LoggerFactory.getLogger(DemandDataListener.class); private static final Logger logger = LoggerFactory.getLogger(DemandDataListener.class);
private static final ObjectMapper oMapper = new ObjectMapper(); private static final ObjectMapper oMapper = new ObjectMapper();
@Value("${big_date.name}") @Value("${big_date.name}")
@ -69,9 +70,7 @@ public class DemandDataListener implements TaskListener, ExecutionListener, Acti
logger.error("----------------------进入能力需求受理者结束节点---------------------------"); logger.error("----------------------进入能力需求受理者结束节点---------------------------");
execution.getProcessBusinessKey(); execution.getProcessBusinessKey();
final String eventName = execution.getEventName(); final String eventName = execution.getEventName();
switch (eventName) { if (EVENTNAME_END.equals(eventName)) {
case EVENTNAME_END:
break;
} }
} }
@ -84,9 +83,9 @@ public class DemandDataListener implements TaskListener, ExecutionListener, Acti
@ActivitiNoticeOperation(value = "需求部门审批", process = "能力需求申请") @ActivitiNoticeOperation(value = "需求部门审批", process = "能力需求申请")
public void notify(DelegateTask delegateTask) { public void notify(DelegateTask delegateTask) {
logger.error("----------------------进入能力需求受理者1节点---------------------------"); logger.error("----------------------进入能力需求受理者1节点---------------------------");
logger.error("事件类型:" + delegateTask.getEventName()); logger.error("事件类型:{}", delegateTask.getEventName());
SysRoleDTO roleDTO = sysRoleService.getByName(roleName); SysRoleDTO roleDTO = sysRoleService.getByName(roleName);
logger.error("roleDTOId:" + roleDTO.getId()); logger.error("roleDTOId:{}", roleDTO.getId());
final String eventName = delegateTask.getEventName(); final String eventName = delegateTask.getEventName();
switch (eventName) { switch (eventName) {
case EVENTNAME_CREATE: // 进入节点 case EVENTNAME_CREATE: // 进入节点
@ -96,7 +95,7 @@ public class DemandDataListener implements TaskListener, ExecutionListener, Acti
complete(delegateTask); complete(delegateTask);
break; break;
default: default:
logger.error("未处理该事件:" + eventName); logger.error("未处理该事件:{}", eventName);
} }
logger.error("----------------------结束能力需求受理者1节点---------------------------"); logger.error("----------------------结束能力需求受理者1节点---------------------------");
} }
@ -131,7 +130,7 @@ public class DemandDataListener implements TaskListener, ExecutionListener, Acti
TDemandDataDTO demandDataDTO = gson.fromJson(jsonElement, TDemandDataDTO.class); TDemandDataDTO demandDataDTO = gson.fromJson(jsonElement, TDemandDataDTO.class);
if (demandDataDTO != null && demandDataDTO.getApplyUserDeptId() != null) { if (demandDataDTO != null && demandDataDTO.getApplyUserDeptId() != null) {
logger.error(JSONObject.toJSONString(demandDataDTO)); logger.error(JSON.toJSONString(demandDataDTO));
SysDeptDTO deptDTO = SysDeptDTO deptDTO =
sysDeptService.get(Long.valueOf(demandDataDTO.getApplyUserDeptId())); sysDeptService.get(Long.valueOf(demandDataDTO.getApplyUserDeptId()));
SysUserDTO userDTO = null; SysUserDTO userDTO = null;
@ -139,27 +138,27 @@ public class DemandDataListener implements TaskListener, ExecutionListener, Acti
userDTO = sysUserService.getByDeptIdAndRoleId(deptDTO.getId(), roleDTO.getId()); // 搜出审批人 userDTO = sysUserService.getByDeptIdAndRoleId(deptDTO.getId(), roleDTO.getId()); // 搜出审批人
} }
if (userDTO != null) { if (userDTO != null) {
logger.error("审批人id:" + userDTO.getId()); logger.error("审批人id:{}", userDTO.getId());
taskService.setAssignee(delegateTask.getId(), userDTO.getId().toString()); taskService.setAssignee(delegateTask.getId(), userDTO.getId().toString());
assignee = userDTO.getId().toString(); assignee = userDTO.getId().toString();
} else { } else {
logger.error("未查到该部门对应的 " + roleName); logger.error("未查到该部门对应的{} ", roleName);
taskService.setAssignee(delegateTask.getId(), "1516728698224427010"); taskService.setAssignee(delegateTask.getId(), "1516728698224427010");
assignee = "1516728698224427010"; assignee = "1516728698224427010";
} }
} else { // 填入大数据审批人 } else { // 填入大数据审批人
logger.error("大数据局名称:" + bigDateDeptName); logger.error("大数据局名称:{}", bigDateDeptName);
SysDeptDTO deptDTO = sysDeptService.getByName(bigDateDeptName); SysDeptDTO deptDTO = sysDeptService.getByName(bigDateDeptName);
logger.error("roleDTOId:" + roleDTO.getId()); logger.error("roleDTOId:{}", roleDTO.getId());
SysUserDTO userDTO = sysUserService.getByDeptIdAndRoleId(deptDTO.getId(), roleDTO.getId()); SysUserDTO userDTO = sysUserService.getByDeptIdAndRoleId(deptDTO.getId(), roleDTO.getId());
if (userDTO != null) { if (userDTO != null) {
logger.error("大数据审批人id:" + userDTO.getId()); logger.error("大数据审批人id:{}", userDTO.getId());
taskService.setAssignee(delegateTask.getId(), userDTO.getId().toString()); taskService.setAssignee(delegateTask.getId(), userDTO.getId().toString());
assignee = userDTO.getId().toString(); assignee = userDTO.getId().toString();
} else { } else {
taskService.setAssignee(delegateTask.getId(), "1516728698224427010"); taskService.setAssignee(delegateTask.getId(), "1516728698224427010");
logger.error("未查到大数据部门对应 " + roleName); logger.error("未查到大数据部门对应 {}", roleName);
assignee = "1516728698224427010"; assignee = "1516728698224427010";
} }
} }
@ -186,7 +185,7 @@ public class DemandDataListener implements TaskListener, ExecutionListener, Acti
TDemandDataDTO demandDataDTO = gson.fromJson(jsonElement, TDemandDataDTO.class); TDemandDataDTO demandDataDTO = gson.fromJson(jsonElement, TDemandDataDTO.class);
if (demandDataDTO != null) { if (demandDataDTO != null) {
logger.error(JSONObject.toJSONString(demandDataDTO)); logger.error(JSON.toJSONString(demandDataDTO));
SysUserDTO userDTO = sysUserService.get(Long.valueOf(delegateTask.getAssignee())); SysUserDTO userDTO = sysUserService.get(Long.valueOf(delegateTask.getAssignee()));
if (demandDataDTO.getReject() != null && demandDataDTO.getReject() == Boolean.TRUE) { // 拒绝 if (demandDataDTO.getReject() != null && demandDataDTO.getReject() == Boolean.TRUE) { // 拒绝
demandDataDTO.setFlag(TDemandDataEntityFlag.REJECT.getFlag()); demandDataDTO.setFlag(TDemandDataEntityFlag.REJECT.getFlag());
@ -214,7 +213,7 @@ public class DemandDataListener implements TaskListener, ExecutionListener, Acti
demandDataDTO.setApprovalOpinions(comment.isPresent() ? comment.get().getFullMessage() : ""); demandDataDTO.setApprovalOpinions(comment.isPresent() ? comment.get().getFullMessage() : "");
logger.error("---------------------------更新状态为已通过---------------------------------"); logger.error("---------------------------更新状态为已通过---------------------------------");
} }
logger.error("demandDataDTO:" + demandDataDTO); logger.error("demandDataDTO:{}", demandDataDTO);
Map<String, Object> combineResultMap = new HashMap<>(); Map<String, Object> combineResultMap = new HashMap<>();
Map<String, Object> variables = oMapper.convertValue(demandDataDTO, Map.class); Map<String, Object> variables = oMapper.convertValue(demandDataDTO, Map.class);

View File

@ -9,7 +9,6 @@ import io.renren.modules.demanData.entity.TDemandDataEntity;
import io.renren.modules.demanData.entity.TDemandDataEntityFlag; import io.renren.modules.demanData.entity.TDemandDataEntityFlag;
import io.renren.modules.demanData.service.TDemandDataService; import io.renren.modules.demanData.service.TDemandDataService;
import io.renren.modules.security.user.SecurityUser; import io.renren.modules.security.user.SecurityUser;
import io.renren.modules.sys.dao.SysDeptDao;
import io.renren.modules.sys.service.SysDeptService; import io.renren.modules.sys.service.SysDeptService;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
@ -49,6 +48,8 @@ public class TDemandDataServiceImpl extends CrudServiceImpl<TDemandDataDao, TDem
case Constant.SEARCHKEY: case Constant.SEARCHKEY:
wrapper.like("demand_subject", params.get(Constant.SEARCHKEY)); wrapper.like("demand_subject", params.get(Constant.SEARCHKEY));
break; break;
default:
break;
} }
}); });
if (!params.containsKey("creator")) { if (!params.containsKey("creator")) {
@ -78,9 +79,7 @@ public class TDemandDataServiceImpl extends CrudServiceImpl<TDemandDataDao, TDem
deptList = deptService.getSubDeptIdList(deptId); deptList = deptService.getSubDeptIdList(deptId);
} }
List<Map> list = baseDao.selectFlagCountByDepts(deptList); List<Map> list = baseDao.selectFlagCountByDepts(deptList);
list.forEach(temp -> { list.forEach(temp -> temp.put("flag", TDemandDataEntityFlag.getByFlag(Integer.parseInt(temp.get("flag").toString())).getTip()));
temp.put("flag", TDemandDataEntityFlag.getByFlag(Integer.parseInt(temp.get("flag").toString())).getTip());
});
resultMap.put("total", list); resultMap.put("total", list);
return resultMap; return resultMap;
} }

View File

@ -27,7 +27,6 @@ import springfox.documentation.annotations.ApiIgnore;
import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpServletResponse;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
import java.util.Optional;
import java.util.stream.Collectors; import java.util.stream.Collectors;

View File

@ -34,7 +34,7 @@ import java.util.Map;
*/ */
@Component @Component
public class CommentListener implements TaskListener, ExecutionListener, ActivitiEventListener, JavaDelegate { public class CommentListener implements TaskListener, ExecutionListener, ActivitiEventListener, JavaDelegate {
private static Logger logger = LoggerFactory.getLogger(CommentListener.class); private static final Logger logger = LoggerFactory.getLogger(CommentListener.class);
@Value("${big_date.name}") @Value("${big_date.name}")
private String bigDateDeptName; // 大数据局名称 private String bigDateDeptName; // 大数据局名称
@ -60,10 +60,8 @@ public class CommentListener implements TaskListener, ExecutionListener, Activit
logger.error("----------------------进入审批结束节点---------------------------"); logger.error("----------------------进入审批结束节点---------------------------");
delegateExecution.getProcessBusinessKey(); delegateExecution.getProcessBusinessKey();
final String eventName = delegateExecution.getEventName(); final String eventName = delegateExecution.getEventName();
switch (eventName) { if (EVENTNAME_END.equals(eventName)) {
case EVENTNAME_END:
endTake(delegateExecution.getVariables()); endTake(delegateExecution.getVariables());
break;
} }
} }
@ -84,11 +82,11 @@ public class CommentListener implements TaskListener, ExecutionListener, Activit
if (tDemandCommentDTO.getReject() != null && tDemandCommentDTO.getReject() == Boolean.TRUE) { // 存在被拒绝的节点 if (tDemandCommentDTO.getReject() != null && tDemandCommentDTO.getReject() == Boolean.TRUE) { // 存在被拒绝的节点
tDemandCommentDTO.setDelFlag(1); tDemandCommentDTO.setDelFlag(1);
tDemandCommentService.update(tDemandCommentDTO); tDemandCommentService.update(tDemandCommentDTO);
logger.error("评论审核不通过不通过申请id:" + tDemandCommentDTO.getId()); logger.error("评论审核不通过不通过申请id:{}", tDemandCommentDTO.getId());
} else { } else {
tDemandCommentDTO.setDelFlag(0); tDemandCommentDTO.setDelFlag(0);
tDemandCommentService.update(tDemandCommentDTO); tDemandCommentService.update(tDemandCommentDTO);
logger.error("审批通过评论id:" + tDemandCommentDTO.getId()); logger.error("审批通过评论id:{}", tDemandCommentDTO.getId());
} }
} }
} }
@ -101,14 +99,12 @@ public class CommentListener implements TaskListener, ExecutionListener, Activit
@Override @Override
@ActivitiNoticeOperation(value = "评论审核", process = "评论审核流程") @ActivitiNoticeOperation(value = "评论审核", process = "评论审核流程")
public void notify(DelegateTask delegateTask) { public void notify(DelegateTask delegateTask) {
logger.error("事件类型:" + delegateTask.getEventName()); logger.error("事件类型: {}", delegateTask.getEventName());
final String eventName = delegateTask.getEventName(); final String eventName = delegateTask.getEventName();
switch (eventName) { if (EVENTNAME_CREATE.equals(eventName)) {
case EVENTNAME_CREATE:
createEvent(delegateTask); createEvent(delegateTask);
break; } else {
default: logger.error("未处理该事件:{}", eventName);
logger.error("未处理该事件:" + eventName);
} }
} }
@ -129,20 +125,20 @@ public class CommentListener implements TaskListener, ExecutionListener, Activit
*/ */
private void createEvent(DelegateTask delegateTask) { private void createEvent(DelegateTask delegateTask) {
String assignee; String assignee;
logger.error("大数据局名称:" + bigDateDeptName); logger.error("大数据局名称:{}", bigDateDeptName);
SysDeptDTO deptDTO = sysDeptService.getByName(bigDateDeptName); SysDeptDTO deptDTO = sysDeptService.getByName(bigDateDeptName);
logger.error("deptDTOId:" + deptDTO.getId()); logger.error("deptDTOId:{}", deptDTO.getId());
SysRoleDTO roleDTO = sysRoleService.getByName(roleName); SysRoleDTO roleDTO = sysRoleService.getByName(roleName);
logger.error("roleDTOId:" + roleDTO.getId()); logger.error("roleDTOId:{}", roleDTO.getId());
SysUserDTO userDTO = sysUserService.getByDeptIdAndRoleId(deptDTO.getId(), roleDTO.getId()); SysUserDTO userDTO = sysUserService.getByDeptIdAndRoleId(deptDTO.getId(), roleDTO.getId());
if (userDTO != null) { if (userDTO != null) {
logger.error("审批人id:" + userDTO.getId()); logger.error("审批人id:{}", userDTO.getId());
taskService.setAssignee(delegateTask.getId(), userDTO.getId().toString()); taskService.setAssignee(delegateTask.getId(), userDTO.getId().toString());
assignee = userDTO.getId().toString(); assignee = userDTO.getId().toString();
} else { } else {
delegateTask.setAssignee("1516728698224427010"); delegateTask.setAssignee("1516728698224427010");
logger.error("未查到该部门对应 " + roleName); logger.error("未查到该部门对应 {}", roleName);
assignee = "1516728698224427010"; assignee = "1516728698224427010";
} }

View File

@ -36,8 +36,8 @@ import java.util.stream.Collectors;
*/ */
@Service @Service
public class TDemandCommentServiceImpl extends CrudServiceImpl<TDemandCommentDao, TDemandCommentEntity, TDemandCommentDTO> implements TDemandCommentService { public class TDemandCommentServiceImpl extends CrudServiceImpl<TDemandCommentDao, TDemandCommentEntity, TDemandCommentDTO> implements TDemandCommentService {
private static Integer cpuNUm = Runtime.getRuntime().availableProcessors(); private static final Integer CPUNUM = Runtime.getRuntime().availableProcessors();
private static final ExecutorService executor = Executors.newFixedThreadPool(cpuNUm); private static final ExecutorService executor = Executors.newFixedThreadPool(CPUNUM);
@Autowired @Autowired
private TDemandDataService tDemandDataService; private TDemandDataService tDemandDataService;
@Autowired @Autowired
@ -64,7 +64,7 @@ public class TDemandCommentServiceImpl extends CrudServiceImpl<TDemandCommentDao
{ {
put(Constant.SEARCHKEY, params.get(Constant.SEARCHKEY).toString()); put(Constant.SEARCHKEY, params.get(Constant.SEARCHKEY).toString());
} }
}).stream().map(index_ -> index_.getId()).collect(Collectors.toList()).toArray()) // 需求主题 }).stream().map(TDemandDataDTO::getId).collect(Collectors.toList()).toArray()) // 需求主题
.or().like("comment", params.get(Constant.SEARCHKEY).toString()); // 评论内容 .or().like("comment", params.get(Constant.SEARCHKEY).toString()); // 评论内容
} }
break; break;
@ -94,7 +94,7 @@ public class TDemandCommentServiceImpl extends CrudServiceImpl<TDemandCommentDao
if (tDemandCommentDTO.getDelFlag() == 0) { if (tDemandCommentDTO.getDelFlag() == 0) {
CompletableFuture.runAsync(() -> { // 发起人 CompletableFuture.runAsync(() -> { // 发起人
Optional<TDemandDataDTO> tDemandDataDTO = Optional.ofNullable(tDemandDataService.get(tDemandCommentDTO.getTargetId())); Optional<TDemandDataDTO> tDemandDataDTO = Optional.ofNullable(tDemandDataService.get(tDemandCommentDTO.getTargetId()));
Optional<SysUserDTO> sysUserDTO = Optional.ofNullable(sysUserService.get(tDemandDataDTO.isPresent() ? tDemandDataDTO.get().getCreator() : null)); Optional<SysUserDTO> sysUserDTO = Optional.ofNullable(sysUserService.get(tDemandDataDTO.map(TDemandDataDTO::getCreator).orElse(null)));
String content = "【评论】" + (sysUserDTO.isPresent() ? sysUserDTO.get().getRealName() : "") + " 您发起的需求 " + tDemandDataDTO.orElse(new TDemandDataDTO()).getDemandSubject() String content = "【评论】" + (sysUserDTO.isPresent() ? sysUserDTO.get().getRealName() : "") + " 您发起的需求 " + tDemandDataDTO.orElse(new TDemandDataDTO()).getDemandSubject()
+ " 有新的评论"; + " 有新的评论";
SysNoticeDTO dto = new SysNoticeDTO(); SysNoticeDTO dto = new SysNoticeDTO();
@ -102,7 +102,7 @@ public class TDemandCommentServiceImpl extends CrudServiceImpl<TDemandCommentDao
dto.setTitle("需求评论系统通知"); dto.setTitle("需求评论系统通知");
dto.setContent(content); // 通知内容 dto.setContent(content); // 通知内容
dto.setReceiverType(1); dto.setReceiverType(1);
dto.setReceiverTypeIds(tDemandDataDTO.isPresent() ? tDemandDataDTO.get().getCreator().toString() : ""); dto.setReceiverTypeIds(tDemandDataDTO.map(demandDataDTO -> demandDataDTO.getCreator().toString()).orElse(""));
dto.setStatus(NoticeStatusEnum.SEND.value()); dto.setStatus(NoticeStatusEnum.SEND.value());
dto.setSenderName("流程系统"); dto.setSenderName("流程系统");
dto.setSenderDate(new Date()); dto.setSenderDate(new Date());

View File

@ -34,7 +34,6 @@ public class DevelopmentGuideController {
developmentGuideService.getDevelopmentFile(request, response); developmentGuideService.getDevelopmentFile(request, response);
} catch (Exception e) { } catch (Exception e) {
e.printStackTrace(); e.printStackTrace();
new Result<>().error(500, "文件获取失败!");
} }
} }
@ -46,12 +45,12 @@ public class DevelopmentGuideController {
@ApiImplicitParam(name = "fileName", value = "文件名称", paramType = "query", dataType = "String", required = true), @ApiImplicitParam(name = "fileName", value = "文件名称", paramType = "query", dataType = "String", required = true),
@ApiImplicitParam(name = "type", value = "能力类型", paramType = "query", dataType = "String", required = true), @ApiImplicitParam(name = "type", value = "能力类型", paramType = "query", dataType = "String", required = true),
}) })
public Result uploadDevelopmentFile(@RequestParam("file") MultipartFile uploadFile, HttpServletRequest request) { public Result<String> uploadDevelopmentFile(@RequestParam("file") MultipartFile uploadFile, HttpServletRequest request) {
try { try {
String s = developmentGuideService.uploadDevelopmentFile(uploadFile, request); String s = developmentGuideService.uploadDevelopmentFile(uploadFile, request);
return new Result().ok(s); return new Result<String>().ok(s);
}catch (Exception e) { }catch (Exception e) {
return new Result().error(e.getMessage()); return new Result<String>().error(e.getMessage());
} }
} }

View File

@ -21,11 +21,7 @@ public class DevelopmentGuideServiceImpl implements DevelopmentGuideService {
@Value("${resource.devModelFilePath}") @Value("${resource.devModelFilePath}")
private String devModelFilePath; private String devModelFilePath;
@Value("${resource.root_url}")
private String root_url;
@Value("${server.servlet.context-path}")
private String context_path;
private static final Logger logger = LoggerFactory.getLogger(FileUploadController.class); private static final Logger logger = LoggerFactory.getLogger(FileUploadController.class);
@ -33,14 +29,14 @@ public class DevelopmentGuideServiceImpl implements DevelopmentGuideService {
public void getDevelopmentFile(HttpServletRequest request, HttpServletResponse response) throws Exception { public void getDevelopmentFile(HttpServletRequest request, HttpServletResponse response) throws Exception {
logger.info("----------------------------------获取开发指南--------------------------------------------------"); logger.info("----------------------------------获取开发指南--------------------------------------------------");
String type = request.getParameter("type"); String type = request.getParameter("type");
String resourceId = request.getParameter("resourceId").toString(); String resourceId = request.getParameter("resourceId");
logger.info("读取文件类型及能力ID" + type + ";" + resourceId); logger.info("读取文件类型及能力ID{};{}", type , resourceId);
String url = devModelFilePath + File.separator + type + File.separator + resourceId + ".md"; String url = devModelFilePath + File.separator + type + File.separator + resourceId + ".md";
String filePath = devModelFilePath + File.separator + type; String filePath = devModelFilePath + File.separator + type;
File file = new File(url); File file = new File(url);
//开发指南未保存过获取默认模板文件 //开发指南未保存过获取默认模板文件
logger.info("文件夹路径---------------------->>>" + filePath); logger.info("文件夹路径--->{}", filePath);
logger.info("文件--------------------------->>>" + url); logger.info("文件--->{}", url);
if (new File(filePath).exists()) { if (new File(filePath).exists()) {
if (! file.exists()) { if (! file.exists()) {
@ -73,7 +69,7 @@ public class DevelopmentGuideServiceImpl implements DevelopmentGuideService {
logger.info("----------------------------------开始上传开发指南--------------------------------------------------"); logger.info("----------------------------------开始上传开发指南--------------------------------------------------");
String type = request.getParameter("type"); String type = request.getParameter("type");
String fileName = request.getParameter("fileName"); String fileName = request.getParameter("fileName");
logger.info("读取文件类型及文件名:" + type + ";" + fileName); logger.info("读取文件类型及文件名:{};{}", type , fileName);
File folder = new File(devModelFilePath + File.separator + type + File.separator + fileName); File folder = new File(devModelFilePath + File.separator + type + File.separator + fileName);
File path = new File(devModelFilePath + File.separator + type + File.separator); File path = new File(devModelFilePath + File.separator + type + File.separator);
//文件保存过删除后重新保存 //文件保存过删除后重新保存
@ -92,7 +88,7 @@ public class DevelopmentGuideServiceImpl implements DevelopmentGuideService {
return type + File.separator + fileName; return type + File.separator + fileName;
} catch (IOException e) { } catch (IOException e) {
logger.info("----------------------------------文件上传失败--------------------------------------"); logger.info("----------------------------------文件上传失败--------------------------------------");
logger.info("异常描述" + e.getMessage()); logger.info("异常描述{}", e.getMessage());
throw e; throw e;
} }
} }

View File

@ -202,7 +202,7 @@ public class GeneratorServiceImpl implements GeneratorService {
//导入的包列表 //导入的包列表
Set<String> imports = fieldTypeService.getPackageListByTableId(tableInfo.getId()); Set<String> imports = fieldTypeService.getPackageListByTableId(tableInfo.getId());
//过滤为空的数据 //过滤为空的数据
imports = imports.stream().filter(i -> StringUtils.isNotBlank(i)).collect(Collectors.toSet()); imports = imports.stream().filter(StringUtils::isNotBlank).collect(Collectors.toSet());
dataModel.put("imports", imports); dataModel.put("imports", imports);
//基类 //基类

View File

@ -26,7 +26,6 @@ import javax.servlet.http.HttpServletResponse;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
/** /**
* test * test
* *

View File

@ -1,7 +1,5 @@
package io.renren.modules.fuse.controller; package io.renren.modules.fuse.controller;
import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;
import io.renren.common.annotation.LogOperation; import io.renren.common.annotation.LogOperation;
import io.renren.common.constant.Constant; import io.renren.common.constant.Constant;
import io.renren.common.page.PageData; import io.renren.common.page.PageData;

View File

@ -6,7 +6,6 @@ import com.baomidou.mybatisplus.core.toolkit.StringUtils;
import io.renren.common.constant.Constant; import io.renren.common.constant.Constant;
import io.renren.common.page.PageData; import io.renren.common.page.PageData;
import io.renren.common.service.impl.CrudServiceImpl; import io.renren.common.service.impl.CrudServiceImpl;
import io.renren.common.utils.Result;
import io.renren.modules.fuse.dao.TbFuseAttrDao; import io.renren.modules.fuse.dao.TbFuseAttrDao;
import io.renren.modules.fuse.dao.TbFuseDao; import io.renren.modules.fuse.dao.TbFuseDao;
import io.renren.modules.fuse.dao.TbFuseResourceDao; import io.renren.modules.fuse.dao.TbFuseResourceDao;
@ -27,7 +26,6 @@ import io.renren.modules.resource.service.impl.ResourceServiceImpl;
import io.renren.modules.resourceCollection.dao.ResourceCollectionDao; import io.renren.modules.resourceCollection.dao.ResourceCollectionDao;
import io.renren.modules.security.user.SecurityUser; import io.renren.modules.security.user.SecurityUser;
import io.renren.modules.sys.service.SysDeptService; import io.renren.modules.sys.service.SysDeptService;
import org.apache.commons.lang3.ObjectUtils;
import org.slf4j.Logger; import org.slf4j.Logger;
import org.slf4j.LoggerFactory; import org.slf4j.LoggerFactory;
import org.springframework.beans.BeanUtils; import org.springframework.beans.BeanUtils;
@ -95,6 +93,8 @@ public class TbFuseServiceImpl extends CrudServiceImpl<TbFuseDao, TbFuseEntity,
case "updateDate": case "updateDate":
wrapper.eq(StringUtils.isNotBlank(params.get("updateDate").toString()), "update_date", params.get("updateDate").toString()); wrapper.eq(StringUtils.isNotBlank(params.get("updateDate").toString()), "update_date", params.get("updateDate").toString());
break; break;
default:
break;
} }
}); });
return wrapper; return wrapper;
@ -163,7 +163,7 @@ public class TbFuseServiceImpl extends CrudServiceImpl<TbFuseDao, TbFuseEntity,
Map<String, Object> dataMap = (Map<String, Object>) factory.get().getDataResource(dto); Map<String, Object> dataMap = (Map<String, Object>) factory.get().getDataResource(dto);
if (dataMap != null) { if (dataMap != null) {
List<Map<String, Object>> list = (List<Map<String, Object>>) dataMap.get("data"); List<Map<String, Object>> list = (List<Map<String, Object>>) dataMap.get("data");
list.stream().forEach(map -> { list.forEach(map -> {
if (map.containsKey("zyname")) { if (map.containsKey("zyname")) {
result.put(map.get("guid").toString(), map); result.put(map.get("guid").toString(), map);
} else { } else {

View File

@ -188,7 +188,7 @@ public class MonitorController {
} }
} }
if (results.size() > 0) { if (!results.isEmpty()) {
LambdaQueryWrapper<ResourceEntity> queryWrapper = new QueryWrapper<ResourceEntity>().lambda(); LambdaQueryWrapper<ResourceEntity> queryWrapper = new QueryWrapper<ResourceEntity>().lambda();
queryWrapper queryWrapper
.select(ResourceEntity::getId, .select(ResourceEntity::getId,
@ -258,7 +258,7 @@ public class MonitorController {
} }
} }
if (results.size() > 0) { if (!results.isEmpty()) {
LambdaQueryWrapper<SysDeptEntity> queryWrapper = new QueryWrapper<SysDeptEntity>().lambda(); LambdaQueryWrapper<SysDeptEntity> queryWrapper = new QueryWrapper<SysDeptEntity>().lambda();
queryWrapper.select(SysDeptEntity::getName,SysDeptEntity::getId) queryWrapper.select(SysDeptEntity::getName,SysDeptEntity::getId)
.in(SysDeptEntity::getId, abilityIds); .in(SysDeptEntity::getId, abilityIds);

View File

@ -12,7 +12,6 @@ import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam; import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams; import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation; import io.swagger.annotations.ApiOperation;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMapping;
@ -24,7 +23,6 @@ import javax.servlet.http.HttpServletResponse;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
/** /**
* 异常日志 * 异常日志
* *

View File

@ -12,7 +12,6 @@ import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam; import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams; import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation; import io.swagger.annotations.ApiOperation;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMapping;
@ -24,7 +23,6 @@ import javax.servlet.http.HttpServletResponse;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
/** /**
* 登录日志 * 登录日志
* *

View File

@ -23,7 +23,6 @@ import javax.servlet.http.HttpServletResponse;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
/** /**
* 操作日志 * 操作日志
* *

View File

@ -74,9 +74,7 @@ public class SysLogOperationServiceImpl extends BaseServiceImpl<SysLogOperationD
@Override @Override
@Transactional(rollbackFor = Exception.class) @Transactional(rollbackFor = Exception.class)
public void save(SysLogOperationEntity entity) { public void save(SysLogOperationEntity entity) {
CompletableFuture.runAsync(() -> { CompletableFuture.runAsync(() -> insert(entity));
insert(entity);
});
} }
} }

View File

@ -38,7 +38,7 @@ public class ClearLogTask implements ITask {
logger.info("---------------------开始清理日志表数据---------------------"); logger.info("---------------------开始清理日志表数据---------------------");
int offset = -Integer.parseInt(params); int offset = -Integer.parseInt(params);
DateTime offsetDay = DateUtil.offsetDay(new Date(), offset); DateTime offsetDay = DateUtil.offsetDay(new Date(), offset);
logger.info("日志保留开始日期-------->" + offsetDay); logger.info("日志保留开始日期-------->{}", offsetDay);
sysLogOperationDao.clearLog(offsetDay); sysLogOperationDao.clearLog(offsetDay);
sysLogErrorDao.clearLog(offsetDay); sysLogErrorDao.clearLog(offsetDay);
logger.info("---------------------结束清理日志表数据---------------------"); logger.info("---------------------结束清理日志表数据---------------------");

View File

@ -631,26 +631,6 @@ public class Controller {
return monitorService.selectChannelNumByRegion(); return monitorService.selectChannelNumByRegion();
} }
/**
* 保存区域信息
*/
@GetMapping("/saveOrgenization")
public Result saveOrgenization() {
List<JSONObject> orgenizationByPage = monitorService.getOrgenization(new ArrayList<>());
List<Map> maps = JSON.parseArray(JSON.toJSONString(orgenizationByPage), Map.class);
if(!maps.isEmpty()){
List<List<Map>> lists = Lists.partition(maps,100);
lists.forEach(list-> cameraOrgenMapper.batchSaveOrgenization(list));
//修改path 信息
List<Map> maps2 = cameraOrgenMapper.testAll();
maps2.forEach(map-> monitorService.setOrganizationPath(map,map.get("parent_id").toString()));
maps2.forEach(m-> cameraOrgenMapper.updateOrganizationPaht(m.get("path").toString(),m.get("id").toString()));
}
return Result.success();
}
/** /**
* 事件版的保存区域组织信息 * 事件版的保存区域组织信息

View File

@ -4,6 +4,7 @@ import lombok.extern.log4j.Log4j2;
import org.springframework.context.ApplicationEvent; import org.springframework.context.ApplicationEvent;
/** /**
* 保存视频资源组织表cache成功事件
* @author ytl * @author ytl
* @Date 2022/7/27 15:13 * @Date 2022/7/27 15:13
**/ **/

View File

@ -1,6 +1,5 @@
package io.renren.modules.monitor.mapper; package io.renren.modules.monitor.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import io.renren.common.dao.BaseDao; import io.renren.common.dao.BaseDao;
import io.renren.modules.monitor.entity.Booth; import io.renren.modules.monitor.entity.Booth;
import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Mapper;

View File

@ -1,11 +1,9 @@
package io.renren.modules.monitor.mapper; package io.renren.modules.monitor.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import io.renren.common.dao.BaseDao; import io.renren.common.dao.BaseDao;
import io.renren.modules.monitor.entity.BuildingRecords; import io.renren.modules.monitor.entity.BuildingRecords;
import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param; import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
@ -19,6 +17,6 @@ import java.util.Map;
*/ */
@Mapper @Mapper
public interface BuildingRecordsMapper extends BaseDao<BuildingRecords> { public interface BuildingRecordsMapper extends BaseDao<BuildingRecords> {
public void batchSave(@Param("list") List<Map> list); void batchSave(@Param("list") List<Map> list);
} }

View File

@ -1,6 +1,5 @@
package io.renren.modules.monitor.mapper; package io.renren.modules.monitor.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import io.renren.common.dao.BaseDao; import io.renren.common.dao.BaseDao;
import io.renren.modules.monitor.entity.BuildingSite; import io.renren.modules.monitor.entity.BuildingSite;
import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Mapper;

View File

@ -11,7 +11,6 @@ import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param; import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select; import org.apache.ibatis.annotations.Select;
import org.springframework.security.core.parameters.P;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
@ -31,8 +30,6 @@ public interface CameraChannelMapper extends BaseDao<CameraChannel> {
@Select("select c.* from t_camera_channel c where channel_code in " + @Select("select c.* from t_camera_channel c where channel_code in " +
"(select b.channel_code from t_channel_mtm_label b where b.label_code = #{labelCode}) ") "(select b.channel_code from t_channel_mtm_label b where b.label_code = #{labelCode}) ")
List<ChannelLabelDto> selectLabel(@Param("labelCode") String labelCode); List<ChannelLabelDto> selectLabel(@Param("labelCode") String labelCode);
//@Update("update t_camera_channel set state = list")
void updateState(@Param("list") List list);
@Select("select * from t_label") @Select("select * from t_label")
List<Label> selectAllLabel(); List<Label> selectAllLabel();
@ -64,7 +61,7 @@ public interface CameraChannelMapper extends BaseDao<CameraChannel> {
Integer selectByParentIdCount(@Param("map") Map queryMap, @Param("labelCodes") List labelCodes); Integer selectByParentIdCount(@Param("map") Map queryMap, @Param("labelCodes") List labelCodes);
Integer selectChannelCounts(@Param("path") String path); Integer selectChannelCountsFromCache(@Param("path") String path);
List<Map> selectByParentIdNew(@Param("map") Map queryMap, @Param("labelCodes") List labelCodes,@Param("path") String path); List<Map> selectByParentIdNew(@Param("map") Map queryMap, @Param("labelCodes") List labelCodes,@Param("path") String path);
@ -81,7 +78,7 @@ public interface CameraChannelMapper extends BaseDao<CameraChannel> {
List<Map> selectCameraChannelByPid(@Param("parentId") String parentId); List<Map> selectCameraChannelByPid(@Param("parentId") String parentId);
void batchSaveCameraChannel(@Param("list") List<Map> list); void batchSaveCameraChannelCache(@Param("list") List<Map> list);
void insertChannelCacheToCameraChannel(); void insertChannelCacheToCameraChannel();

View File

@ -1,6 +1,5 @@
package io.renren.modules.monitor.mapper; package io.renren.modules.monitor.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import io.renren.common.dao.BaseDao; import io.renren.common.dao.BaseDao;
import io.renren.modules.monitor.dto.ChengguanDto; import io.renren.modules.monitor.dto.ChengguanDto;
import io.renren.modules.monitor.entity.Camera; import io.renren.modules.monitor.entity.Camera;
@ -13,12 +12,6 @@ import java.util.List;
@Mapper @Mapper
public interface CameraMapper extends BaseDao<Camera> { public interface CameraMapper extends BaseDao<Camera> {
@Select("SELECT tc.pic,tc.capture_time AS captureTime FROM t_project_mtm_camera pmc JOIN t_camera tc ON pmc.project_id = #{id} AND pmc.camera_id = tc.`code` AND tc.pic IS NOT NULL") @Select("SELECT tc.pic,tc.capture_time AS captureTime FROM t_project_mtm_camera pmc JOIN t_camera tc ON pmc.project_id = #{id} AND pmc.camera_id = tc.code AND tc.pic IS NOT NULL")
List<Picture> selectPicByProjectId(String id); List<Picture> selectPicByProjectId(String id);
@Select("SELECT tp.*,tc.* FROM t_project_mtm_camera pmc JOIN t_camera tc JOIN t_project tp ON pmc.camera_id = tc.`code` AND pmc.project_id = tp.id")
List<ChengguanDto> selectCamera();
@Select("SELECT code FROM t_camera")
List<String> selectCameraCodes();
} }

View File

@ -23,15 +23,17 @@ public interface CameraOrgenizationMapper extends BaseDao<CameraOrganization> {
@Select("select name,parent_id,id from t_camera_organization where path LIKE CONCAT(#{path},'%') ") @Select("select name,parent_id,id from t_camera_organization where path LIKE CONCAT(#{path},'%') ")
List<Map> selectSubOrganizationMapByPath(@Param("path") String path); List<Map> selectSubOrganizationMapByPath(@Param("path") String path);
void batchSaveOrgenization(List<Map> list); void batchSaveOrgenizationCache(List<Map> list);
@Select("SELECT name,parent_id,id,path FROM t_camera_organization_cache WHERE id = #{id}") @Select("SELECT name,parent_id,id,path FROM t_camera_organization WHERE id = #{id}")
Map selectOrgenizationById(@Param("id") String id); Map selectOrgenizationById(@Param("id") String id);
Map selectOrgenizationCacheById(@Param("id") String id);
@Update("UPDATE t_camera_organization SET path = TRIM( TRAILING '->' FROM #{path}) where id = #{id}") @Update("UPDATE t_camera_organization SET path = TRIM( TRAILING '->' FROM #{path}) where id = #{id}")
void updateOrganizationPaht(@Param("path") String path,@Param("id") String id); void updateOrganizationPaht(@Param("path") String path,@Param("id") String id);
void updateOrganizationPath(@Param("path") String path,@Param("id") String id); void updateOrganizationCachePath(@Param("path") String path,@Param("id") String id);
@Select(" SELECT id FROM t_camera_organization") @Select(" SELECT id FROM t_camera_organization")
List<Map> listOrgenization(); List<Map> listOrgenization();
@ -42,21 +44,21 @@ public interface CameraOrgenizationMapper extends BaseDao<CameraOrganization> {
// @Update("UPDATE t_camera_organization SET COUNT = COUNT + 1 WHERE id = #{id}") // @Update("UPDATE t_camera_organization SET COUNT = COUNT + 1 WHERE id = #{id}")
// void updateOrganizationCount(@Param("id") String id); // void updateOrganizationCount(@Param("id") String id);
void batchSaveCameraChannel(List<Map> list); //void batchSaveCameraChannel(List<Map> list);
@Select("select * from t_camera_organization") @Select("select * from t_camera_organization")
List<Map> testAll(); List<Map> testAll();
List<Map> selectAll(); List<Map> selectAllFromOrgenizationCache();
@Update("truncate table ${tableName}") @Update("truncate table ${tableName}")
void truncate(@Param("tableName") String tableName) ; void truncate(@Param("tableName") String tableName) ;
@Select("select orgaid,id,name,path from t_camera_organization_cache order by orgaid") @Select("select orgaid,id,name,path from t_camera_organization_cache order by orgaid")
List<Map> selectAllSubOrganizationMap(); List<Map> selectAllSubOrganizationCacheMap();
@Update("UPDATE t_camera_organization_cache SET channelCount = #{channelCount} where orgaid = #{orgaId}") @Update("UPDATE t_camera_organization_cache SET channelCount = #{channelCount} where orgaid = #{orgaId}")
void editChannelCount(@Param("channelCount") Integer channelCount,@Param("orgaId") Integer orgaId); void editChannelCacheCount(@Param("channelCount") Integer channelCount,@Param("orgaId") Integer orgaId);
void updateRegionChannelCount(); void updateRegionChannelCount();

View File

@ -1,6 +1,5 @@
package io.renren.modules.monitor.mapper; package io.renren.modules.monitor.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import io.renren.common.dao.BaseDao; import io.renren.common.dao.BaseDao;
import io.renren.modules.monitor.entity.CameraScenic; import io.renren.modules.monitor.entity.CameraScenic;
import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Mapper;

View File

@ -1,6 +1,5 @@
package io.renren.modules.monitor.mapper; package io.renren.modules.monitor.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import io.renren.common.dao.BaseDao; import io.renren.common.dao.BaseDao;
import io.renren.modules.monitor.entity.CaseCityLaw; import io.renren.modules.monitor.entity.CaseCityLaw;
import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Mapper;
@ -17,7 +16,6 @@ import java.util.Map;
*/ */
@Mapper @Mapper
public interface CaseCityLawMapper extends BaseDao<CaseCityLaw> { public interface CaseCityLawMapper extends BaseDao<CaseCityLaw> {
//public void batchSave(List<Map> list); void batchSave(List<Map> list);
public void batchSave(List<Map> list); void singleSave(Map map);
public void singleSave(Map map);
} }

View File

@ -1,6 +1,5 @@
package io.renren.modules.monitor.mapper; package io.renren.modules.monitor.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import io.renren.common.dao.BaseDao; import io.renren.common.dao.BaseDao;
import io.renren.modules.monitor.dto.ChannelPictureDto; import io.renren.modules.monitor.dto.ChannelPictureDto;
import io.renren.modules.monitor.entity.ChannelPicture; import io.renren.modules.monitor.entity.ChannelPicture;

View File

@ -1,6 +1,5 @@
package io.renren.modules.monitor.mapper; package io.renren.modules.monitor.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import io.renren.common.dao.BaseDao; import io.renren.common.dao.BaseDao;
import io.renren.modules.monitor.entity.Event; import io.renren.modules.monitor.entity.Event;
import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Mapper;

View File

@ -1,7 +1,5 @@
package io.renren.modules.monitor.mapper; package io.renren.modules.monitor.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import io.renren.common.dao.BaseDao; import io.renren.common.dao.BaseDao;
import io.renren.modules.monitor.entity.PassengerFlow; import io.renren.modules.monitor.entity.PassengerFlow;
import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Mapper;

View File

@ -1,6 +1,5 @@
package io.renren.modules.monitor.mapper; package io.renren.modules.monitor.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import io.renren.common.dao.BaseDao; import io.renren.common.dao.BaseDao;
import io.renren.modules.monitor.entity.Project; import io.renren.modules.monitor.entity.Project;
import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Mapper;

View File

@ -1,6 +1,5 @@
package io.renren.modules.monitor.mapper; package io.renren.modules.monitor.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import io.renren.common.dao.BaseDao; import io.renren.common.dao.BaseDao;
import io.renren.modules.monitor.entity.RoadData; import io.renren.modules.monitor.entity.RoadData;
import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Mapper;

View File

@ -1,6 +1,5 @@
package io.renren.modules.monitor.mapper; package io.renren.modules.monitor.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import io.renren.common.dao.BaseDao; import io.renren.common.dao.BaseDao;
import io.renren.modules.monitor.entity.Sanitation; import io.renren.modules.monitor.entity.Sanitation;
import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Mapper;

View File

@ -1,6 +1,5 @@
package io.renren.modules.monitor.mapper; package io.renren.modules.monitor.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import io.renren.common.dao.BaseDao; import io.renren.common.dao.BaseDao;
import io.renren.modules.monitor.entity.SanitationTask; import io.renren.modules.monitor.entity.SanitationTask;
import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Mapper;

View File

@ -1,6 +1,5 @@
package io.renren.modules.monitor.mapper; package io.renren.modules.monitor.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import io.renren.common.dao.BaseDao; import io.renren.common.dao.BaseDao;
import io.renren.modules.monitor.dto.ScenicCameraDto; import io.renren.modules.monitor.dto.ScenicCameraDto;
import io.renren.modules.monitor.entity.Camera; import io.renren.modules.monitor.entity.Camera;

View File

@ -1,6 +1,5 @@
package io.renren.modules.monitor.mapper; package io.renren.modules.monitor.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import io.renren.common.dao.BaseDao; import io.renren.common.dao.BaseDao;
import io.renren.modules.monitor.entity.SedimentTrail; import io.renren.modules.monitor.entity.SedimentTrail;
import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Mapper;

View File

@ -1140,7 +1140,9 @@ public class MonitorService {
return Result.success(maps); return Result.success(maps);
} }
//以此作为获取视频资源的开始获取地区和组织信息 /** ---------------------------------- 获取视频组织和通道资源相关代码 start ------------------------------------------------------------**/
//以此作为获取视频资源的开始获取地区和组织信息,成功后发布事件
public void getAndSaveOrgenization(){ public void getAndSaveOrgenization(){
List<JSONObject> orgenizationByPage = this.getOrgenization(new ArrayList<JSONObject>(10000)); List<JSONObject> orgenizationByPage = this.getOrgenization(new ArrayList<JSONObject>(10000));
if(orgenizationByPage != null && orgenizationByPage.size() > 0){ if(orgenizationByPage != null && orgenizationByPage.size() > 0){
@ -1149,17 +1151,17 @@ public class MonitorService {
if(maps.size() > 0){ if(maps.size() > 0){
List<List<Map>> lists = Lists.partition(maps,100); List<List<Map>> lists = Lists.partition(maps,100);
lists.forEach(list->{ lists.forEach(list->{
cameraOrgenMapper.batchSaveOrgenization(list); cameraOrgenMapper.batchSaveOrgenizationCache(list);
}); });
//修改path 信息 //修改path 信息
List<Map> maps2 = cameraOrgenMapper.selectAll(); List<Map> maps2 = cameraOrgenMapper.selectAllFromOrgenizationCache();
maps2.forEach(map->{ maps2.forEach(map->{
this.setOrganizationPath(map,map.get("parent_id").toString()); this.setOrganizationPath(map,map.get("parent_id").toString());
}); });
maps2.forEach(m->{ maps2.forEach(m->{
cameraOrgenMapper.updateOrganizationPath(m.get("path").toString(),m.get("id").toString()); cameraOrgenMapper.updateOrganizationCachePath(m.get("path").toString(),m.get("id").toString());
}); });
//发布事件 //发布事件
@ -1251,7 +1253,7 @@ public class MonitorService {
//更新组织的path //更新组织的path
public void setOrganizationPath(Map map ,String parentId){ public void setOrganizationPath(Map map ,String parentId){
Map map2 = cameraOrgenMapper.selectOrgenizationById(parentId); Map map2 = cameraOrgenMapper.selectOrgenizationCacheById(parentId);
if(map2 != null){ if(map2 != null){
String path = map2.get("name").toString(); String path = map2.get("name").toString();
String newNodeName = path + "->" + (map.get("path")==null?"":map.get("path").toString()); String newNodeName = path + "->" + (map.get("path")==null?"":map.get("path").toString());
@ -1305,12 +1307,11 @@ public class MonitorService {
public void saveChannelInfoAsync() throws Exception { public void saveChannelInfoAsync() throws Exception {
RestTemplate restTemplate = this.getRestTemplate(); RestTemplate restTemplate = this.getRestTemplate();
AtomicInteger faulseCount = new AtomicInteger();//失败的次数 AtomicInteger faulseCount = new AtomicInteger();//失败的次数
//1-清空t_camera_channel //1-清空t_camera_channel_cache
cameraOrgenMapper.truncate("t_camera_channel_cache"); cameraOrgenMapper.truncate("t_camera_channel_cache");
Thread.sleep(1500); Thread.sleep(1500);
//2-查询全部地区 //2-查询全部地区
//List<Map> maps = cameraOrgenMapper.testAll(); List<Map> maps = cameraOrgenMapper.selectAllFromOrgenizationCache();
List<Map> maps = cameraOrgenMapper.selectAll();
if (maps != null && maps.size() > 0){ if (maps != null && maps.size() > 0){
List<List<Map>> lists = Lists.partition(maps, 1000); List<List<Map>> lists = Lists.partition(maps, 1000);
//3-创建线程池 //3-创建线程池
@ -1344,7 +1345,7 @@ public class MonitorService {
if(cameraChannels.size() > 0){ if(cameraChannels.size() > 0){
List<List<Map>> channelList = Lists.partition(cameraChannels,100); List<List<Map>> channelList = Lists.partition(cameraChannels,100);
for(List<Map> ll:channelList){ for(List<Map> ll:channelList){
cameraChannelMapper.batchSaveCameraChannel(ll); cameraChannelMapper.batchSaveCameraChannelCache(ll);
} }
} else { } else {
log.error("根据组织id:{},从正式表中查询视频通道失败,不存在该部门数据",m.get("id").toString()); log.error("根据组织id:{},从正式表中查询视频通道失败,不存在该部门数据",m.get("id").toString());
@ -1432,7 +1433,8 @@ public class MonitorService {
if(needSave.size() > 0){ if(needSave.size() > 0){
List<List<Map>> partition = Lists.partition(needSave, 100); List<List<Map>> partition = Lists.partition(needSave, 100);
partition.forEach(l->{ partition.forEach(l->{
cameraOrgenMapper.batchSaveCameraChannel(l); cameraChannelMapper.batchSaveCameraChannelCache(l);
//cameraOrgenMapper.batchSaveCameraChannelCache(l);
}); });
} }
} }
@ -1440,13 +1442,13 @@ public class MonitorService {
//更新完通道信息后查询组织下通道的数量并更新到组织表中 //更新完通道信息后查询组织下通道的数量并更新到组织表中
public void editChannelCount() throws Exception{ public void editChannelCount() throws Exception{
//更新地区表中的每个地区下channelCount //更新地区表中的每个地区下channelCount
List<Map> maps = cameraOrgenMapper.selectAllSubOrganizationMap(); List<Map> maps = cameraOrgenMapper.selectAllSubOrganizationCacheMap();
if(maps.size() > 0){ if(maps.size() > 0){
for(int i=0;i< maps.size();i++){ for(int i=0;i< maps.size();i++){
String path = maps.get(i).get("path").toString(); String path = maps.get(i).get("path").toString();
Integer count = cameraChannelMapper.selectChannelCounts(path); Integer count = cameraChannelMapper.selectChannelCountsFromCache(path);
Integer orgaid = Integer.parseInt(maps.get(i).get("orgaid").toString()); Integer orgaid = Integer.parseInt(maps.get(i).get("orgaid").toString());
cameraOrgenMapper.editChannelCount(count,orgaid); cameraOrgenMapper.editChannelCacheCount(count,orgaid);
}; };
} }
} }
@ -1502,6 +1504,8 @@ public class MonitorService {
return restTemplate; return restTemplate;
} }
/** ---------------------------------- 获取视频组织和通道资源相关代码 end ------------------------------------------------------------**/
//测试用的 //测试用的
public List<Map> listChildOrgenIds(String id){ public List<Map> listChildOrgenIds(String id){
Map orgenNow = cameraOrgenMapper.selectOrgenizationById(id); Map orgenNow = cameraOrgenMapper.selectOrgenizationById(id);

View File

@ -15,7 +15,6 @@ import io.renren.common.validator.group.DefaultGroup;
import io.renren.common.validator.group.UpdateGroup; import io.renren.common.validator.group.UpdateGroup;
import io.renren.modules.activiti.dto.HistoryDetailDTO; import io.renren.modules.activiti.dto.HistoryDetailDTO;
import io.renren.modules.activiti.service.ActivitiService; import io.renren.modules.activiti.service.ActivitiService;
import io.renren.modules.monitor.dto.CameraChannelDto1;
import io.renren.modules.monitor.mapper.CameraChannelMapper; import io.renren.modules.monitor.mapper.CameraChannelMapper;
import io.renren.modules.processForm.dao.TAbilityApplicationDao; import io.renren.modules.processForm.dao.TAbilityApplicationDao;
import io.renren.modules.processForm.dto.TAbilityApplicationDTO; import io.renren.modules.processForm.dto.TAbilityApplicationDTO;
@ -43,10 +42,7 @@ import springfox.documentation.annotations.ApiIgnore;
import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpServletResponse;
import java.time.LocalDateTime; import java.time.LocalDateTime;
import java.util.ArrayList; import java.util.*;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.stream.Collectors; import java.util.stream.Collectors;
/** /**
@ -148,7 +144,7 @@ public class TAbilityApplicationController {
} else { } else {
String sql = String.format("SELECT IF(COUNT(id) >0 ,FALSE,TRUE) AS ended FROM t_ability_application WHERE apply_flag = '%s' AND EXISTS (SELECT 1 FROM t_ability_application t1 WHERE t1.apply_flag = t_ability_application.apply_flag AND approve_status = '审核中');", index.getApplyFlag()); String sql = String.format("SELECT IF(COUNT(id) >0 ,FALSE,TRUE) AS ended FROM t_ability_application WHERE apply_flag = '%s' AND EXISTS (SELECT 1 FROM t_ability_application t1 WHERE t1.apply_flag = t_ability_application.apply_flag AND approve_status = '审核中');", index.getApplyFlag());
Boolean ended = jdbcTemplate.queryForObject(sql, Boolean.class); Boolean ended = jdbcTemplate.queryForObject(sql, Boolean.class);
index.setEnded(Boolean.valueOf(ended)); index.setEnded(ended);
} }
return index; return index;
}).collect(Collectors.toList()); }).collect(Collectors.toList());
@ -197,7 +193,7 @@ public class TAbilityApplicationController {
return new Result<TAbilityApplicationV2DTO>().ok(null); return new Result<TAbilityApplicationV2DTO>().ok(null);
} }
TAbilityApplicationV2DTO tAbilityApplicationV2DTO = ConvertUtils.sourceToTarget(applicationDTOS.get(0), TAbilityApplicationV2DTO.class); TAbilityApplicationV2DTO tAbilityApplicationV2DTO = ConvertUtils.sourceToTarget(applicationDTOS.get(0), TAbilityApplicationV2DTO.class);
applicationDTOS.stream().limit(1l).forEach(dto -> { applicationDTOS.stream().limit(1L).forEach(dto -> {
if (StringUtils.isNotEmpty(dto.getCameraList())) { if (StringUtils.isNotEmpty(dto.getCameraList())) {
if (applicationDTOS.size() > 1) { if (applicationDTOS.size() > 1) {
tAbilityApplicationV2DTO.setSystem("视频资源申请:(" + dto.getSystem() + "" + applicationDTOS.size() + "个摄像头)"); tAbilityApplicationV2DTO.setSystem("视频资源申请:(" + dto.getSystem() + "" + applicationDTOS.size() + "个摄像头)");
@ -226,16 +222,11 @@ public class TAbilityApplicationController {
return; return;
} }
cameraList.add(JSON.parseObject(index_.getCameraList())); cameraList.add(JSON.parseObject(index_.getCameraList()));
//
//List<CameraChannelDto1> channelDto1s = cameraChannelMapper.selectByChannelCode(index_.getCameraList().replaceAll("\"", ""));
//if (!channelDto1s.isEmpty()) {
// cameraList.add(channelDto1s.get(0));
//}
}); });
camera = cameraList; camera = cameraList;
List<Object> finalCamera = camera; List<Object> finalCamera = camera;
Map<String, Object> resourceApplication = new HashMap<String, Object>() { return new HashMap<String, Object>() {
{ {
put("instanceId", tAbilityApplicationDTOList.get(0).getInstanceId()); // 流程id put("instanceId", tAbilityApplicationDTOList.get(0).getInstanceId()); // 流程id
put("resourceOwnerDept", tAbilityApplicationDTOList.get(0).getResourceOwnerDept()); // 资源所属部门信息 put("resourceOwnerDept", tAbilityApplicationDTOList.get(0).getResourceOwnerDept()); // 资源所属部门信息
@ -252,8 +243,7 @@ public class TAbilityApplicationController {
} }
} }
}; };
return resourceApplication; }).filter(Objects::nonNull).collect(Collectors.groupingBy(t -> {
}).filter(index -> index != null).collect(Collectors.groupingBy(t -> {
SysDeptDTO sysDeptDTO = (SysDeptDTO) t.get("resourceOwnerDept"); SysDeptDTO sysDeptDTO = (SysDeptDTO) t.get("resourceOwnerDept");
if (sysDeptDTO == null) { if (sysDeptDTO == null) {
return "未知部门"; // 无部门信息 return "未知部门"; // 无部门信息

View File

@ -60,8 +60,8 @@ import java.util.stream.Collectors;
@RequestMapping("/resource") @RequestMapping("/resource")
@Api(tags = "资源表") @Api(tags = "资源表")
public class ResourceController { public class ResourceController {
private static Integer cpuNUm = Runtime.getRuntime().availableProcessors(); private static final Integer CPUNUM = Runtime.getRuntime().availableProcessors();
private static final ExecutorService executor = Executors.newFixedThreadPool(cpuNUm); private static final ExecutorService executor = Executors.newFixedThreadPool(CPUNUM);
@Value("${big_date.name}") @Value("${big_date.name}")
private String bigDateDeptName; // 大数据局名称 private String bigDateDeptName; // 大数据局名称
@ -175,7 +175,7 @@ public class ResourceController {
public Result<String> updateTest() { public Result<String> updateTest() {
CompletableFuture.runAsync(() -> { CompletableFuture.runAsync(() -> {
List<Long> ids = jdbcTemplate.queryForList("SELECT id FROM tb_data_resource", Long.class); List<Long> ids = jdbcTemplate.queryForList("SELECT id FROM tb_data_resource", Long.class);
ids.stream().forEach(id -> { ids.forEach(id -> {
ResourceDTO data = resourceService.selectWithAttrs(id); ResourceDTO data = resourceService.selectWithAttrs(id);
resourceService.update(data); resourceService.update(data);
}); });

View File

@ -168,4 +168,6 @@ public interface ResourceDao extends BaseDao<ResourceEntity> {
List<ResourceDTO> selectUsersApplyAndCount(@Param("userIds") List<Long> userIds); List<ResourceDTO> selectUsersApplyAndCount(@Param("userIds") List<Long> userIds);
List<Map<String, Object>> selectDevelopDocResource(); List<Map<String, Object>> selectDevelopDocResource();
List<Map<String,Object>> resourceInstallationOrDataResourceDetails(Map params);
} }

View File

@ -133,4 +133,6 @@ public interface ResourceService extends CrudService<ResourceEntity, ResourceDTO
List<Map> selectDevelopDoc(); List<Map> selectDevelopDoc();
PageData<Map<String,Object>> resourceInstallationOrDataResourceDetails(Map<String, Object> params);
} }

View File

@ -1426,6 +1426,49 @@ public class ResourceServiceImpl extends CrudServiceImpl<ResourceDao, ResourceEn
} }
public PageData<Map<String,Object>> resourceInstallationOrDataResourceDetails(Map<String, Object> params){
List<Map<String, Object>> result;
Integer page = Integer.parseInt(params.get("page").toString()) - 1;
Integer pageSize = Integer.parseInt(params.get("limit").toString());
Object[] pas = {params.get("id"), params.get("id")};
List<Map<String, Object>> result2;
result2 = resourceDao.resourceInstallationOrDataResourceDetails(params);
if (!result2.isEmpty() && result2 != null) {
List<List<Map<String, Object>>> partition = Lists.partition(result2, pageSize);
result = new CopyOnWriteArrayList<>(partition.get(page));
} else {
return new PageData<>(result2, 0);
}
CompletableFuture<Void> resourceCollectionNum01 = CompletableFuture.runAsync(() -> {//被申请数量 resourceCarNum
result.forEach(r -> {
Integer integer = baseDao.selectResourceCarNum(params);
r.put("resourceCarNum", integer);
});
}, executor);
CompletableFuture<Void> resourceCollectionNum02 = CompletableFuture.runAsync(() -> {//被浏览数量
result.forEach(r -> {
Integer integer = baseDao.selectResourceBrowseNum(params);
r.put("resourceBrowseNum", integer);
});
}, executor);
CompletableFuture<Void> resourceCollectionNum03 = CompletableFuture.runAsync(() -> {//被收藏数量
result.forEach(r -> {
Integer integer = baseDao.selectResourceCollectionNum(params);
r.put("resourceCollectionNum", integer);
});
}, executor);
CompletableFuture<Void> all = CompletableFuture.allOf(resourceCollectionNum01, resourceCollectionNum02, resourceCollectionNum03);
all.join();
return new PageData<>(result, result2.size());
}
@Override @Override
public PageData<Map<String, Object>> resourceInfrastructureDetails(Map<String, Object> params) { public PageData<Map<String, Object>> resourceInfrastructureDetails(Map<String, Object> params) {
List<Map<String, Object>> result; List<Map<String, Object>> result;

View File

@ -10,7 +10,6 @@ import org.apache.shiro.spring.security.interceptor.AuthorizationAttributeSource
import org.apache.shiro.spring.web.ShiroFilterFactoryBean; import org.apache.shiro.spring.web.ShiroFilterFactoryBean;
import org.apache.shiro.web.mgt.DefaultWebSecurityManager; import org.apache.shiro.web.mgt.DefaultWebSecurityManager;
import org.apache.shiro.web.session.mgt.DefaultWebSessionManager; import org.apache.shiro.web.session.mgt.DefaultWebSessionManager;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration; import org.springframework.context.annotation.Configuration;
@ -25,21 +24,6 @@ import java.util.Map;
@Configuration @Configuration
public class ShiroConfig { public class ShiroConfig {
// @Autowired
// private Oauth2Filter oauth2Filter;
//@Autowired
//private ShiroSessionManager shiroSessionManager;
//@Bean
//public DefaultWebSessionManager sessionManager() {
// DefaultWebSessionManager sessionManager = new DefaultWebSessionManager();
// sessionManager.setSessionValidationSchedulerEnabled(false);
// sessionManager.setSessionIdUrlRewritingEnabled(false);
// sessionManager.setGlobalSessionTimeout(-1000l);
// return sessionManager;
//}
@Bean @Bean
public DefaultWebSessionManager sessionManager() { public DefaultWebSessionManager sessionManager() {
ShiroSessionManager sessionManager = new ShiroSessionManager(); ShiroSessionManager sessionManager = new ShiroSessionManager();

View File

@ -37,7 +37,6 @@ public class WebMvcConfig implements WebMvcConfigurer {
@Override @Override
public void addInterceptors(InterceptorRegistry registry) { public void addInterceptors(InterceptorRegistry registry) {
registry.addInterceptor(new AliPayInterceptor()).addPathPatterns("/pay/alipay/**"); registry.addInterceptor(new AliPayInterceptor()).addPathPatterns("/pay/alipay/**");
// registry.addInterceptor(identityInterceptor);
} }
@Override @Override

View File

@ -89,24 +89,13 @@ public class LoginController {
// @ApiImplicitParam(name = "captcha", value = "验证码", paramType = "query",required = true, dataType="String"), // @ApiImplicitParam(name = "captcha", value = "验证码", paramType = "query",required = true, dataType="String"),
@ApiImplicitParam(name = "uuid", value = "UUID", paramType = "query", required = true, dataType = "String"), @ApiImplicitParam(name = "uuid", value = "UUID", paramType = "query", required = true, dataType = "String"),
}) })
// public Result login(HttpServletRequest request, @RequestBody LoginDTO login) {
public Result login(HttpServletRequest request, HttpServletResponse response, @ApiIgnore @RequestParam Map<String, Object> params) throws Exception { public Result login(HttpServletRequest request, HttpServletResponse response, @ApiIgnore @RequestParam Map<String, Object> params) throws Exception {
LoginDTO login = new LoginDTO(); LoginDTO login = new LoginDTO();
login.setUsername(String.valueOf(params.get("username"))); login.setUsername(String.valueOf(params.get("username")));
String password = PasswordUtils.desEncrypt(String.valueOf(params.get("password"))); String password = PasswordUtils.desEncrypt(String.valueOf(params.get("password")));
login.setPassword(password); login.setPassword(password);
// login.setCaptcha(String.valueOf(params.get("captcha")));
login.setUuid(String.valueOf(params.get("uuid"))); login.setUuid(String.valueOf(params.get("uuid")));
//效验数据
// ValidatorUtils.validateEntity(login);
//验证码是否正确
// boolean flag = captchaService.validate(login.getUuid(), login.getCaptcha());
// if(!flag){
// return new Result().error(ErrorCode.CAPTCHA_ERROR);
// }
//用户信息 //用户信息
SysUserDTO user = sysUserService.getByUsername(login.getUsername()); SysUserDTO user = sysUserService.getByUsername(login.getUsername());

View File

@ -71,7 +71,7 @@ public class CasSSOValidator implements SSOValidator {
String newQuery = stringBuilder.toString(); String newQuery = stringBuilder.toString();
if (newQuery.endsWith("&")) newQuery = newQuery.substring(0, newQuery.length()-1); if (newQuery.endsWith("&")) newQuery = newQuery.substring(0, newQuery.length()-1);
return url.replace(StringUtils.isBlank(newQuery) ? "?"+query:query, newQuery); return url.replace(StringUtils.isBlank(newQuery) ? "?" + query : query, newQuery);
} catch (MalformedURLException e) { } catch (MalformedURLException e) {
e.printStackTrace(); e.printStackTrace();

View File

@ -57,9 +57,6 @@ public class Oauth2Filter extends AuthenticatingFilter {
@Override @Override
protected boolean isAccessAllowed(ServletRequest request, ServletResponse response, Object mappedValue) { protected boolean isAccessAllowed(ServletRequest request, ServletResponse response, Object mappedValue) {
// if(((HttpServletRequest) request).getMethod().equals(RequestMethod.OPTIONS.name())){
// return true;
// }
String currentToken = getRequestToken((HttpServletRequest) request); String currentToken = getRequestToken((HttpServletRequest) request);
if (StringUtils.isBlank(currentToken)) if (StringUtils.isBlank(currentToken))
return false; return false;
@ -106,7 +103,6 @@ public class Oauth2Filter extends AuthenticatingFilter {
private void send401Error(HttpServletResponse response, String msg) throws IOException { private void send401Error(HttpServletResponse response, String msg) throws IOException {
response.setContentType("application/json;charset=utf-8"); response.setContentType("application/json;charset=utf-8");
response.setHeader("Access-Control-Allow-Credentials", "true"); response.setHeader("Access-Control-Allow-Credentials", "true");
// response.setHeader("Access-Control-Allow-Origin", "*");
response.setStatus(HttpStatus.SC_UNAUTHORIZED); response.setStatus(HttpStatus.SC_UNAUTHORIZED);
Result r = new Result().error(HttpStatus.SC_UNAUTHORIZED, msg); Result r = new Result().error(HttpStatus.SC_UNAUTHORIZED, msg);

View File

@ -67,17 +67,16 @@ public class Oauth2Realm extends AuthorizingRealm {
//转换成UserDetail对象 //转换成UserDetail对象
UserDetail userDetail = ConvertUtils.sourceToTarget(userEntity, UserDetail.class); UserDetail userDetail = ConvertUtils.sourceToTarget(userEntity, UserDetail.class);
//获取用户对应的部门数据权限
List<Long> deptIdList = shiroService.getDataScopeList(userDetail.getId());
userDetail.setDeptIdList(deptIdList);
//账号锁定 //账号锁定
if(userDetail.getStatus() == 0){ if(userDetail.getStatus() == 0){
throw new LockedAccountException(MessageUtils.getMessage(ErrorCode.ACCOUNT_LOCK)); throw new LockedAccountException(MessageUtils.getMessage(ErrorCode.ACCOUNT_LOCK));
} }
SimpleAuthenticationInfo info = new SimpleAuthenticationInfo(userDetail, accessToken, getName()); //获取用户对应的部门数据权限
return info; List<Long> deptIdList = shiroService.getDataScopeList(userDetail.getId());
userDetail.setDeptIdList(deptIdList);
return new SimpleAuthenticationInfo(userDetail, accessToken, getName());
} }
} }

View File

@ -1,32 +1,22 @@
package io.renren.modules.security.oauth2; package io.renren.modules.security.oauth2;
import org.apache.commons.lang.StringUtils; import org.apache.commons.lang.StringUtils;
import org.apache.shiro.session.Session;
import org.apache.shiro.session.mgt.SessionContext;
import org.apache.shiro.web.servlet.ShiroHttpServletRequest; import org.apache.shiro.web.servlet.ShiroHttpServletRequest;
import org.apache.shiro.web.session.mgt.DefaultWebSessionManager; import org.apache.shiro.web.session.mgt.DefaultWebSessionManager;
import org.apache.shiro.web.util.WebUtils; import org.apache.shiro.web.util.WebUtils;
import org.slf4j.Logger; import org.slf4j.Logger;
import org.slf4j.LoggerFactory; import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Component;
import javax.servlet.ServletRequest; import javax.servlet.ServletRequest;
import javax.servlet.ServletResponse; import javax.servlet.ServletResponse;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.Serializable; import java.io.Serializable;
//@Component
public class ShiroSessionManager extends DefaultWebSessionManager { public class ShiroSessionManager extends DefaultWebSessionManager {
/**
* 返回客户端的
*/
public final String TOKEN_NAME = "token";
/** /**
* 这个是客户端请求给服务端带的header * 这个是客户端请求给服务端带的header
*/ */
public final static String HEADER_TOKEN_NAME = "token"; public static final String HEADER_TOKEN_NAME = "token";
public final static Logger log = LoggerFactory.getLogger(ShiroSessionManager.class); public static final Logger log = LoggerFactory.getLogger(ShiroSessionManager.class);
private static final String REFERENCED_SESSION_ID_SOURCE = "Stateless request"; private static final String REFERENCED_SESSION_ID_SOURCE = "Stateless request";
/** /**
@ -35,7 +25,7 @@ public class ShiroSessionManager extends DefaultWebSessionManager {
@Override @Override
protected Serializable getSessionId(ServletRequest request, ServletResponse response) { protected Serializable getSessionId(ServletRequest request, ServletResponse response) {
String sessionId = WebUtils.toHttp(request).getHeader(HEADER_TOKEN_NAME); String sessionId = WebUtils.toHttp(request).getHeader(HEADER_TOKEN_NAME);
log.info("获取的sessionId为" + sessionId); log.error("获取的sessionId为------>{}", sessionId);
if (StringUtils.isEmpty(sessionId)) { if (StringUtils.isEmpty(sessionId)) {
return super.getSessionId(request, response); return super.getSessionId(request, response);
} else { } else {
@ -47,36 +37,4 @@ public class ShiroSessionManager extends DefaultWebSessionManager {
} }
} }
/*@Override
protected void onStart(Session session, SessionContext context) {
log.info("执行onStart");
if (!WebUtils.isHttp(context)) {
log.debug("SessionContext argument is not HTTP compatible or does not have an HTTP request/response pair. No session ID cookie will be set.");
} else {
HttpServletRequest request = WebUtils.getHttpRequest(context);
HttpServletResponse response = WebUtils.getHttpResponse(context);
Serializable sessionId = session.getId();
this.storeSessionId(sessionId, request, response);
request.removeAttribute(ShiroHttpServletRequest.REFERENCED_SESSION_ID_SOURCE);
request.setAttribute(ShiroHttpServletRequest.REFERENCED_SESSION_IS_NEW, Boolean.TRUE);
}
}
*//**
* 把sessionId 放入 response header
* onStart时调用
* 没有sessionid时 会产生sessionid 并放入 response header中
*//*
private void storeSessionId(Serializable currentId, HttpServletRequest ignored, HttpServletResponse response) {
if (currentId == null) {
String msg = "sessionId cannot be null when persisting for subsequent requests.";
throw new IllegalArgumentException(msg);
} else {
String idString = currentId.toString();
response.setHeader(this.TOKEN_NAME, idString);
log.info("Set session ID header for session with id {}", idString);
log.trace("Set session ID header for session with id {}", idString);
}
}*/
} }

View File

@ -17,7 +17,6 @@ import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam; import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams; import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation; import io.swagger.annotations.ApiOperation;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*; import org.springframework.web.bind.annotation.*;
import springfox.documentation.annotations.ApiIgnore; import springfox.documentation.annotations.ApiIgnore;

View File

@ -1,255 +1,200 @@
-- 涉及到的表sys_dict_datasys_dict_type -- 涉及到的表sys_dict_datasys_dict_type
-- 表数据有更新时直接从Navicat选择转储SQL文件替换文件内容
-- 替换前建议备份
-- 注意更新时间 -- 注意更新时间
/* /*
Date: 18/07/2022 17:06:10 Date: 18/07/2022 17:06:10
*/ */
SET NAMES utf8mb4; REPLACE INTO `sys_dict_data` VALUES (1160061112075464705, 1160061077912858625, '', '0', '', 0, 1067246875800000001, '2022-02-25 10:37:18', 1067246875800000001, '2022-02-25 10:37:18', 0);
SET FOREIGN_KEY_CHECKS = 0; REPLACE INTO `sys_dict_data` VALUES (1160061146967879681, 1160061077912858625, '', '1', '', 1, 1067246875800000001, '2022-02-25 10:37:18', 1067246875800000001, '2022-02-25 10:37:18', 0);
REPLACE INTO `sys_dict_data` VALUES (1160061190127267841, 1160061077912858625, '保密', '2', '', 2, 1067246875800000001, '2022-02-25 10:37:18', 1067246875800000001, '2022-02-25 10:37:18', 0);
-- ---------------------------- REPLACE INTO `sys_dict_data` VALUES (1225814069634195457, 1225813644059140097, '公告', '0', '', 0, 1067246875800000001, '2022-02-25 10:37:18', 1067246875800000001, '2022-02-25 10:37:18', 0);
-- Table structure for sys_dict_data REPLACE INTO `sys_dict_data` VALUES (1225814107559092225, 1225813644059140097, '会议', '1', '', 1, 1067246875800000001, '2022-02-25 10:37:18', 1067246875800000001, '2022-02-25 10:37:18', 0);
-- ---------------------------- REPLACE INTO `sys_dict_data` VALUES (1225814271879340034, 1225813644059140097, '其他', '2', '', 2, 1067246875800000001, '2022-02-25 10:37:18', 1067246875800000001, '2022-02-25 10:37:18', 0);
DROP TABLE IF EXISTS `sys_dict_data`; REPLACE INTO `sys_dict_data` VALUES (1341593562419445762, 1341593474355838978, '停用', '0', '', 1, 1067246875800000001, '2022-02-25 10:37:18', 1067246875800000001, '2022-02-25 10:37:18', 0);
CREATE TABLE `sys_dict_data` ( REPLACE INTO `sys_dict_data` VALUES (1341593595407646722, 1341593474355838978, '正常', '1', '', 0, 1067246875800000001, '2022-02-25 10:37:18', 1067246875800000001, '2022-02-25 10:37:18', 0);
`id` bigint(0) NOT NULL COMMENT 'id', REPLACE INTO `sys_dict_data` VALUES (1343069765549191170, 1343069688596295682, '已取消', '-1', '', 0, 1067246875800000001, '2022-02-25 10:37:18', 1067246875800000001, '2022-02-25 10:37:18', 0);
`dict_type_id` bigint(0) NOT NULL COMMENT '字典类型ID', REPLACE INTO `sys_dict_data` VALUES (1343069839847092226, 1343069688596295682, '等待付款', '0', '', 1, 1067246875800000001, '2022-02-25 10:37:18', 1067246875800000001, '2022-02-25 10:37:18', 0);
`dict_label` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '字典标签', REPLACE INTO `sys_dict_data` VALUES (1343069914518286337, 1343069688596295682, '已完成', '1', '', 2, 1067246875800000001, '2022-02-25 10:37:18', 1067246875800000001, '2022-02-25 10:37:18', 0);
`dict_value` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '字典值', REPLACE INTO `sys_dict_data` VALUES (1497114787694264321, 1497114512560504834, '文明创城', '1', '', 1, 1067246875800000001, '2022-02-25 15:42:35', 1067246875800000001, '2022-02-25 15:42:35', 0);
`remark` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '备注', REPLACE INTO `sys_dict_data` VALUES (1497114846380965890, 1497114512560504834, '恶劣天气处置', '2', '', 2, 1067246875800000001, '2022-02-25 15:42:49', 1067246875800000001, '2022-02-25 15:42:49', 0);
`sort` int(0) UNSIGNED NULL DEFAULT NULL COMMENT '排序', REPLACE INTO `sys_dict_data` VALUES (1497114921660334082, 1497114512560504834, '疫情场景', '3', '', 3, 1067246875800000001, '2022-02-25 15:43:07', 1067246875800000001, '2022-02-25 15:43:07', 0);
`creator` bigint(0) NULL DEFAULT NULL COMMENT '创建者', REPLACE INTO `sys_dict_data` VALUES (1497114968951111681, 1497114512560504834, '非法燃放烟花爆竹', '4', '', 4, 1067246875800000001, '2022-02-25 15:43:18', 1067246875800000001, '2022-02-25 15:43:18', 0);
`create_date` datetime(0) NULL DEFAULT NULL COMMENT '创建时间', REPLACE INTO `sys_dict_data` VALUES (1501492864766509057, 1501431675134992386, '新闻分类', '0', NULL, NULL, 1067246875800000001, '2022-03-09 17:39:30', 1067246875800000001, '2022-03-09 17:39:30', 0);
`updater` bigint(0) NULL DEFAULT NULL COMMENT '更新者', REPLACE INTO `sys_dict_data` VALUES (1501753390335639554, 1501431675134992380, '新闻', '0', NULL, NULL, 1067246875800000001, '2022-03-10 10:54:44', 1067246875800000001, '2022-03-10 10:54:44', 0);
`update_date` datetime(0) NULL DEFAULT NULL COMMENT '更新时间', REPLACE INTO `sys_dict_data` VALUES (1513691045674131458, 1513690812521160705, '办公类', '1', '', 1, 1513433270406643713, '2022-04-12 09:30:43', 1513433270406643713, '2022-04-12 09:30:43', NULL);
`status` int(0) NULL DEFAULT NULL COMMENT '删除状态(0未删除 1删除)', REPLACE INTO `sys_dict_data` VALUES (1513691199558950914, 1513690812521160705, '业务类', '2', '', 2, 1513433270406643713, '2022-04-12 09:31:20', 1513433270406643713, '2022-04-12 09:31:20', NULL);
PRIMARY KEY (`id`) USING BTREE, REPLACE INTO `sys_dict_data` VALUES (1513692025207693314, 1513690812521160705, '工具类', '3', '', 3, 1513435534798127105, '2022-04-12 09:34:37', 1513435534798127105, '2022-04-12 09:36:22', NULL);
UNIQUE INDEX `uk_dict_type_value`(`dict_type_id`, `dict_value`) USING BTREE, REPLACE INTO `sys_dict_data` VALUES (1513692537168633857, 1513690812521160705, '门户网站', '4', '', 4, 1513435534798127105, '2022-04-12 09:36:39', 1513435534798127105, '2022-04-12 09:36:39', NULL);
INDEX `idx_sort`(`sort`) USING BTREE REPLACE INTO `sys_dict_data` VALUES (1513692601890938881, 1513690812521160705, '大屏看板', '5', '', 5, 1513435534798127105, '2022-04-12 09:36:54', 1513435534798127105, '2022-04-12 09:36:54', NULL);
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '字典数据' ROW_FORMAT = Dynamic; REPLACE INTO `sys_dict_data` VALUES (1513693142452838402, 1513690812521160705, '硬件类', '6', '', 6, 1513435534798127105, '2022-04-12 09:39:03', 1513435534798127105, '2022-04-12 09:39:03', NULL);
REPLACE INTO `sys_dict_data` VALUES (1513693214594867201, 1513690812521160705, '小程序', '7', '', 7, 1513435534798127105, '2022-04-12 09:39:20', 1513435534798127105, '2022-04-12 09:39:20', NULL);
-- ---------------------------- REPLACE INTO `sys_dict_data` VALUES (1513693270773374978, 1513690812521160705, '公众号', '8', '', 8, 1513435534798127105, '2022-04-12 09:39:33', 1513435534798127105, '2022-04-12 09:39:33', NULL);
-- Records of sys_dict_data REPLACE INTO `sys_dict_data` VALUES (1513693379103858690, 1513690812521160705, '其他', '99', '', 99, 1513435534798127105, '2022-04-12 09:39:59', 1513435534798127105, '2022-04-12 09:44:54', NULL);
-- ---------------------------- REPLACE INTO `sys_dict_data` VALUES (1513694142332968962, 1513693624420311042, '青e办', '1', '', 1, 1513435534798127105, '2022-04-12 09:43:01', 1513435534798127105, '2022-04-12 09:43:01', NULL);
INSERT INTO `sys_dict_data` VALUES (1160061112075464705, 1160061077912858625, '', '0', '', 0, 1067246875800000001, '2022-02-25 10:37:18', 1067246875800000001, '2022-02-25 10:37:18', 0); REPLACE INTO `sys_dict_data` VALUES (1513694184779325442, 1513693624420311042, '青政办', '2', '', 2, 1513435534798127105, '2022-04-12 09:43:11', 1513435534798127105, '2022-04-12 09:43:11', NULL);
INSERT INTO `sys_dict_data` VALUES (1160061146967879681, 1160061077912858625, '', '1', '', 1, 1067246875800000001, '2022-02-25 10:37:18', 1067246875800000001, '2022-02-25 10:37:18', 0); REPLACE INTO `sys_dict_data` VALUES (1513694225602486274, 1513693624420311042, '微信', '3', '', 3, 1513435534798127105, '2022-04-12 09:43:21', 1513435534798127105, '2022-04-12 09:43:21', NULL);
INSERT INTO `sys_dict_data` VALUES (1160061190127267841, 1160061077912858625, '保密', '2', '', 2, 1067246875800000001, '2022-02-25 10:37:18', 1067246875800000001, '2022-02-25 10:37:18', 0); REPLACE INTO `sys_dict_data` VALUES (1513694306254757889, 1513693624420311042, '支付宝', '4', '', 4, 1513435534798127105, '2022-04-12 09:43:40', 1513435534798127105, '2022-04-12 09:43:40', NULL);
INSERT INTO `sys_dict_data` VALUES (1225814069634195457, 1225813644059140097, '公告', '0', '', 0, 1067246875800000001, '2022-02-25 10:37:18', 1067246875800000001, '2022-02-25 10:37:18', 0); REPLACE INTO `sys_dict_data` VALUES (1513694351901368322, 1513693624420311042, 'PC端', '5', '', 5, 1513435534798127105, '2022-04-12 09:43:51', 1513435534798127105, '2022-04-12 09:43:51', NULL);
INSERT INTO `sys_dict_data` VALUES (1225814107559092225, 1225813644059140097, '会议', '1', '', 1, 1067246875800000001, '2022-02-25 10:37:18', 1067246875800000001, '2022-02-25 10:37:18', 0); REPLACE INTO `sys_dict_data` VALUES (1513694388765106177, 1513693624420311042, 'APP端', '6', '', 6, 1513435534798127105, '2022-04-12 09:44:00', 1513435534798127105, '2022-04-12 09:44:00', NULL);
INSERT INTO `sys_dict_data` VALUES (1225814271879340034, 1225813644059140097, '其他', '2', '', 2, 1067246875800000001, '2022-02-25 10:37:18', 1067246875800000001, '2022-02-25 10:37:18', 0); REPLACE INTO `sys_dict_data` VALUES (1513694432113238017, 1513693624420311042, '网页', '7', '', 7, 1513435534798127105, '2022-04-12 09:44:10', 1513435534798127105, '2022-04-12 09:44:10', NULL);
INSERT INTO `sys_dict_data` VALUES (1341593562419445762, 1341593474355838978, '停用', '0', '', 1, 1067246875800000001, '2022-02-25 10:37:18', 1067246875800000001, '2022-02-25 10:37:18', 0); REPLACE INTO `sys_dict_data` VALUES (1513694486660161537, 1513693624420311042, '其他', '99', '', 99, 1513435534798127105, '2022-04-12 09:44:23', 1513435534798127105, '2022-04-12 09:44:41', NULL);
INSERT INTO `sys_dict_data` VALUES (1341593595407646722, 1341593474355838978, '正常', '1', '', 0, 1067246875800000001, '2022-02-25 10:37:18', 1067246875800000001, '2022-02-25 10:37:18', 0); REPLACE INTO `sys_dict_data` VALUES (1513712147154640898, 1513711991655014402, '申报中', '1', '', 1, 1513435534798127105, '2022-04-12 10:54:34', 1513435534798127105, '2022-04-12 10:54:34', NULL);
INSERT INTO `sys_dict_data` VALUES (1343069765549191170, 1343069688596295682, '已取消', '-1', '', 0, 1067246875800000001, '2022-02-25 10:37:18', 1067246875800000001, '2022-02-25 10:37:18', 0); REPLACE INTO `sys_dict_data` VALUES (1513712186178445314, 1513711991655014402, '立项中', '2', '', 2, 1513435534798127105, '2022-04-12 10:54:43', 1513435534798127105, '2022-04-12 10:54:43', NULL);
INSERT INTO `sys_dict_data` VALUES (1343069839847092226, 1343069688596295682, '等待付款', '0', '', 1, 1067246875800000001, '2022-02-25 10:37:18', 1067246875800000001, '2022-02-25 10:37:18', 0); REPLACE INTO `sys_dict_data` VALUES (1513712240268189697, 1513711991655014402, '建设中', '3', '', 3, 1513435534798127105, '2022-04-12 10:54:56', 1513435534798127105, '2022-04-12 10:54:56', NULL);
INSERT INTO `sys_dict_data` VALUES (1343069914518286337, 1343069688596295682, '已完成', '1', '', 2, 1067246875800000001, '2022-02-25 10:37:18', 1067246875800000001, '2022-02-25 10:37:18', 0); REPLACE INTO `sys_dict_data` VALUES (1513712287663824897, 1513711991655014402, '运行中', '4', '', 4, 1513435534798127105, '2022-04-12 10:55:07', 1513435534798127105, '2022-04-12 10:55:07', NULL);
INSERT INTO `sys_dict_data` VALUES (1497114787694264321, 1497114512560504834, '文明创城', '1', '', 1, 1067246875800000001, '2022-02-25 15:42:35', 1067246875800000001, '2022-02-25 15:42:35', 0); REPLACE INTO `sys_dict_data` VALUES (1513712326930898945, 1513711991655014402, '升级中', '5', '', 5, 1513435534798127105, '2022-04-12 10:55:17', 1513435534798127105, '2022-04-12 10:55:17', NULL);
INSERT INTO `sys_dict_data` VALUES (1497114846380965890, 1497114512560504834, '恶劣天气处置', '2', '', 2, 1067246875800000001, '2022-02-25 15:42:49', 1067246875800000001, '2022-02-25 15:42:49', 0); REPLACE INTO `sys_dict_data` VALUES (1513712368735526914, 1513711991655014402, '停用', '6', '', 6, 1513435534798127105, '2022-04-12 10:55:27', 1513435534798127105, '2022-04-12 10:55:27', NULL);
INSERT INTO `sys_dict_data` VALUES (1497114921660334082, 1497114512560504834, '疫情场景', '3', '', 3, 1067246875800000001, '2022-02-25 15:43:07', 1067246875800000001, '2022-02-25 15:43:07', 0); REPLACE INTO `sys_dict_data` VALUES (1513712413711048706, 1513711991655014402, '其他', '99', '', 99, 1513435534798127105, '2022-04-12 10:55:38', 1513435534798127105, '2022-04-12 10:55:38', NULL);
INSERT INTO `sys_dict_data` VALUES (1497114968951111681, 1497114512560504834, '非法燃放烟花爆竹', '4', '', 4, 1067246875800000001, '2022-02-25 15:43:18', 1067246875800000001, '2022-02-25 15:43:18', 0); REPLACE INTO `sys_dict_data` VALUES (1513712902657843202, 1513712507692818433, '社会治安', '1', '', 1, 1513435534798127105, '2022-04-12 10:57:34', 1513435534798127105, '2022-04-12 10:57:34', NULL);
INSERT INTO `sys_dict_data` VALUES (1501492864766509057, 1501431675134992386, '新闻分类', '0', NULL, NULL, 1067246875800000001, '2022-03-09 17:39:30', 1067246875800000001, '2022-03-09 17:39:30', 0); REPLACE INTO `sys_dict_data` VALUES (1513712953966764033, 1513712507692818433, '城市管理', '2', '', 2, 1513435534798127105, '2022-04-12 10:57:46', 1513435534798127105, '2022-04-12 10:57:46', NULL);
INSERT INTO `sys_dict_data` VALUES (1501753390335639554, 1501431675134992380, '新闻', '0', NULL, NULL, 1067246875800000001, '2022-03-10 10:54:44', 1067246875800000001, '2022-03-10 10:54:44', 0); REPLACE INTO `sys_dict_data` VALUES (1513712990385905666, 1513712507692818433, '疫情防控', '3', '', 3, 1513435534798127105, '2022-04-12 10:57:55', 1513435534798127105, '2022-04-12 10:57:55', NULL);
INSERT INTO `sys_dict_data` VALUES (1513691045674131458, 1513690812521160705, '办公类', '1', '', 1, 1513433270406643713, '2022-04-12 09:30:43', 1513433270406643713, '2022-04-12 09:30:43', NULL); REPLACE INTO `sys_dict_data` VALUES (1513713052541296642, 1513712507692818433, '危化品管理', '4', '', 4, 1513435534798127105, '2022-04-12 10:58:10', 1513435534798127105, '2022-04-12 10:58:10', NULL);
INSERT INTO `sys_dict_data` VALUES (1513691199558950914, 1513690812521160705, '业务类', '2', '', 2, 1513433270406643713, '2022-04-12 09:31:20', 1513433270406643713, '2022-04-12 09:31:20', NULL); REPLACE INTO `sys_dict_data` VALUES (1513713091770621954, 1513712507692818433, '交通运输', '5', '', 5, 1513435534798127105, '2022-04-12 10:58:19', 1513435534798127105, '2022-04-12 10:58:19', NULL);
INSERT INTO `sys_dict_data` VALUES (1513692025207693314, 1513690812521160705, '工具类', '3', '', 3, 1513435534798127105, '2022-04-12 09:34:37', 1513435534798127105, '2022-04-12 09:36:22', NULL); REPLACE INTO `sys_dict_data` VALUES (1513713131058667521, 1513712507692818433, '森林防火', '6', '', 6, 1513435534798127105, '2022-04-12 10:58:29', 1513435534798127105, '2022-04-12 10:58:29', NULL);
INSERT INTO `sys_dict_data` VALUES (1513692537168633857, 1513690812521160705, '门户网站', '4', '', 4, 1513435534798127105, '2022-04-12 09:36:39', 1513435534798127105, '2022-04-12 09:36:39', NULL); REPLACE INTO `sys_dict_data` VALUES (1513713173379194882, 1513712507692818433, '防汛抗旱', '7', '', 7, 1513435534798127105, '2022-04-12 10:58:39', 1513435534798127105, '2022-04-12 10:58:39', NULL);
INSERT INTO `sys_dict_data` VALUES (1513692601890938881, 1513690812521160705, '大屏看板', '5', '', 5, 1513435534798127105, '2022-04-12 09:36:54', 1513435534798127105, '2022-04-12 09:36:54', NULL); REPLACE INTO `sys_dict_data` VALUES (1513713207898316802, 1513712507692818433, '文化旅游', '8', '', 8, 1513435534798127105, '2022-04-12 10:58:47', 1513435534798127105, '2022-04-12 10:58:47', NULL);
INSERT INTO `sys_dict_data` VALUES (1513693142452838402, 1513690812521160705, '硬件类', '6', '', 6, 1513435534798127105, '2022-04-12 09:39:03', 1513435534798127105, '2022-04-12 09:39:03', NULL); REPLACE INTO `sys_dict_data` VALUES (1513713246678851586, 1513712507692818433, '非煤矿山', '9', '', 9, 1513435534798127105, '2022-04-12 10:58:56', 1513435534798127105, '2022-04-12 10:58:56', NULL);
INSERT INTO `sys_dict_data` VALUES (1513693214594867201, 1513690812521160705, '小程序', '7', '', 7, 1513435534798127105, '2022-04-12 09:39:20', 1513435534798127105, '2022-04-12 09:39:20', NULL); REPLACE INTO `sys_dict_data` VALUES (1513713286688317442, 1513712507692818433, '医疗卫生', '10', '', 10, 1513435534798127105, '2022-04-12 10:59:06', 1513435534798127105, '2022-04-12 10:59:06', NULL);
INSERT INTO `sys_dict_data` VALUES (1513693270773374978, 1513690812521160705, '公众号', '8', '', 8, 1513435534798127105, '2022-04-12 09:39:33', 1513435534798127105, '2022-04-12 09:39:33', NULL); REPLACE INTO `sys_dict_data` VALUES (1513713328153206786, 1513712507692818433, '安全生产', '11', '', 11, 1513435534798127105, '2022-04-12 10:59:16', 1513435534798127105, '2022-04-12 10:59:16', NULL);
INSERT INTO `sys_dict_data` VALUES (1513693379103858690, 1513690812521160705, '其他', '99', '', 99, 1513435534798127105, '2022-04-12 09:39:59', 1513435534798127105, '2022-04-12 09:44:54', NULL); REPLACE INTO `sys_dict_data` VALUES (1513713389469736962, 1513712507692818433, '生态环境', '12', '', 12, 1513435534798127105, '2022-04-12 10:59:30', 1513435534798127105, '2022-04-12 10:59:30', NULL);
INSERT INTO `sys_dict_data` VALUES (1513694142332968962, 1513693624420311042, '青e办', '1', '', 1, 1513435534798127105, '2022-04-12 09:43:01', 1513435534798127105, '2022-04-12 09:43:01', NULL); REPLACE INTO `sys_dict_data` VALUES (1513713438274658306, 1513712507692818433, '农村农业', '13', '', 13, 1513435534798127105, '2022-04-12 10:59:42', 1513435534798127105, '2022-04-12 10:59:42', NULL);
INSERT INTO `sys_dict_data` VALUES (1513694184779325442, 1513693624420311042, '青政办', '2', '', 2, 1513435534798127105, '2022-04-12 09:43:11', 1513435534798127105, '2022-04-12 09:43:11', NULL); REPLACE INTO `sys_dict_data` VALUES (1513713486626594817, 1513712507692818433, '市场监管', '14', '', 14, 1513435534798127105, '2022-04-12 10:59:53', 1513435534798127105, '2022-04-12 10:59:53', NULL);
INSERT INTO `sys_dict_data` VALUES (1513694225602486274, 1513693624420311042, '微信', '3', '', 3, 1513435534798127105, '2022-04-12 09:43:21', 1513435534798127105, '2022-04-12 09:43:21', NULL); REPLACE INTO `sys_dict_data` VALUES (1513713527395229698, 1513712507692818433, '政务服务', '15', '', 15, 1513435534798127105, '2022-04-12 11:00:03', 1513435534798127105, '2022-04-12 11:00:03', NULL);
INSERT INTO `sys_dict_data` VALUES (1513694306254757889, 1513693624420311042, '支付宝', '4', '', 4, 1513435534798127105, '2022-04-12 09:43:40', 1513435534798127105, '2022-04-12 09:43:40', NULL); REPLACE INTO `sys_dict_data` VALUES (1513713561142599682, 1513712507692818433, '其他', '99', '', 99, 1513435534798127105, '2022-04-12 11:00:11', 1513435534798127105, '2022-04-12 11:00:11', NULL);
INSERT INTO `sys_dict_data` VALUES (1513694351901368322, 1513693624420311042, 'PC端', '5', '', 5, 1513435534798127105, '2022-04-12 09:43:51', 1513435534798127105, '2022-04-12 09:43:51', NULL); REPLACE INTO `sys_dict_data` VALUES (1513713726427537410, 1513713662657339394, '智能算法', '1', '', 1, 1513435534798127105, '2022-04-12 11:00:50', 1513435534798127105, '2022-04-12 11:00:50', NULL);
INSERT INTO `sys_dict_data` VALUES (1513694388765106177, 1513693624420311042, 'APP端', '6', '', 6, 1513435534798127105, '2022-04-12 09:44:00', 1513435534798127105, '2022-04-12 09:44:00', NULL); REPLACE INTO `sys_dict_data` VALUES (1513713756559417346, 1513713662657339394, '图层服务', '2', '', 2, 1513435534798127105, '2022-04-12 11:00:58', 1513435534798127105, '2022-04-12 11:00:58', NULL);
INSERT INTO `sys_dict_data` VALUES (1513694432113238017, 1513693624420311042, '网页', '7', '', 7, 1513435534798127105, '2022-04-12 09:44:10', 1513435534798127105, '2022-04-12 09:44:10', NULL); REPLACE INTO `sys_dict_data` VALUES (1513713790751383553, 1513713662657339394, '开发组件', '3', '', 3, 1513435534798127105, '2022-04-12 11:01:06', 1513435534798127105, '2022-04-12 11:01:06', NULL);
INSERT INTO `sys_dict_data` VALUES (1513694486660161537, 1513693624420311042, '其他', '99', '', 99, 1513435534798127105, '2022-04-12 09:44:23', 1513435534798127105, '2022-04-12 09:44:41', NULL); REPLACE INTO `sys_dict_data` VALUES (1513713864000708610, 1513713662657339394, '业务组件', '5', '', 5, 1513435534798127105, '2022-04-12 11:01:23', 1513435534798127105, '2022-04-12 11:01:23', NULL);
INSERT INTO `sys_dict_data` VALUES (1513712147154640898, 1513711991655014402, '申报中', '1', '', 1, 1513435534798127105, '2022-04-12 10:54:34', 1513435534798127105, '2022-04-12 10:54:34', NULL); REPLACE INTO `sys_dict_data` VALUES (1513714259091562497, 1513714027213660162, '调用接口', '1', '', 1, 1513435534798127105, '2022-04-12 11:02:57', 1524924140178481154, '2022-07-01 14:26:55', NULL);
INSERT INTO `sys_dict_data` VALUES (1513712186178445314, 1513711991655014402, '立项中', '2', '', 2, 1513435534798127105, '2022-04-12 10:54:43', 1513435534798127105, '2022-04-12 10:54:43', NULL); REPLACE INTO `sys_dict_data` VALUES (1513714288619462658, 1513714027213660162, '平台对接', '2', '', 2, 1513435534798127105, '2022-04-12 11:03:05', 1524924140178481154, '2022-07-01 14:27:15', NULL);
INSERT INTO `sys_dict_data` VALUES (1513712240268189697, 1513711991655014402, '建设中', '3', '', 3, 1513435534798127105, '2022-04-12 10:54:56', 1513435534798127105, '2022-04-12 10:54:56', NULL); REPLACE INTO `sys_dict_data` VALUES (1513714321163067394, 1513714027213660162, 'SDK', '3', '', 3, 1513435534798127105, '2022-04-12 11:03:12', 1524924140178481154, '2022-07-01 14:27:56', NULL);
INSERT INTO `sys_dict_data` VALUES (1513712287663824897, 1513711991655014402, '运行中', '4', '', 4, 1513435534798127105, '2022-04-12 10:55:07', 1513435534798127105, '2022-04-12 10:55:07', NULL); REPLACE INTO `sys_dict_data` VALUES (1513714474334855170, 1513714403530809346, 'SDK', '2', '', 2, 1513435534798127105, '2022-04-12 11:03:49', 1513435534798127105, '2022-04-12 11:03:49', NULL);
INSERT INTO `sys_dict_data` VALUES (1513712326930898945, 1513711991655014402, '升级中', '5', '', 5, 1513435534798127105, '2022-04-12 10:55:17', 1513435534798127105, '2022-04-12 10:55:17', NULL); REPLACE INTO `sys_dict_data` VALUES (1513714504261214210, 1513714403530809346, 'Web页面', '3', '', 3, 1513435534798127105, '2022-04-12 11:03:56', 1513435534798127105, '2022-04-12 11:03:56', NULL);
INSERT INTO `sys_dict_data` VALUES (1513712368735526914, 1513711991655014402, '停用', '6', '', 6, 1513435534798127105, '2022-04-12 10:55:27', 1513435534798127105, '2022-04-12 10:55:27', NULL); REPLACE INTO `sys_dict_data` VALUES (1513714541603102722, 1513714403530809346, '其他', '99', '', 99, 1513435534798127105, '2022-04-12 11:04:05', 1513435534798127105, '2022-04-12 11:04:05', NULL);
INSERT INTO `sys_dict_data` VALUES (1513712413711048706, 1513711991655014402, '其他', '99', '', 99, 1513435534798127105, '2022-04-12 10:55:38', 1513435534798127105, '2022-04-12 10:55:38', NULL); REPLACE INTO `sys_dict_data` VALUES (1529028194517127170, 1529028127496343554, '', '0', '', 0, 1515239183144824833, '2022-05-24 17:15:04', 1515239183144824833, '2022-05-24 17:18:10', NULL);
INSERT INTO `sys_dict_data` VALUES (1513712902657843202, 1513712507692818433, '社会治安', '1', '', 1, 1513435534798127105, '2022-04-12 10:57:34', 1513435534798127105, '2022-04-12 10:57:34', NULL); REPLACE INTO `sys_dict_data` VALUES (1529028238309855233, 1529028127496343554, '', '1', '', 2, 1515239183144824833, '2022-05-24 17:15:15', 1515973081575276545, '2022-06-22 16:36:52', NULL);
INSERT INTO `sys_dict_data` VALUES (1513712953966764033, 1513712507692818433, '城市管理', '2', '', 2, 1513435534798127105, '2022-04-12 10:57:46', 1513435534798127105, '2022-04-12 10:57:46', NULL); REPLACE INTO `sys_dict_data` VALUES (1531164091329077250, 1531163741457014785, '单行文本', 'input', '', 1, 1513433270406643713, '2022-05-30 14:42:22', 1513433270406643713, '2022-05-30 14:42:22', NULL);
INSERT INTO `sys_dict_data` VALUES (1513712990385905666, 1513712507692818433, '疫情防控', '3', '', 3, 1513435534798127105, '2022-04-12 10:57:55', 1513435534798127105, '2022-04-12 10:57:55', NULL); REPLACE INTO `sys_dict_data` VALUES (1531164238528176129, 1531163741457014785, '多行文本', 'textArea', '', 2, 1513433270406643713, '2022-05-30 14:42:57', 1513433270406643713, '2022-05-30 14:42:57', NULL);
INSERT INTO `sys_dict_data` VALUES (1513713052541296642, 1513712507692818433, '危化品管理', '4', '', 4, 1513435534798127105, '2022-04-12 10:58:10', 1513435534798127105, '2022-04-12 10:58:10', NULL); REPLACE INTO `sys_dict_data` VALUES (1531164512823074818, 1531163741457014785, '单张图片', 'image', '', 4, 1513433270406643713, '2022-05-30 14:44:02', 1513433270406643713, '2022-05-30 14:50:28', NULL);
INSERT INTO `sys_dict_data` VALUES (1513713091770621954, 1513712507692818433, '交通运输', '5', '', 5, 1513435534798127105, '2022-04-12 10:58:19', 1513435534798127105, '2022-04-12 10:58:19', NULL); REPLACE INTO `sys_dict_data` VALUES (1531164554032111618, 1531163741457014785, '视频', 'video', '', 6, 1513433270406643713, '2022-05-30 14:44:12', 1513433270406643713, '2022-05-30 14:44:12', NULL);
INSERT INTO `sys_dict_data` VALUES (1513713131058667521, 1513712507692818433, '森林防火', '6', '', 6, 1513435534798127105, '2022-04-12 10:58:29', 1513435534798127105, '2022-04-12 10:58:29', NULL); REPLACE INTO `sys_dict_data` VALUES (1531164588542844929, 1531163741457014785, '文件', 'file', '', 7, 1513433270406643713, '2022-05-30 14:44:20', 1513433270406643713, '2022-05-30 14:44:20', NULL);
INSERT INTO `sys_dict_data` VALUES (1513713173379194882, 1513712507692818433, '防汛抗旱', '7', '', 7, 1513435534798127105, '2022-04-12 10:58:39', 1513435534798127105, '2022-04-12 10:58:39', NULL); REPLACE INTO `sys_dict_data` VALUES (1531164650173947906, 1531163741457014785, '下拉列表', 'select', '', 3, 1513433270406643713, '2022-05-30 14:44:35', 1513433270406643713, '2022-05-30 14:44:35', NULL);
INSERT INTO `sys_dict_data` VALUES (1513713207898316802, 1513712507692818433, '文化旅游', '8', '', 8, 1513435534798127105, '2022-04-12 10:58:47', 1513435534798127105, '2022-04-12 10:58:47', NULL); REPLACE INTO `sys_dict_data` VALUES (1531166270181900289, 1531163741457014785, '多张图片', 'images', '', 5, 1513433270406643713, '2022-05-30 14:51:01', 1513433270406643713, '2022-05-30 14:51:01', NULL);
INSERT INTO `sys_dict_data` VALUES (1513713246678851586, 1513712507692818433, '非煤矿山', '9', '', 9, 1513435534798127105, '2022-04-12 10:58:56', 1513435534798127105, '2022-04-12 10:58:56', NULL); REPLACE INTO `sys_dict_data` VALUES (1531193645722038273, 1531193462665834498, '有条件共享', 'conditional', '', 1, 1513433709613187073, '2022-05-30 16:39:48', 1513433709613187073, '2022-05-30 16:39:48', NULL);
INSERT INTO `sys_dict_data` VALUES (1513713286688317442, 1513712507692818433, '医疗卫生', '10', '', 10, 1513435534798127105, '2022-04-12 10:59:06', 1513435534798127105, '2022-04-12 10:59:06', NULL); REPLACE INTO `sys_dict_data` VALUES (1531193734569979906, 1531193462665834498, '无条件共享', 'unconditional', '', 2, 1513433709613187073, '2022-05-30 16:40:09', 1513433709613187073, '2022-05-30 16:40:09', NULL);
INSERT INTO `sys_dict_data` VALUES (1513713328153206786, 1513712507692818433, '安全生产', '11', '', 11, 1513435534798127105, '2022-04-12 10:59:16', 1513435534798127105, '2022-04-12 10:59:16', NULL); REPLACE INTO `sys_dict_data` VALUES (1531193945941929986, 1531193872826822657, '申请', 'application', '', 1, 1513433709613187073, '2022-05-30 16:41:00', 1513433709613187073, '2022-05-30 16:41:00', NULL);
INSERT INTO `sys_dict_data` VALUES (1513713389469736962, 1513712507692818433, '生态环境', '12', '', 12, 1513435534798127105, '2022-04-12 10:59:30', 1513435534798127105, '2022-04-12 10:59:30', NULL); REPLACE INTO `sys_dict_data` VALUES (1531194122345967618, 1531193872826822657, '免批申请', 'exemptionFromApproval', '', 2, 1513433709613187073, '2022-05-30 16:41:42', 1513433709613187073, '2022-05-30 16:41:42', NULL);
INSERT INTO `sys_dict_data` VALUES (1513713438274658306, 1513712507692818433, '农村农业', '13', '', 13, 1513435534798127105, '2022-04-12 10:59:42', 1513435534798127105, '2022-04-12 10:59:42', NULL); REPLACE INTO `sys_dict_data` VALUES (1531214682814177282, 1531214531592740866, 'GET', 'GET', '', 1, 1513433709613187073, '2022-05-30 18:03:24', 1513433709613187073, '2022-05-30 18:03:24', NULL);
INSERT INTO `sys_dict_data` VALUES (1513713486626594817, 1513712507692818433, '市场监管', '14', '', 14, 1513435534798127105, '2022-04-12 10:59:53', 1513435534798127105, '2022-04-12 10:59:53', NULL); REPLACE INTO `sys_dict_data` VALUES (1531214706830761985, 1531214531592740866, 'POST', 'POST', '', 2, 1513433709613187073, '2022-05-30 18:03:29', 1513433709613187073, '2022-05-30 18:03:29', NULL);
INSERT INTO `sys_dict_data` VALUES (1513713527395229698, 1513712507692818433, '政务服务', '15', '', 15, 1513435534798127105, '2022-04-12 11:00:03', 1513435534798127105, '2022-04-12 11:00:03', NULL); REPLACE INTO `sys_dict_data` VALUES (1531214734282481665, 1531214531592740866, 'PUT', 'PUT', '', 3, 1513433709613187073, '2022-05-30 18:03:36', 1513433709613187073, '2022-05-30 18:03:36', NULL);
INSERT INTO `sys_dict_data` VALUES (1513713561142599682, 1513712507692818433, '其他', '99', '', 99, 1513435534798127105, '2022-04-12 11:00:11', 1513435534798127105, '2022-04-12 11:00:11', NULL); REPLACE INTO `sys_dict_data` VALUES (1531214762791165954, 1531214531592740866, 'DELETE', 'DELETE', '', 4, 1513433709613187073, '2022-05-30 18:03:43', 1513433709613187073, '2022-05-30 18:03:43', NULL);
INSERT INTO `sys_dict_data` VALUES (1513713726427537410, 1513713662657339394, '智能算法', '1', '', 1, 1513435534798127105, '2022-04-12 11:00:50', 1513435534798127105, '2022-04-12 11:00:50', NULL); REPLACE INTO `sys_dict_data` VALUES (1531214794017759233, 1531214531592740866, 'HEAD', 'HEAD', '', 5, 1513433709613187073, '2022-05-30 18:03:50', 1513433709613187073, '2022-05-30 18:03:50', NULL);
INSERT INTO `sys_dict_data` VALUES (1513713756559417346, 1513713662657339394, '图层服务', '2', '', 2, 1513435534798127105, '2022-04-12 11:00:58', 1513435534798127105, '2022-04-12 11:00:58', NULL); REPLACE INTO `sys_dict_data` VALUES (1531214849307074561, 1531214531592740866, 'OPTIONS', 'OPTIONS', '', 6, 1513433709613187073, '2022-05-30 18:04:03', 1513433709613187073, '2022-05-30 18:04:03', NULL);
INSERT INTO `sys_dict_data` VALUES (1513713790751383553, 1513713662657339394, '开发组件', '3', '', 3, 1513435534798127105, '2022-04-12 11:01:06', 1513435534798127105, '2022-04-12 11:01:06', NULL); REPLACE INTO `sys_dict_data` VALUES (1531214969662627841, 1531214531592740866, 'TRACE', 'TRACE', '', 7, 1513433709613187073, '2022-05-30 18:04:32', 1513433709613187073, '2022-05-30 18:04:32', NULL);
INSERT INTO `sys_dict_data` VALUES (1513713864000708610, 1513713662657339394, '业务组件', '5', '', 5, 1513435534798127105, '2022-04-12 11:01:23', 1513435534798127105, '2022-04-12 11:01:23', NULL); REPLACE INTO `sys_dict_data` VALUES (1531215034481401858, 1531214531592740866, 'CONNECT', 'CONNECT', '', 8, 1513433709613187073, '2022-05-30 18:04:47', 1513433709613187073, '2022-05-30 18:04:47', NULL);
INSERT INTO `sys_dict_data` VALUES (1513714259091562497, 1513714027213660162, '调用接口', '1', '', 1, 1513435534798127105, '2022-04-12 11:02:57', 1524924140178481154, '2022-07-01 14:26:55', NULL); REPLACE INTO `sys_dict_data` VALUES (1531572146202079234, 1531571420813979650, '一级', '1', '', 1, 1517397484770328578, '2022-05-31 17:43:50', 1517397484770328578, '2022-05-31 17:43:50', NULL);
INSERT INTO `sys_dict_data` VALUES (1513714288619462658, 1513714027213660162, '平台对接', '2', '', 2, 1513435534798127105, '2022-04-12 11:03:05', 1524924140178481154, '2022-07-01 14:27:15', NULL); REPLACE INTO `sys_dict_data` VALUES (1531572199784312834, 1531571420813979650, '二级', '2', '', 2, 1517397484770328578, '2022-05-31 17:44:02', 1517397484770328578, '2022-05-31 17:44:02', NULL);
INSERT INTO `sys_dict_data` VALUES (1513714321163067394, 1513714027213660162, 'SDK', '3', '', 3, 1513435534798127105, '2022-04-12 11:03:12', 1524924140178481154, '2022-07-01 14:27:56', NULL); REPLACE INTO `sys_dict_data` VALUES (1531572239600840705, 1531571420813979650, '三级', '3', '', 3, 1517397484770328578, '2022-05-31 17:44:12', 1517397484770328578, '2022-05-31 17:44:22', NULL);
INSERT INTO `sys_dict_data` VALUES (1513714443263451137, 1513714403530809346, '接口', '1', '', 1, 1513435534798127105, '2022-04-12 11:03:41', 1513435534798127105, '2022-04-12 11:03:41', NULL); REPLACE INTO `sys_dict_data` VALUES (1534451646737612801, 1531163741457014785, '多选标签', 'checkBox', '', 8, 1513433270406643713, '2022-06-08 16:25:56', 1513433270406643713, '2022-06-08 16:25:56', NULL);
INSERT INTO `sys_dict_data` VALUES (1513714474334855170, 1513714403530809346, 'SDK', '2', '', 2, 1513435534798127105, '2022-04-12 11:03:49', 1513435534798127105, '2022-04-12 11:03:49', NULL); REPLACE INTO `sys_dict_data` VALUES (1534465201109139457, 1531163741457014785, '单选标签', 'radio', '', 9, 1513433270406643713, '2022-06-08 17:19:48', 1513433270406643713, '2022-06-08 17:19:48', NULL);
INSERT INTO `sys_dict_data` VALUES (1513714504261214210, 1513714403530809346, 'Web页面', '3', '', 3, 1513435534798127105, '2022-04-12 11:03:56', 1513435534798127105, '2022-04-12 11:03:56', NULL); REPLACE INTO `sys_dict_data` VALUES (1534803228620709889, 1534803070025687042, '金宏网', 'jhw', '', 0, 1513433270406643713, '2022-06-09 15:43:00', 1513433270406643713, '2022-06-09 15:43:47', NULL);
INSERT INTO `sys_dict_data` VALUES (1513714541603102722, 1513714403530809346, '其他', '99', '', 99, 1513435534798127105, '2022-04-12 11:04:05', 1513435534798127105, '2022-04-12 11:04:05', NULL); REPLACE INTO `sys_dict_data` VALUES (1534803286921535489, 1534803070025687042, '互联网', 'hlw', '', 1, 1513433270406643713, '2022-06-09 15:43:14', 1513433270406643713, '2022-06-09 15:43:56', NULL);
INSERT INTO `sys_dict_data` VALUES (1529028194517127170, 1529028127496343554, '', '0', '', 0, 1515239183144824833, '2022-05-24 17:15:04', 1515239183144824833, '2022-05-24 17:18:10', NULL); REPLACE INTO `sys_dict_data` VALUES (1534803333532835842, 1534803070025687042, '专线', 'zx', '', 2, 1513433270406643713, '2022-06-09 15:43:25', 1513433270406643713, '2022-06-09 15:44:06', NULL);
INSERT INTO `sys_dict_data` VALUES (1529028238309855233, 1529028127496343554, '', '1', '', 2, 1515239183144824833, '2022-05-24 17:15:15', 1515973081575276545, '2022-06-22 16:36:52', NULL); REPLACE INTO `sys_dict_data` VALUES (1534804223119548418, 1534804157952647169, 'GET', 'GET', '', 0, 1513433270406643713, '2022-06-09 15:46:57', 1513433270406643713, '2022-06-09 15:46:57', NULL);
INSERT INTO `sys_dict_data` VALUES (1531164091329077250, 1531163741457014785, '单行文本', 'input', '', 1, 1513433270406643713, '2022-05-30 14:42:22', 1513433270406643713, '2022-05-30 14:42:22', NULL); REPLACE INTO `sys_dict_data` VALUES (1534804267029716994, 1534804157952647169, 'POST', 'POST', '', 1, 1513433270406643713, '2022-06-09 15:47:07', 1513433270406643713, '2022-06-09 15:47:07', NULL);
INSERT INTO `sys_dict_data` VALUES (1531164238528176129, 1531163741457014785, '多行文本', 'textArea', '', 2, 1513433270406643713, '2022-05-30 14:42:57', 1513433270406643713, '2022-05-30 14:42:57', NULL); REPLACE INTO `sys_dict_data` VALUES (1534804320565813250, 1534804157952647169, 'PUT', 'PUT', '', 2, 1513433270406643713, '2022-06-09 15:47:20', 1513433270406643713, '2022-06-09 15:47:20', NULL);
INSERT INTO `sys_dict_data` VALUES (1531164512823074818, 1531163741457014785, '单张图片', 'image', '', 4, 1513433270406643713, '2022-05-30 14:44:02', 1513433270406643713, '2022-05-30 14:50:28', NULL); REPLACE INTO `sys_dict_data` VALUES (1534804582491709442, 1534804157952647169, 'HEAD', 'HEAD', '', 3, 1513433270406643713, '2022-06-09 15:48:22', 1513433270406643713, '2022-06-09 15:48:22', NULL);
INSERT INTO `sys_dict_data` VALUES (1531164554032111618, 1531163741457014785, '视频', 'video', '', 6, 1513433270406643713, '2022-05-30 14:44:12', 1513433270406643713, '2022-05-30 14:44:12', NULL); REPLACE INTO `sys_dict_data` VALUES (1534804640578625538, 1534804157952647169, 'DELETE', 'DELETE', '', 4, 1513433270406643713, '2022-06-09 15:48:36', 1513433270406643713, '2022-06-09 15:48:36', NULL);
INSERT INTO `sys_dict_data` VALUES (1531164588542844929, 1531163741457014785, '文件', 'file', '', 7, 1513433270406643713, '2022-05-30 14:44:20', 1513433270406643713, '2022-05-30 14:44:20', NULL); REPLACE INTO `sys_dict_data` VALUES (1534805309289095170, 1534805229031088130, '文本类', '3', '', 2, 1513433270406643713, '2022-06-09 15:51:16', 1524924140178481154, '2022-07-01 14:19:52', NULL);
INSERT INTO `sys_dict_data` VALUES (1531164650173947906, 1531163741457014785, '下拉列表', 'select', '', 3, 1513433270406643713, '2022-05-30 14:44:35', 1513433270406643713, '2022-05-30 14:44:35', NULL); REPLACE INTO `sys_dict_data` VALUES (1534805370156834818, 1534805229031088130, '视频类', '1', '', 0, 1513433270406643713, '2022-06-09 15:51:30', 1524924140178481154, '2022-07-01 14:20:04', NULL);
INSERT INTO `sys_dict_data` VALUES (1531166270181900289, 1531163741457014785, '多张图片', 'images', '', 5, 1513433270406643713, '2022-05-30 14:51:01', 1513433270406643713, '2022-05-30 14:51:01', NULL); REPLACE INTO `sys_dict_data` VALUES (1536670196898336769, 1534805229031088130, '图片类', '2', '', 1, 1513433270406643713, '2022-06-14 19:21:40', 1524924140178481154, '2022-07-01 14:20:27', NULL);
INSERT INTO `sys_dict_data` VALUES (1531193645722038273, 1531193462665834498, '有条件共享', 'conditional', '', 1, 1513433709613187073, '2022-05-30 16:39:48', 1513433709613187073, '2022-05-30 16:39:48', NULL); REPLACE INTO `sys_dict_data` VALUES (1536670305505644545, 1534805229031088130, '其他', '5', '', 4, 1513433270406643713, '2022-06-14 19:22:05', 1524924140178481154, '2022-07-01 14:15:11', NULL);
INSERT INTO `sys_dict_data` VALUES (1531193734569979906, 1531193462665834498, '无条件共享', 'unconditional', '', 2, 1513433709613187073, '2022-05-30 16:40:09', 1513433709613187073, '2022-05-30 16:40:09', NULL); REPLACE INTO `sys_dict_data` VALUES (1539453444552638466, 1539453183746621441, '视频资源', '1', '', 0, 1067246875800000001, '2022-06-22 11:41:18', 1067246875800000001, '2022-06-22 11:41:18', NULL);
INSERT INTO `sys_dict_data` VALUES (1531193945941929986, 1531193872826822657, '申请', 'application', '', 1, 1513433709613187073, '2022-05-30 16:41:00', 1513433709613187073, '2022-05-30 16:41:00', NULL); REPLACE INTO `sys_dict_data` VALUES (1539453481407987714, 1539453183746621441, '感知资源', '2', '', 0, 1067246875800000001, '2022-06-22 11:41:26', 1067246875800000001, '2022-06-22 11:41:26', NULL);
INSERT INTO `sys_dict_data` VALUES (1531194122345967618, 1531193872826822657, '免批申请', 'exemptionFromApproval', '', 2, 1513433709613187073, '2022-05-30 16:41:42', 1513433709613187073, '2022-05-30 16:41:42', NULL); REPLACE INTO `sys_dict_data` VALUES (1539453516610781185, 1539453183746621441, '云资源', '3', '', 0, 1067246875800000001, '2022-06-22 11:41:35', 1067246875800000001, '2022-06-22 11:41:35', NULL);
INSERT INTO `sys_dict_data` VALUES (1531214682814177282, 1531214531592740866, 'GET', 'GET', '', 1, 1513433709613187073, '2022-05-30 18:03:24', 1513433709613187073, '2022-05-30 18:03:24', NULL); REPLACE INTO `sys_dict_data` VALUES (1539527640796356610, 1539527547234017282, '点图层', '1', '', 1, 1515973081575276545, '2022-06-22 16:36:07', 1515973081575276545, '2022-06-22 16:37:06', NULL);
INSERT INTO `sys_dict_data` VALUES (1531214706830761985, 1531214531592740866, 'POST', 'POST', '', 2, 1513433709613187073, '2022-05-30 18:03:29', 1513433709613187073, '2022-05-30 18:03:29', NULL); REPLACE INTO `sys_dict_data` VALUES (1539527678180188162, 1539527547234017282, '线图层', '2', '', 2, 1515973081575276545, '2022-06-22 16:36:16', 1515973081575276545, '2022-06-22 16:37:13', NULL);
INSERT INTO `sys_dict_data` VALUES (1531214734282481665, 1531214531592740866, 'PUT', 'PUT', '', 3, 1513433709613187073, '2022-05-30 18:03:36', 1513433709613187073, '2022-05-30 18:03:36', NULL); REPLACE INTO `sys_dict_data` VALUES (1539527714012127233, 1539527547234017282, '面图层', '3', '', 3, 1515973081575276545, '2022-06-22 16:36:25', 1515973081575276545, '2022-06-22 16:37:18', NULL);
INSERT INTO `sys_dict_data` VALUES (1531214762791165954, 1531214531592740866, 'DELETE', 'DELETE', '', 4, 1513433709613187073, '2022-05-30 18:03:43', 1513433709613187073, '2022-05-30 18:03:43', NULL); REPLACE INTO `sys_dict_data` VALUES (1541336531280465922, 1541336217898848257, '火车站', 'trainStation', '', 0, 1513433270406643713, '2022-06-27 16:24:00', 1513433270406643713, '2022-06-27 16:24:00', NULL);
INSERT INTO `sys_dict_data` VALUES (1531214794017759233, 1531214531592740866, 'HEAD', 'HEAD', '', 5, 1513433709613187073, '2022-05-30 18:03:50', 1513433709613187073, '2022-05-30 18:03:50', NULL); REPLACE INTO `sys_dict_data` VALUES (1541336662352465922, 1541336217898848257, '长途汽车站', 'interCityBusStation', '', 1, 1513433270406643713, '2022-06-27 16:24:32', 1513433270406643713, '2022-06-27 16:24:32', NULL);
INSERT INTO `sys_dict_data` VALUES (1531214849307074561, 1531214531592740866, 'OPTIONS', 'OPTIONS', '', 6, 1513433709613187073, '2022-05-30 18:04:03', 1513433709613187073, '2022-05-30 18:04:03', NULL); REPLACE INTO `sys_dict_data` VALUES (1541336877826445313, 1541336217898848257, '轮渡码头', 'ferryTerminal', '', 2, 1513433270406643713, '2022-06-27 16:25:23', 1513433270406643713, '2022-06-27 16:25:23', NULL);
INSERT INTO `sys_dict_data` VALUES (1531214969662627841, 1531214531592740866, 'TRACE', 'TRACE', '', 7, 1513433709613187073, '2022-05-30 18:04:32', 1513433709613187073, '2022-05-30 18:04:32', NULL); REPLACE INTO `sys_dict_data` VALUES (1541337001235451905, 1541336217898848257, '景区景点', 'scenicSpots', '', 3, 1513433270406643713, '2022-06-27 16:25:52', 1513433270406643713, '2022-06-27 16:25:52', NULL);
INSERT INTO `sys_dict_data` VALUES (1531215034481401858, 1531214531592740866, 'CONNECT', 'CONNECT', '', 8, 1513433709613187073, '2022-05-30 18:04:47', 1513433709613187073, '2022-05-30 18:04:47', NULL); REPLACE INTO `sys_dict_data` VALUES (1541337098887237634, 1541336217898848257, '公园广场', 'parkSquare', '', 4, 1513433270406643713, '2022-06-27 16:26:16', 1513433270406643713, '2022-06-27 16:26:16', NULL);
INSERT INTO `sys_dict_data` VALUES (1531572146202079234, 1531571420813979650, '一级', '1', '', 1, 1517397484770328578, '2022-05-31 17:43:50', 1517397484770328578, '2022-05-31 17:43:50', NULL); REPLACE INTO `sys_dict_data` VALUES (1541337205883932673, 1541336217898848257, '海水浴场', 'bathingBeach', '', 5, 1513433270406643713, '2022-06-27 16:26:41', 1513433270406643713, '2022-06-27 16:26:46', NULL);
INSERT INTO `sys_dict_data` VALUES (1531572199784312834, 1531571420813979650, '二级', '2', '', 2, 1517397484770328578, '2022-05-31 17:44:02', 1517397484770328578, '2022-05-31 17:44:02', NULL); REPLACE INTO `sys_dict_data` VALUES (1541337353955446785, 1541336217898848257, '商业街区', 'commercialStreet', '', 6, 1513433270406643713, '2022-06-27 16:27:17', 1513433270406643713, '2022-06-27 16:27:17', NULL);
INSERT INTO `sys_dict_data` VALUES (1531572239600840705, 1531571420813979650, '三级', '3', '', 3, 1517397484770328578, '2022-05-31 17:44:12', 1517397484770328578, '2022-05-31 17:44:22', NULL); REPLACE INTO `sys_dict_data` VALUES (1541337466346016769, 1541336217898848257, '建筑工地', 'constructionSite', '', 7, 1513433270406643713, '2022-06-27 16:27:43', 1513433270406643713, '2022-06-27 16:27:43', NULL);
INSERT INTO `sys_dict_data` VALUES (1534451646737612801, 1531163741457014785, '多选标签', 'checkBox', '', 8, 1513433270406643713, '2022-06-08 16:25:56', 1513433270406643713, '2022-06-08 16:25:56', NULL); REPLACE INTO `sys_dict_data` VALUES (1541337577625096193, 1541336217898848257, '农贸市场', 'farmProductMarket', '', 8, 1513433270406643713, '2022-06-27 16:28:10', 1513433270406643713, '2022-06-27 16:28:10', NULL);
INSERT INTO `sys_dict_data` VALUES (1534465201109139457, 1531163741457014785, '单选标签', 'radio', '', 9, 1513433270406643713, '2022-06-08 17:19:48', 1513433270406643713, '2022-06-08 17:19:48', NULL); REPLACE INTO `sys_dict_data` VALUES (1541337705907884034, 1541336217898848257, '渔港', 'fishingPort', '', 9, 1513433270406643713, '2022-06-27 16:28:40', 1513433270406643713, '2022-06-27 16:28:40', NULL);
INSERT INTO `sys_dict_data` VALUES (1534803228620709889, 1534803070025687042, '金宏网', 'jhw', '', 0, 1513433270406643713, '2022-06-09 15:43:00', 1513433270406643713, '2022-06-09 15:43:47', NULL); REPLACE INTO `sys_dict_data` VALUES (1541337792872583169, 1541336217898848257, '河道', 'riverCourse', '', 10, 1513433270406643713, '2022-06-27 16:29:01', 1513433270406643713, '2022-06-27 16:29:01', NULL);
INSERT INTO `sys_dict_data` VALUES (1534803286921535489, 1534803070025687042, '互联网', 'hlw', '', 1, 1513433270406643713, '2022-06-09 15:43:14', 1513433270406643713, '2022-06-09 15:43:56', NULL); REPLACE INTO `sys_dict_data` VALUES (1541337861629808641, 1541336217898848257, '水库', 'reservoir', '', 11, 1513433270406643713, '2022-06-27 16:29:18', 1513433270406643713, '2022-06-27 16:29:18', NULL);
INSERT INTO `sys_dict_data` VALUES (1534803333532835842, 1534803070025687042, '专线', 'zx', '', 2, 1513433270406643713, '2022-06-09 15:43:25', 1513433270406643713, '2022-06-09 15:44:06', NULL); REPLACE INTO `sys_dict_data` VALUES (1541337956945367042, 1541336217898848257, '积水点', 'pondingPoint', '', 12, 1513433270406643713, '2022-06-27 16:29:40', 1513433270406643713, '2022-06-27 16:29:40', NULL);
INSERT INTO `sys_dict_data` VALUES (1534804223119548418, 1534804157952647169, 'GET', 'GET', '', 0, 1513433270406643713, '2022-06-09 15:46:57', 1513433270406643713, '2022-06-09 15:46:57', NULL); REPLACE INTO `sys_dict_data` VALUES (1541338061064769538, 1541336217898848257, '加油站', 'gasStation', '', 13, 1513433270406643713, '2022-06-27 16:30:05', 1513433270406643713, '2022-06-27 16:30:05', NULL);
INSERT INTO `sys_dict_data` VALUES (1534804267029716994, 1534804157952647169, 'POST', 'POST', '', 1, 1513433270406643713, '2022-06-09 15:47:07', 1513433270406643713, '2022-06-09 15:47:07', NULL); REPLACE INTO `sys_dict_data` VALUES (1541338210910474242, 1541336217898848257, '山区/林区', 'mountainOrForestArea', '', 14, 1513433270406643713, '2022-06-27 16:30:41', 1513433270406643713, '2022-06-27 16:30:41', NULL);
INSERT INTO `sys_dict_data` VALUES (1534804320565813250, 1534804157952647169, 'PUT', 'PUT', '', 2, 1513433270406643713, '2022-06-09 15:47:20', 1513433270406643713, '2022-06-09 15:47:20', NULL); REPLACE INTO `sys_dict_data` VALUES (1541338876106117121, 1541336217898848257, '墓地', 'cemetery', '', 15, 1513433270406643713, '2022-06-27 16:33:19', 1513433270406643713, '2022-06-27 16:33:19', NULL);
INSERT INTO `sys_dict_data` VALUES (1534804582491709442, 1534804157952647169, 'HEAD', 'HEAD', '', 3, 1513433270406643713, '2022-06-09 15:48:22', 1513433270406643713, '2022-06-09 15:48:22', NULL); REPLACE INTO `sys_dict_data` VALUES (1541338966925381634, 1541336217898848257, '旅游景点', 'scenicSpot', '', 16, 1513433270406643713, '2022-06-27 16:33:41', 1513433270406643713, '2022-06-27 16:33:41', NULL);
INSERT INTO `sys_dict_data` VALUES (1534804640578625538, 1534804157952647169, 'DELETE', 'DELETE', '', 4, 1513433270406643713, '2022-06-09 15:48:36', 1513433270406643713, '2022-06-09 15:48:36', NULL); REPLACE INTO `sys_dict_data` VALUES (1541339073888522241, 1541336217898848257, '输油管道', 'petroleumPipeline', '', 17, 1513433270406643713, '2022-06-27 16:34:07', 1513433270406643713, '2022-06-27 16:34:07', NULL);
INSERT INTO `sys_dict_data` VALUES (1534805309289095170, 1534805229031088130, '文本类', '3', '', 2, 1513433270406643713, '2022-06-09 15:51:16', 1524924140178481154, '2022-07-01 14:19:52', NULL); REPLACE INTO `sys_dict_data` VALUES (1541339179807281153, 1541336217898848257, '危化企业', 'hazardousChemicalEnterprise', '', 18, 1513433270406643713, '2022-06-27 16:34:32', 1513433270406643713, '2022-06-27 16:34:32', NULL);
INSERT INTO `sys_dict_data` VALUES (1534805370156834818, 1534805229031088130, '视频类', '1', '', 0, 1513433270406643713, '2022-06-09 15:51:30', 1524924140178481154, '2022-07-01 14:20:04', NULL); REPLACE INTO `sys_dict_data` VALUES (1541339273172488194, 1541336217898848257, '学校', 'school', '', 19, 1513433270406643713, '2022-06-27 16:34:54', 1513433270406643713, '2022-06-27 16:34:54', NULL);
INSERT INTO `sys_dict_data` VALUES (1536670196898336769, 1534805229031088130, '图片类', '2', '', 1, 1513433270406643713, '2022-06-14 19:21:40', 1524924140178481154, '2022-07-01 14:20:27', NULL); REPLACE INTO `sys_dict_data` VALUES (1541339333645963265, 1541336217898848257, '广场', 'square', '', 20, 1513433270406643713, '2022-06-27 16:35:08', 1513433270406643713, '2022-06-27 16:35:08', NULL);
INSERT INTO `sys_dict_data` VALUES (1536670305505644545, 1534805229031088130, '其他', '5', '', 4, 1513433270406643713, '2022-06-14 19:22:05', 1524924140178481154, '2022-07-01 14:15:11', NULL); REPLACE INTO `sys_dict_data` VALUES (1541339454483861505, 1541336217898848257, '公园', 'park', '', 21, 1513433270406643713, '2022-06-27 16:35:37', 1513433270406643713, '2022-06-27 16:35:37', NULL);
INSERT INTO `sys_dict_data` VALUES (1539453444552638466, 1539453183746621441, '视频资源', '1', '', 0, 1067246875800000001, '2022-06-22 11:41:18', 1067246875800000001, '2022-06-22 11:41:18', NULL); REPLACE INTO `sys_dict_data` VALUES (1541339513900371969, 1541336217898848257, '政府', 'government', '', 22, 1513433270406643713, '2022-06-27 16:35:51', 1513433270406643713, '2022-06-27 16:35:51', NULL);
INSERT INTO `sys_dict_data` VALUES (1539453481407987714, 1539453183746621441, '感知资源', '2', '', 0, 1067246875800000001, '2022-06-22 11:41:26', 1067246875800000001, '2022-06-22 11:41:26', NULL); REPLACE INTO `sys_dict_data` VALUES (1541339575422423041, 1541336217898848257, '桥梁', 'bridge', '', 23, 1513433270406643713, '2022-06-27 16:36:06', 1513433270406643713, '2022-06-27 16:36:06', NULL);
INSERT INTO `sys_dict_data` VALUES (1539453516610781185, 1539453183746621441, '云资源', '3', '', 0, 1067246875800000001, '2022-06-22 11:41:35', 1067246875800000001, '2022-06-22 11:41:35', NULL); REPLACE INTO `sys_dict_data` VALUES (1541339648030019585, 1541336217898848257, '隧道', 'tunnel', '', 24, 1513433270406643713, '2022-06-27 16:36:23', 1513433270406643713, '2022-06-27 16:36:23', NULL);
INSERT INTO `sys_dict_data` VALUES (1539527640796356610, 1539527547234017282, '点图层', '1', '', 1, 1515973081575276545, '2022-06-22 16:36:07', 1515973081575276545, '2022-06-22 16:37:06', NULL); REPLACE INTO `sys_dict_data` VALUES (1541339776463802370, 1541336217898848257, '物资储备库', 'materialReserveWarehouse', '', 25, 1513433270406643713, '2022-06-27 16:36:54', 1513433270406643713, '2022-06-27 16:36:54', NULL);
INSERT INTO `sys_dict_data` VALUES (1539527678180188162, 1539527547234017282, '线图层', '2', '', 2, 1515973081575276545, '2022-06-22 16:36:16', 1515973081575276545, '2022-06-22 16:37:13', NULL); REPLACE INTO `sys_dict_data` VALUES (1541340458763816961, 1541336217898848257, '地铁站', 'metroStation', '', 26, 1513433270406643713, '2022-06-27 16:39:37', 1513433270406643713, '2022-06-27 16:39:37', NULL);
INSERT INTO `sys_dict_data` VALUES (1539527714012127233, 1539527547234017282, '面图层', '3', '', 3, 1515973081575276545, '2022-06-22 16:36:25', 1515973081575276545, '2022-06-22 16:37:18', NULL); REPLACE INTO `sys_dict_data` VALUES (1541340592314744834, 1541336217898848257, '安全生产企业', 'safetyProductionEnterprise', '', 27, 1513433270406643713, '2022-06-27 16:40:09', 1513433270406643713, '2022-06-27 16:40:09', NULL);
INSERT INTO `sys_dict_data` VALUES (1541336531280465922, 1541336217898848257, '火车站', 'trainStation', '', 0, 1513433270406643713, '2022-06-27 16:24:00', 1513433270406643713, '2022-06-27 16:24:00', NULL); REPLACE INTO `sys_dict_data` VALUES (1541340718114504705, 1541336217898848257, '敬老院', 'homeOfRespectForTheAged', '', 28, 1513433270406643713, '2022-06-27 16:40:39', 1513433270406643713, '2022-06-27 16:40:52', NULL);
INSERT INTO `sys_dict_data` VALUES (1541336662352465922, 1541336217898848257, '长途汽车站', 'interCityBusStation', '', 1, 1513433270406643713, '2022-06-27 16:24:32', 1513433270406643713, '2022-06-27 16:24:32', NULL); REPLACE INTO `sys_dict_data` VALUES (1541340857289900033, 1541336217898848257, '医院', 'hospital', '', 29, 1513433270406643713, '2022-06-27 16:41:12', 1513433270406643713, '2022-06-27 16:41:12', NULL);
INSERT INTO `sys_dict_data` VALUES (1541336877826445313, 1541336217898848257, '轮渡码头', 'ferryTerminal', '', 2, 1513433270406643713, '2022-06-27 16:25:23', 1513433270406643713, '2022-06-27 16:25:23', NULL); REPLACE INTO `sys_dict_data` VALUES (1541340947492601858, 1541336217898848257, '港口', 'port', '', 30, 1513433270406643713, '2022-06-27 16:41:33', 1513433270406643713, '2022-06-27 16:41:33', NULL);
INSERT INTO `sys_dict_data` VALUES (1541337001235451905, 1541336217898848257, '景区景点', 'scenicSpots', '', 3, 1513433270406643713, '2022-06-27 16:25:52', 1513433270406643713, '2022-06-27 16:25:52', NULL); REPLACE INTO `sys_dict_data` VALUES (1541341038223785986, 1541336217898848257, '高速', 'highSpeed', '', 31, 1513433270406643713, '2022-06-27 16:41:55', 1513433270406643713, '2022-06-27 16:41:55', NULL);
INSERT INTO `sys_dict_data` VALUES (1541337098887237634, 1541336217898848257, '公园广场', 'parkSquare', '', 4, 1513433270406643713, '2022-06-27 16:26:16', 1513433270406643713, '2022-06-27 16:26:16', NULL); REPLACE INTO `sys_dict_data` VALUES (1542442046211428354, 1539528437391155202, 'ArcGIS map image layer', '1', '', 1, 1515973081575276545, '2022-06-30 17:36:56', 1515973081575276545, '2022-06-30 17:36:56', NULL);
INSERT INTO `sys_dict_data` VALUES (1541337205883932673, 1541336217898848257, '海水浴场', 'bathingBeach', '', 5, 1513433270406643713, '2022-06-27 16:26:41', 1513433270406643713, '2022-06-27 16:26:46', NULL); REPLACE INTO `sys_dict_data` VALUES (1542442104080240641, 1539528437391155202, 'ArcGIS tiled layer', '2', '', 2, 1515973081575276545, '2022-06-30 17:37:09', 1515973081575276545, '2022-06-30 17:37:09', NULL);
INSERT INTO `sys_dict_data` VALUES (1541337353955446785, 1541336217898848257, '商业街区', 'commercialStreet', '', 6, 1513433270406643713, '2022-06-27 16:27:17', 1513433270406643713, '2022-06-27 16:27:17', NULL); REPLACE INTO `sys_dict_data` VALUES (1542442140499382273, 1539528437391155202, 'ArcGIS vector tiled layer', '3', '', 3, 1515973081575276545, '2022-06-30 17:37:18', 1515973081575276545, '2022-06-30 17:37:18', NULL);
INSERT INTO `sys_dict_data` VALUES (1541337466346016769, 1541336217898848257, '建筑工地', 'constructionSite', '', 7, 1513433270406643713, '2022-06-27 16:27:43', 1513433270406643713, '2022-06-27 16:27:43', NULL); REPLACE INTO `sys_dict_data` VALUES (1542442174674571266, 1539528437391155202, 'Bing maps layer', '4', '', 4, 1515973081575276545, '2022-06-30 17:37:26', 1515973081575276545, '2022-06-30 17:37:26', NULL);
INSERT INTO `sys_dict_data` VALUES (1541337577625096193, 1541336217898848257, '农贸市场', 'farmProductMarket', '', 8, 1513433270406643713, '2022-06-27 16:28:10', 1513433270406643713, '2022-06-27 16:28:10', NULL); REPLACE INTO `sys_dict_data` VALUES (1542442212905652226, 1539528437391155202, 'ENC layer', '5', '', 5, 1515973081575276545, '2022-06-30 17:37:35', 1515973081575276545, '2022-06-30 17:37:35', NULL);
INSERT INTO `sys_dict_data` VALUES (1541337705907884034, 1541336217898848257, '渔港', 'fishingPort', '', 9, 1513433270406643713, '2022-06-27 16:28:40', 1513433270406643713, '2022-06-27 16:28:40', NULL); REPLACE INTO `sys_dict_data` VALUES (1542442251380002818, 1539528437391155202, 'Feature collection layer', '6', '', 6, 1515973081575276545, '2022-06-30 17:37:45', 1515973081575276545, '2022-06-30 17:37:45', NULL);
INSERT INTO `sys_dict_data` VALUES (1541337792872583169, 1541336217898848257, '河道', 'riverCourse', '', 10, 1513433270406643713, '2022-06-27 16:29:01', 1513433270406643713, '2022-06-27 16:29:01', NULL); REPLACE INTO `sys_dict_data` VALUES (1542442287157415937, 1539528437391155202, 'Feature layer', '7', '', 7, 1515973081575276545, '2022-06-30 17:37:53', 1515973081575276545, '2022-06-30 17:37:53', NULL);
INSERT INTO `sys_dict_data` VALUES (1541337861629808641, 1541336217898848257, '水库', 'reservoir', '', 11, 1513433270406643713, '2022-06-27 16:29:18', 1513433270406643713, '2022-06-27 16:29:18', NULL); REPLACE INTO `sys_dict_data` VALUES (1542442320867037186, 1539528437391155202, 'Mobile basemap layer', '8', '', 8, 1515973081575276545, '2022-06-30 17:38:01', 1515973081575276545, '2022-06-30 17:38:01', NULL);
INSERT INTO `sys_dict_data` VALUES (1541337956945367042, 1541336217898848257, '积水点', 'pondingPoint', '', 12, 1513433270406643713, '2022-06-27 16:29:40', 1513433270406643713, '2022-06-27 16:29:40', NULL); REPLACE INTO `sys_dict_data` VALUES (1542442362709413890, 1539528437391155202, 'OpenStreetMap layer', '9', '', 9, 1515973081575276545, '2022-06-30 17:38:11', 1515973081575276545, '2022-06-30 17:38:11', NULL);
INSERT INTO `sys_dict_data` VALUES (1541338061064769538, 1541336217898848257, '加油站', 'gasStation', '', 13, 1513433270406643713, '2022-06-27 16:30:05', 1513433270406643713, '2022-06-27 16:30:05', NULL); REPLACE INTO `sys_dict_data` VALUES (1542442399313104898, 1539528437391155202, 'Raster layer', '10', '', 10, 1515973081575276545, '2022-06-30 17:38:20', 1515973081575276545, '2022-06-30 17:38:20', NULL);
INSERT INTO `sys_dict_data` VALUES (1541338210910474242, 1541336217898848257, '山区/林区', 'mountainOrForestArea', '', 14, 1513433270406643713, '2022-06-27 16:30:41', 1513433270406643713, '2022-06-27 16:30:41', NULL); REPLACE INTO `sys_dict_data` VALUES (1542442425208737793, 1539528437391155202, 'Scene layer', '11', '', 11, 1515973081575276545, '2022-06-30 17:38:26', 1515973081575276545, '2022-06-30 17:38:26', NULL);
INSERT INTO `sys_dict_data` VALUES (1541338876106117121, 1541336217898848257, '墓地', 'cemetery', '', 15, 1513433270406643713, '2022-06-27 16:33:19', 1513433270406643713, '2022-06-27 16:33:19', NULL); REPLACE INTO `sys_dict_data` VALUES (1542442452488491009, 1539528437391155202, 'Web tiled layer', '12', '', 12, 1515973081575276545, '2022-06-30 17:38:33', 1515973081575276545, '2022-06-30 17:38:33', NULL);
INSERT INTO `sys_dict_data` VALUES (1541338966925381634, 1541336217898848257, '旅游景点', 'scenicSpot', '', 16, 1513433270406643713, '2022-06-27 16:33:41', 1513433270406643713, '2022-06-27 16:33:41', NULL); REPLACE INTO `sys_dict_data` VALUES (1542442479298482177, 1539528437391155202, 'WMS layer', '13', '', 13, 1515973081575276545, '2022-06-30 17:38:39', 1515973081575276545, '2022-06-30 17:38:39', NULL);
INSERT INTO `sys_dict_data` VALUES (1541339073888522241, 1541336217898848257, '输油管道', 'petroleumPipeline', '', 17, 1513433270406643713, '2022-06-27 16:34:07', 1513433270406643713, '2022-06-27 16:34:07', NULL); REPLACE INTO `sys_dict_data` VALUES (1542442510910951425, 1539528437391155202, 'WMTS layer', '14', '', 14, 1515973081575276545, '2022-06-30 17:38:46', 1515973081575276545, '2022-06-30 17:38:46', NULL);
INSERT INTO `sys_dict_data` VALUES (1541339179807281153, 1541336217898848257, '危化企业', 'hazardousChemicalEnterprise', '', 18, 1513433270406643713, '2022-06-27 16:34:32', 1513433270406643713, '2022-06-27 16:34:32', NULL); REPLACE INTO `sys_dict_data` VALUES (1542753737822306305, 1534805229031088130, '语音类', '4', '', 3, 1524924140178481154, '2022-07-01 14:15:29', 1524924140178481154, '2022-07-01 14:15:29', NULL);
INSERT INTO `sys_dict_data` VALUES (1541339273172488194, 1541336217898848257, '学校', 'school', '', 19, 1513433270406643713, '2022-06-27 16:34:54', 1513433270406643713, '2022-06-27 16:34:54', NULL); REPLACE INTO `sys_dict_data` VALUES (1542761409565155330, 1531163741457014785, '来源应用', 'AssociatedApplication', '', 10, 1524924140178481154, '2022-07-01 14:45:58', 1524924140178481154, '2022-07-15 10:58:15', NULL);
INSERT INTO `sys_dict_data` VALUES (1541339333645963265, 1541336217898848257, '广场', 'square', '', 20, 1513433270406643713, '2022-06-27 16:35:08', 1513433270406643713, '2022-06-27 16:35:08', NULL); REPLACE INTO `sys_dict_data` VALUES (1542788734075789314, 1542788081786019842, '小程序', '1', '', 1, 1524924140178481154, '2022-07-01 16:34:32', 1524924140178481154, '2022-07-01 16:34:32', NULL);
INSERT INTO `sys_dict_data` VALUES (1541339454483861505, 1541336217898848257, '公园', 'park', '', 21, 1513433270406643713, '2022-06-27 16:35:37', 1513433270406643713, '2022-06-27 16:35:37', NULL); REPLACE INTO `sys_dict_data` VALUES (1542788778887733249, 1542788081786019842, 'APP', '2', '', 2, 1524924140178481154, '2022-07-01 16:34:43', 1524924140178481154, '2022-07-01 16:34:43', NULL);
INSERT INTO `sys_dict_data` VALUES (1541339513900371969, 1541336217898848257, '政府', 'government', '', 22, 1513433270406643713, '2022-06-27 16:35:51', 1513433270406643713, '2022-06-27 16:35:51', NULL); REPLACE INTO `sys_dict_data` VALUES (1542788831614328834, 1542788081786019842, 'PC', '3', '', 3, 1524924140178481154, '2022-07-01 16:34:56', 1524924140178481154, '2022-07-01 16:34:56', NULL);
INSERT INTO `sys_dict_data` VALUES (1541339575422423041, 1541336217898848257, '桥梁', 'bridge', '', 23, 1513433270406643713, '2022-06-27 16:36:06', 1513433270406643713, '2022-06-27 16:36:06', NULL); REPLACE INTO `sys_dict_data` VALUES (1542793799050190849, 1531163741457014785, '能力类型', 'AbilityType', '', 11, 1524924140178481154, '2022-07-01 16:54:40', 1524924140178481154, '2022-07-15 10:46:19', NULL);
INSERT INTO `sys_dict_data` VALUES (1541339648030019585, 1541336217898848257, '隧道', 'tunnel', '', 24, 1513433270406643713, '2022-06-27 16:36:23', 1513433270406643713, '2022-06-27 16:36:23', NULL); REPLACE INTO `sys_dict_data` VALUES (1542806484877799426, 1531163741457014785, '组件类型', 'ComponentType', '', 12, 1524924140178481154, '2022-07-01 17:45:05', 1524924140178481154, '2022-07-15 10:46:47', NULL);
INSERT INTO `sys_dict_data` VALUES (1541339776463802370, 1541336217898848257, '物资储备库', 'materialReserveWarehouse', '', 25, 1513433270406643713, '2022-06-27 16:36:54', 1513433270406643713, '2022-06-27 16:36:54', NULL); REPLACE INTO `sys_dict_data` VALUES (1543899506717712386, 1531163741457014785, '关联组件', 'AssociatedComponents', '', 13, 1524924140178481154, '2022-07-04 18:08:21', 1524924140178481154, '2022-07-15 10:59:11', NULL);
INSERT INTO `sys_dict_data` VALUES (1541340458763816961, 1541336217898848257, '地铁站', 'metroStation', '', 26, 1513433270406643713, '2022-06-27 16:39:37', 1513433270406643713, '2022-06-27 16:39:37', NULL); REPLACE INTO `sys_dict_data` VALUES (1545342103516487682, 1531163741457014785, '富文本编辑', 'richText', '', 20, 1513433709613187073, '2022-07-08 17:40:43', 1513433709613187073, '2022-07-08 17:40:43', NULL);
INSERT INTO `sys_dict_data` VALUES (1541340592314744834, 1541336217898848257, '安全生产企业', 'safetyProductionEnterprise', '', 27, 1513433270406643713, '2022-06-27 16:40:09', 1513433270406643713, '2022-06-27 16:40:09', NULL); REPLACE INTO `sys_dict_data` VALUES (1545610536514695170, 1531163741457014785, '多条添加', ' multipleAdditions', '', 20, 1513433709613187073, '2022-07-09 11:27:23', 1513433709613187073, '2022-07-09 11:27:23', NULL);
INSERT INTO `sys_dict_data` VALUES (1541340718114504705, 1541336217898848257, '敬老院', 'homeOfRespectForTheAged', '', 28, 1513433270406643713, '2022-06-27 16:40:39', 1513433270406643713, '2022-06-27 16:40:52', NULL); REPLACE INTO `sys_dict_data` VALUES (1547520739196383234, 1531163741457014785, '压缩包', 'package', '', 21, 1524924140178481154, '2022-07-14 17:57:50', 1524924140178481154, '2022-07-14 17:58:03', NULL);
INSERT INTO `sys_dict_data` VALUES (1541340857289900033, 1541336217898848257, '医院', 'hospital', '', 29, 1513433270406643713, '2022-06-27 16:41:12', 1513433270406643713, '2022-06-27 16:41:12', NULL); REPLACE INTO `sys_dict_type` VALUES (1160061077912858625, 'gender', '性别', '', 0, 1067246875800000001, '2022-02-25 10:37:18', 1067246875800000001, '2022-02-25 10:37:18', NULL);
INSERT INTO `sys_dict_data` VALUES (1541340947492601858, 1541336217898848257, '港口', 'port', '', 30, 1513433270406643713, '2022-06-27 16:41:33', 1513433270406643713, '2022-06-27 16:41:33', NULL); REPLACE INTO `sys_dict_type` VALUES (1225813644059140097, 'notice_type', '站内通知-类型', '', 1, 1067246875800000001, '2022-02-25 10:37:18', 1067246875800000001, '2022-02-25 10:37:18', NULL);
INSERT INTO `sys_dict_data` VALUES (1541341038223785986, 1541336217898848257, '高速', 'highSpeed', '', 31, 1513433270406643713, '2022-06-27 16:41:55', 1513433270406643713, '2022-06-27 16:41:55', NULL); REPLACE INTO `sys_dict_type` VALUES (1341593474355838978, 'post_status', '岗位管理状态', '', 0, 1067246875800000001, '2022-02-25 10:37:18', 1067246875800000001, '2022-02-25 10:37:18', NULL);
INSERT INTO `sys_dict_data` VALUES (1542442046211428354, 1539528437391155202, 'ArcGIS map image layer', '1', '', 1, 1515973081575276545, '2022-06-30 17:36:56', 1515973081575276545, '2022-06-30 17:36:56', NULL); REPLACE INTO `sys_dict_type` VALUES (1343069688596295682, 'order_status', '订单状态', '', 0, 1067246875800000001, '2022-02-25 10:37:18', 1067246875800000001, '2022-02-25 10:37:18', NULL);
INSERT INTO `sys_dict_data` VALUES (1542442104080240641, 1539528437391155202, 'ArcGIS tiled layer', '2', '', 2, 1515973081575276545, '2022-06-30 17:37:09', 1515973081575276545, '2022-06-30 17:37:09', NULL); REPLACE INTO `sys_dict_type` VALUES (1497114512560504834, 'event_type', '异常事件', '', 0, 1067246875800000001, '2022-02-25 15:41:29', 1513435534798127105, '2022-04-12 10:54:08', NULL);
INSERT INTO `sys_dict_data` VALUES (1542442140499382273, 1539528437391155202, 'ArcGIS vector tiled layer', '3', '', 3, 1515973081575276545, '2022-06-30 17:37:18', 1515973081575276545, '2022-06-30 17:37:18', NULL); REPLACE INTO `sys_dict_type` VALUES (1513690812521160705, 'applicationType', '应用类型', '应用资源', 0, 1513433270406643713, '2022-04-12 09:29:47', 1513433270406643713, '2022-04-12 09:29:47', NULL);
INSERT INTO `sys_dict_data` VALUES (1542442174674571266, 1539528437391155202, 'Bing maps layer', '4', '', 4, 1515973081575276545, '2022-06-30 17:37:26', 1515973081575276545, '2022-06-30 17:37:26', NULL); REPLACE INTO `sys_dict_type` VALUES (1513693624420311042, 'publishingTerminal_back', '发布终端', '发布终端', 0, 1513435534798127105, '2022-04-12 09:40:58', 1524924140178481154, '2022-07-01 16:31:35', NULL);
INSERT INTO `sys_dict_data` VALUES (1542442212905652226, 1539528437391155202, 'ENC layer', '5', '', 5, 1515973081575276545, '2022-06-30 17:37:35', 1515973081575276545, '2022-06-30 17:37:35', NULL); REPLACE INTO `sys_dict_type` VALUES (1513711991655014402, 'applicationStatus', '应用状态', '应用状态', 0, 1513435534798127105, '2022-04-12 10:53:57', 1513435534798127105, '2022-04-12 10:53:57', NULL);
INSERT INTO `sys_dict_data` VALUES (1542442251380002818, 1539528437391155202, 'Feature collection layer', '6', '', 6, 1515973081575276545, '2022-06-30 17:37:45', 1515973081575276545, '2022-06-30 17:37:45', NULL); REPLACE INTO `sys_dict_type` VALUES (1513712507692818433, 'applicationArea', '应用领域', '', 0, 1513435534798127105, '2022-04-12 10:56:00', 1513435534798127105, '2022-04-12 11:09:55', NULL);
INSERT INTO `sys_dict_data` VALUES (1542442287157415937, 1539528437391155202, 'Feature layer', '7', '', 7, 1515973081575276545, '2022-06-30 17:37:53', 1515973081575276545, '2022-06-30 17:37:53', NULL); REPLACE INTO `sys_dict_type` VALUES (1513713662657339394, 'category', '组件类型', '组件类型', 0, 1513435534798127105, '2022-04-12 11:00:35', 1513435534798127105, '2022-04-12 11:05:20', NULL);
INSERT INTO `sys_dict_data` VALUES (1542442320867037186, 1539528437391155202, 'Mobile basemap layer', '8', '', 8, 1515973081575276545, '2022-06-30 17:38:01', 1515973081575276545, '2022-06-30 17:38:01', NULL); REPLACE INTO `sys_dict_type` VALUES (1513714027213660162, 'useType', '使用类型', '使用类型', 0, 1513435534798127105, '2022-04-12 11:02:02', 1513435534798127105, '2022-04-12 11:02:43', NULL);
INSERT INTO `sys_dict_data` VALUES (1542442362709413890, 1539528437391155202, 'OpenStreetMap layer', '9', '', 9, 1515973081575276545, '2022-06-30 17:38:11', 1515973081575276545, '2022-06-30 17:38:11', NULL); REPLACE INTO `sys_dict_type` VALUES (1513714403530809346, 'technicalField', '技术领域', '技术领域', 0, 1513435534798127105, '2022-04-12 11:03:32', 1513435534798127105, '2022-04-12 11:03:32', NULL);
INSERT INTO `sys_dict_data` VALUES (1542442399313104898, 1539528437391155202, 'Raster layer', '10', '', 10, 1515973081575276545, '2022-06-30 17:38:20', 1515973081575276545, '2022-06-30 17:38:20', NULL); REPLACE INTO `sys_dict_type` VALUES (1529028127496343554, 'yes_not', '是否存在', '', 0, 1515239183144824833, '2022-05-24 17:14:48', 1515239183144824833, '2022-05-24 17:14:48', NULL);
INSERT INTO `sys_dict_data` VALUES (1542442425208737793, 1539528437391155202, 'Scene layer', '11', '', 11, 1515973081575276545, '2022-06-30 17:38:26', 1515973081575276545, '2022-06-30 17:38:26', NULL); REPLACE INTO `sys_dict_type` VALUES (1531163741457014785, 'fieldType', '字段类型', '编目-字段类型', 30, 1513433270406643713, '2022-05-30 14:40:58', 1513433709613187073, '2022-06-06 10:12:31', NULL);
INSERT INTO `sys_dict_data` VALUES (1542442452488491009, 1539528437391155202, 'Web tiled layer', '12', '', 12, 1515973081575276545, '2022-06-30 17:38:33', 1515973081575276545, '2022-06-30 17:38:33', NULL); REPLACE INTO `sys_dict_type` VALUES (1531193462665834498, 'shareType', '共享类型', '', 18, 1513433709613187073, '2022-05-30 16:39:04', 1513433709613187073, '2022-05-30 16:39:04', NULL);
INSERT INTO `sys_dict_data` VALUES (1542442479298482177, 1539528437391155202, 'WMS layer', '13', '', 13, 1515973081575276545, '2022-06-30 17:38:39', 1515973081575276545, '2022-06-30 17:38:39', NULL); REPLACE INTO `sys_dict_type` VALUES (1531193872826822657, 'sharingConditions', '共享条件', '', 19, 1513433709613187073, '2022-05-30 16:40:42', 1513433709613187073, '2022-05-30 16:40:42', NULL);
INSERT INTO `sys_dict_data` VALUES (1542442510910951425, 1539528437391155202, 'WMTS layer', '14', '', 14, 1515973081575276545, '2022-06-30 17:38:46', 1515973081575276545, '2022-06-30 17:38:46', NULL); REPLACE INTO `sys_dict_type` VALUES (1531214531592740866, 'api_type', '接口请求方式', '', 20, 1513433709613187073, '2022-05-30 18:02:48', 1513433709613187073, '2022-05-30 18:02:48', NULL);
INSERT INTO `sys_dict_data` VALUES (1542753737822306305, 1534805229031088130, '语音类', '4', '', 3, 1524924140178481154, '2022-07-01 14:15:29', 1524924140178481154, '2022-07-01 14:15:29', NULL); REPLACE INTO `sys_dict_type` VALUES (1531571420813979650, 'gradesandbaoding', '等保定级', '等保定级', 0, 1517397484770328578, '2022-05-31 17:40:57', 1517397484770328578, '2022-05-31 17:40:57', NULL);
INSERT INTO `sys_dict_data` VALUES (1542761409565155330, 1531163741457014785, '来源应用', 'AssociatedApplication', '', 10, 1524924140178481154, '2022-07-01 14:45:58', 1524924140178481154, '2022-07-15 10:58:15', NULL); REPLACE INTO `sys_dict_type` VALUES (1534803070025687042, 'deploymentArea', '部署区域', '', 0, 1513433270406643713, '2022-06-09 15:42:22', 1513433270406643713, '2022-06-09 15:42:22', NULL);
INSERT INTO `sys_dict_data` VALUES (1542788734075789314, 1542788081786019842, '小程序', '1', '', 1, 1524924140178481154, '2022-07-01 16:34:32', 1524924140178481154, '2022-07-01 16:34:32', NULL); REPLACE INTO `sys_dict_type` VALUES (1534804157952647169, 'methodType', '接口请求方式', '', 0, 1513433270406643713, '2022-06-09 15:46:41', 1513433270406643713, '2022-06-09 15:46:41', NULL);
INSERT INTO `sys_dict_data` VALUES (1542788778887733249, 1542788081786019842, 'APP', '2', '', 2, 1524924140178481154, '2022-07-01 16:34:43', 1524924140178481154, '2022-07-01 16:34:43', NULL); REPLACE INTO `sys_dict_type` VALUES (1534805229031088130, 'algorithmCategory', '算法类别', '', 0, 1513433270406643713, '2022-06-09 15:50:57', 1513433270406643713, '2022-06-09 15:50:57', NULL);
INSERT INTO `sys_dict_data` VALUES (1542788831614328834, 1542788081786019842, 'PC', '3', '', 3, 1524924140178481154, '2022-07-01 16:34:56', 1524924140178481154, '2022-07-01 16:34:56', NULL); REPLACE INTO `sys_dict_type` VALUES (1539453183746621441, 'resourceType', '资源类型', '', 0, 1067246875800000001, '2022-06-22 11:40:15', 1067246875800000001, '2022-06-22 11:40:15', NULL);
INSERT INTO `sys_dict_data` VALUES (1542793799050190849, 1531163741457014785, '能力类型', 'AbilityType', '', 11, 1524924140178481154, '2022-07-01 16:54:40', 1524924140178481154, '2022-07-15 10:46:19', NULL); REPLACE INTO `sys_dict_type` VALUES (1539527547234017282, 'layer_style ', '图层类型', '', 20, 1515973081575276545, '2022-06-22 16:35:45', 1515973081575276545, '2022-06-22 16:35:45', NULL);
INSERT INTO `sys_dict_data` VALUES (1542806484877799426, 1531163741457014785, '组件类型', 'ComponentType', '', 12, 1524924140178481154, '2022-07-01 17:45:05', 1524924140178481154, '2022-07-15 10:46:47', NULL); REPLACE INTO `sys_dict_type` VALUES (1539528437391155202, 'Service_type', '服务类型', '', 21, 1515973081575276545, '2022-06-22 16:39:17', 1515973081575276545, '2022-06-22 16:39:17', NULL);
INSERT INTO `sys_dict_data` VALUES (1543899506717712386, 1531163741457014785, '关联组件', 'AssociatedComponents', '', 13, 1524924140178481154, '2022-07-04 18:08:21', 1524924140178481154, '2022-07-15 10:59:11', NULL); REPLACE INTO `sys_dict_type` VALUES (1541336217898848257, 'videoLabel', '视频标签', '', 31, 1513433270406643713, '2022-06-27 16:22:46', 1513433270406643713, '2022-06-27 16:22:46', NULL);
INSERT INTO `sys_dict_data` VALUES (1545342103516487682, 1531163741457014785, '富文本编辑', 'richText', '', 20, 1513433709613187073, '2022-07-08 17:40:43', 1513433709613187073, '2022-07-08 17:40:43', NULL); REPLACE INTO `sys_dict_type` VALUES (1542788081786019842, 'publishingTerminal', '发布端', '', 0, 1524924140178481154, '2022-07-01 16:31:57', 1524924140178481154, '2022-07-01 16:31:57', NULL);
INSERT INTO `sys_dict_data` VALUES (1545610536514695170, 1531163741457014785, '多条添加', ' multipleAdditions', '', 20, 1513433709613187073, '2022-07-09 11:27:23', 1513433709613187073, '2022-07-09 11:27:23', NULL);
INSERT INTO `sys_dict_data` VALUES (1547520739196383234, 1531163741457014785, '压缩包', 'package', '', 21, 1524924140178481154, '2022-07-14 17:57:50', 1524924140178481154, '2022-07-14 17:58:03', NULL);
-- ----------------------------
-- Table structure for sys_dict_type
-- ----------------------------
DROP TABLE IF EXISTS `sys_dict_type`;
CREATE TABLE `sys_dict_type` (
`id` bigint(0) NOT NULL COMMENT 'id',
`dict_type` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '字典类型',
`dict_name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '字典名称',
`remark` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '备注',
`sort` int(0) UNSIGNED NULL DEFAULT NULL COMMENT '排序',
`creator` bigint(0) NULL DEFAULT NULL COMMENT '创建者',
`create_date` datetime(0) NULL DEFAULT NULL COMMENT '创建时间',
`updater` bigint(0) NULL DEFAULT NULL COMMENT '更新者',
`update_date` datetime(0) NULL DEFAULT NULL COMMENT '更新时间',
`status` int(0) NULL DEFAULT NULL COMMENT '状态',
PRIMARY KEY (`id`) USING BTREE,
UNIQUE INDEX `dict_type`(`dict_type`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '字典类型' ROW_FORMAT = Dynamic;
-- ----------------------------
-- Records of sys_dict_type
-- ----------------------------
INSERT INTO `sys_dict_type` VALUES (1160061077912858625, 'gender', '性别', '', 0, 1067246875800000001, '2022-02-25 10:37:18', 1067246875800000001, '2022-02-25 10:37:18', NULL);
INSERT INTO `sys_dict_type` VALUES (1225813644059140097, 'notice_type', '站内通知-类型', '', 1, 1067246875800000001, '2022-02-25 10:37:18', 1067246875800000001, '2022-02-25 10:37:18', NULL);
INSERT INTO `sys_dict_type` VALUES (1341593474355838978, 'post_status', '岗位管理状态', '', 0, 1067246875800000001, '2022-02-25 10:37:18', 1067246875800000001, '2022-02-25 10:37:18', NULL);
INSERT INTO `sys_dict_type` VALUES (1343069688596295682, 'order_status', '订单状态', '', 0, 1067246875800000001, '2022-02-25 10:37:18', 1067246875800000001, '2022-02-25 10:37:18', NULL);
INSERT INTO `sys_dict_type` VALUES (1497114512560504834, 'event_type', '异常事件', '', 0, 1067246875800000001, '2022-02-25 15:41:29', 1513435534798127105, '2022-04-12 10:54:08', NULL);
INSERT INTO `sys_dict_type` VALUES (1513690812521160705, 'applicationType', '应用类型', '应用资源', 0, 1513433270406643713, '2022-04-12 09:29:47', 1513433270406643713, '2022-04-12 09:29:47', NULL);
INSERT INTO `sys_dict_type` VALUES (1513693624420311042, 'publishingTerminal_back', '发布终端', '发布终端', 0, 1513435534798127105, '2022-04-12 09:40:58', 1524924140178481154, '2022-07-01 16:31:35', NULL);
INSERT INTO `sys_dict_type` VALUES (1513711991655014402, 'applicationStatus', '应用状态', '应用状态', 0, 1513435534798127105, '2022-04-12 10:53:57', 1513435534798127105, '2022-04-12 10:53:57', NULL);
INSERT INTO `sys_dict_type` VALUES (1513712507692818433, 'applicationArea', '应用领域', '', 0, 1513435534798127105, '2022-04-12 10:56:00', 1513435534798127105, '2022-04-12 11:09:55', NULL);
INSERT INTO `sys_dict_type` VALUES (1513713662657339394, 'category', '组件类型', '组件类型', 0, 1513435534798127105, '2022-04-12 11:00:35', 1513435534798127105, '2022-04-12 11:05:20', NULL);
INSERT INTO `sys_dict_type` VALUES (1513714027213660162, 'useType', '使用类型', '使用类型', 0, 1513435534798127105, '2022-04-12 11:02:02', 1513435534798127105, '2022-04-12 11:02:43', NULL);
INSERT INTO `sys_dict_type` VALUES (1513714403530809346, 'technicalField', '技术领域', '技术领域', 0, 1513435534798127105, '2022-04-12 11:03:32', 1513435534798127105, '2022-04-12 11:03:32', NULL);
INSERT INTO `sys_dict_type` VALUES (1529028127496343554, 'yes_not', '是否存在', '', 0, 1515239183144824833, '2022-05-24 17:14:48', 1515239183144824833, '2022-05-24 17:14:48', NULL);
INSERT INTO `sys_dict_type` VALUES (1531163741457014785, 'fieldType', '字段类型', '编目-字段类型', 30, 1513433270406643713, '2022-05-30 14:40:58', 1513433709613187073, '2022-06-06 10:12:31', NULL);
INSERT INTO `sys_dict_type` VALUES (1531193462665834498, 'shareType', '共享类型', '', 18, 1513433709613187073, '2022-05-30 16:39:04', 1513433709613187073, '2022-05-30 16:39:04', NULL);
INSERT INTO `sys_dict_type` VALUES (1531193872826822657, 'sharingConditions', '共享条件', '', 19, 1513433709613187073, '2022-05-30 16:40:42', 1513433709613187073, '2022-05-30 16:40:42', NULL);
INSERT INTO `sys_dict_type` VALUES (1531214531592740866, 'api_type', '接口请求方式', '', 20, 1513433709613187073, '2022-05-30 18:02:48', 1513433709613187073, '2022-05-30 18:02:48', NULL);
INSERT INTO `sys_dict_type` VALUES (1531571420813979650, 'gradesandbaoding', '等保定级', '等保定级', 0, 1517397484770328578, '2022-05-31 17:40:57', 1517397484770328578, '2022-05-31 17:40:57', NULL);
INSERT INTO `sys_dict_type` VALUES (1534803070025687042, 'deploymentArea', '部署区域', '', 0, 1513433270406643713, '2022-06-09 15:42:22', 1513433270406643713, '2022-06-09 15:42:22', NULL);
INSERT INTO `sys_dict_type` VALUES (1534804157952647169, 'methodType', '接口请求方式', '', 0, 1513433270406643713, '2022-06-09 15:46:41', 1513433270406643713, '2022-06-09 15:46:41', NULL);
INSERT INTO `sys_dict_type` VALUES (1534805229031088130, 'algorithmCategory', '算法类别', '', 0, 1513433270406643713, '2022-06-09 15:50:57', 1513433270406643713, '2022-06-09 15:50:57', NULL);
INSERT INTO `sys_dict_type` VALUES (1539453183746621441, 'resourceType', '资源类型', '', 0, 1067246875800000001, '2022-06-22 11:40:15', 1067246875800000001, '2022-06-22 11:40:15', NULL);
INSERT INTO `sys_dict_type` VALUES (1539527547234017282, 'layer_style ', '图层类型', '', 20, 1515973081575276545, '2022-06-22 16:35:45', 1515973081575276545, '2022-06-22 16:35:45', NULL);
INSERT INTO `sys_dict_type` VALUES (1539528437391155202, 'Service_type', '服务类型', '', 21, 1515973081575276545, '2022-06-22 16:39:17', 1515973081575276545, '2022-06-22 16:39:17', NULL);
INSERT INTO `sys_dict_type` VALUES (1541336217898848257, 'videoLabel', '视频标签', '', 31, 1513433270406643713, '2022-06-27 16:22:46', 1513433270406643713, '2022-06-27 16:22:46', NULL);
INSERT INTO `sys_dict_type` VALUES (1542788081786019842, 'publishingTerminal', '发布端', '', 0, 1524924140178481154, '2022-07-01 16:31:57', 1524924140178481154, '2022-07-01 16:31:57', NULL);
SET FOREIGN_KEY_CHECKS = 1;

File diff suppressed because it is too large Load Diff

View File

@ -1,35 +1,35 @@
DROP TABLE IF EXISTS `t_camera_channel_cache`; DROP TABLE IF EXISTS `t_camera_channel_cache`;
CREATE TABLE `t_camera_channel_cache` ( CREATE TABLE `t_camera_channel_cache` (
`idt_camera_channel` bigint(0) NOT NULL AUTO_INCREMENT COMMENT '主键', `idt_camera_channel` bigint(0) NOT NULL AUTO_INCREMENT COMMENT '主键',
`channel_code` varchar(45) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL, `channel_code` varchar(45) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL,
`channel_id` varchar(45) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL, `channel_id` varchar(45) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL,
`channel_name` varchar(999) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '摄像头id', `channel_name` varchar(999) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '摄像头id',
`gps_x` varchar(45) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '经度', `gps_x` varchar(45) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '经度',
`gps_y` varchar(45) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '纬度', `gps_y` varchar(45) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '纬度',
`status` int(0) NULL DEFAULT NULL COMMENT '1在线0离线', `status` int(0) NULL DEFAULT NULL COMMENT '1在线0离线',
`parent_id` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '组织id', `parent_id` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '组织id',
`region_code` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL, `region_code` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL,
`region_name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL, `region_name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL,
`node_name` varchar(999) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL, `node_name` varchar(999) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL,
`check_status` int(0) NULL DEFAULT 0, `check_status` int(0) NULL DEFAULT 0,
PRIMARY KEY (`idt_camera_channel`, `channel_code`) USING BTREE, PRIMARY KEY (`idt_camera_channel`, `channel_code`) USING BTREE,
INDEX `gps_x`(`gps_x`) USING BTREE, INDEX `gps_x`(`gps_x`) USING BTREE,
INDEX `gps_y`(`gps_y`) USING BTREE, INDEX `gps_y`(`gps_y`) USING BTREE,
INDEX `channel_code`(`channel_code`) USING BTREE INDEX `channel_code`(`channel_code`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 134450 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '通道表' ROW_FORMAT = Dynamic; ) ENGINE = InnoDB AUTO_INCREMENT = 134450 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '通道表' ROW_FORMAT = Dynamic;
DROP TABLE IF EXISTS `t_camera_organization_cache`; DROP TABLE IF EXISTS `t_camera_organization_cache`;
CREATE TABLE `t_camera_organization_cache` ( CREATE TABLE `t_camera_organization_cache` (
`id` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL, `id` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
`name` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `name` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
`parent_id` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `parent_id` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
`sort` int(0) NULL DEFAULT NULL, `sort` int(0) NULL DEFAULT NULL,
`subCount` int(0) NULL DEFAULT NULL, `subCount` int(0) NULL DEFAULT NULL,
`count` int(0) NULL DEFAULT 0 COMMENT '这个是统计该区域下的摄像头数据同步的次数,没太大作用', `count` int(0) NULL DEFAULT 0 COMMENT '这个是统计该区域下的摄像头数据同步的次数,没太大作用',
`is_parent` int(0) NULL DEFAULT NULL COMMENT '是否有子节点', `is_parent` int(0) NULL DEFAULT NULL COMMENT '是否有子节点',
`path` varchar(500) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `path` varchar(500) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
`is_root` int(0) NULL DEFAULT 0 COMMENT '是否是根节点', `is_root` int(0) NULL DEFAULT 0 COMMENT '是否是根节点',
`orgaid` bigint(0) NOT NULL AUTO_INCREMENT COMMENT '作为主键', `orgaid` bigint(0) NOT NULL AUTO_INCREMENT COMMENT '作为主键',
`channelCount` int(0) NULL DEFAULT 0, `channelCount` int(0) NULL DEFAULT 0,
PRIMARY KEY (`orgaid`, `id`) USING BTREE PRIMARY KEY (`orgaid`, `id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 8868 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic; ) ENGINE = InnoDB AUTO_INCREMENT = 8868 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;

View File

@ -116,7 +116,7 @@
</if> ) temp </if> ) temp
</select> </select>
<select id="selectChannelCounts" parameterType="java.lang.String" resultType="integer"> <select id="selectChannelCountsFromCache" parameterType="java.lang.String" resultType="integer">
SELECT COUNT(a.idt_camera_channel) FROM t_camera_channel_cache a inner join t_camera_organization_cache b on a.parent_id = b.id SELECT COUNT(a.idt_camera_channel) FROM t_camera_channel_cache a inner join t_camera_organization_cache b on a.parent_id = b.id
WHERE b.path like concat(#{path},'%') WHERE b.path like concat(#{path},'%')
</select> </select>
@ -251,7 +251,7 @@
WHERE parent_id = #{parentId} WHERE parent_id = #{parentId}
</select> </select>
<insert id="batchSaveCameraChannel" parameterType="java.util.List"> <insert id="batchSaveCameraChannelCache" parameterType="java.util.List">
INSERT INTO t_camera_channel_cache INSERT INTO t_camera_channel_cache
( (
channel_code,channel_id,channel_name,gps_x,gps_y,status, channel_code,channel_id,channel_name,gps_x,gps_y,status,

View File

@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?> <?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"> <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="io.renren.modules.monitor.mapper.CameraOrgenizationMapper"> <mapper namespace="io.renren.modules.monitor.mapper.CameraOrgenizationMapper">
<insert id="batchSaveOrgenization" parameterType="java.util.List"> <insert id="batchSaveOrgenizationCache" parameterType="java.util.List">
INSERT INTO t_camera_organization_cache ( INSERT INTO t_camera_organization_cache (
id,name,parent_id,sort,subCount,path,is_parent,is_root id,name,parent_id,sort,subCount,path,is_parent,is_root
@ -14,21 +14,21 @@
</insert> </insert>
<insert id="batchSaveCameraChannel" parameterType="java.util.List"> <!-- <insert id="batchSaveCameraChannel" parameterType="java.util.List">-->
INSERT INTO t_camera_channel_cache <!-- INSERT INTO t_camera_channel_cache-->
( <!-- (-->
channel_code,channel_id,channel_name,gps_x,gps_y,status, <!-- channel_code,channel_id,channel_name,gps_x,gps_y,status,-->
parent_id,region_code,region_name,node_name <!-- parent_id,region_code,region_name,node_name-->
) <!-- )-->
VALUES <!-- VALUES-->
<foreach collection="list" item="item" separator="," > <!-- <foreach collection="list" item="item" separator="," >-->
( <!-- (-->
#{item.channelCode},#{item.channelId},#{item.channelName},#{item.gpsX},#{item.gpsY},#{item.status}, <!-- #{item.channelCode},#{item.channelId},#{item.channelName},#{item.gpsX},#{item.gpsY},#{item.status},-->
#{item.parentId},#{item.regionCode},#{item.regionName},TRIM(TRAILING '->' FROM #{item.nodeName}) <!-- #{item.parentId},#{item.regionCode},#{item.regionName},TRIM(TRAILING '->' FROM #{item.nodeName})-->
) <!-- )-->
</foreach> <!-- </foreach>-->
</insert> <!-- </insert>-->
<update id="updateRegionChannelCount"> <update id="updateRegionChannelCount">
UPDATE t_region a UPDATE t_region a
@ -50,11 +50,11 @@
<!-- ON a.id = b.parent_id--> <!-- ON a.id = b.parent_id-->
<!-- ) ORDER BY orgaid ASC--> <!-- ) ORDER BY orgaid ASC-->
<!-- </select>--> <!-- </select>-->
<select id="selectAll" resultType="java.util.Map"> <select id="selectAllFromOrgenizationCache" resultType="java.util.Map">
select * from t_camera_organization_cache select * from t_camera_organization_cache
</select> </select>
<update id="updateOrganizationPath" parameterType="java.lang.String"> <update id="updateOrganizationCachePath" parameterType="java.lang.String">
UPDATE t_camera_organization_cache SET path = TRIM( TRAILING '->' FROM #{path}) where id = #{id} UPDATE t_camera_organization_cache SET path = TRIM( TRAILING '->' FROM #{path}) where id = #{id}
</update> </update>
@ -65,4 +65,8 @@
) )
SELECT id,name,parent_id,sort,subCount,is_parent,path,is_root,channelCount,count FROM t_camera_organization_cache SELECT id,name,parent_id,sort,subCount,is_parent,path,is_root,channelCount,count FROM t_camera_organization_cache
</insert> </insert>
<select id="selectOrgenizationCacheById" parameterType="java.lang.String" resultType="java.util.Map">
SELECT name,parent_id,id,path FROM t_camera_organization_cache WHERE id = #{id}
</select>
</mapper> </mapper>

View File

@ -1458,4 +1458,14 @@
where tdr.del_flag != 1 and tda.attr_type='技术文档' where tdr.del_flag != 1 and tda.attr_type='技术文档'
</select> </select>
<select id="resourceInstallationOrDataResourceDetails" parameterType="java.util.Map" resultType="java.util.Map">
SELECT COUNT(a.id) AS resourceNum,a.dept_id AS deptId,b.name AS deptName
FROM tb_data_resource a INNER JOIN sys_dept b ON a.dept_id = b.id
WHERE a.type = #{resourceType} AND a.del_flag = 0
<if test="id != '0'.toString()">
AND (b.ID = #{id} OR INSTR(b.pids,#{id}))
</if>
GROUP BY a.dept_id,b.name
ORDER BY a.dept_id,b.name
</select>
</mapper> </mapper>