Compare commits

...

3 Commits

  1. 6
      src/main/java/com/msdw/tms/common/utils/ConstantUtils.java
  2. 15
      src/main/java/com/msdw/tms/controller/StudentController.java
  3. 6
      src/main/java/com/msdw/tms/service/impl/ExperimentalReportServiceImpl.java
  4. 3
      src/main/java/com/msdw/tms/service/impl/SystemSettingServiceImpl.java
  5. 52
      src/main/resources/application-chaohu.properties
  6. 52
      src/main/resources/application-hehai.properties
  7. 6
      src/main/resources/application-test.properties
  8. 2
      src/main/resources/application.properties
  9. 42
      src/main/resources/application.yml
  10. 9
      src/main/resources/mapper/tms/ProjectRecordDao.xml
  11. 2
      src/main/resources/mapper/tms/StudentDao.xml

@ -11,8 +11,10 @@ public class ConstantUtils {
//绑定电子科大的schoolId //绑定巢湖学院的schoolId
public static final Integer Keda_schoolId = 2105; public static final Integer Keda_schoolId = 1006;
//河海大學id
// public static final Integer Keda_schoolId = 729;
//绑定角色ID //绑定角色ID
public static final Integer STUDENT_ROLE = 4; public static final Integer STUDENT_ROLE = 4;

@ -1,19 +1,14 @@
package com.msdw.tms.controller; package com.msdw.tms.controller;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.msdw.tms.api.StudentControllerApi; import com.msdw.tms.api.StudentControllerApi;
import com.msdw.tms.common.utils.Constant;
import com.msdw.tms.common.utils.ConstantUtils; import com.msdw.tms.common.utils.ConstantUtils;
import com.msdw.tms.common.utils.PageUtils; import com.msdw.tms.common.utils.PageUtils;
import com.msdw.tms.common.utils.R; import com.msdw.tms.common.utils.R;
import com.msdw.tms.entity.StudentEntity;
import com.msdw.tms.entity.UserInfoEntity; import com.msdw.tms.entity.UserInfoEntity;
import com.msdw.tms.entity.vo.StudentVo; import com.msdw.tms.entity.vo.StudentVo;
import com.msdw.tms.service.StudentService; import com.msdw.tms.service.StudentService;
import com.msdw.tms.service.UserInfoService; import com.msdw.tms.service.UserInfoService;
import com.sun.xml.bind.v2.model.core.ID;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.redis.core.ValueOperations;
import org.springframework.transaction.annotation.Transactional; import org.springframework.transaction.annotation.Transactional;
import org.springframework.web.bind.annotation.*; import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.MultipartFile; import org.springframework.web.multipart.MultipartFile;
@ -21,11 +16,8 @@ import org.springframework.web.multipart.MultipartFile;
import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpServletResponse;
import javax.validation.Valid; import javax.validation.Valid;
import java.io.IOException; import java.io.IOException;
import java.util.HashMap;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
import java.util.UUID;
import java.util.concurrent.TimeUnit;
/** /**
* 学生管理 * 学生管理
@ -51,9 +43,8 @@ public class StudentController implements StudentControllerApi{
studentVo.setSchoolId(ConstantUtils.Keda_schoolId); studentVo.setSchoolId(ConstantUtils.Keda_schoolId);
String account = studentVo.getAccount(); String account = studentVo.getAccount();
String phone = studentVo.getPhone(); String phone = studentVo.getPhone();
Integer schoolId = studentVo.getSchoolId(); Integer result = studentService.queryStudentIdNumber(studentVo.getWorkNumber(),ConstantUtils.Keda_schoolId);
Integer result = studentService.queryStudentIdNumber(studentVo.getWorkNumber(),schoolId); Integer res = userInfoService.queryStudentAccount(account,ConstantUtils.Keda_schoolId);
Integer res = userInfoService.queryStudentAccount(account,schoolId);
if (phone!=null&&phone!=""){ if (phone!=null&&phone!=""){
Integer outcome = userInfoService.queryStudentPhone(phone); Integer outcome = userInfoService.queryStudentPhone(phone);
if(outcome==1){ if(outcome==1){
@ -72,7 +63,7 @@ public class StudentController implements StudentControllerApi{
userInfoList.setAccount(account) userInfoList.setAccount(account)
.setPhone(phone) .setPhone(phone)
.setEmail(studentVo.getEmail()) .setEmail(studentVo.getEmail())
.setSchoolId(studentVo.getSchoolAppellationId()) .setSchoolId(ConstantUtils.Keda_schoolId)
.setUserName(studentVo.getUserName()) .setUserName(studentVo.getUserName())
.setToken(new ConstantUtils().token); .setToken(new ConstantUtils().token);
userInfoService.saveUserInfo(userInfoList); userInfoService.saveUserInfo(userInfoList);

@ -41,12 +41,12 @@ public class ExperimentalReportServiceImpl extends ServiceImpl<ExperimentalRepor
//python实验 //python实验
HashMap<String, Object> map = new HashMap<>(); HashMap<String, Object> map = new HashMap<>();
map.put("report", result); map.put("report", result);
if (systemId == 1 | systemId == 4 | systemId == 5) { // if (systemId == 1 | systemId == 4 | systemId == 5) {
List<AchievementManagementVO> data = achievementManagementDao.queryPythonTest(recordId); List<AchievementManagementVO> data = achievementManagementDao.queryPythonTest(recordId);
map.put("data", data); map.put("data", data);
return R.ok().put("data", map); return R.ok().put("data", map);
} // }
return R.ok().put("data", map); // return R.ok().put("data", map);
} }
//虚拟实验 //虚拟实验

@ -3,7 +3,6 @@ package com.msdw.tms.service.impl;
import com.alibaba.fastjson.JSON; import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.TypeReference; import com.alibaba.fastjson.TypeReference;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.msdw.tms.common.exception.ExceptionCast; import com.msdw.tms.common.exception.ExceptionCast;
@ -12,7 +11,6 @@ import com.msdw.tms.common.utils.poi.ExcelExportUtil;
import com.msdw.tms.dao.SystemSetttingDao; import com.msdw.tms.dao.SystemSetttingDao;
import com.msdw.tms.dao.UserInfoDao; import com.msdw.tms.dao.UserInfoDao;
import com.msdw.tms.entity.StaffEntity; import com.msdw.tms.entity.StaffEntity;
import com.msdw.tms.entity.StudentEntity;
import com.msdw.tms.entity.UserInfoEntity; import com.msdw.tms.entity.UserInfoEntity;
import com.msdw.tms.entity.XlsxTemplateEntity; import com.msdw.tms.entity.XlsxTemplateEntity;
import com.msdw.tms.entity.response.CommonCode; import com.msdw.tms.entity.response.CommonCode;
@ -284,7 +282,6 @@ public class SystemSettingServiceImpl implements SystemSetttingService {
String phone = staffVo.getPhone(); String phone = staffVo.getPhone();
String email = staffVo.getEmail(); String email = staffVo.getEmail();
//校验员工姓名 //校验员工姓名
if (staffVo.getUserName().equals("")) { if (staffVo.getUserName().equals("")) {
StaffExportVo vo = new StaffExportVo(); StaffExportVo vo = new StaffExportVo();

@ -0,0 +1,52 @@
server.port=9001
server.servlet.context-path=/evaluation
#\u6B63\u5F0F\u6570\u636E\u5E93\u8FDE\u63A5
spring.datasource.url=jdbc:mysql://192.168.0.245:3306/chaohu?useUnicode=true&characterEncoding=UTF-8&useSSL=false&serverTimezone=Asia/Shanghai
spring.datasource.username=root
spring.datasource.password=HuoRan@2021
spring.datasource.driver-class-name=com.mysql.cj.jdbc.Driver
spring.jackson.default-property-inclusion=non_null
# \u8FD9\u4E2A\u914D\u7F6E\u4F1A\u5C06\u6267\u884C\u7684sql\u6253\u5370\u51FA\u6765\uFF0C\u5728\u5F00\u53D1\u6216\u6D4B\u8BD5\u7684\u65F6\u5019\u53EF\u4EE5\u7528
mybatis-plus.configuration.log-impl=org.apache.ibatis.logging.stdout.StdOutImpl
mybatis-plus.mapper-locations=classpath:/mapper/**/*.xml
mybatis-plus.global-config.db-config.id-type=auto
mybatis-plus.global-config.db-config.logic-delete-field=is_del
mybatis-plus.global-config.db-config.logic-delete-value=0
mybatis-plus.global-config.db-config.logic-not-delete-value=1
tms.thread.core-size=20
tms.thread.max-size=200
tms.thread.keep-alive-time=10
#redis\u914D\u7F6E
spring.redis.database=0
spring.redis.host=127.0.0.1
spring.redis.password=
spring.redis.port=6379
spring.redis.timeout=3000
spring.redis.jedis.pool.max-idle=500
spring.redis.jedis.pool.min-idle=50
spring.redis.jedis.pool.max-active=2000
spring.redis.jedis.pool.max-wait=1000
#\u65E5\u5FD7\u7EA7\u522B
logging.level.jdbc=OFF
logging.level.jdbc.sqltiming=DEBUG
logging.level.jdbc.resultsettable=DEBUG
logging.level.com.yipin.liuwar.mapper=DEBUG
logging.level.com.yipin.liuwanr.mapper=DEBUG
spring.elasticsearch.rest.uris=http://es-cn-v641e944a0006xtwy.elasticsearch.aliyuncs.com:9200
spring.elasticsearch.rest.username=elastic
spring.elasticsearch.rest.password=1qaz@WSX
# maxFileSize \u5355\u4E2A\u6570\u636E\u5927\u5C0F
spring.servlet.multipart.maxFileSize = 1024MB
# maxRequestSize \u662F\u603B\u6570\u636E\u5927\u5C0F
spring.servlet.multipart.maxRequestSize=10240MB
pagehelper.reasonable=false

@ -0,0 +1,52 @@
server.port=9090
server.servlet.context-path=/evaluation
#\u6B63\u5F0F\u6570\u636E\u5E93\u8FDE\u63A5
spring.datasource.url=jdbc:mysql://127.0.0.1:3306/huoran?useUnicode=true&characterEncoding=UTF-8&useSSL=false&serverTimezone=Asia/Shanghai
spring.datasource.username=root
spring.datasource.password=HeHai.3
spring.datasource.driver-class-name=com.mysql.cj.jdbc.Driver
spring.jackson.default-property-inclusion=non_null
# \u8FD9\u4E2A\u914D\u7F6E\u4F1A\u5C06\u6267\u884C\u7684sql\u6253\u5370\u51FA\u6765\uFF0C\u5728\u5F00\u53D1\u6216\u6D4B\u8BD5\u7684\u65F6\u5019\u53EF\u4EE5\u7528
mybatis-plus.configuration.log-impl=org.apache.ibatis.logging.stdout.StdOutImpl
mybatis-plus.mapper-locations=classpath:/mapper/**/*.xml
mybatis-plus.global-config.db-config.id-type=auto
mybatis-plus.global-config.db-config.logic-delete-field=is_del
mybatis-plus.global-config.db-config.logic-delete-value=0
mybatis-plus.global-config.db-config.logic-not-delete-value=1
tms.thread.core-size=20
tms.thread.max-size=200
tms.thread.keep-alive-time=10
#redis\u914D\u7F6E
spring.redis.database=0
spring.redis.host=127.0.0.1
spring.redis.password=HeHai.6
spring.redis.port=6379
spring.redis.timeout=3000
spring.redis.jedis.pool.max-idle=500
spring.redis.jedis.pool.min-idle=50
spring.redis.jedis.pool.max-active=2000
spring.redis.jedis.pool.max-wait=1000
#\u65E5\u5FD7\u7EA7\u522B
logging.level.jdbc=OFF
logging.level.jdbc.sqltiming=DEBUG
logging.level.jdbc.resultsettable=DEBUG
logging.level.com.yipin.liuwar.mapper=DEBUG
logging.level.com.yipin.liuwanr.mapper=DEBUG
spring.elasticsearch.rest.uris=http://es-cn-v641e944a0006xtwy.elasticsearch.aliyuncs.com:9200
spring.elasticsearch.rest.username=elastic
spring.elasticsearch.rest.password=1qaz@WSX
# maxFileSize \u5355\u4E2A\u6570\u636E\u5927\u5C0F
spring.servlet.multipart.maxFileSize = 1024MB
# maxRequestSize \u662F\u603B\u6570\u636E\u5927\u5C0F
spring.servlet.multipart.maxRequestSize=10240MB
pagehelper.reasonable=false

@ -24,9 +24,9 @@ tms.thread.keep-alive-time=10
#redis\u914D\u7F6E #redis\u914D\u7F6E
spring.redis.database=0 spring.redis.database=0
spring.redis.host=www.liuwanr.cn spring.redis.host=127.0.0.1
spring.redis.password=huoran spring.redis.password=huoran#2021
spring.redis.port=6379 spring.redis.port=6710
spring.redis.timeout=3000 spring.redis.timeout=3000
spring.redis.jedis.pool.max-idle=500 spring.redis.jedis.pool.max-idle=500
spring.redis.jedis.pool.min-idle=50 spring.redis.jedis.pool.min-idle=50

@ -1,2 +1,2 @@
#\u9009\u62E9\u6307\u5B9A\u73AF\u5883,\u76EE\u524D\u53EA\u6709\u6D4B\u8BD5\u548C\u6B63\u5F0F\u73AF\u5883 #\u9009\u62E9\u6307\u5B9A\u73AF\u5883,\u76EE\u524D\u53EA\u6709\u6D4B\u8BD5\u548C\u6B63\u5F0F\u73AF\u5883
spring.profiles.active=prod spring.profiles.active=chaohu

@ -1,42 +0,0 @@
spring:
jackson:
default-property-inclusion: non_null
datasource:
# url: jdbc:mysql://www.liuwanr.cn:3306/huoran?useUnicode=true&characterEncoding=UTF-8&useSSL=false&serverTimezone=Asia/Shanghai
# username: super
# password: huoran888
url: jdbc:mysql://rm-wz9y13wf7u8q8610fwo.mysql.rds.aliyuncs.com:3306/huoran?useUnicode=true&characterEncoding=UTF-8&useSSL=false&serverTimezone=Asia/Shanghai
username: super
password: huoran888
# url: jdbc:mysql://localhost:3306/msdw_tms?useUnicode=true&characterEncoding=UTF-8&useSSL=false&serverTimezone=Asia/Shanghai
# username: root
# password: root
driver-class-name: com.mysql.cj.jdbc.Driver
# redis:
# host: www.liuwanr.cn
# port: 6379
# password: huoran
redis:
host: 127.0.0.1
port: 6379
password:
mybatis-plus:
configuration:
log-impl: org.apache.ibatis.logging.stdout.StdOutImpl # 这个配置会将执行的sql打印出来,在开发或测试的时候可以用
mapper-locations: classpath:/mapper/**/*.xml
global-config:
db-config:
id-type: auto
logic-delete-field: is_del
logic-delete-value: 0
logic-not-delete-value: 1
server:
port: 9090
servlet:
context-path: /evaluation
tms:
thread:
core-size: 20
max-size: 200
keep-alive-time: 10

@ -58,13 +58,11 @@
INNER JOIN tms_project_record r ON r.recordId = c.recordId INNER JOIN tms_project_record r ON r.recordId = c.recordId
INNER JOIN tms_experimental_report re ON re.eventId = r.recordId INNER JOIN tms_experimental_report re ON re.eventId = r.recordId
WHERE c.userId = #{userId} WHERE c.userId = #{userId}
-- 教师端逻辑删除,学生端不做判断
-- and r.isdel = 0
and projectPermissions = #{projectPermissions} and projectPermissions = #{projectPermissions}
<if test="systemId!=null and systemId!=''"> <if test="systemId!=null and systemId!=''">
and t.systemId = #{systemId} and t.systemId = #{systemId}
</if> </if>
GROUP BY c.recordId desc GROUP BY c.recordId
</select> </select>
<!-- 考核记录 --> <!-- 考核记录 -->
@ -87,9 +85,7 @@
LEFT JOIN tms_experimental_teaching tet ON tet.project_id = tpr.projectId LEFT JOIN tms_experimental_teaching tet ON tet.project_id = tpr.projectId
LEFT JOIN tms_experimental_report ter ON ter.projectId = tet.id LEFT JOIN tms_experimental_report ter ON ter.projectId = tet.id
WHERE tpr.userId = #{pro.userid} WHERE tpr.userId = #{pro.userid}
<if test="systemId!=null and systemId!=''">and systemId = #{systemId}</if> <if test="systemId!=null and systemId!=''">and systemId = #{systemId}</if>
AND tpr.isdel >= #{pro.isdel} AND tpr.isdel >= #{pro.isdel}
AND tp.projectPermissions !=0 AND tp.projectPermissions !=0
AND AND
@ -192,7 +188,6 @@
LEFT JOIN hr_project_management tp ON tpr.projectId = tp.projectId LEFT JOIN hr_project_management tp ON tpr.projectId = tp.projectId
LEFT JOIN tms_experimental_report re ON re.eventId = tpr.recordId LEFT JOIN tms_experimental_report re ON re.eventId = tpr.recordId
WHERE tpr.userId = #{userid} WHERE tpr.userId = #{userid}
-- 注释掉报错,>=表示是否删除都导出
AND tpr.isdel >= #{isdel} AND tpr.isdel >= #{isdel}
AND tp.projectPermissions = 0 AND tp.projectPermissions = 0
</select> </select>
@ -235,7 +230,7 @@
INNER JOIN tms_experimental_report re ON re.eventId = r.recordId INNER JOIN tms_experimental_report re ON re.eventId = r.recordId
WHERE c.userId = #{userId} WHERE c.userId = #{userId}
AND projectPermissions = 0 AND projectPermissions = 0
GROUP BY c.recordId DESC; GROUP BY c.recordId
</select> </select>
<!-- 考核记录 --> <!-- 考核记录 -->

@ -93,7 +93,7 @@ WHERE
<insert id="saveStudent" useGeneratedKeys="true" keyProperty="studentId"> <insert id="saveStudent" useGeneratedKeys="true" keyProperty="studentId">
INSERT INTO student ( schoolId, userId, workNumber, roleId, isdel,platformId ) INSERT INTO student ( schoolId, userId, workNumber, roleId, isdel,platformId )
VALUES VALUES
( #{schoolId},#{userId},#{workNumber},#{roleId},#{isdel},#{platformId} ( 1006,#{userId},#{workNumber},#{roleId},#{isdel},#{platformId}
) )
</insert> </insert>
<insert id="addStudentInfo"> <insert id="addStudentInfo">

Loading…
Cancel
Save