Merge branch 'dev'

This commit is contained in:
wangliwen 2022-11-22 13:36:39 +08:00
commit 43d202fcf5
25 changed files with 471 additions and 10 deletions

View File

@ -0,0 +1,4 @@
ALTER TABLE `sys_dict_data`
ADD COLUMN `status` int NULL DEFAULT 1 COMMENT '启用状态(0未启用 1启用)' AFTER `update_date`;
ALTER TABLE `sys_dict_type`
ADD COLUMN `status` int NULL DEFAULT 1 COMMENT '启用状态(0未启用 1启用)' AFTER `update_date`;

View File

@ -0,0 +1 @@
ALTER TABLE `sys_user` ADD COLUMN `frequency` int NULL DEFAULT 0 COMMENT '登录失败次数';

View File

@ -0,0 +1,11 @@
INSERT INTO `sys_dict_type`(`id`, `dict_type`, `dict_name`, `remark`, `sort`, `creator`, `create_date`, `updater`, `update_date`, `status`) VALUES (1592357067014803457, ' encryptedRoute', '加密路由', '', 0, 1067246875800000001, '2022-11-15 11:21:24', 1067246875800000001, '2022-11-15 11:21:24', 1);
INSERT INTO `sys_dict_data`(`id`, `dict_type_id`, `dict_label`, `dict_value`, `remark`, `sort`, `creator`, `create_date`, `updater`, `update_date`, `status`) VALUES (1592357815098281986, 1592357067014803457, '个人中心', '/personalCenter', '', 0, 1067246875800000001, '2022-11-15 11:24:22', 1067246875800000001, '2022-11-15 11:24:22', 1);
INSERT INTO `sys_dict_data`(`id`, `dict_type_id`, `dict_label`, `dict_value`, `remark`, `sort`, `creator`, `create_date`, `updater`, `update_date`, `status`) VALUES (1592357749759414274, 1592357067014803457, '消息通知', '/mynoticeView', '', 0, 1067246875800000001, '2022-11-15 11:24:07', 1067246875800000001, '2022-11-15 11:24:07', 1);
INSERT INTO `sys_dict_data`(`id`, `dict_type_id`, `dict_label`, `dict_value`, `remark`, `sort`, `creator`, `create_date`, `updater`, `update_date`, `status`) VALUES (1592357668599631874, 1592357067014803457, '融合服务详情', '/integrationServicesDetails', '', 0, 1067246875800000001, '2022-11-15 11:23:47', 1067246875800000001, '2022-11-15 11:23:47', 1);
INSERT INTO `sys_dict_data`(`id`, `dict_type_id`, `dict_label`, `dict_value`, `remark`, `sort`, `creator`, `create_date`, `updater`, `update_date`, `status`) VALUES (1592357561145757698, 1592357067014803457, '融合服务', '/integrationServices', '', 0, 1067246875800000001, '2022-11-15 11:23:22', 1067246875800000001, '2022-11-15 11:23:22', 1);
INSERT INTO `sys_dict_data`(`id`, `dict_type_id`, `dict_label`, `dict_value`, `remark`, `sort`, `creator`, `create_date`, `updater`, `update_date`, `status`) VALUES (1592357495567814658, 1592357067014803457, '能力统计', '/abilityStatistics', '', 0, 1067246875800000001, '2022-11-15 11:23:06', 1067246875800000001, '2022-11-15 11:23:06', 1);
INSERT INTO `sys_dict_data`(`id`, `dict_type_id`, `dict_label`, `dict_value`, `remark`, `sort`, `creator`, `create_date`, `updater`, `update_date`, `status`) VALUES (1592357417113358338, 1592357067014803457, '能力详情', '/details', '', 0, 1067246875800000001, '2022-11-15 11:22:47', 1067246875800000001, '2022-11-15 11:22:47', 1);
INSERT INTO `sys_dict_data`(`id`, `dict_type_id`, `dict_label`, `dict_value`, `remark`, `sort`, `creator`, `create_date`, `updater`, `update_date`, `status`) VALUES (1592357337807458305, 1592357067014803457, '能力集市', '/DetailsPageconetent', '', 0, 1067246875800000001, '2022-11-15 11:22:29', 1067246875800000001, '2022-11-15 11:22:29', 1);

View File

@ -0,0 +1,31 @@
-- ----------------------------
-- Table structure for t_will_apply_camera
-- ----------------------------
DROP TABLE IF EXISTS `t_will_apply_camera`;
CREATE TABLE `t_will_apply_camera` (
`id` bigint(0) NOT NULL COMMENT '主键ID',
`user_id` bigint(0) NULL DEFAULT NULL COMMENT '用户',
`del_flag` int(0) NULL DEFAULT NULL COMMENT '删除标志0正常1删除',
`camera_point_type_name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL,
`channel_code` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL,
`channel_id` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL,
`channel_name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL,
`check_status` int(0) NULL DEFAULT NULL,
`gpsX` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL,
`gpsY` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL,
`idt_camera_channel` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL,
`management_unit_name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL,
`node_name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL,
`parent_id` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL,
`status` int(0) NULL DEFAULT NULL,
`creator` bigint(0) NULL DEFAULT NULL,
`create_date` datetime(0) NULL DEFAULT NULL,
`updater` bigint(0) NULL DEFAULT NULL,
`update_date` datetime(0) NULL DEFAULT NULL,
PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci ROW_FORMAT = Dynamic;
SET FOREIGN_KEY_CHECKS = 1;

View File

@ -0,0 +1 @@
ALTER TABLE tb_data_resource ADD COLUMN `undercarriage_instance_id` bigint NULL COMMENT '下架流程实例ID';

View File

@ -236,6 +236,11 @@ public class ResourceMountController {
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());
//11-18 新增下架流程实例id
dto.setUndercarriageInstanceId(Long.parseLong(index_.getProcessInstanceId()));
resourceService.update(dto);
dtoList.add(index_); dtoList.add(index_);
}); });
return dtoList.stream().findAny().orElse(null); return dtoList.stream().findAny().orElse(null);

View File

@ -453,4 +453,22 @@ public class TAbilityApplicationController {
return new Result().ok(tAbilityApplicationService.getApplyDeptList()); return new Result().ok(tAbilityApplicationService.getApplyDeptList());
} }
@GetMapping("/getApplyCameraList")
@ApiOperation("/西海岸-根据用户获取已申请摄像头列表")
@LogOperation("/西海岸-根据用户获取已申请摄像头列表")
public Result getApplyCameraList() {
return new Result().ok(tAbilityApplicationService.getApplyCameraList());
}
@GetMapping("/delApplyCamera")
@ApiOperation("/西海岸-用户删除已申请摄像头")
@LogOperation("/西海岸-用户删除已申请摄像头")
public Result delApplyCamera(@RequestBody List<Long> ids) {
tAbilityApplicationService.delApplyCamera(ids);
return new Result().ok("删除成功。");
}
} }

View File

@ -0,0 +1,59 @@
package io.renren.modules.processForm.controller;
import io.renren.common.annotation.LogOperation;
import io.renren.common.utils.Result;
import io.renren.modules.processForm.dto.WillApplyCameraDTO;
import io.renren.modules.processForm.entity.WillApplyCameraEntity;
import io.renren.modules.processForm.service.WillApplyCameraService;
import io.renren.modules.security.user.SecurityUser;
import io.renren.modules.security.user.UserDetail;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import java.util.ArrayList;
import java.util.List;
@RestController
@RequestMapping("/willApplyCamera")
@Api(tags = "西海岸待申请摄像头")
public class WillApplyCameraController {
@Autowired
private WillApplyCameraService willApplyCameraService;
@GetMapping("/select")
@LogOperation("/查询")
@ApiOperation("/查询")
public Result select() {
UserDetail user = SecurityUser.getUser();
return new Result().ok(willApplyCameraService.selectByUserId(user.getId()));
}
@PostMapping("/batchInsert")
@ApiOperation("/保存")
@LogOperation("/保存")
public Result batchInsert(@RequestBody List<WillApplyCameraDTO> willApplyCameraDTOList) {
ArrayList<WillApplyCameraEntity> list = new ArrayList<>();
willApplyCameraDTOList.forEach(index -> {
WillApplyCameraEntity cameraEntity = new WillApplyCameraEntity();
BeanUtils.copyProperties(index, cameraEntity);
cameraEntity.setUserId(SecurityUser.getUserId());
cameraEntity.setDelFlag(0);
list.add(cameraEntity);
});
willApplyCameraService.insertBatch(list);
return new Result().ok("数据保存成功。");
}
@PostMapping("/batchDelete")
@ApiOperation("/删除")
@LogOperation("/删除")
public Result batchDelete(@RequestBody List<Long> ids) {
willApplyCameraService.deleteBatchIds(ids);
return new Result().ok("数据删除成功。");
}
}

View File

@ -3,6 +3,7 @@ package io.renren.modules.processForm.dao;
import io.renren.common.dao.BaseDao; import io.renren.common.dao.BaseDao;
import io.renren.modules.processForm.entity.TAbilityApplicationEntity; import io.renren.modules.processForm.entity.TAbilityApplicationEntity;
import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
@ -49,4 +50,8 @@ public interface TAbilityApplicationDao extends BaseDao<TAbilityApplicationEntit
List<Long> getInstanceIdByResId(Long id); List<Long> getInstanceIdByResId(Long id);
List<Map> getApplyDeptList(); List<Map> getApplyDeptList();
List<Map> getApplyCameraList(@Param("userId") Long userId, @Param("date") String date);
Integer delApplyCamera(@Param("ids") List<Long> ids);
} }

View File

@ -0,0 +1,15 @@
package io.renren.modules.processForm.dao;
import io.renren.common.dao.BaseDao;
import io.renren.modules.processForm.entity.WillApplyCameraEntity;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import java.util.List;
import java.util.Map;
@Mapper
public interface WillApplyCameraDao extends BaseDao<WillApplyCameraEntity> {
List<Map> select(@Param("userId") Long userId);
}

View File

@ -0,0 +1,62 @@
package io.renren.modules.processForm.dto;
import io.swagger.annotations.ApiModel;
import lombok.Data;
import java.io.Serializable;
import java.util.Date;
@Data
@ApiModel(value = "西海岸待申请摄像头")
public class WillApplyCameraDTO implements Serializable {
private static final long serialVersionUID = 1L;
private Long id;
private Long userId;
private Integer delFlag;
private String cameraPointTypeName;
private String channelCode;
private String channelId;
private String channelName;
private Integer checkStatus;
private String gpsX;
private String gpsY;
private String idtCameraChannel;
private String managementUnitName;
private String nodeName;
private String parentId;
private Integer status;
/**
* 创建者
*/
private Long creator;
/**
* 创建时间
*/
private Date createDate;
/**
* 创建者
*/
private Long updater;
/**
* 创建时间
*/
private Date updateDate;
}

View File

@ -0,0 +1,73 @@
package io.renren.modules.processForm.entity;
import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
import lombok.EqualsAndHashCode;
import java.io.Serializable;
import java.util.Date;
@Data
@EqualsAndHashCode(callSuper = false)
@TableName(value = "t_will_apply_camera", autoResultMap = true)
public class WillApplyCameraEntity implements Serializable {
private static final long serialVersionUID = 1L;
@TableId
private Long id;
private Long userId;
private Integer delFlag;
private String cameraPointTypeName;
private String channelCode;
private String channelId;
private String channelName;
private Integer checkStatus;
@TableField("gpsX")
private String gpsX;
@TableField("gpsY")
private String gpsY;
private String idtCameraChannel;
private String managementUnitName;
private String nodeName;
private String parentId;
private Integer status;
/**
* 创建者
*/
@TableField(fill = FieldFill.INSERT)
private Long creator;
/**
* 创建时间
*/
@TableField(fill = FieldFill.INSERT)
private Date createDate;
/**
* 创建者
*/
@TableField(fill = FieldFill.INSERT_UPDATE)
private Long updater;
/**
* 创建时间
*/
@TableField(fill = FieldFill.INSERT_UPDATE)
private Date updateDate;
}

View File

@ -1,6 +1,7 @@
package io.renren.modules.processForm.service; package io.renren.modules.processForm.service;
import io.renren.common.service.CrudService; import io.renren.common.service.CrudService;
import io.renren.common.utils.Result;
import io.renren.modules.processForm.dto.TAbilityApplicationDTO; import io.renren.modules.processForm.dto.TAbilityApplicationDTO;
import io.renren.modules.processForm.entity.TAbilityApplicationEntity; import io.renren.modules.processForm.entity.TAbilityApplicationEntity;
@ -58,4 +59,7 @@ public interface TAbilityApplicationService extends CrudService<TAbilityApplicat
*/ */
Object getApplyDeptList(); Object getApplyDeptList();
Object getApplyCameraList();
void delApplyCamera(List<Long> ids);
} }

View File

@ -0,0 +1,10 @@
package io.renren.modules.processForm.service;
import io.renren.common.service.CrudService;
import io.renren.modules.processForm.dto.WillApplyCameraDTO;
import io.renren.modules.processForm.entity.WillApplyCameraEntity;
public interface WillApplyCameraService extends CrudService<WillApplyCameraEntity, WillApplyCameraDTO> {
Object selectByUserId(Long id);
}

View File

@ -73,7 +73,7 @@ public class JuApiGateway implements ApiGateway {
HashSet supportMethod = Sets.newHashSet("POST", "GET"); HashSet supportMethod = Sets.newHashSet("POST", "GET");
if (StringUtils.isBlank(apiUrl) || deptId == null || deptId == 0 || StringUtils.isBlank(methods) || !supportMethod.contains(methods)) { if (StringUtils.isBlank(apiUrl) || deptId == null || deptId == 0 || StringUtils.isBlank(methods) || !supportMethod.contains(methods)) {
String msg = String.format("注册api参数为空跳过 apiUrl:%s, deptId:%ld methods:%s, resourceId:%s", apiUrl, deptId, methods, resourceId); String msg = String.format("注册api参数为空跳过 apiUrl:%s, deptId:%d methods:%s, resourceId:%s", apiUrl, deptId, methods, resourceId);
//重要参数没有当成不需要注册 //重要参数没有当成不需要注册
log.info(msg); log.info(msg);

View File

@ -3,15 +3,19 @@ package io.renren.modules.processForm.service.impl;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import io.renren.common.service.impl.CrudServiceImpl; import io.renren.common.service.impl.CrudServiceImpl;
import io.renren.common.utils.ConvertUtils; import io.renren.common.utils.ConvertUtils;
import io.renren.common.utils.DateUtils;
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;
import io.renren.modules.processForm.entity.TAbilityApplicationEntity; import io.renren.modules.processForm.entity.TAbilityApplicationEntity;
import io.renren.modules.processForm.service.TAbilityApplicationService; import io.renren.modules.processForm.service.TAbilityApplicationService;
import io.renren.modules.security.user.SecurityUser;
import io.renren.modules.security.user.UserDetail;
import org.apache.commons.lang3.StringUtils; import org.apache.commons.lang3.StringUtils;
import org.slf4j.Logger; import org.slf4j.Logger;
import org.slf4j.LoggerFactory; import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import java.util.Date;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
import java.util.stream.Collectors; import java.util.stream.Collectors;
@ -137,5 +141,17 @@ public class TAbilityApplicationServiceImpl extends CrudServiceImpl<TAbilityAppl
return abilityApplicationDao.getApplyDeptList(); return abilityApplicationDao.getApplyDeptList();
} }
@Override
public Object getApplyCameraList() {
UserDetail userDetail = SecurityUser.getUser();
String currentTime = DateUtils.format(new Date(), DateUtils.DATE_TIME_PATTERN);
return abilityApplicationDao.getApplyCameraList(userDetail.getId(), currentTime);
}
@Override
public void delApplyCamera(List<Long> ids) {
abilityApplicationDao.delApplyCamera(ids);
}
} }

View File

@ -0,0 +1,35 @@
package io.renren.modules.processForm.service.impl;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import io.renren.common.service.impl.CrudServiceImpl;
import io.renren.modules.processForm.dao.WillApplyCameraDao;
import io.renren.modules.processForm.dto.WillApplyCameraDTO;
import io.renren.modules.processForm.entity.WillApplyCameraEntity;
import io.renren.modules.processForm.service.WillApplyCameraService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.ArrayList;
import java.util.Map;
@Service
public class WillApplyCameraServiceImpl extends CrudServiceImpl<WillApplyCameraDao, WillApplyCameraEntity, WillApplyCameraDTO> implements WillApplyCameraService {
@Autowired
private WillApplyCameraDao willApplyCameraDao;
@Override
public QueryWrapper<WillApplyCameraEntity> getWrapper(Map<String, Object> params) {
return null;
}
@Override
public Object selectByUserId(Long id) {
QueryWrapper<WillApplyCameraEntity> wrapper = new QueryWrapper<>();
wrapper.eq("user_id", id)
.orderByDesc("create_date");
return willApplyCameraDao.selectList(wrapper) == null ? new ArrayList<>() : willApplyCameraDao.selectList(wrapper);
}
}

View File

@ -129,6 +129,9 @@ public class ResourceDTO extends AuditingBaseDTO implements Serializable {
@ApiModelProperty(value = "置顶时间") @ApiModelProperty(value = "置顶时间")
private Date pinTopTime; private Date pinTopTime;
@ApiModelProperty(value = "下架流程实例ID")
private Long undercarriageInstanceId;
public String getDelFlagTip() { public String getDelFlagTip() {
if (this.delFlag != null) { if (this.delFlag != null) {
Optional<ResourceEntityDelFlag> resourceEntityDelFlagOptional = Optional.ofNullable(ResourceEntityDelFlag.getByFlag(this.delFlag)); Optional<ResourceEntityDelFlag> resourceEntityDelFlagOptional = Optional.ofNullable(ResourceEntityDelFlag.getByFlag(this.delFlag));

View File

@ -173,4 +173,6 @@ public class ResourceEntity extends BaseEntity {
* 申请单号 * 申请单号
*/ */
private String applyNumber; private String applyNumber;
private Long undercarriageInstanceId;
} }

View File

@ -2607,6 +2607,7 @@ public class ResourceServiceImpl extends CrudServiceImpl<ResourceDao, ResourceEn
//resource,attr表 //resource,attr表
CompletableFuture<Void> delRes = CompletableFuture.runAsync(() -> { CompletableFuture<Void> delRes = CompletableFuture.runAsync(() -> {
resourceDao.deleteById(id); resourceDao.deleteById(id);
Map<String, Object> map = new HashMap<>(); Map<String, Object> map = new HashMap<>();
map.put("data_resource_id", id); map.put("data_resource_id", id);
@ -2639,6 +2640,12 @@ public class ResourceServiceImpl extends CrudServiceImpl<ResourceDao, ResourceEn
} }
}, executor); }, executor);
//删除下架流程表单相关数据及通知消息数据
CompletableFuture<Void> delUnderData = CompletableFuture.runAsync(() -> {
Long instanceId = resourceDao.selectById(id).getUndercarriageInstanceId();
this.delProcinstBySuAd(instanceId, "能力下架", null);
}, executor);
//会客厅 //会客厅
CompletableFuture<Void> delRoom = CompletableFuture.runAsync(() -> { CompletableFuture<Void> delRoom = CompletableFuture.runAsync(() -> {
meetingroomMapper.deleteById(id); meetingroomMapper.deleteById(id);
@ -2658,7 +2665,7 @@ public class ResourceServiceImpl extends CrudServiceImpl<ResourceDao, ResourceEn
abilityApplicationDao.deleteByMap(map); abilityApplicationDao.deleteByMap(map);
}, executor); }, executor);
CompletableFuture<Void> all = CompletableFuture.allOf(delRes, delResOthers, delMountData, delAbilityData, delRoom, delFormData); CompletableFuture<Void> all = CompletableFuture.allOf(delRes, delResOthers, delMountData, delUnderData, delAbilityData, delRoom, delFormData);
all.join(); all.join();
} }
@ -2717,7 +2724,9 @@ public class ResourceServiceImpl extends CrudServiceImpl<ResourceDao, ResourceEn
} }
break; break;
case "能力下架": { case "能力下架": {
resourceDao.updateByDelProcinst(resourceId); if (resourceId != null) {
resourceDao.updateByDelProcinst(resourceId);
}
} }
break; break;
case "需求评论": { case "需求评论": {

View File

@ -1,7 +0,0 @@
DELETE
FROM sys_user_token
WHERE id NOT IN (SELECT s.id
FROM (SELECT sut.id,
ROW_NUMBER() OVER ( PARTITION BY sut.user_id ORDER BY sut.create_date DESC ) AS group_idx
FROM sys_user_token sut) s
WHERE s.group_idx = 1);

View File

@ -0,0 +1,31 @@
-- ----------------------------
-- Table structure for t_will_apply_camera
-- ----------------------------
DROP TABLE IF EXISTS `t_will_apply_camera`;
CREATE TABLE `t_will_apply_camera` (
`id` bigint(0) NOT NULL COMMENT '主键ID',
`user_id` bigint(0) NULL DEFAULT NULL COMMENT '用户',
`del_flag` int(0) NULL DEFAULT NULL COMMENT '删除标志0正常1删除',
`camera_point_type_name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL,
`channel_code` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL,
`channel_id` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL,
`channel_name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL,
`check_status` int(0) NULL DEFAULT NULL,
`gpsX` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL,
`gpsY` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL,
`idt_camera_channel` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL,
`management_unit_name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL,
`node_name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL,
`parent_id` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL,
`status` int(0) NULL DEFAULT NULL,
`creator` bigint(0) NULL DEFAULT NULL,
`create_date` datetime(0) NULL DEFAULT NULL,
`updater` bigint(0) NULL DEFAULT NULL,
`update_date` datetime(0) NULL DEFAULT NULL,
PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci ROW_FORMAT = Dynamic;
SET FOREIGN_KEY_CHECKS = 1;

View File

@ -0,0 +1 @@
ALTER TABLE tb_data_resource ADD COLUMN `undercarriage_instance_id` bigint NULL COMMENT '下架流程实例ID';

View File

@ -61,6 +61,15 @@
update t_ability_application set instance_id = #{instanceId} where id = #{id} update t_ability_application set instance_id = #{instanceId} where id = #{id}
</update> </update>
<update id="delApplyCamera">
UPDATE t_ability_application taa
SET expire_date = now()
WHERE id IN
<foreach collection="ids" item="item" separator="," open="(" close=")">
#{item}
</foreach>
</update>
<select id="getByInstanceId" resultMap="tAbilityApplicationMap"> <select id="getByInstanceId" resultMap="tAbilityApplicationMap">
SELECT SELECT
t1.* t1.*
@ -315,4 +324,17 @@
WHERE WHERE
sd.NAME = tmb.dept sd.NAME = tmb.dept
</select> </select>
<select id="getApplyCameraList" resultType="java.util.Map">
SELECT id, camera_list AS "cameraInfo", approve_status AS "approveStatus"
FROM t_ability_application taa
WHERE 1 = 1
AND del_flag = 0
AND camera_list IS NOT NULL
AND camera_list != ''
AND approve_status IN ('通过', '审核中')
AND user_id = #{userId}
AND expire_date > #{date}
ORDER BY create_date DESC
</select>
</mapper> </mapper>

View File

@ -0,0 +1,50 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="io.renren.modules.processForm.dao.WillApplyCameraDao">
<resultMap type="io.renren.modules.processForm.entity.WillApplyCameraEntity" id="willApplyCameraEntityMap">
<result property="id" column="id"/>
<result property="userId" column="user_id"/>
<result property="delFlag" column="del_flag"/>
<result property="cameraPointTypeName" column="camera_point_type_name"/>
<result property="channelCode" column="channel_code"/>
<result property="channelId" column="channel_id"/>
<result property="channelName" column="channel_name"/>
<result property="checkStatus" column="checkstatus"/>
<result property="gpsX" column="gpsX"/>
<result property="gpsY" column="gpsY"/>
<result property="idtCameraChannel" column="idt_camera_channel"/>
<result property="managementUnitName" column="management_unit_name"/>
<result property="nodeName" column="node_name"/>
<result property="parentId" column="parent_id"/>
<result property="status" column="status"/>
<result property="creator" column="creator"/>
<result property="createDate" column="create_date"/>
<result property="updater" column="updater"/>
<result property="updateDate" column="update_date"/>
</resultMap>
<resultMap id="willApplyCameraDTO" type="io.renren.modules.processForm.dto.WillApplyCameraDTO">
<result property="id" column="id"/>
<result property="userId" column="user_id"/>
<result property="delFlag" column="del_flag"/>
<result property="cameraPointTypeName" column="camera_point_type_name"/>
<result property="channelCode" column="channel_code"/>
<result property="channelId" column="channel_id"/>
<result property="channelName" column="channel_name"/>
<result property="checkStatus" column="checkstatus"/>
<result property="gpsX" column="gpsX"/>
<result property="gpsY" column="gpsY"/>
<result property="idtCameraChannel" column="idt_camera_channel"/>
<result property="managementUnitName" column="management_unit_name"/>
<result property="nodeName" column="node_name"/>
<result property="parentId" column="parent_id"/>
<result property="status" column="status"/>
<result property="creator" column="creator"/>
<result property="createDate" column="create_date"/>
<result property="updater" column="updater"/>
<result property="updateDate" column="update_date"/>
</resultMap>
</mapper>