【增加实训生成背景、设备选择】

This commit is contained in:
weizhihong 2022-12-06 11:13:10 +08:00
parent 735f7a4bc3
commit 902a39bd0b
18 changed files with 559 additions and 160 deletions

View File

@ -62,7 +62,6 @@ CREATE TABLE `rts_paper_user` (
`id` bigint NOT NULL AUTO_INCREMENT COMMENT '用户试卷id', `id` bigint NOT NULL AUTO_INCREMENT COMMENT '用户试卷id',
`user_id` bigint NOT NULL COMMENT '用户id', `user_id` bigint NOT NULL COMMENT '用户id',
`pc_id` bigint NOT NULL COMMENT '生成用户试卷的paper_compostion的id', `pc_id` bigint NOT NULL COMMENT '生成用户试卷的paper_compostion的id',
`org_id` bigint NULL DEFAULT NULL COMMENT '组织id',
`score` int NULL DEFAULT NULL COMMENT '用户最终得分', `score` int NULL DEFAULT NULL COMMENT '用户最终得分',
`start_time` datetime NULL DEFAULT NULL COMMENT '用户开始做题时间', `start_time` datetime NULL DEFAULT NULL COMMENT '用户开始做题时间',
`end_time` datetime NULL DEFAULT NULL COMMENT '用户结束做题时间', `end_time` datetime NULL DEFAULT NULL COMMENT '用户结束做题时间',

View File

@ -11,7 +11,7 @@
Target Server Version : 80029 Target Server Version : 80029
File Encoding : 65001 File Encoding : 65001
Date: 05/12/2022 09:17:49 Date: 06/12/2022 09:53:18
*/ */
SET NAMES utf8mb4; SET NAMES utf8mb4;
@ -27,6 +27,8 @@ CREATE TABLE `rts_iscs_model_data` (
`view` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT 'iscs二级视图', `view` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT 'iscs二级视图',
`place` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '场所(车站、变电所、停车场等)', `place` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '场所(车站、变电所、停车场等)',
`data` blob NULL COMMENT '场所整个所有的模型的数据', `data` blob NULL COMMENT '场所整个所有的模型的数据',
`create_time` datetime NULL DEFAULT NULL COMMENT '创建时间',
`update_time` datetime NULL DEFAULT NULL COMMENT '更新时间',
PRIMARY KEY (`id`) USING BTREE PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci ROW_FORMAT = Dynamic; ) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci ROW_FORMAT = Dynamic;

View File

@ -2,6 +2,7 @@ package club.joylink.rtss.entity.paper;
import java.io.Serializable; import java.io.Serializable;
import java.time.LocalDateTime; import java.time.LocalDateTime;
import java.util.Date;
import lombok.Data; import lombok.Data;
/** /**
@ -25,11 +26,6 @@ public class PaperUser implements Serializable {
*/ */
private Long pcId; private Long pcId;
/**
* 组织id
*/
private Long orgId;
/** /**
* 用户最终得分 * 用户最终得分
*/ */

View File

@ -1,7 +1,7 @@
package club.joylink.rtss.entity.paper; package club.joylink.rtss.entity.paper;
import java.time.LocalDateTime;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.Date;
import java.util.List; import java.util.List;
public class PaperUserExample { public class PaperUserExample {
@ -305,66 +305,6 @@ public class PaperUserExample {
return (Criteria) this; return (Criteria) this;
} }
public Criteria andOrgIdIsNull() {
addCriterion("org_id is null");
return (Criteria) this;
}
public Criteria andOrgIdIsNotNull() {
addCriterion("org_id is not null");
return (Criteria) this;
}
public Criteria andOrgIdEqualTo(Long value) {
addCriterion("org_id =", value, "orgId");
return (Criteria) this;
}
public Criteria andOrgIdNotEqualTo(Long value) {
addCriterion("org_id <>", value, "orgId");
return (Criteria) this;
}
public Criteria andOrgIdGreaterThan(Long value) {
addCriterion("org_id >", value, "orgId");
return (Criteria) this;
}
public Criteria andOrgIdGreaterThanOrEqualTo(Long value) {
addCriterion("org_id >=", value, "orgId");
return (Criteria) this;
}
public Criteria andOrgIdLessThan(Long value) {
addCriterion("org_id <", value, "orgId");
return (Criteria) this;
}
public Criteria andOrgIdLessThanOrEqualTo(Long value) {
addCriterion("org_id <=", value, "orgId");
return (Criteria) this;
}
public Criteria andOrgIdIn(List<Long> values) {
addCriterion("org_id in", values, "orgId");
return (Criteria) this;
}
public Criteria andOrgIdNotIn(List<Long> values) {
addCriterion("org_id not in", values, "orgId");
return (Criteria) this;
}
public Criteria andOrgIdBetween(Long value1, Long value2) {
addCriterion("org_id between", value1, value2, "orgId");
return (Criteria) this;
}
public Criteria andOrgIdNotBetween(Long value1, Long value2) {
addCriterion("org_id not between", value1, value2, "orgId");
return (Criteria) this;
}
public Criteria andScoreIsNull() { public Criteria andScoreIsNull() {
addCriterion("score is null"); addCriterion("score is null");
return (Criteria) this; return (Criteria) this;
@ -435,52 +375,52 @@ public class PaperUserExample {
return (Criteria) this; return (Criteria) this;
} }
public Criteria andStartTimeEqualTo(LocalDateTime value) { public Criteria andStartTimeEqualTo(Date value) {
addCriterion("start_time =", value, "startTime"); addCriterion("start_time =", value, "startTime");
return (Criteria) this; return (Criteria) this;
} }
public Criteria andStartTimeNotEqualTo(LocalDateTime value) { public Criteria andStartTimeNotEqualTo(Date value) {
addCriterion("start_time <>", value, "startTime"); addCriterion("start_time <>", value, "startTime");
return (Criteria) this; return (Criteria) this;
} }
public Criteria andStartTimeGreaterThan(LocalDateTime value) { public Criteria andStartTimeGreaterThan(Date value) {
addCriterion("start_time >", value, "startTime"); addCriterion("start_time >", value, "startTime");
return (Criteria) this; return (Criteria) this;
} }
public Criteria andStartTimeGreaterThanOrEqualTo(LocalDateTime value) { public Criteria andStartTimeGreaterThanOrEqualTo(Date value) {
addCriterion("start_time >=", value, "startTime"); addCriterion("start_time >=", value, "startTime");
return (Criteria) this; return (Criteria) this;
} }
public Criteria andStartTimeLessThan(LocalDateTime value) { public Criteria andStartTimeLessThan(Date value) {
addCriterion("start_time <", value, "startTime"); addCriterion("start_time <", value, "startTime");
return (Criteria) this; return (Criteria) this;
} }
public Criteria andStartTimeLessThanOrEqualTo(LocalDateTime value) { public Criteria andStartTimeLessThanOrEqualTo(Date value) {
addCriterion("start_time <=", value, "startTime"); addCriterion("start_time <=", value, "startTime");
return (Criteria) this; return (Criteria) this;
} }
public Criteria andStartTimeIn(List<LocalDateTime> values) { public Criteria andStartTimeIn(List<Date> values) {
addCriterion("start_time in", values, "startTime"); addCriterion("start_time in", values, "startTime");
return (Criteria) this; return (Criteria) this;
} }
public Criteria andStartTimeNotIn(List<LocalDateTime> values) { public Criteria andStartTimeNotIn(List<Date> values) {
addCriterion("start_time not in", values, "startTime"); addCriterion("start_time not in", values, "startTime");
return (Criteria) this; return (Criteria) this;
} }
public Criteria andStartTimeBetween(LocalDateTime value1, LocalDateTime value2) { public Criteria andStartTimeBetween(Date value1, Date value2) {
addCriterion("start_time between", value1, value2, "startTime"); addCriterion("start_time between", value1, value2, "startTime");
return (Criteria) this; return (Criteria) this;
} }
public Criteria andStartTimeNotBetween(LocalDateTime value1, LocalDateTime value2) { public Criteria andStartTimeNotBetween(Date value1, Date value2) {
addCriterion("start_time not between", value1, value2, "startTime"); addCriterion("start_time not between", value1, value2, "startTime");
return (Criteria) this; return (Criteria) this;
} }
@ -495,52 +435,52 @@ public class PaperUserExample {
return (Criteria) this; return (Criteria) this;
} }
public Criteria andEndTimeEqualTo(LocalDateTime value) { public Criteria andEndTimeEqualTo(Date value) {
addCriterion("end_time =", value, "endTime"); addCriterion("end_time =", value, "endTime");
return (Criteria) this; return (Criteria) this;
} }
public Criteria andEndTimeNotEqualTo(LocalDateTime value) { public Criteria andEndTimeNotEqualTo(Date value) {
addCriterion("end_time <>", value, "endTime"); addCriterion("end_time <>", value, "endTime");
return (Criteria) this; return (Criteria) this;
} }
public Criteria andEndTimeGreaterThan(LocalDateTime value) { public Criteria andEndTimeGreaterThan(Date value) {
addCriterion("end_time >", value, "endTime"); addCriterion("end_time >", value, "endTime");
return (Criteria) this; return (Criteria) this;
} }
public Criteria andEndTimeGreaterThanOrEqualTo(LocalDateTime value) { public Criteria andEndTimeGreaterThanOrEqualTo(Date value) {
addCriterion("end_time >=", value, "endTime"); addCriterion("end_time >=", value, "endTime");
return (Criteria) this; return (Criteria) this;
} }
public Criteria andEndTimeLessThan(LocalDateTime value) { public Criteria andEndTimeLessThan(Date value) {
addCriterion("end_time <", value, "endTime"); addCriterion("end_time <", value, "endTime");
return (Criteria) this; return (Criteria) this;
} }
public Criteria andEndTimeLessThanOrEqualTo(LocalDateTime value) { public Criteria andEndTimeLessThanOrEqualTo(Date value) {
addCriterion("end_time <=", value, "endTime"); addCriterion("end_time <=", value, "endTime");
return (Criteria) this; return (Criteria) this;
} }
public Criteria andEndTimeIn(List<LocalDateTime> values) { public Criteria andEndTimeIn(List<Date> values) {
addCriterion("end_time in", values, "endTime"); addCriterion("end_time in", values, "endTime");
return (Criteria) this; return (Criteria) this;
} }
public Criteria andEndTimeNotIn(List<LocalDateTime> values) { public Criteria andEndTimeNotIn(List<Date> values) {
addCriterion("end_time not in", values, "endTime"); addCriterion("end_time not in", values, "endTime");
return (Criteria) this; return (Criteria) this;
} }
public Criteria andEndTimeBetween(LocalDateTime value1, LocalDateTime value2) { public Criteria andEndTimeBetween(Date value1, Date value2) {
addCriterion("end_time between", value1, value2, "endTime"); addCriterion("end_time between", value1, value2, "endTime");
return (Criteria) this; return (Criteria) this;
} }
public Criteria andEndTimeNotBetween(LocalDateTime value1, LocalDateTime value2) { public Criteria andEndTimeNotBetween(Date value1, Date value2) {
addCriterion("end_time not between", value1, value2, "endTime"); addCriterion("end_time not between", value1, value2, "endTime");
return (Criteria) this; return (Criteria) this;
} }
@ -625,52 +565,52 @@ public class PaperUserExample {
return (Criteria) this; return (Criteria) this;
} }
public Criteria andCreateTimeEqualTo(LocalDateTime value) { public Criteria andCreateTimeEqualTo(Date value) {
addCriterion("create_time =", value, "createTime"); addCriterion("create_time =", value, "createTime");
return (Criteria) this; return (Criteria) this;
} }
public Criteria andCreateTimeNotEqualTo(LocalDateTime value) { public Criteria andCreateTimeNotEqualTo(Date value) {
addCriterion("create_time <>", value, "createTime"); addCriterion("create_time <>", value, "createTime");
return (Criteria) this; return (Criteria) this;
} }
public Criteria andCreateTimeGreaterThan(LocalDateTime value) { public Criteria andCreateTimeGreaterThan(Date value) {
addCriterion("create_time >", value, "createTime"); addCriterion("create_time >", value, "createTime");
return (Criteria) this; return (Criteria) this;
} }
public Criteria andCreateTimeGreaterThanOrEqualTo(LocalDateTime value) { public Criteria andCreateTimeGreaterThanOrEqualTo(Date value) {
addCriterion("create_time >=", value, "createTime"); addCriterion("create_time >=", value, "createTime");
return (Criteria) this; return (Criteria) this;
} }
public Criteria andCreateTimeLessThan(LocalDateTime value) { public Criteria andCreateTimeLessThan(Date value) {
addCriterion("create_time <", value, "createTime"); addCriterion("create_time <", value, "createTime");
return (Criteria) this; return (Criteria) this;
} }
public Criteria andCreateTimeLessThanOrEqualTo(LocalDateTime value) { public Criteria andCreateTimeLessThanOrEqualTo(Date value) {
addCriterion("create_time <=", value, "createTime"); addCriterion("create_time <=", value, "createTime");
return (Criteria) this; return (Criteria) this;
} }
public Criteria andCreateTimeIn(List<LocalDateTime> values) { public Criteria andCreateTimeIn(List<Date> values) {
addCriterion("create_time in", values, "createTime"); addCriterion("create_time in", values, "createTime");
return (Criteria) this; return (Criteria) this;
} }
public Criteria andCreateTimeNotIn(List<LocalDateTime> values) { public Criteria andCreateTimeNotIn(List<Date> values) {
addCriterion("create_time not in", values, "createTime"); addCriterion("create_time not in", values, "createTime");
return (Criteria) this; return (Criteria) this;
} }
public Criteria andCreateTimeBetween(LocalDateTime value1, LocalDateTime value2) { public Criteria andCreateTimeBetween(Date value1, Date value2) {
addCriterion("create_time between", value1, value2, "createTime"); addCriterion("create_time between", value1, value2, "createTime");
return (Criteria) this; return (Criteria) this;
} }
public Criteria andCreateTimeNotBetween(LocalDateTime value1, LocalDateTime value2) { public Criteria andCreateTimeNotBetween(Date value1, Date value2) {
addCriterion("create_time not between", value1, value2, "createTime"); addCriterion("create_time not between", value1, value2, "createTime");
return (Criteria) this; return (Criteria) this;
} }

View File

@ -3,11 +3,15 @@ package club.joylink.rtss.iscs.controller;
import club.joylink.rtss.exception.BusinessExceptionAssertEnum; import club.joylink.rtss.exception.BusinessExceptionAssertEnum;
import club.joylink.rtss.iscs.entity.IscsModelData; import club.joylink.rtss.iscs.entity.IscsModelData;
import club.joylink.rtss.iscs.services.IscsModelDataService; import club.joylink.rtss.iscs.services.IscsModelDataService;
import club.joylink.rtss.iscs.vo.FindIscsModelDataBasicInfoByPageReqVo;
import club.joylink.rtss.iscs.vo.IscsModelDataBasicInfo; import club.joylink.rtss.iscs.vo.IscsModelDataBasicInfo;
import club.joylink.rtss.vo.client.PageVO;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
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 javax.validation.constraints.NotNull;
/** /**
* iscs 模型数据处理接口 * iscs 模型数据处理接口
* <p> * <p>
@ -54,7 +58,7 @@ import org.springframework.web.bind.annotation.*;
*/ */
@Slf4j @Slf4j
@RestController @RestController
@RequestMapping("/api/v2/iscs") @RequestMapping("/api/v2/iscs/model")
public class IscsModelDataController { public class IscsModelDataController {
@Autowired @Autowired
private IscsModelDataService modelDataService; private IscsModelDataService modelDataService;
@ -65,7 +69,7 @@ public class IscsModelDataController {
* @param data 模型proto数据DataModelMap * @param data 模型proto数据DataModelMap
*/ */
@PostMapping("/{system}/{view}/{place}/init") @PostMapping("/{system}/{view}/{place}/init")
public IscsModelDataBasicInfo storeModelData(@PathVariable("system") String system, @PathVariable("view") String view, @PathVariable("place") String place, @RequestBody byte[] data) { public IscsModelDataBasicInfo storeModelData(@PathVariable("system") @NotNull String system, @PathVariable("view") @NotNull String view, @PathVariable("place") @NotNull String place, @RequestBody @NotNull byte[] data) {
log.debug("==>>初始化模型数据 system = {} view = {} place = {}", system, view, place); log.debug("==>>初始化模型数据 system = {} view = {} place = {}", system, view, place);
final IscsModelData param = new IscsModelData(); final IscsModelData param = new IscsModelData();
param.setSystem(system); param.setSystem(system);
@ -82,7 +86,7 @@ public class IscsModelDataController {
*/ */
@GetMapping("/{system}/{view}/{place}") @GetMapping("/{system}/{view}/{place}")
@ResponseBody @ResponseBody
public byte[] findModelData(@PathVariable("system") String system, @PathVariable("view") String view, @PathVariable("place") String place) { public byte[] findModelDataByBasicInfo(@PathVariable("system") @NotNull String system, @PathVariable("view") @NotNull String view, @PathVariable("place") @NotNull String place) {
log.debug("==>>获取模型数据 system = {} view = {} place = {}", system, view, place); log.debug("==>>获取模型数据 system = {} view = {} place = {}", system, view, place);
final IscsModelDataBasicInfo param = new IscsModelDataBasicInfo(); final IscsModelDataBasicInfo param = new IscsModelDataBasicInfo();
param.setSystem(system); param.setSystem(system);
@ -92,5 +96,25 @@ public class IscsModelDataController {
BusinessExceptionAssertEnum.SYSTEM_EXCEPTION.assertTrue(null != rt && null != rt.getData(), "模型数据不存在"); BusinessExceptionAssertEnum.SYSTEM_EXCEPTION.assertTrue(null != rt && null != rt.getData(), "模型数据不存在");
return rt.getData(); return rt.getData();
} }
/**
* 获取模型数据
*
* @return 模型proto数据DataModelMap
*/
@GetMapping("/{id}")
@ResponseBody
public byte[] findModelDataById(@PathVariable("id") @NotNull Long id) {
log.debug("==>>获取模型数据 id = {}", id);
final IscsModelData rt = modelDataService.findModelData(id);
BusinessExceptionAssertEnum.SYSTEM_EXCEPTION.assertTrue(null != rt && null != rt.getData(), "模型数据不存在");
return rt.getData();
}
/**
* 分页查询ISCS模型数据基本信息
*/
@PostMapping("/find/page")
public PageVO<IscsModelDataBasicInfo> findModelDataByPage(@RequestBody FindIscsModelDataBasicInfoByPageReqVo req) {
log.debug("==>>分页查询ISCS模型数据基本信息 : {}", req.toString());
return modelDataService.findModelDataByPage(req);
}
} }

View File

@ -1,6 +1,7 @@
package club.joylink.rtss.iscs.entity; package club.joylink.rtss.iscs.entity;
import java.io.Serializable; import java.io.Serializable;
import java.time.LocalDateTime;
import lombok.Data; import lombok.Data;
/** /**
@ -29,6 +30,16 @@ public class IscsModelData implements Serializable {
*/ */
private String place; private String place;
/**
* 创建时间
*/
private LocalDateTime createTime;
/**
* 更新时间
*/
private LocalDateTime updateTime;
/** /**
* 场所整个所有的模型的数据 * 场所整个所有的模型的数据
*/ */

View File

@ -1,5 +1,6 @@
package club.joylink.rtss.iscs.entity; package club.joylink.rtss.iscs.entity;
import java.time.LocalDateTime;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.List; import java.util.List;
@ -393,6 +394,126 @@ public class IscsModelDataExample {
addCriterion("place not between", value1, value2, "place"); addCriterion("place not between", value1, value2, "place");
return (Criteria) this; return (Criteria) this;
} }
public Criteria andCreateTimeIsNull() {
addCriterion("create_time is null");
return (Criteria) this;
}
public Criteria andCreateTimeIsNotNull() {
addCriterion("create_time is not null");
return (Criteria) this;
}
public Criteria andCreateTimeEqualTo(LocalDateTime value) {
addCriterion("create_time =", value, "createTime");
return (Criteria) this;
}
public Criteria andCreateTimeNotEqualTo(LocalDateTime value) {
addCriterion("create_time <>", value, "createTime");
return (Criteria) this;
}
public Criteria andCreateTimeGreaterThan(LocalDateTime value) {
addCriterion("create_time >", value, "createTime");
return (Criteria) this;
}
public Criteria andCreateTimeGreaterThanOrEqualTo(LocalDateTime value) {
addCriterion("create_time >=", value, "createTime");
return (Criteria) this;
}
public Criteria andCreateTimeLessThan(LocalDateTime value) {
addCriterion("create_time <", value, "createTime");
return (Criteria) this;
}
public Criteria andCreateTimeLessThanOrEqualTo(LocalDateTime value) {
addCriterion("create_time <=", value, "createTime");
return (Criteria) this;
}
public Criteria andCreateTimeIn(List<LocalDateTime> values) {
addCriterion("create_time in", values, "createTime");
return (Criteria) this;
}
public Criteria andCreateTimeNotIn(List<LocalDateTime> values) {
addCriterion("create_time not in", values, "createTime");
return (Criteria) this;
}
public Criteria andCreateTimeBetween(LocalDateTime value1, LocalDateTime value2) {
addCriterion("create_time between", value1, value2, "createTime");
return (Criteria) this;
}
public Criteria andCreateTimeNotBetween(LocalDateTime value1, LocalDateTime value2) {
addCriterion("create_time not between", value1, value2, "createTime");
return (Criteria) this;
}
public Criteria andUpdateTimeIsNull() {
addCriterion("update_time is null");
return (Criteria) this;
}
public Criteria andUpdateTimeIsNotNull() {
addCriterion("update_time is not null");
return (Criteria) this;
}
public Criteria andUpdateTimeEqualTo(LocalDateTime value) {
addCriterion("update_time =", value, "updateTime");
return (Criteria) this;
}
public Criteria andUpdateTimeNotEqualTo(LocalDateTime value) {
addCriterion("update_time <>", value, "updateTime");
return (Criteria) this;
}
public Criteria andUpdateTimeGreaterThan(LocalDateTime value) {
addCriterion("update_time >", value, "updateTime");
return (Criteria) this;
}
public Criteria andUpdateTimeGreaterThanOrEqualTo(LocalDateTime value) {
addCriterion("update_time >=", value, "updateTime");
return (Criteria) this;
}
public Criteria andUpdateTimeLessThan(LocalDateTime value) {
addCriterion("update_time <", value, "updateTime");
return (Criteria) this;
}
public Criteria andUpdateTimeLessThanOrEqualTo(LocalDateTime value) {
addCriterion("update_time <=", value, "updateTime");
return (Criteria) this;
}
public Criteria andUpdateTimeIn(List<LocalDateTime> values) {
addCriterion("update_time in", values, "updateTime");
return (Criteria) this;
}
public Criteria andUpdateTimeNotIn(List<LocalDateTime> values) {
addCriterion("update_time not in", values, "updateTime");
return (Criteria) this;
}
public Criteria andUpdateTimeBetween(LocalDateTime value1, LocalDateTime value2) {
addCriterion("update_time between", value1, value2, "updateTime");
return (Criteria) this;
}
public Criteria andUpdateTimeNotBetween(LocalDateTime value1, LocalDateTime value2) {
addCriterion("update_time not between", value1, value2, "updateTime");
return (Criteria) this;
}
} }
/** /**

View File

@ -4,12 +4,21 @@ import club.joylink.rtss.exception.BusinessExceptionAssertEnum;
import club.joylink.rtss.iscs.dao.IscsModelDataDAO; import club.joylink.rtss.iscs.dao.IscsModelDataDAO;
import club.joylink.rtss.iscs.entity.IscsModelData; import club.joylink.rtss.iscs.entity.IscsModelData;
import club.joylink.rtss.iscs.entity.IscsModelDataExample; import club.joylink.rtss.iscs.entity.IscsModelDataExample;
import club.joylink.rtss.iscs.vo.FindIscsModelDataBasicInfoByPageReqVo;
import club.joylink.rtss.iscs.vo.IscsModelDataBasicInfo; import club.joylink.rtss.iscs.vo.IscsModelDataBasicInfo;
import club.joylink.rtss.vo.client.PageVO;
import com.github.pagehelper.Page;
import com.github.pagehelper.PageHelper;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional; import org.springframework.transaction.annotation.Transactional;
import org.springframework.util.CollectionUtils;
import org.springframework.util.StringUtils;
import java.time.LocalDateTime;
import java.util.ArrayList;
import java.util.List; import java.util.List;
import java.util.stream.Collectors;
@Service @Service
public class IscsModelDataService { public class IscsModelDataService {
@ -24,13 +33,16 @@ public class IscsModelDataService {
//参数校验 //参数校验
BusinessExceptionAssertEnum.SYSTEM_EXCEPTION.assertTrue(null != md.getSystem() && null != md.getView() && null != md.getPlace(), "参数校验失败"); BusinessExceptionAssertEnum.SYSTEM_EXCEPTION.assertTrue(null != md.getSystem() && null != md.getView() && null != md.getPlace(), "参数校验失败");
// //
IscsModelData has = findBySystemViewAndPlace(md.getSystem(), md.getView(), md.getPlace()); IscsModelData has = findBasicBySystemViewAndPlace(md.getSystem(), md.getView(), md.getPlace());
final LocalDateTime now = LocalDateTime.now();
md.setUpdateTime(now);
if (null != has) {//更新 if (null != has) {//更新
md.setId(has.getId()); md.setId(has.getId());
md.setCreateTime(now);
modelDataDao.updateByPrimaryKeySelective(md); modelDataDao.updateByPrimaryKeySelective(md);
} else {//新增 } else {//新增
modelDataDao.insertSelective(md); modelDataDao.insertSelective(md);
has = findBySystemViewAndPlace(md.getSystem(), md.getView(), md.getPlace()); has = findBasicBySystemViewAndPlace(md.getSystem(), md.getView(), md.getPlace());
} }
// //
IscsModelDataBasicInfo rt = new IscsModelDataBasicInfo(); IscsModelDataBasicInfo rt = new IscsModelDataBasicInfo();
@ -42,23 +54,114 @@ public class IscsModelDataService {
} }
/** /**
* 根据完整基本模型信息获取模型数据 * 根据完整基本模型信息获取模型数据(包括大字段信息)
*/ */
@Transactional(readOnly = true, rollbackFor = Exception.class) @Transactional(readOnly = true)
public IscsModelData findModelData(final IscsModelDataBasicInfo md) { public IscsModelData findModelData(final IscsModelDataBasicInfo md) {
//参数校验 //参数校验
BusinessExceptionAssertEnum.SYSTEM_EXCEPTION.assertTrue(null != md.getSystem() && null != md.getView() && null != md.getPlace(), "参数校验失败"); BusinessExceptionAssertEnum.SYSTEM_EXCEPTION.assertTrue(null != md.getSystem() && null != md.getView() && null != md.getPlace(), "参数校验失败");
// //
return findBySystemViewAndPlace(md.getSystem(), md.getView(), md.getPlace()); return findAllBySystemViewAndPlace(md.getSystem(), md.getView(), md.getPlace());
}
/**
* 根据完整基本模型信息获取模型数据(包括大字段信息)
*/
@Transactional(readOnly = true)
public IscsModelData findModelData(final Long id) {
return modelDataDao.selectByPrimaryKey(id);
}
/**
* 分页查询ISCS模型数据基本信息
*/
@Transactional(readOnly = true)
public PageVO<IscsModelDataBasicInfo> findModelDataByPage(FindIscsModelDataBasicInfoByPageReqVo req) {
IscsModelDataExample example = new IscsModelDataExample();
if (req.getLogicAnd()) {
final IscsModelDataExample.Criteria andCriteria = example.createCriteria();
if (StringUtils.hasText(req.getSystem())) {
if (req.getLike()) {
andCriteria.andSystemLike(String.format("%%%s%%", req.getSystem()));
} else {
andCriteria.andSystemEqualTo(req.getSystem());
}
}
if (StringUtils.hasText(req.getView())) {
if (req.getLike()) {
andCriteria.andViewLike(String.format("%%%s%%", req.getView()));
} else {
andCriteria.andViewEqualTo(req.getView());
}
}
if (StringUtils.hasText(req.getPlace())) {
if (req.getLike()) {
andCriteria.andPlaceLike(String.format("%%%s%%", req.getPlace()));
} else {
andCriteria.andPlaceEqualTo(req.getPlace());
}
}
} else {
if (StringUtils.hasText(req.getSystem())) {
if (req.getLike()) {
example.or().andSystemLike(String.format("%%%s%%", req.getSystem()));
} else {
example.or().andSystemEqualTo(req.getSystem());
}
}
if (StringUtils.hasText(req.getView())) {
if (req.getLike()) {
example.or().andViewLike(String.format("%%%s%%", req.getView()));
} else {
example.or().andViewEqualTo(req.getView());
}
}
if (StringUtils.hasText(req.getPlace())) {
if (req.getLike()) {
example.or().andPlaceLike(String.format("%%%s%%", req.getPlace()));
} else {
example.or().andPlaceEqualTo(req.getPlace());
}
}
}
//
final String orderBy = req.getOrderByType().with() + (req.getDesc() ? " desc" : "");
PageHelper.clearPage();
PageHelper.startPage(req.getPageNum(), req.getPageSize(), orderBy);
Page<IscsModelData> sqlPage = (Page<IscsModelData>) this.modelDataDao.selectByExample(example);
List<IscsModelDataBasicInfo> rtList = new ArrayList<>();
if (!CollectionUtils.isEmpty(sqlPage.getResult())) {
rtList = sqlPage.getResult().stream().map((IscsModelData md) -> {
final IscsModelDataBasicInfo bi = new IscsModelDataBasicInfo();
bi.setId(md.getId());
bi.setSystem(md.getSystem());
bi.setView(md.getView());
bi.setPlace(md.getPlace());
bi.setCreateTime(md.getCreateTime());
bi.setUpdateTime(md.getUpdateTime());
return bi;
}).collect(Collectors.toList());
}
return PageVO.convert(sqlPage, rtList);
} }
/** /**
* 根据基本信息查询模型(不包括大字段信息) * 根据基本信息查询模型(不包括大字段信息)
*/ */
private IscsModelData findBySystemViewAndPlace(String system, String view, String place) { private IscsModelData findBasicBySystemViewAndPlace(String system, String view, String place) {
IscsModelDataExample example = new IscsModelDataExample(); IscsModelDataExample example = new IscsModelDataExample();
example.createCriteria().andSystemEqualTo(system).andViewEqualTo(view).andPlaceEqualTo(place); example.createCriteria().andSystemEqualTo(system).andViewEqualTo(view).andPlaceEqualTo(place);
List<IscsModelData> list = modelDataDao.selectByExample(example); List<IscsModelData> list = modelDataDao.selectByExample(example);
return null != list && list.size() > 0 ? list.get(0) : null; return null != list && list.size() > 0 ? list.get(0) : null;
} }
/**
* 根据基本信息查询模型(包括大字段信息)
*/
private IscsModelData findAllBySystemViewAndPlace(String system, String view, String place) {
IscsModelDataExample example = new IscsModelDataExample();
example.createCriteria().andSystemEqualTo(system).andViewEqualTo(view).andPlaceEqualTo(place);
List<IscsModelData> list = modelDataDao.selectByExampleWithBLOBs(example);
return null != list && list.size() > 0 ? list.get(0) : null;
}
} }

View File

@ -0,0 +1,91 @@
package club.joylink.rtss.iscs.vo;
import club.joylink.rtss.vo.client.PageQueryVO;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonValue;
import lombok.Data;
import java.util.HashMap;
import java.util.Map;
/**
* 分页查询ISCS模型数据基本信息
*/
@Data
public class FindIscsModelDataBasicInfoByPageReqVo extends PageQueryVO {
/**
* iscs一级系统(如FASPISAFC等)
*/
private String system;
/**
* iscs二级视图
*/
private String view;
/**
* 场所(车站变电所停车场等)
*/
private String place;
/**
* 当查询条件有多个时条件间关系true-false-默认值为true
*/
private Boolean logicAnd = true;
/**
* 默认true,true-模糊查询false-精确查询
*/
private Boolean like = true;
/**
* 是否降序true-降序false-升序默认值为true;
*/
private Boolean desc = true;
/**
* 排序类型,默认按创建时间排序序列化为数值1-system2-view3-place4-create_time ,5-update_time
*/
private OrderByType orderByType = OrderByType.OrderByCreateTime;
/////////////////////////////////////////////
public static enum OrderByType {
OrderBySystem(1, "system"),
OrderByView(2, "view"),
OrderByPlace(3, "place"),
OrderByCreateTime(4, "create_time"),
OrderByUpdateTime(5, "update_time"),
;
private Integer value;
private String orderBy;
private OrderByType(Integer value, String orderBy) {
this.value = value;
this.orderBy = orderBy;
}
public String with() {
return this.orderBy;
}
@JsonCreator
public static OrderByType getItem(Integer value) {
return map.get(value);
}
@JsonValue
public Integer getValue() {
return this.value;
}
private static Map<Integer, OrderByType> map = new HashMap<>();
static {
for (OrderByType t : values()) {
map.put(t.value, t);
}
}
}
@Override
public String toString() {
return
"system='" + system + '\'' +
", view='" + view + '\'' +
", place='" + place + '\'' + super.toString();
}
}

View File

@ -2,6 +2,11 @@ package club.joylink.rtss.iscs.vo;
import lombok.Data; import lombok.Data;
import java.time.LocalDateTime;
/**
* 模型数据基本信息
*/
@Data @Data
public class IscsModelDataBasicInfo { public class IscsModelDataBasicInfo {
/** /**
@ -20,4 +25,13 @@ public class IscsModelDataBasicInfo {
* 场所(车站变电所停车场等) * 场所(车站变电所停车场等)
*/ */
private String place; private String place;
/**
* 创建时间
*/
private LocalDateTime createTime;
/**
* 更新时间
*/
private LocalDateTime updateTime;
} }

View File

@ -81,7 +81,7 @@ public class PaperUserCreateService {
PaperUser paper = new PaperUser(); PaperUser paper = new PaperUser();
paper.setUserId(user.getId()); paper.setUserId(user.getId());
paper.setPcId(pcId); paper.setPcId(pcId);
paper.setOrgId(orgId); // paper.setOrgId(orgId);
paper.setCreateTime(LocalDateTime.now()); paper.setCreateTime(LocalDateTime.now());
paper.setStartTime(LocalDateTime.now()); paper.setStartTime(LocalDateTime.now());
paperUserDAO.insertSelective(paper); paperUserDAO.insertSelective(paper);

View File

@ -31,4 +31,10 @@ public class PageQueryVO {
this.pageSize = pageSize; this.pageSize = pageSize;
} }
@Override
public String toString() {
return
" pageNum=" + pageNum +
", pageSize=" + pageSize;
}
} }

View File

@ -12,7 +12,7 @@ public class PaperUserConvertor {
to.setId(from.getId()); to.setId(from.getId());
to.setUserId(from.getUserId()); to.setUserId(from.getUserId());
to.setPcId(from.getPcId()); to.setPcId(from.getPcId());
to.setOrgId(from.getOrgId()); // to.setOrgId(from.getOrgId());
to.setScore(from.getScore()); to.setScore(from.getScore());
to.setStartTime(from.getStartTime()); to.setStartTime(from.getStartTime());
to.setEndTime(from.getEndTime()); to.setEndTime(from.getEndTime());

View File

@ -1,5 +1,6 @@
package club.joylink.rtss.vo.training2.rule; package club.joylink.rtss.vo.training2.rule;
import club.joylink.rtss.constants.BusinessConsts;
import club.joylink.rtss.constants.MapPrdTypeEnum; import club.joylink.rtss.constants.MapPrdTypeEnum;
import club.joylink.rtss.exception.BusinessExceptionAssertEnum; import club.joylink.rtss.exception.BusinessExceptionAssertEnum;
import club.joylink.rtss.simulation.cbtc.Simulation; import club.joylink.rtss.simulation.cbtc.Simulation;
@ -338,6 +339,39 @@ public enum BgSceneStatusRule {
return getBgScene(simulation); return getBgScene(simulation);
} }
}, },
STATION_OPEN_AUTO_SETTING_BG_SCENE("全站进路交ATS自动控背景") {
@Override
public String doHandle(Simulation simulation, MapElement mapElement) {
Station station = (Station) mapElement;
if(!station.isInterlock()) {
throw new SimulationException(SimulationExceptionType.Simulation_Map_Data_Error);
}
if (BusinessConsts.MapPrd.PrdType.Type01.equals(simulation.getBuildParams().getProdType())) {
if(station.isCentralized()) {
station.setControlMode(Station.ControlMode.Local);
}else{
station.getDeviceStation().setControlMode(Station.ControlMode.Local);
}
}
List<Route> routeList3 = simulation.getRepository().getRouteList();
for (Route route : routeList3) {
if (Objects.equals(route.getInterlockStation(), station)) {
if (route.isAtsControl()) {
route.setAtsControl(false);
}
}
}
return getBgScene(simulation);
}
},
STATION_CENTER_CONTROL_BG_SCENE ("车站设置中控背景") {
@Override
public String doHandle(Simulation simulation, MapElement mapElement) {
Station station = (Station) mapElement;
station.setControlMode(Station.ControlMode.Local);
return getBgScene(simulation);
}
},
STAND_EARLY_DEPART_BG_SCENE("提前发车背景") { STAND_EARLY_DEPART_BG_SCENE("提前发车背景") {
@Override @Override
public String doHandle(Simulation simulation, MapElement mapElement) { public String doHandle(Simulation simulation, MapElement mapElement) {
@ -379,15 +413,22 @@ public enum BgSceneStatusRule {
return getBgScene(simulation); return getBgScene(simulation);
} }
}, },
STAND_CANCEL_JUMP_STOP_BG_SCENE("站台取消设置跳停") { STAND_CANCEL_JUMP_STOP_BG_SCENE("站台取消设置跳停背景") {
@Override @Override
public String doHandle(Simulation simulation, MapElement mapElement) { public String doHandle(Simulation simulation, MapElement mapElement) {
Stand stand = (Stand) mapElement; Stand stand = (Stand) mapElement;
stand.setAllSkip(true); stand.setAllSkip(true);
return getBgScene(simulation); return getBgScene(simulation);
} }
},
STAND_STRATEGY_BG_SCENE("人工折返策略设置背景") {
@Override
public String doHandle(Simulation simulation, MapElement mapElement) {
Stand stand = (Stand) mapElement;
stand.setTypeStrategy(Stand.TurnBackType.AUTO);
return getBgScene(simulation);
}
} }
; ;
/** /**

View File

@ -7,6 +7,7 @@ import lombok.Getter;
import org.springframework.util.StringUtils; import org.springframework.util.StringUtils;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.Comparator;
import java.util.List; import java.util.List;
import java.util.Random; import java.util.Random;
import java.util.function.Function; import java.util.function.Function;
@ -18,7 +19,9 @@ public enum MapDeviceRule {
@Override @Override
public List<Station> filterMapDeviceList(Simulation simulation) { public List<Station> filterMapDeviceList(Simulation simulation) {
List<Station> stationList = simulation.getBuildParams().getMap().getGraphDataNew().getStationList() List<Station> stationList = simulation.getBuildParams().getMap().getGraphDataNew().getStationList()
.stream().filter(s -> s.isVisible() && s.isCentralized() && s.isCiStation()).map(MapStationNewVO::getCode) .stream().filter(s -> s.isVisible() && s.isCentralized() && s.isCiStation())
.sorted(Comparator.comparing(MapStationNewVO::getSn))
.map(MapStationNewVO::getCode)
.map(code -> simulation.getRepository().getByCode(code, Station.class)) .map(code -> simulation.getRepository().getByCode(code, Station.class))
.collect(Collectors.toList()); .collect(Collectors.toList());
return generateRandomElement(stationList, 1); return generateRandomElement(stationList, 1);
@ -27,9 +30,15 @@ public enum MapDeviceRule {
STAND_LIST("站台列表"){ STAND_LIST("站台列表"){
@Override @Override
public List<Stand> filterMapDeviceList(Simulation simulation) { public List<Stand> filterMapDeviceList(Simulation simulation) {
List<Station> stationList = STATION_LIST.filterMapDeviceList(simulation); List<Stand> stationList = simulation.getRepository().getStandList().stream().filter(stand -> {
Station station = stationList.get(0); if (stand.getStation() != null && stand.getStation().isDepot())
return MapDeviceRule.generateRandomElement(station.getAllStandList(), 2); return false;
if (!stand.isVisible() || !stand.hasDoor() || stand.isSmall()) { // 特殊站台
return false;
}
return true;
}).collect(Collectors.toList());
return MapDeviceRule.generateRandomElement(stationList, 2);
} }
}, },
ROUTE_LIST("进路列表") { ROUTE_LIST("进路列表") {
@ -92,7 +101,15 @@ public enum MapDeviceRule {
return generateRandomElement(sectionList, 2); return generateRandomElement(sectionList, 2);
} }
}, },
CONTROL_STATION_LIST("控制模式的车站列表") {
@Override
public List<Station> filterMapDeviceList(Simulation simulation) {
//找到所有有控制模式的车站
List<Station> stationList = simulation.getRepository().getStationList().stream()
.filter(Station::isHasControlMode).collect(Collectors.toList());
return MapDeviceRule.generateRandomElement(stationList, 1);
}
}
; ;
private String description; private String description;

View File

@ -113,14 +113,35 @@ public enum PropertyValueRule {
return buttonVO.getCode(); return buttonVO.getCode();
} }
}, },
SIGNAL_FIRST_ROUTE_CODE_LIST("信号机关联的第一条进路编码列表") { SIGNAL_FIRST_ROUTE_CODE_LIST("信号机关联的进路编码列表") {
@Override @Override
public Object resolve(Simulation simulation, Object mapElement) { public Object resolve(Simulation simulation, Object mapElement) {
Signal signal = (Signal) mapElement; Signal signal = (Signal) mapElement;
Route route = signal.getRouteList().get(0); Route route = signal.getRouteList().get(0);
return List.of(route.getCode()); return List.of(route.getCode());
} }
},
SIGNAL_FIRST_ROUTE_NAME("信号机关联的进路名称") {
@Override
public Object resolve(Simulation simulation, Object mapElement) {
Signal signal = (Signal) mapElement;
Route route = signal.getRouteList().get(0);
return route.getName();
} }
},
CENTER_CONTROL_STATION_CODE_LIST("站控转中控时车站列表") {
@Override
public Object resolve(Simulation simulation, Object mapElement) {
Station station = (Station) mapElement;
return List.of(station.getCode());
}
},
CENTER_CONTROL_STATION_NAME("站控转中控时车站名称") {
@Override
public Object resolve(Simulation simulation, Object mapElement) {
return ((Station) mapElement).getName();
}
},
; ;
private final String description; private final String description;

View File

@ -6,6 +6,8 @@
<result column="system" jdbcType="VARCHAR" property="system" /> <result column="system" jdbcType="VARCHAR" property="system" />
<result column="view" jdbcType="VARCHAR" property="view" /> <result column="view" jdbcType="VARCHAR" property="view" />
<result column="place" jdbcType="VARCHAR" property="place" /> <result column="place" jdbcType="VARCHAR" property="place" />
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
<result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
</resultMap> </resultMap>
<resultMap extends="BaseResultMap" id="ResultMapWithBLOBs" type="club.joylink.rtss.iscs.entity.IscsModelData"> <resultMap extends="BaseResultMap" id="ResultMapWithBLOBs" type="club.joylink.rtss.iscs.entity.IscsModelData">
<result column="data" jdbcType="LONGVARBINARY" property="data" /> <result column="data" jdbcType="LONGVARBINARY" property="data" />
@ -69,7 +71,7 @@
</where> </where>
</sql> </sql>
<sql id="Base_Column_List"> <sql id="Base_Column_List">
id, `system`, `view`, place id, `system`, `view`, place, create_time, update_time
</sql> </sql>
<sql id="Blob_Column_List"> <sql id="Blob_Column_List">
`data` `data`
@ -140,9 +142,11 @@
</delete> </delete>
<insert id="insert" parameterType="club.joylink.rtss.iscs.entity.IscsModelData"> <insert id="insert" parameterType="club.joylink.rtss.iscs.entity.IscsModelData">
insert into rts_iscs_model_data (id, `system`, `view`, insert into rts_iscs_model_data (id, `system`, `view`,
place, `data`) place, create_time, update_time,
`data`)
values (#{id,jdbcType=BIGINT}, #{system,jdbcType=VARCHAR}, #{view,jdbcType=VARCHAR}, values (#{id,jdbcType=BIGINT}, #{system,jdbcType=VARCHAR}, #{view,jdbcType=VARCHAR},
#{place,jdbcType=VARCHAR}, #{data,jdbcType=LONGVARBINARY}) #{place,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP},
#{data,jdbcType=LONGVARBINARY})
</insert> </insert>
<insert id="insertSelective" parameterType="club.joylink.rtss.iscs.entity.IscsModelData"> <insert id="insertSelective" parameterType="club.joylink.rtss.iscs.entity.IscsModelData">
insert into rts_iscs_model_data insert into rts_iscs_model_data
@ -159,6 +163,12 @@
<if test="place != null"> <if test="place != null">
place, place,
</if> </if>
<if test="createTime != null">
create_time,
</if>
<if test="updateTime != null">
update_time,
</if>
<if test="data != null"> <if test="data != null">
`data`, `data`,
</if> </if>
@ -176,6 +186,12 @@
<if test="place != null"> <if test="place != null">
#{place,jdbcType=VARCHAR}, #{place,jdbcType=VARCHAR},
</if> </if>
<if test="createTime != null">
#{createTime,jdbcType=TIMESTAMP},
</if>
<if test="updateTime != null">
#{updateTime,jdbcType=TIMESTAMP},
</if>
<if test="data != null"> <if test="data != null">
#{data,jdbcType=LONGVARBINARY}, #{data,jdbcType=LONGVARBINARY},
</if> </if>
@ -202,6 +218,12 @@
<if test="record.place != null"> <if test="record.place != null">
place = #{record.place,jdbcType=VARCHAR}, place = #{record.place,jdbcType=VARCHAR},
</if> </if>
<if test="record.createTime != null">
create_time = #{record.createTime,jdbcType=TIMESTAMP},
</if>
<if test="record.updateTime != null">
update_time = #{record.updateTime,jdbcType=TIMESTAMP},
</if>
<if test="record.data != null"> <if test="record.data != null">
`data` = #{record.data,jdbcType=LONGVARBINARY}, `data` = #{record.data,jdbcType=LONGVARBINARY},
</if> </if>
@ -216,6 +238,8 @@
`system` = #{record.system,jdbcType=VARCHAR}, `system` = #{record.system,jdbcType=VARCHAR},
`view` = #{record.view,jdbcType=VARCHAR}, `view` = #{record.view,jdbcType=VARCHAR},
place = #{record.place,jdbcType=VARCHAR}, place = #{record.place,jdbcType=VARCHAR},
create_time = #{record.createTime,jdbcType=TIMESTAMP},
update_time = #{record.updateTime,jdbcType=TIMESTAMP},
`data` = #{record.data,jdbcType=LONGVARBINARY} `data` = #{record.data,jdbcType=LONGVARBINARY}
<if test="_parameter != null"> <if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" /> <include refid="Update_By_Example_Where_Clause" />
@ -226,7 +250,9 @@
set id = #{record.id,jdbcType=BIGINT}, set id = #{record.id,jdbcType=BIGINT},
`system` = #{record.system,jdbcType=VARCHAR}, `system` = #{record.system,jdbcType=VARCHAR},
`view` = #{record.view,jdbcType=VARCHAR}, `view` = #{record.view,jdbcType=VARCHAR},
place = #{record.place,jdbcType=VARCHAR} place = #{record.place,jdbcType=VARCHAR},
create_time = #{record.createTime,jdbcType=TIMESTAMP},
update_time = #{record.updateTime,jdbcType=TIMESTAMP}
<if test="_parameter != null"> <if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" /> <include refid="Update_By_Example_Where_Clause" />
</if> </if>
@ -243,6 +269,12 @@
<if test="place != null"> <if test="place != null">
place = #{place,jdbcType=VARCHAR}, place = #{place,jdbcType=VARCHAR},
</if> </if>
<if test="createTime != null">
create_time = #{createTime,jdbcType=TIMESTAMP},
</if>
<if test="updateTime != null">
update_time = #{updateTime,jdbcType=TIMESTAMP},
</if>
<if test="data != null"> <if test="data != null">
`data` = #{data,jdbcType=LONGVARBINARY}, `data` = #{data,jdbcType=LONGVARBINARY},
</if> </if>
@ -254,6 +286,8 @@
set `system` = #{system,jdbcType=VARCHAR}, set `system` = #{system,jdbcType=VARCHAR},
`view` = #{view,jdbcType=VARCHAR}, `view` = #{view,jdbcType=VARCHAR},
place = #{place,jdbcType=VARCHAR}, place = #{place,jdbcType=VARCHAR},
create_time = #{createTime,jdbcType=TIMESTAMP},
update_time = #{updateTime,jdbcType=TIMESTAMP},
`data` = #{data,jdbcType=LONGVARBINARY} `data` = #{data,jdbcType=LONGVARBINARY}
where id = #{id,jdbcType=BIGINT} where id = #{id,jdbcType=BIGINT}
</update> </update>
@ -261,7 +295,9 @@
update rts_iscs_model_data update rts_iscs_model_data
set `system` = #{system,jdbcType=VARCHAR}, set `system` = #{system,jdbcType=VARCHAR},
`view` = #{view,jdbcType=VARCHAR}, `view` = #{view,jdbcType=VARCHAR},
place = #{place,jdbcType=VARCHAR} place = #{place,jdbcType=VARCHAR},
create_time = #{createTime,jdbcType=TIMESTAMP},
update_time = #{updateTime,jdbcType=TIMESTAMP}
where id = #{id,jdbcType=BIGINT} where id = #{id,jdbcType=BIGINT}
</update> </update>
</mapper> </mapper>

View File

@ -5,7 +5,6 @@
<id column="id" jdbcType="BIGINT" property="id" /> <id column="id" jdbcType="BIGINT" property="id" />
<result column="user_id" jdbcType="BIGINT" property="userId" /> <result column="user_id" jdbcType="BIGINT" property="userId" />
<result column="pc_id" jdbcType="BIGINT" property="pcId" /> <result column="pc_id" jdbcType="BIGINT" property="pcId" />
<result column="org_id" jdbcType="BIGINT" property="orgId" />
<result column="score" jdbcType="INTEGER" property="score" /> <result column="score" jdbcType="INTEGER" property="score" />
<result column="start_time" jdbcType="TIMESTAMP" property="startTime" /> <result column="start_time" jdbcType="TIMESTAMP" property="startTime" />
<result column="end_time" jdbcType="TIMESTAMP" property="endTime" /> <result column="end_time" jdbcType="TIMESTAMP" property="endTime" />
@ -71,7 +70,7 @@
</where> </where>
</sql> </sql>
<sql id="Base_Column_List"> <sql id="Base_Column_List">
id, user_id, pc_id, org_id, score, start_time, end_time, cause, create_time id, user_id, pc_id, score, start_time, end_time, cause, create_time
</sql> </sql>
<select id="selectByExample" parameterType="club.joylink.rtss.entity.paper.PaperUserExample" resultMap="BaseResultMap"> <select id="selectByExample" parameterType="club.joylink.rtss.entity.paper.PaperUserExample" resultMap="BaseResultMap">
select select
@ -111,31 +110,23 @@
<include refid="Example_Where_Clause" /> <include refid="Example_Where_Clause" />
</if> </if>
</delete> </delete>
<insert id="insert" parameterType="club.joylink.rtss.entity.paper.PaperUser"> <insert id="insert" keyColumn="id" keyProperty="id" parameterType="club.joylink.rtss.entity.paper.PaperUser" useGeneratedKeys="true">
insert into rts_paper_user (id, user_id, pc_id, insert into rts_paper_user (user_id, pc_id, score,
org_id, score, start_time, start_time, end_time, cause,
end_time, cause, create_time create_time)
) values (#{userId,jdbcType=BIGINT}, #{pcId,jdbcType=BIGINT}, #{score,jdbcType=INTEGER},
values (#{id,jdbcType=BIGINT}, #{userId,jdbcType=BIGINT}, #{pcId,jdbcType=BIGINT}, #{startTime,jdbcType=TIMESTAMP}, #{endTime,jdbcType=TIMESTAMP}, #{cause,jdbcType=VARCHAR},
#{orgId,jdbcType=BIGINT}, #{score,jdbcType=INTEGER}, #{startTime,jdbcType=TIMESTAMP}, #{createTime,jdbcType=TIMESTAMP})
#{endTime,jdbcType=TIMESTAMP}, #{cause,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP}
)
</insert> </insert>
<insert id="insertSelective" parameterType="club.joylink.rtss.entity.paper.PaperUser"> <insert id="insertSelective" keyColumn="id" keyProperty="id" parameterType="club.joylink.rtss.entity.paper.PaperUser" useGeneratedKeys="true">
insert into rts_paper_user insert into rts_paper_user
<trim prefix="(" suffix=")" suffixOverrides=","> <trim prefix="(" suffix=")" suffixOverrides=",">
<if test="id != null">
id,
</if>
<if test="userId != null"> <if test="userId != null">
user_id, user_id,
</if> </if>
<if test="pcId != null"> <if test="pcId != null">
pc_id, pc_id,
</if> </if>
<if test="orgId != null">
org_id,
</if>
<if test="score != null"> <if test="score != null">
score, score,
</if> </if>
@ -153,18 +144,12 @@
</if> </if>
</trim> </trim>
<trim prefix="values (" suffix=")" suffixOverrides=","> <trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="id != null">
#{id,jdbcType=BIGINT},
</if>
<if test="userId != null"> <if test="userId != null">
#{userId,jdbcType=BIGINT}, #{userId,jdbcType=BIGINT},
</if> </if>
<if test="pcId != null"> <if test="pcId != null">
#{pcId,jdbcType=BIGINT}, #{pcId,jdbcType=BIGINT},
</if> </if>
<if test="orgId != null">
#{orgId,jdbcType=BIGINT},
</if>
<if test="score != null"> <if test="score != null">
#{score,jdbcType=INTEGER}, #{score,jdbcType=INTEGER},
</if> </if>
@ -200,9 +185,6 @@
<if test="record.pcId != null"> <if test="record.pcId != null">
pc_id = #{record.pcId,jdbcType=BIGINT}, pc_id = #{record.pcId,jdbcType=BIGINT},
</if> </if>
<if test="record.orgId != null">
org_id = #{record.orgId,jdbcType=BIGINT},
</if>
<if test="record.score != null"> <if test="record.score != null">
score = #{record.score,jdbcType=INTEGER}, score = #{record.score,jdbcType=INTEGER},
</if> </if>
@ -228,7 +210,6 @@
set id = #{record.id,jdbcType=BIGINT}, set id = #{record.id,jdbcType=BIGINT},
user_id = #{record.userId,jdbcType=BIGINT}, user_id = #{record.userId,jdbcType=BIGINT},
pc_id = #{record.pcId,jdbcType=BIGINT}, pc_id = #{record.pcId,jdbcType=BIGINT},
org_id = #{record.orgId,jdbcType=BIGINT},
score = #{record.score,jdbcType=INTEGER}, score = #{record.score,jdbcType=INTEGER},
start_time = #{record.startTime,jdbcType=TIMESTAMP}, start_time = #{record.startTime,jdbcType=TIMESTAMP},
end_time = #{record.endTime,jdbcType=TIMESTAMP}, end_time = #{record.endTime,jdbcType=TIMESTAMP},
@ -247,9 +228,6 @@
<if test="pcId != null"> <if test="pcId != null">
pc_id = #{pcId,jdbcType=BIGINT}, pc_id = #{pcId,jdbcType=BIGINT},
</if> </if>
<if test="orgId != null">
org_id = #{orgId,jdbcType=BIGINT},
</if>
<if test="score != null"> <if test="score != null">
score = #{score,jdbcType=INTEGER}, score = #{score,jdbcType=INTEGER},
</if> </if>
@ -272,7 +250,6 @@
update rts_paper_user update rts_paper_user
set user_id = #{userId,jdbcType=BIGINT}, set user_id = #{userId,jdbcType=BIGINT},
pc_id = #{pcId,jdbcType=BIGINT}, pc_id = #{pcId,jdbcType=BIGINT},
org_id = #{orgId,jdbcType=BIGINT},
score = #{score,jdbcType=INTEGER}, score = #{score,jdbcType=INTEGER},
start_time = #{startTime,jdbcType=TIMESTAMP}, start_time = #{startTime,jdbcType=TIMESTAMP},
end_time = #{endTime,jdbcType=TIMESTAMP}, end_time = #{endTime,jdbcType=TIMESTAMP},