Merge branch 'dev'
This commit is contained in:
commit
a068f97ab6
|
@ -94,6 +94,9 @@ public class ActivitiNoticeAspect {
|
|||
case TaskListener.EVENTNAME_COMPLETE: // 节点执行完成
|
||||
task_complete_notice(delegateTask, activitiNoticeOperation);
|
||||
break;
|
||||
case TaskListener.EVENTNAME_CREATE: // 节点被创建
|
||||
task_create_notice(delegateTask, activitiNoticeOperation);
|
||||
break;
|
||||
default:
|
||||
}
|
||||
});
|
||||
|
@ -118,6 +121,79 @@ public class ActivitiNoticeAspect {
|
|||
LOGGER.error("执行时长{} ms", time);
|
||||
}
|
||||
|
||||
/**
|
||||
* 特殊处理驳回
|
||||
*
|
||||
* @param delegateTask
|
||||
* @param activitiNoticeOperation
|
||||
*/
|
||||
private void task_create_notice(final DelegateTask delegateTask, final ActivitiNoticeOperation activitiNoticeOperation) {
|
||||
Map<String, Object> kv = delegateTask.getVariables();
|
||||
LOGGER.error("表单:{}", JSON.toJSONString(kv));
|
||||
final String workKey = TaskListener.EVENTNAME_CREATE + kv.get("id").toString();
|
||||
if (work.contains(workKey)) {
|
||||
LOGGER.error("------------出现重放------------");
|
||||
return;
|
||||
}
|
||||
work.add(workKey);
|
||||
String creator = null;
|
||||
if (kv.containsKey("creator")) { // 表单存在创建者
|
||||
creator = kv.get("creator").toString();
|
||||
} else if (kv.containsKey("userId")) {
|
||||
creator = kv.get("userId").toString();
|
||||
}
|
||||
if (StringUtils.isEmpty(creator)) {
|
||||
work.remove(workKey);
|
||||
return;
|
||||
}
|
||||
if (!"发起人录入表单".equals(activitiNoticeOperation.process())) { // 非驳回到录入表单
|
||||
work.remove(workKey);
|
||||
return;
|
||||
}
|
||||
try {
|
||||
String result;
|
||||
Boolean backToFirst = Boolean.valueOf(kv.get("backToFirst") != null ? kv.get("backToFirst").toString() : Boolean.FALSE.toString()); // 存在驳回
|
||||
if (Boolean.TRUE.equals(backToFirst)) {
|
||||
result = "被驳回";
|
||||
} else {
|
||||
work.remove(workKey);
|
||||
return;
|
||||
}
|
||||
String finalCreator = creator;
|
||||
String finalResult = result;
|
||||
CompletableFuture.runAsync(() -> { // 发起人
|
||||
SysUserDTO userDTO = sysUserService.get(Long.valueOf(finalCreator));
|
||||
String content = "【通知】" + userDTO.getRealName() + ",您发起的流程 " + kv.getOrDefault("flowType", "") + finalResult;
|
||||
SysNoticeDTO dto = new SysNoticeDTO();
|
||||
dto.setType(2);
|
||||
dto.setTitle("流程节点系统通知");
|
||||
dto.setContent(content); // 通知内容
|
||||
dto.setReceiverType(1);
|
||||
dto.setReceiverTypeIds(finalCreator);
|
||||
dto.setStatus(NoticeStatusEnum.SEND.value());
|
||||
dto.setSenderName("流程系统");
|
||||
dto.setSenderDate(new Date());
|
||||
dto.setCreator(sysUserService.getByUsername("admin").getId());
|
||||
dto.setCreateDate(new Date());
|
||||
dto.setFrom("通知");
|
||||
sysNoticeService.save(dto);
|
||||
}, EXECUTOR);
|
||||
} catch (Exception exception) {
|
||||
LOGGER.error("发送通知消息异常", exception);
|
||||
} finally {
|
||||
// 防止重放
|
||||
new Thread(() -> {
|
||||
try {
|
||||
Thread.sleep(200);
|
||||
} catch (InterruptedException e) {
|
||||
throw new RuntimeException(e);
|
||||
} finally {
|
||||
work.remove(workKey);
|
||||
}
|
||||
}).start();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 进行节点流转
|
||||
*
|
||||
|
@ -127,11 +203,12 @@ public class ActivitiNoticeAspect {
|
|||
private void task_complete_notice(final DelegateTask delegateTask, final ActivitiNoticeOperation activitiNoticeOperation) {
|
||||
Map<String, Object> kv = delegateTask.getVariables();
|
||||
LOGGER.error("表单:{}", JSON.toJSONString(kv));
|
||||
if (work.contains(TaskListener.EVENTNAME_COMPLETE + kv.get("id").toString())) {
|
||||
final String workKey = TaskListener.EVENTNAME_COMPLETE + kv.get("id").toString();
|
||||
if (work.contains(workKey)) {
|
||||
LOGGER.error("------------出现重放------------");
|
||||
return;
|
||||
}
|
||||
work.add(TaskListener.EVENTNAME_COMPLETE + kv.get("id").toString());
|
||||
work.add(workKey);
|
||||
String creator = null;
|
||||
if (kv.containsKey("creator")) { // 表单存在创建者
|
||||
creator = kv.get("creator").toString();
|
||||
|
@ -139,6 +216,7 @@ public class ActivitiNoticeAspect {
|
|||
creator = kv.get("userId").toString();
|
||||
}
|
||||
if (StringUtils.isEmpty(creator)) {
|
||||
work.remove(workKey);
|
||||
return;
|
||||
}
|
||||
try {
|
||||
|
@ -186,7 +264,7 @@ public class ActivitiNoticeAspect {
|
|||
} catch (InterruptedException e) {
|
||||
throw new RuntimeException(e);
|
||||
} finally {
|
||||
work.remove(TaskListener.EVENTNAME_COMPLETE + kv.get("id").toString());
|
||||
work.remove(workKey);
|
||||
}
|
||||
}).start();
|
||||
}
|
||||
|
@ -201,11 +279,12 @@ public class ActivitiNoticeAspect {
|
|||
private void end_notice(final DelegateExecution execution, final ActivitiNoticeOperation activitiNoticeOperation) {
|
||||
Map<String, Object> kv = execution.getVariables();
|
||||
LOGGER.error("表单:{}", JSON.toJSONString(kv));
|
||||
if (work.contains(ExecutionListener.EVENTNAME_END + kv.get("id").toString())) {
|
||||
final String workKey = ExecutionListener.EVENTNAME_END + kv.get("id").toString();
|
||||
if (work.contains(workKey)) {
|
||||
LOGGER.error("------------出现重放------------");
|
||||
return;
|
||||
}
|
||||
work.add(ExecutionListener.EVENTNAME_END + kv.get("id").toString());
|
||||
work.add(workKey);
|
||||
String creator = null;
|
||||
if (kv.containsKey("creator")) { // 表单存在创建者
|
||||
creator = kv.get("creator").toString();
|
||||
|
@ -213,6 +292,7 @@ public class ActivitiNoticeAspect {
|
|||
creator = kv.get("userId").toString();
|
||||
}
|
||||
if (StringUtils.isEmpty(creator)) {
|
||||
work.remove(workKey);
|
||||
return;
|
||||
}
|
||||
try {
|
||||
|
@ -284,7 +364,7 @@ public class ActivitiNoticeAspect {
|
|||
} catch (InterruptedException e) {
|
||||
throw new RuntimeException(e);
|
||||
} finally {
|
||||
work.remove(ExecutionListener.EVENTNAME_END + kv.get("id").toString());
|
||||
work.remove(workKey);
|
||||
}
|
||||
}).start();
|
||||
}
|
||||
|
@ -300,11 +380,12 @@ public class ActivitiNoticeAspect {
|
|||
private void assignment_notice(final DelegateTask delegateTask, final ActivitiNoticeOperation activitiNoticeOperation) {
|
||||
Map<String, Object> kv = delegateTask.getVariables();
|
||||
LOGGER.error("表单:{}", JSON.toJSONString(kv));
|
||||
if (work.contains(TaskListener.EVENTNAME_ASSIGNMENT + kv.get("id").toString())) {
|
||||
final String workKey = TaskListener.EVENTNAME_ASSIGNMENT + kv.get("id").toString();
|
||||
if (work.contains(workKey)) {
|
||||
LOGGER.error("------------出现重放------------");
|
||||
return;
|
||||
}
|
||||
work.add(TaskListener.EVENTNAME_ASSIGNMENT + kv.get("id").toString());
|
||||
work.add(workKey);
|
||||
String creator = null;
|
||||
if (kv.containsKey("creator")) { // 表单存在创建者
|
||||
creator = kv.get("creator").toString();
|
||||
|
@ -312,6 +393,7 @@ public class ActivitiNoticeAspect {
|
|||
creator = kv.get("userId").toString();
|
||||
}
|
||||
if (StringUtils.isEmpty(creator)) {
|
||||
work.remove(workKey);
|
||||
return;
|
||||
}
|
||||
try {
|
||||
|
@ -365,9 +447,10 @@ public class ActivitiNoticeAspect {
|
|||
new Thread(() -> {
|
||||
try {
|
||||
Thread.sleep(200);
|
||||
work.remove(TaskListener.EVENTNAME_ASSIGNMENT + kv.get("id").toString());
|
||||
} catch (InterruptedException e) {
|
||||
throw new RuntimeException(e);
|
||||
} finally {
|
||||
work.remove(workKey);
|
||||
}
|
||||
}).start();
|
||||
}
|
||||
|
|
|
@ -112,6 +112,7 @@ public class AbilityCenterController {
|
|||
tAbilityApplicationDTO.setUserId(abilityBatchApplicationDTO.getUserId());
|
||||
tAbilityApplicationDTO.setApproveStatus("审核中");
|
||||
tAbilityApplicationDTO.setDelFlag(0);
|
||||
tAbilityApplicationDTO.setFlowType("能力申请");
|
||||
tAbilityApplicationDTO.setEnclosureName(abilityBatchApplicationDTO.getEnclosureName());
|
||||
// 仿照请求接口 /processForm/tabilityapplication
|
||||
ValidatorUtils.validateEntity(tAbilityApplicationDTO, AddGroup.class, DefaultGroup.class);
|
||||
|
|
|
@ -170,6 +170,8 @@ public class AbilityCenterControllerV2 {
|
|||
// 归为同一次申请
|
||||
tAbilityApplicationDTO.setApplyFlag(abilityBatchApplicationDTO.getApplyFlag());
|
||||
|
||||
tAbilityApplicationDTO.setFlowType("能力申请");
|
||||
|
||||
// 仿照请求接口 /processForm/tabilityapplication
|
||||
ValidatorUtils.validateEntity(tAbilityApplicationDTO, AddGroup.class, DefaultGroup.class);
|
||||
tAbilityApplicationService.save(tAbilityApplicationDTO); // 写能力申请数据
|
||||
|
@ -232,10 +234,10 @@ public class AbilityCenterControllerV2 {
|
|||
processStartDTO.setProcessDefinitionKey(KEY); //限定
|
||||
AuditingBaseDTO auditingBaseDTO = new AuditingBaseDTO();
|
||||
auditingBaseDTO.setCompleteEntry(Boolean.TRUE); // 首次录入
|
||||
auditingBaseDTO.setFlowType("能力申请");
|
||||
|
||||
Map<String, Object> variables = oMapper.convertValue(auditingBaseDTO, Map.class);
|
||||
|
||||
|
||||
variables.putAll(new HashMap<String, Object>() { // 流程内携带属性值
|
||||
{
|
||||
put("tAbilityApplicationDTOList", dtoList); // 归属该部门的申请
|
||||
|
|
|
@ -86,6 +86,7 @@ public class CommentController {
|
|||
}
|
||||
tDemandCommentDTO.setDelFlag(2); // 待审核
|
||||
tDemandCommentDTO.setCompleteEntry(Boolean.TRUE);
|
||||
tDemandCommentDTO.setFlowType("评论审核");
|
||||
tDemandCommentService.update(tDemandCommentDTO);
|
||||
codeGenerationUtils.setApplyNumber("XQPL", Arrays.asList(tDemandCommentDTO.getId()), jdbcTemplate);
|
||||
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
package io.renren.common.controller;
|
||||
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import io.renren.common.annotation.LogOperation;
|
||||
import io.renren.common.page.PageData;
|
||||
import io.renren.common.utils.CodeGenerationUtils;
|
||||
|
@ -73,7 +72,7 @@ public class DemandDataController {
|
|||
logger.info(JSON.toJSONString(tDemandDataDTO));
|
||||
logger.info("####################################################");
|
||||
tDemandDataDTO.setFlag(TDemandDataEntityFlag.UNDER_REVIEW.getFlag());
|
||||
|
||||
tDemandDataDTO.setFlowType("能力需求申请");
|
||||
ValidatorUtils.validateEntity(tDemandDataDTO, AddGroup.class, DefaultGroup.class);
|
||||
tDemandDataService.save(tDemandDataDTO);
|
||||
if (tDemandDataDTO.getId() == null) {
|
||||
|
|
|
@ -116,6 +116,7 @@ public class ResourceMountController {
|
|||
tResourceMountApplyDTO.setParameterContentMd5(SecureUtil.md5(JSON.toJSONString(index)));
|
||||
tResourceMountApplyDTO.setResourceDTO(index);
|
||||
tResourceMountApplyDTO.setEnclosure(index.getEnclosure());
|
||||
tResourceMountApplyDTO.setFlowType("资源上架");
|
||||
try {
|
||||
tResourceMountApplyDTO.setResourceId(tResourceMountApplyDTO.getResourceDTO().getId());
|
||||
} catch (Exception e) {
|
||||
|
@ -209,6 +210,7 @@ public class ResourceMountController {
|
|||
dto.setUndercarriageReason(tResourceUndercarriageApplyDTO.getReason());
|
||||
dto.setUndercarriageEnclosure(tResourceUndercarriageApplyDTO.getEnclosure());
|
||||
dto.setDelFlag(ResourceEntityDelFlag.NORMAL.getFlag()); // 设置为正常
|
||||
dto.setFlowType("资源下架");
|
||||
String userId = SecurityUser.getUserId().toString();
|
||||
Optional<SysUserDTO> userDTO = Optional.ofNullable(sysUserService.get(Long.valueOf(userId)));
|
||||
userDTO.ifPresent(user -> {
|
||||
|
|
|
@ -11,6 +11,7 @@ import java.io.Serializable;
|
|||
public class AuditingBaseDTO implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = -6612029904210773020L;
|
||||
|
||||
/**
|
||||
* 流程中是否存在拒绝?
|
||||
*/
|
||||
|
@ -41,4 +42,9 @@ public class AuditingBaseDTO implements Serializable {
|
|||
*/
|
||||
private Boolean endByUser = null;
|
||||
|
||||
/**
|
||||
* 流程类型
|
||||
*/
|
||||
private String flowType = null;
|
||||
|
||||
}
|
||||
|
|
|
@ -4,6 +4,7 @@ import com.google.gson.Gson;
|
|||
import com.google.gson.GsonBuilder;
|
||||
import com.google.gson.JsonDeserializer;
|
||||
import com.google.gson.JsonElement;
|
||||
import io.renren.common.annotation.ActivitiNoticeOperation;
|
||||
import io.renren.common.dto.AuditingBaseDTO;
|
||||
import org.activiti.engine.TaskService;
|
||||
import org.activiti.engine.delegate.DelegateTask;
|
||||
|
@ -28,6 +29,7 @@ public class InitiatorDataEntryListener implements TaskListener {
|
|||
private TaskService taskService;
|
||||
|
||||
@Override
|
||||
@ActivitiNoticeOperation(value = "任意流程", process = "发起人录入表单")
|
||||
public void notify(DelegateTask delegateTask) {
|
||||
logger.error("----------------------流程发起人录入表单节点---------------------------");
|
||||
logger.error("事件类型:{}", delegateTask.getEventName());
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
package io.renren.modules.monitor.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import io.renren.common.dao.BaseDao;
|
||||
import io.renren.modules.monitor.entity.Booth;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
|
|
@ -1,11 +1,9 @@
|
|||
package io.renren.modules.monitor.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import io.renren.common.dao.BaseDao;
|
||||
import io.renren.modules.monitor.entity.BuildingRecords;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import org.apache.ibatis.annotations.Select;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
@ -19,6 +17,6 @@ import java.util.Map;
|
|||
*/
|
||||
@Mapper
|
||||
public interface BuildingRecordsMapper extends BaseDao<BuildingRecords> {
|
||||
public void batchSave(@Param("list") List<Map> list);
|
||||
void batchSave(@Param("list") List<Map> list);
|
||||
|
||||
}
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
package io.renren.modules.monitor.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import io.renren.common.dao.BaseDao;
|
||||
import io.renren.modules.monitor.entity.BuildingSite;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
|
|
@ -11,7 +11,6 @@ import org.apache.ibatis.annotations.Delete;
|
|||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import org.apache.ibatis.annotations.Select;
|
||||
import org.springframework.security.core.parameters.P;
|
||||
|
||||
import java.util.List;
|
||||
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 b.channel_code from t_channel_mtm_label b where b.label_code = #{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")
|
||||
List<Label> selectAllLabel();
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
package io.renren.modules.monitor.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import io.renren.common.dao.BaseDao;
|
||||
import io.renren.modules.monitor.dto.ChengguanDto;
|
||||
import io.renren.modules.monitor.entity.Camera;
|
||||
|
@ -13,12 +12,6 @@ import java.util.List;
|
|||
@Mapper
|
||||
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);
|
||||
|
||||
@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();
|
||||
}
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
package io.renren.modules.monitor.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import io.renren.common.dao.BaseDao;
|
||||
import io.renren.modules.monitor.entity.CameraScenic;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
package io.renren.modules.monitor.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import io.renren.common.dao.BaseDao;
|
||||
import io.renren.modules.monitor.entity.CaseCityLaw;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
@ -17,7 +16,6 @@ import java.util.Map;
|
|||
*/
|
||||
@Mapper
|
||||
public interface CaseCityLawMapper extends BaseDao<CaseCityLaw> {
|
||||
//public void batchSave(List<Map> list);
|
||||
public void batchSave(List<Map> list);
|
||||
public void singleSave(Map map);
|
||||
void batchSave(List<Map> list);
|
||||
void singleSave(Map map);
|
||||
}
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
package io.renren.modules.monitor.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import io.renren.common.dao.BaseDao;
|
||||
import io.renren.modules.monitor.dto.ChannelPictureDto;
|
||||
import io.renren.modules.monitor.entity.ChannelPicture;
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
package io.renren.modules.monitor.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import io.renren.common.dao.BaseDao;
|
||||
import io.renren.modules.monitor.entity.Event;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
|
|
@ -1,7 +1,5 @@
|
|||
package io.renren.modules.monitor.mapper;
|
||||
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import io.renren.common.dao.BaseDao;
|
||||
import io.renren.modules.monitor.entity.PassengerFlow;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
package io.renren.modules.monitor.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import io.renren.common.dao.BaseDao;
|
||||
import io.renren.modules.monitor.entity.Project;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
package io.renren.modules.monitor.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import io.renren.common.dao.BaseDao;
|
||||
import io.renren.modules.monitor.entity.RoadData;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
package io.renren.modules.monitor.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import io.renren.common.dao.BaseDao;
|
||||
import io.renren.modules.monitor.entity.Sanitation;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
package io.renren.modules.monitor.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import io.renren.common.dao.BaseDao;
|
||||
import io.renren.modules.monitor.entity.SanitationTask;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
package io.renren.modules.monitor.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import io.renren.common.dao.BaseDao;
|
||||
import io.renren.modules.monitor.dto.ScenicCameraDto;
|
||||
import io.renren.modules.monitor.entity.Camera;
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
package io.renren.modules.monitor.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import io.renren.common.dao.BaseDao;
|
||||
import io.renren.modules.monitor.entity.SedimentTrail;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
|
|
@ -60,8 +60,8 @@ import java.util.stream.Collectors;
|
|||
@RequestMapping("/resource")
|
||||
@Api(tags = "资源表")
|
||||
public class ResourceController {
|
||||
private static Integer cpuNUm = Runtime.getRuntime().availableProcessors();
|
||||
private static final ExecutorService executor = Executors.newFixedThreadPool(cpuNUm);
|
||||
private static final Integer CPUNUM = Runtime.getRuntime().availableProcessors();
|
||||
private static final ExecutorService executor = Executors.newFixedThreadPool(CPUNUM);
|
||||
|
||||
@Value("${big_date.name}")
|
||||
private String bigDateDeptName; // 大数据局名称
|
||||
|
@ -175,7 +175,7 @@ public class ResourceController {
|
|||
public Result<String> updateTest() {
|
||||
CompletableFuture.runAsync(() -> {
|
||||
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);
|
||||
resourceService.update(data);
|
||||
});
|
||||
|
|
|
@ -459,9 +459,9 @@ public class ResourceServiceImpl extends CrudServiceImpl<ResourceDao, ResourceEn
|
|||
List<ResourceDTO> resourceDTOS;
|
||||
if (orderField.equals("total")) { // 对总体评价特殊处理
|
||||
List<Long> ids = new ArrayList<>();
|
||||
switch (orderType) {
|
||||
switch (orderType.toUpperCase()) {
|
||||
case "DESC": // total 倒序
|
||||
ids = selectDTOPageSpecilTotal.parallelStream().map(Map.class::cast).sorted(Comparator.comparing(x -> {
|
||||
ids = selectDTOPageSpecilTotal.stream().map(Map.class::cast).sorted(Comparator.comparing(x -> {
|
||||
Map index = (Map) x;
|
||||
String string = (index.get("total") == null) ? "0" : index.get("total").toString();
|
||||
return Long.valueOf(string);
|
||||
|
@ -471,7 +471,7 @@ public class ResourceServiceImpl extends CrudServiceImpl<ResourceDao, ResourceEn
|
|||
).collect(Collectors.toList());
|
||||
break;
|
||||
case "ASC": // total 升序
|
||||
ids = selectDTOPageSpecilTotal.parallelStream().map(Map.class::cast).sorted(Comparator.comparing(x -> {
|
||||
ids = selectDTOPageSpecilTotal.stream().map(Map.class::cast).sorted(Comparator.comparing(x -> {
|
||||
String string = (x.get("total") == null) ? "0" : x.get("total").toString();
|
||||
return Long.valueOf(string);
|
||||
}
|
||||
|
@ -500,7 +500,6 @@ public class ResourceServiceImpl extends CrudServiceImpl<ResourceDao, ResourceEn
|
|||
} else {
|
||||
logger.info("排序要求 orderField:{} orderType:{}", orderField, orderType);
|
||||
List<ResourceDTO> resourceDTOS = resourceDao.selectWithAttrs(resourceDTO, orderField, orderType);
|
||||
int j = Math.min(pageNum * pageSize, resourceDTOS.size());
|
||||
if (resourceDTOS.isEmpty()) {
|
||||
resultPage.setRecords(new ArrayList<>());
|
||||
resultPage.setTotal(0);
|
||||
|
@ -1426,7 +1425,7 @@ public class ResourceServiceImpl extends CrudServiceImpl<ResourceDao, ResourceEn
|
|||
}
|
||||
|
||||
|
||||
public PageData<Map<String,Object>> resourceInstallationOrDataResourceDetails(Map<String, Object> params){
|
||||
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());
|
||||
|
|
|
@ -10,7 +10,6 @@ import org.apache.shiro.spring.security.interceptor.AuthorizationAttributeSource
|
|||
import org.apache.shiro.spring.web.ShiroFilterFactoryBean;
|
||||
import org.apache.shiro.web.mgt.DefaultWebSecurityManager;
|
||||
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.Configuration;
|
||||
|
||||
|
|
|
@ -37,7 +37,6 @@ public class WebMvcConfig implements WebMvcConfigurer {
|
|||
@Override
|
||||
public void addInterceptors(InterceptorRegistry registry) {
|
||||
registry.addInterceptor(new AliPayInterceptor()).addPathPatterns("/pay/alipay/**");
|
||||
// registry.addInterceptor(identityInterceptor);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -89,24 +89,13 @@ public class LoginController {
|
|||
// @ApiImplicitParam(name = "captcha", value = "验证码", 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 {
|
||||
|
||||
LoginDTO login = new LoginDTO();
|
||||
login.setUsername(String.valueOf(params.get("username")));
|
||||
String password = PasswordUtils.desEncrypt(String.valueOf(params.get("password")));
|
||||
login.setPassword(password);
|
||||
// login.setCaptcha(String.valueOf(params.get("captcha")));
|
||||
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());
|
||||
|
||||
|
|
|
@ -71,7 +71,7 @@ public class CasSSOValidator implements SSOValidator {
|
|||
|
||||
String newQuery = stringBuilder.toString();
|
||||
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) {
|
||||
e.printStackTrace();
|
||||
|
|
|
@ -57,9 +57,6 @@ public class Oauth2Filter extends AuthenticatingFilter {
|
|||
|
||||
@Override
|
||||
protected boolean isAccessAllowed(ServletRequest request, ServletResponse response, Object mappedValue) {
|
||||
// if(((HttpServletRequest) request).getMethod().equals(RequestMethod.OPTIONS.name())){
|
||||
// return true;
|
||||
// }
|
||||
String currentToken = getRequestToken((HttpServletRequest) request);
|
||||
if (StringUtils.isBlank(currentToken))
|
||||
return false;
|
||||
|
@ -106,7 +103,6 @@ public class Oauth2Filter extends AuthenticatingFilter {
|
|||
private void send401Error(HttpServletResponse response, String msg) throws IOException {
|
||||
response.setContentType("application/json;charset=utf-8");
|
||||
response.setHeader("Access-Control-Allow-Credentials", "true");
|
||||
// response.setHeader("Access-Control-Allow-Origin", "*");
|
||||
response.setStatus(HttpStatus.SC_UNAUTHORIZED);
|
||||
Result r = new Result().error(HttpStatus.SC_UNAUTHORIZED, msg);
|
||||
|
||||
|
|
|
@ -11,7 +11,7 @@ import javax.servlet.ServletRequest;
|
|||
import javax.servlet.ServletResponse;
|
||||
import java.io.Serializable;
|
||||
|
||||
public class ShiroSessionManager extends DefaultWebSessionManager {
|
||||
public class ShiroSessionManager extends DefaultWebSessionManager {
|
||||
/**
|
||||
* 这个是客户端请求给服务端带的header
|
||||
*/
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
-- 涉及到的表:tb_data_category
|
||||
-- 注意更新时间
|
||||
/*
|
||||
2022年8月2日10:32:13
|
||||
2022年8月3日10:58:06
|
||||
*/
|
||||
|
||||
REPLACE INTO `tb_data_category` VALUES (1514138753379680257, '组件服务', NULL, NULL, 'false', NULL, 'false', 'false', '', 10, 0, 1067246875800000001, '2022-04-13 15:09:45', 1513437369940344833, '2022-07-12 16:16:11', NULL, NULL, NULL, NULL, NULL);
|
||||
|
@ -123,7 +123,7 @@ REPLACE INTO `tb_data_category` VALUES (1529779058827653122, '应用场景一图
|
|||
REPLACE INTO `tb_data_category` VALUES (1529779170127704065, '应用场景二图片', '组件服务', '1529027455640145922', 'true', 'image', 'false', 'false', '', 7, 0, 1516728698224427010, '2022-05-26 18:59:11', 1516728698224427010, '2022-05-26 18:59:11', NULL, NULL, NULL, NULL, NULL);
|
||||
REPLACE INTO `tb_data_category` VALUES (1529795010596253697, '算法体验中心', '组件服务', '1514138753379680257', 'false', NULL, 'false', 'false', '', 8, 0, 1516728698224427010, '2022-05-26 20:02:07', 1516728698224427010, '2022-05-26 20:02:07', NULL, NULL, NULL, NULL, NULL);
|
||||
REPLACE INTO `tb_data_category` VALUES (1529795422393020418, '图片文字识别', '组件服务', '1529795010596253697', 'true', 'image', 'false', 'false', '', 1, 0, 1516728698224427010, '2022-05-26 20:03:46', 1516728698224427010, '2022-05-26 20:03:46', NULL, NULL, NULL, NULL, NULL);
|
||||
REPLACE INTO `tb_data_category` VALUES (1529795713490300929, '文本识别', '组件服务', '1529795010596253697', 'true', 'select', 'true', 'true', '1529028127496343554', 2, 0, 1516728698224427010, '2022-05-26 20:04:55', 1516728698224427010, '2022-05-26 20:04:55', NULL, NULL, NULL, NULL, NULL);
|
||||
REPLACE INTO `tb_data_category` VALUES (1529795713490300929, '文本识别', '组件服务', '1529795010596253697', 'true', 'select', 'false', 'true', '1529028127496343554', 2, 0, 1516728698224427010, '2022-05-26 20:04:55', 1516728698224427010, '2022-05-26 20:04:55', NULL, NULL, NULL, NULL, NULL);
|
||||
REPLACE INTO `tb_data_category` VALUES (1529804677682663425, '子系统', '应用资源', '1514164306501517314', 'false', NULL, 'false', 'false', '', 6, 0, 1516970523606630401, '2022-05-26 20:40:32', 1516970523606630401, '2022-05-26 20:40:32', NULL, NULL, NULL, NULL, NULL);
|
||||
REPLACE INTO `tb_data_category` VALUES (1529804827373178882, '子系统数量', '应用资源', '1529804677682663425', 'true', 'input', 'false', 'false', '', 1, 0, 1516970523606630401, '2022-05-26 20:41:08', 1516970523606630401, '2022-05-26 20:41:08', NULL, NULL, NULL, NULL, NULL);
|
||||
REPLACE INTO `tb_data_category` VALUES (1529804904594509826, '子系统一名称', '应用资源', '1529804677682663425', 'true', 'input', 'false', 'false', '', 2, 0, 1516970523606630401, '2022-05-26 20:41:26', 1516970523606630401, '2022-05-26 20:41:26', NULL, NULL, NULL, NULL, NULL);
|
||||
|
|
|
@ -1,35 +1,35 @@
|
|||
DROP TABLE IF EXISTS `t_camera_channel_cache`;
|
||||
CREATE TABLE `t_camera_channel_cache` (
|
||||
`idt_camera_channel` bigint(0) NOT NULL AUTO_INCREMENT COMMENT '主键',
|
||||
`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_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_y` varchar(45) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '纬度',
|
||||
`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',
|
||||
`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,
|
||||
`node_name` varchar(999) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL,
|
||||
`check_status` int(0) NULL DEFAULT 0,
|
||||
PRIMARY KEY (`idt_camera_channel`, `channel_code`) USING BTREE,
|
||||
INDEX `gps_x`(`gps_x`) USING BTREE,
|
||||
INDEX `gps_y`(`gps_y`) USING BTREE,
|
||||
INDEX `channel_code`(`channel_code`) USING BTREE
|
||||
`idt_camera_channel` bigint(0) NOT NULL AUTO_INCREMENT COMMENT '主键',
|
||||
`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_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_y` varchar(45) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '纬度',
|
||||
`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',
|
||||
`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,
|
||||
`node_name` varchar(999) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL,
|
||||
`check_status` int(0) NULL DEFAULT 0,
|
||||
PRIMARY KEY (`idt_camera_channel`, `channel_code`) USING BTREE,
|
||||
INDEX `gps_x`(`gps_x`) USING BTREE,
|
||||
INDEX `gps_y`(`gps_y`) 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;
|
||||
|
||||
DROP TABLE IF EXISTS `t_camera_organization_cache`;
|
||||
CREATE TABLE `t_camera_organization_cache` (
|
||||
`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,
|
||||
`parent_id` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
|
||||
`sort` int(0) NULL DEFAULT NULL,
|
||||
`subCount` int(0) NULL DEFAULT NULL,
|
||||
`count` int(0) NULL DEFAULT 0 COMMENT '这个是统计该区域下的摄像头数据同步的次数,没太大作用',
|
||||
`is_parent` int(0) NULL DEFAULT NULL COMMENT '是否有子节点',
|
||||
`path` varchar(500) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
|
||||
`is_root` int(0) NULL DEFAULT 0 COMMENT '是否是根节点',
|
||||
`orgaid` bigint(0) NOT NULL AUTO_INCREMENT COMMENT '作为主键',
|
||||
`channelCount` int(0) NULL DEFAULT 0,
|
||||
PRIMARY KEY (`orgaid`, `id`) USING BTREE
|
||||
`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,
|
||||
`parent_id` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
|
||||
`sort` int(0) NULL DEFAULT NULL,
|
||||
`subCount` int(0) NULL DEFAULT NULL,
|
||||
`count` int(0) NULL DEFAULT 0 COMMENT '这个是统计该区域下的摄像头数据同步的次数,没太大作用',
|
||||
`is_parent` int(0) NULL DEFAULT NULL COMMENT '是否有子节点',
|
||||
`path` varchar(500) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
|
||||
`is_root` int(0) NULL DEFAULT 0 COMMENT '是否是根节点',
|
||||
`orgaid` bigint(0) NOT NULL AUTO_INCREMENT COMMENT '作为主键',
|
||||
`channelCount` int(0) NULL DEFAULT 0,
|
||||
PRIMARY KEY (`orgaid`, `id`) USING BTREE
|
||||
) ENGINE = InnoDB AUTO_INCREMENT = 8868 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;
|
||||
|
|
Loading…
Reference in New Issue