Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
涂亚平
/
subsidy
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit 6be77ec7
authored
Jul 10, 2023
by
涂亚平
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
exportExerciseTest导出新增考试时长字段
1 parent
af0e0279
Hide whitespace changes
Inline
Side-by-side
Showing
21 changed files
with
214 additions
and
194 deletions
src/main/java/com/subsidy/common/configure/RenSheConfig.java
src/main/java/com/subsidy/controller/AdministerController.java
src/main/java/com/subsidy/controller/DuDaoController.java
src/main/java/com/subsidy/controller/RenshejuHistoryController.java
src/main/java/com/subsidy/jobs/DudaoJob.java
src/main/java/com/subsidy/jobs/RenSheJuJob.java
src/main/java/com/subsidy/service/DudaoService.java
src/main/java/com/subsidy/service/impl/AdministerServiceImpl.java
src/main/java/com/subsidy/service/impl/DudaoServiceImpl.java
src/main/java/com/subsidy/service/impl/RenSheJuServiceImpl.java
src/main/java/com/subsidy/util/ExcelFormatUtils.java
src/main/java/com/subsidy/util/excel/ExcelUtil.java
src/main/java/com/subsidy/util/websocket/WebSocketUtil.java
src/main/java/com/subsidy/vo/administer/ExerciseTestVO.java
src/main/java/com/subsidy/vo/done/TestScoreInfoVO.java
src/main/resources/application-dev.properties
src/main/resources/application-prod.properties
src/main/resources/application.properties
src/main/resources/mapper/CourseContentMapper.xml
src/main/resources/mapper/ExerciseDoneResultMapper.xml
src/main/resources/mapper/RenSheJuMapper.xml
src/main/java/com/subsidy/common/configure/RenSheConfig.java
View file @
6be77ec
...
@@ -15,4 +15,6 @@ public class RenSheConfig {
...
@@ -15,4 +15,6 @@ public class RenSheConfig {
//私钥
//私钥
private
String
secretKey
;
private
String
secretKey
;
//普陀 正式接口
private
String
putuo
;
}
}
src/main/java/com/subsidy/controller/AdministerController.java
View file @
6be77ec
...
@@ -123,7 +123,7 @@ public class AdministerController {
...
@@ -123,7 +123,7 @@ public class AdministerController {
@PostMapping
(
"exportExerciseTest"
)
@PostMapping
(
"exportExerciseTest"
)
@ApiOperation
(
"班级管理--测评成绩 id 班级id userName paperId"
)
@ApiOperation
(
"班级管理--测评成绩 id 班级id userName paperId"
)
@LoginRequired
//
@LoginRequired
public
void
exportExerciseTest
(
@RequestBody
ClassDetailDTO
classDetailDTO
)
throws
Exception
{
public
void
exportExerciseTest
(
@RequestBody
ClassDetailDTO
classDetailDTO
)
throws
Exception
{
classDetailDTO
.
setFlag
(
true
);
classDetailDTO
.
setFlag
(
true
);
administerService
.
exportExerciseTest
(
classDetailDTO
);
administerService
.
exportExerciseTest
(
classDetailDTO
);
...
...
src/main/java/com/subsidy/controller/DuDaoController.java
View file @
6be77ec
package
com
.
subsidy
.
controller
;
package
com
.
subsidy
.
controller
;
import
com.subsidy.dto.renshe.*
;
import
com.subsidy.service.DudaoService
;
import
com.subsidy.service.DudaoService
;
import
com.subsidy.service.RenSheJuService
;
import
com.subsidy.vo.renshe.RensheResponseVO
;
import
com.subsidy.vo.renshe.RensheResponseVO
;
import
com.subsidy.vo.renshe.RensheStringVO
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
io.swagger.annotations.ApiOperation
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
...
@@ -13,7 +10,6 @@ import org.springframework.web.bind.annotation.RequestMapping;
...
@@ -13,7 +10,6 @@ import org.springframework.web.bind.annotation.RequestMapping;
import
org.springframework.web.bind.annotation.RestController
;
import
org.springframework.web.bind.annotation.RestController
;
import
java.io.IOException
;
import
java.io.IOException
;
import
java.util.List
;
@RestController
@RestController
@Api
(
tags
=
"普陀区人社督导"
)
@Api
(
tags
=
"普陀区人社督导"
)
...
@@ -23,6 +19,11 @@ public class DuDaoController {
...
@@ -23,6 +19,11 @@ public class DuDaoController {
@Autowired
@Autowired
private
DudaoService
dudaoService
;
private
DudaoService
dudaoService
;
@PostMapping
(
"all"
)
public
RensheResponseVO
all
()
throws
IOException
{
return
dudaoService
.
all
();
}
@PostMapping
(
"classBaseInfo"
)
@PostMapping
(
"classBaseInfo"
)
@ApiOperation
(
"POST-1:班级基本信息信息采集接口"
)
@ApiOperation
(
"POST-1:班级基本信息信息采集接口"
)
public
RensheResponseVO
classBaseInfo
()
throws
IOException
{
public
RensheResponseVO
classBaseInfo
()
throws
IOException
{
...
...
src/main/java/com/subsidy/controller/RenshejuHistoryController.java
deleted
100644 → 0
View file @
af0e027
package
com
.
subsidy
.
controller
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RestController
;
import
io.swagger.annotations.Api
;
/**
* <p>
* 人社局推送失败记录表 前端控制器
* </p>
*
* @author Tuyp
* @since 2023-02-07
*/
@RestController
@Api
(
tags
=
"人社局推送失败记录表"
)
@RequestMapping
(
"/rensheju-history-do"
)
public
class
RenshejuHistoryController
{
}
src/main/java/com/subsidy/jobs/DudaoJob.java
View file @
6be77ec
//
package com.subsidy.jobs;
package
com
.
subsidy
.
jobs
;
//
//
import com.subsidy.service.DudaoService;
import
com.subsidy.service.DudaoService
;
//
import org.springframework.beans.factory.annotation.Autowired;
import
org.springframework.beans.factory.annotation.Autowired
;
//
import org.springframework.beans.factory.annotation.Value;
import
org.springframework.beans.factory.annotation.Value
;
//
import org.springframework.scheduling.annotation.Scheduled;
import
org.springframework.scheduling.annotation.Scheduled
;
//
import org.springframework.stereotype.Component;
import
org.springframework.stereotype.Component
;
//
//
import java.io.IOException;
import
java.io.IOException
;
//
/
//
**
/**
//
* 企业职工线上培训
* 企业职工线上培训
//
*/
*/
//
@Component
@Component
//
public class DudaoJob {
public
class
DudaoJob
{
//
//
@Value("${spring.profiles.active}")
@Value
(
"${spring.profiles.active}"
)
//
private String env;
private
String
env
;
//
//
@Autowired
@Autowired
//
private DudaoService dudaoService;
private
DudaoService
dudaoService
;
//
//
@Scheduled(cron = "0 0 2 * * ?")
@Scheduled
(
cron
=
"0 0 2 * * ?"
)
//
public void classBaseInfo() throws IOException {
public
void
classBaseInfo
()
throws
IOException
{
//
if ("prod".equals(env)){
if
(
"prod"
.
equals
(
env
)){
//
dudaoService.classBaseInfo();
dudaoService
.
classBaseInfo
();
//
}
}
//
}
}
//
//
@Scheduled(cron = "0 5 2 * * ?")
@Scheduled
(
cron
=
"0 5 2 * * ?"
)
//
public void classHourBehavior() throws IOException {
public
void
classHourBehavior
()
throws
IOException
{
//
if ("prod".equals(env)){
if
(
"prod"
.
equals
(
env
)){
//
dudaoService.classHourBehavior();
dudaoService
.
classHourBehavior
();
//
}
}
//
}
}
//
//
@Scheduled(cron = "0 10 2 * * ?")
@Scheduled
(
cron
=
"0 10 2 * * ?"
)
//
public void uploadChapterBehavior() throws IOException {
public
void
uploadChapterBehavior
()
throws
IOException
{
//
if ("prod".equals(env)){
if
(
"prod"
.
equals
(
env
)){
//
dudaoService.uploadChapterBehavior();
dudaoService
.
uploadChapterBehavior
();
//
}
}
//
}
}
//
//
@Scheduled(cron = "0 15 2 * * ?")
@Scheduled
(
cron
=
"0 15 2 * * ?"
)
//
public void uploadClassAnswerQuestionBehavior() throws IOException {
public
void
uploadClassAnswerQuestionBehavior
()
throws
IOException
{
//
if ("prod".equals(env)){
if
(
"prod"
.
equals
(
env
)){
//
dudaoService.uploadClassAnswerQuestionBehavior();
dudaoService
.
uploadClassAnswerQuestionBehavior
();
//
}
}
//
}
}
//
//
@Scheduled(cron = "0 20 2 * * ?")
@Scheduled
(
cron
=
"0 20 2 * * ?"
)
//
public void uploadClassCode()throws IOException {
public
void
uploadClassCode
()
throws
IOException
{
//
if ("prod".equals(env)){
if
(
"prod"
.
equals
(
env
)){
//
dudaoService.uploadClassCode();
dudaoService
.
uploadClassCode
();
//
}
}
//
}
}
//
//
}
}
src/main/java/com/subsidy/jobs/RenSheJuJob.java
View file @
6be77ec
...
@@ -157,7 +157,7 @@ public class RenSheJuJob {
...
@@ -157,7 +157,7 @@ public class RenSheJuJob {
/**
/**
* 删掉有登录数据 做过人脸 没有学习数据(视频+考试+答疑)
* 删掉有登录数据 做过人脸 没有学习数据(视频+考试+答疑)
*/
*/
@Scheduled
(
cron
=
"0
01 16
* * ?"
)
@Scheduled
(
cron
=
"0
35 23
* * ?"
)
@Transactional
(
rollbackFor
=
Exception
.
class
)
@Transactional
(
rollbackFor
=
Exception
.
class
)
public
void
deleteNoStudyMembers
()
{
public
void
deleteNoStudyMembers
()
{
...
...
src/main/java/com/subsidy/service/DudaoService.java
View file @
6be77ec
...
@@ -7,6 +7,8 @@ import java.io.IOException;
...
@@ -7,6 +7,8 @@ import java.io.IOException;
public
interface
DudaoService
{
public
interface
DudaoService
{
RensheResponseVO
all
()
throws
IOException
;
RensheResponseVO
classBaseInfo
()
throws
IOException
;
RensheResponseVO
classBaseInfo
()
throws
IOException
;
RensheResponseVO
classHourBehavior
()
throws
IOException
;
RensheResponseVO
classHourBehavior
()
throws
IOException
;
...
...
src/main/java/com/subsidy/service/impl/AdministerServiceImpl.java
View file @
6be77ec
...
@@ -767,6 +767,7 @@ public class AdministerServiceImpl extends ServiceImpl<AdministerMapper, Adminis
...
@@ -767,6 +767,7 @@ public class AdministerServiceImpl extends ServiceImpl<AdministerMapper, Adminis
exerciseTestVO
.
setEndDate
(
testScoreInfoVO
.
getEndDate
());
exerciseTestVO
.
setEndDate
(
testScoreInfoVO
.
getEndDate
());
exerciseTestVO
.
setScore
(
testScoreInfoVO
.
getScore
());
exerciseTestVO
.
setScore
(
testScoreInfoVO
.
getScore
());
exerciseTestVO
.
setResult
(
testScoreInfoVO
.
getResult
());
exerciseTestVO
.
setResult
(
testScoreInfoVO
.
getResult
());
exerciseTestVO
.
setPeriod
(
MathUtil
.
exerciseLength
(
testScoreInfoVO
.
getDiff
()));
//测评次数
//测评次数
exerciseTestVO
.
setCount
(
testScoreInfoVO
.
getCnt
());
exerciseTestVO
.
setCount
(
testScoreInfoVO
.
getCnt
());
}
else
{
}
else
{
...
@@ -1418,9 +1419,9 @@ public class AdministerServiceImpl extends ServiceImpl<AdministerMapper, Adminis
...
@@ -1418,9 +1419,9 @@ public class AdministerServiceImpl extends ServiceImpl<AdministerMapper, Adminis
memberDepartmentMappingMapper
.
insert
(
memberDepartmentMappingDO
);
memberDepartmentMappingMapper
.
insert
(
memberDepartmentMappingDO
);
}
}
}
}
System
.
out
.
println
(
failMembers
);
});
});
}
catch
(
}
catch
(
Exception
e
)
{
Exception
e
)
{
e
.
printStackTrace
();
e
.
printStackTrace
();
throw
new
HttpException
(
10001
);
throw
new
HttpException
(
10001
);
}
}
...
...
src/main/java/com/subsidy/service/impl/DudaoServiceImpl.java
View file @
6be77ec
package
com
.
subsidy
.
service
.
impl
;
package
com
.
subsidy
.
service
.
impl
;
import
com.alibaba.fastjson.JSON
;
import
com.alibaba.fastjson.JSON
;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
import
com.subsidy.common.configure.RenSheConfig
;
import
com.subsidy.common.configure.RenSheConfig
;
import
com.subsidy.dto.renshe.*
;
import
com.subsidy.dto.renshe.*
;
import
com.subsidy.mapper.*
;
import
com.subsidy.mapper.ClassDictMapper
;
import
com.subsidy.mapper.DudaoMapper
;
import
com.subsidy.mapper.RenSheJuMapper
;
import
com.subsidy.mapper.RenshejuHistoryMapper
;
import
com.subsidy.model.*
;
import
com.subsidy.model.*
;
import
com.subsidy.service.DudaoService
;
import
com.subsidy.service.DudaoService
;
import
com.subsidy.service.RenSheJuService
;
import
com.subsidy.util.OSSUtils
;
import
com.subsidy.util.DudaoConstant
;
import
com.subsidy.util.DudaoConstant
;
import
com.subsidy.vo.renshe.*
;
import
com.subsidy.vo.renshe.*
;
import
net.sf.json.JSONObject
;
import
net.sf.json.JSONObject
;
...
@@ -19,22 +19,23 @@ import org.springframework.stereotype.Service;
...
@@ -19,22 +19,23 @@ import org.springframework.stereotype.Service;
import
java.io.IOException
;
import
java.io.IOException
;
import
java.sql.Timestamp
;
import
java.sql.Timestamp
;
import
java.time.LocalDateTime
;
import
java.util.*
;
import
java.util.*
;
@Service
@Service
public
class
DudaoServiceImpl
implements
DudaoService
{
public
class
DudaoServiceImpl
implements
DudaoService
{
/**
//
/**
* 测试环境
//
* 测试环境
*/
//
*/
public
static
final
String
PREFIX_URL
=
"http://180.167.195.117:18015/ddproject"
;
//
public static final String PREFIX_URL = "http://180.167.195.117:18015/ddproject";
//
/**
//
/**
* 正式环境
//
* 正式环境
*/
//
*/
public
static
final
String
PROD_URL
=
"http://180.167.195.117:18025/ddproject"
;
//
public static final String PROD_URL = "http://180.167.195.117:18025/ddproject";
@Autowired
private
RenSheConfig
renSheConfig
;
@Autowired
@Autowired
private
RenSheJuMapper
renSheJuMapper
;
private
RenSheJuMapper
renSheJuMapper
;
...
@@ -48,6 +49,17 @@ public class DudaoServiceImpl implements DudaoService {
...
@@ -48,6 +49,17 @@ public class DudaoServiceImpl implements DudaoService {
@Autowired
@Autowired
private
DudaoMapper
dudaoMapper
;
private
DudaoMapper
dudaoMapper
;
public
RensheResponseVO
all
()
throws
IOException
{
classBaseInfo
();
classHourBehavior
();
uploadChapterBehavior
();
uploadClassAnswerQuestionBehavior
();
uploadClassCode
();
return
new
RensheResponseVO
();
}
public
RensheResponseVO
classBaseInfo
()
throws
IOException
{
public
RensheResponseVO
classBaseInfo
()
throws
IOException
{
OkHttpClient
client
=
new
OkHttpClient
().
newBuilder
()
OkHttpClient
client
=
new
OkHttpClient
().
newBuilder
()
...
@@ -74,7 +86,6 @@ public class DudaoServiceImpl implements DudaoService {
...
@@ -74,7 +86,6 @@ public class DudaoServiceImpl implements DudaoService {
//人脸识别
//人脸识别
List
<
Long
>
imageClassIds
=
dudaoMapper
.
imageClassIds
(
"0"
);
List
<
Long
>
imageClassIds
=
dudaoMapper
.
imageClassIds
(
"0"
);
Set
<
Long
>
classIds
=
new
HashSet
<>();
Set
<
Long
>
classIds
=
new
HashSet
<>();
vodClassIds
.
stream
().
forEach
(
x
->
classIds
.
add
(
x
));
vodClassIds
.
stream
().
forEach
(
x
->
classIds
.
add
(
x
));
...
@@ -109,7 +120,7 @@ public class DudaoServiceImpl implements DudaoService {
...
@@ -109,7 +120,7 @@ public class DudaoServiceImpl implements DudaoService {
RequestBody
body
=
RequestBody
.
create
(
mediaType
,
JSONObject
.
fromObject
(
classBaseInfoDTO
).
toString
());
RequestBody
body
=
RequestBody
.
create
(
mediaType
,
JSONObject
.
fromObject
(
classBaseInfoDTO
).
toString
());
Request
request
=
new
Request
.
Builder
()
Request
request
=
new
Request
.
Builder
()
.
url
(
PREFIX_URL
+
"/classbasicinformation/insertClassBasicInformation"
)
.
url
(
renSheConfig
.
getPutuo
()
+
"/classbasicinformation/insertClassBasicInformation"
)
.
method
(
"POST"
,
body
)
.
method
(
"POST"
,
body
)
.
addHeader
(
"User-Agent"
,
"Apifox/1.0.0 (https://www.apifox.cn)"
)
.
addHeader
(
"User-Agent"
,
"Apifox/1.0.0 (https://www.apifox.cn)"
)
.
addHeader
(
"Content-Type"
,
"application/json"
)
.
addHeader
(
"Content-Type"
,
"application/json"
)
...
@@ -163,9 +174,19 @@ public class DudaoServiceImpl implements DudaoService {
...
@@ -163,9 +174,19 @@ public class DudaoServiceImpl implements DudaoService {
List
<
ClassHourBasic
>
classHourBasics
=
new
ArrayList
<>();
List
<
ClassHourBasic
>
classHourBasics
=
new
ArrayList
<>();
try
{
try
{
//前一天新增视频学习数据的班级并且是普陀的
List
<
DailyStudyInfoVO
>
dailyStudyInfoVOS
=
dudaoMapper
.
dailyStudyInfo
(
"0"
);
//产生视频学习数据的班级
for
(
DailyStudyInfoVO
dailyStudyInfoVO
:
dailyStudyInfoVOS
)
{
List
<
Long
>
vodClassIds
=
dudaoMapper
.
vodClassIds
(
"0"
);
List
<
DailyStudyInfoVO
>
result
=
new
ArrayList
<>();
for
(
Long
classId
:
vodClassIds
){
//产生数据的班级
List
<
DailyStudyInfoVO
>
dailyStudyInfoVOS
=
renSheJuMapper
.
dailyStudyInfo
(
classId
);
result
.
addAll
(
dailyStudyInfoVOS
);
}
for
(
DailyStudyInfoVO
dailyStudyInfoVO
:
result
)
{
ClassHourBasic
classHourBasic
=
new
ClassHourBasic
();
ClassHourBasic
classHourBasic
=
new
ClassHourBasic
();
BeanUtils
.
copyProperties
(
dailyStudyInfoVO
,
classHourBasic
);
BeanUtils
.
copyProperties
(
dailyStudyInfoVO
,
classHourBasic
);
classHourBasic
.
setDownCode
(
dailyStudyInfoVO
.
getDownCode
());
classHourBasic
.
setDownCode
(
dailyStudyInfoVO
.
getDownCode
());
...
@@ -216,9 +237,10 @@ public class DudaoServiceImpl implements DudaoService {
...
@@ -216,9 +237,10 @@ public class DudaoServiceImpl implements DudaoService {
activityLists
.
add
(
activityList
);
activityLists
.
add
(
activityList
);
}
}
classHourBasic
.
setActivityList
(
activityLists
);
classHourBasic
.
setActivityList
(
activityLists
);
classHourBasics
.
add
(
classHourBasic
);
classHourBasics
.
add
(
classHourBasic
);
}
}
classHourBehaviorDTO
.
setClassHourBasic
(
classHourBasics
);
classHourBehaviorDTO
.
setClassHourBasic
(
classHourBasics
);
System
.
out
.
println
(
com
.
alibaba
.
fastjson
.
JSONObject
.
toJSONString
(
classHourBehaviorDTO
));
System
.
out
.
println
(
com
.
alibaba
.
fastjson
.
JSONObject
.
toJSONString
(
classHourBehaviorDTO
));
...
@@ -227,7 +249,7 @@ public class DudaoServiceImpl implements DudaoService {
...
@@ -227,7 +249,7 @@ public class DudaoServiceImpl implements DudaoService {
RequestBody
body
=
RequestBody
.
create
(
mediaType
,
JSONObject
.
fromObject
(
classHourBehaviorDTO
).
toString
());
RequestBody
body
=
RequestBody
.
create
(
mediaType
,
JSONObject
.
fromObject
(
classHourBehaviorDTO
).
toString
());
Request
request
=
new
Request
.
Builder
()
Request
request
=
new
Request
.
Builder
()
.
url
(
PREFIX_URL
+
"/learnduration/insertLearnDuration"
)
.
url
(
renSheConfig
.
getPutuo
()
+
"/learnduration/insertLearnDuration"
)
.
method
(
"POST"
,
body
)
.
method
(
"POST"
,
body
)
.
addHeader
(
"User-Agent"
,
"Apifox/1.0.0 (https://www.apifox.cn)"
)
.
addHeader
(
"User-Agent"
,
"Apifox/1.0.0 (https://www.apifox.cn)"
)
.
addHeader
(
"Content-Type"
,
"application/json"
)
.
addHeader
(
"Content-Type"
,
"application/json"
)
...
@@ -366,7 +388,7 @@ public class DudaoServiceImpl implements DudaoService {
...
@@ -366,7 +388,7 @@ public class DudaoServiceImpl implements DudaoService {
RequestBody
body
=
RequestBody
.
create
(
mediaType
,
JSONObject
.
fromObject
(
uploadChapterBehaviorDTO
).
toString
());
RequestBody
body
=
RequestBody
.
create
(
mediaType
,
JSONObject
.
fromObject
(
uploadChapterBehaviorDTO
).
toString
());
Request
request
=
new
Request
.
Builder
()
Request
request
=
new
Request
.
Builder
()
.
url
(
PREFIX_URL
+
"/examinformation/insertExamInformation"
)
.
url
(
renSheConfig
.
getPutuo
()
+
"/examinformation/insertExamInformation"
)
.
method
(
"POST"
,
body
)
.
method
(
"POST"
,
body
)
.
addHeader
(
"User-Agent"
,
"Apifox/1.0.0 (https://www.apifox.cn)"
)
.
addHeader
(
"User-Agent"
,
"Apifox/1.0.0 (https://www.apifox.cn)"
)
.
addHeader
(
"Content-Type"
,
"application/json"
)
.
addHeader
(
"Content-Type"
,
"application/json"
)
...
@@ -459,7 +481,7 @@ public class DudaoServiceImpl implements DudaoService {
...
@@ -459,7 +481,7 @@ public class DudaoServiceImpl implements DudaoService {
System
.
out
.
println
(
com
.
alibaba
.
fastjson
.
JSONObject
.
toJSONString
(
uploadClassAnswerQuestionBehaviorDTO
));
System
.
out
.
println
(
com
.
alibaba
.
fastjson
.
JSONObject
.
toJSONString
(
uploadClassAnswerQuestionBehaviorDTO
));
RequestBody
body
=
RequestBody
.
create
(
mediaType
,
JSONObject
.
fromObject
(
uploadClassAnswerQuestionBehaviorDTO
).
toString
());
RequestBody
body
=
RequestBody
.
create
(
mediaType
,
JSONObject
.
fromObject
(
uploadClassAnswerQuestionBehaviorDTO
).
toString
());
Request
request
=
new
Request
.
Builder
()
Request
request
=
new
Request
.
Builder
()
.
url
(
PREFIX_URL
+
"/answertutor/insertAnswerTutor"
)
.
url
(
renSheConfig
.
getPutuo
()
+
"/answertutor/insertAnswerTutor"
)
.
method
(
"POST"
,
body
)
.
method
(
"POST"
,
body
)
.
addHeader
(
"User-Agent"
,
"Apifox/1.0.0 (https://www.apifox.cn)"
)
.
addHeader
(
"User-Agent"
,
"Apifox/1.0.0 (https://www.apifox.cn)"
)
.
addHeader
(
"Content-Type"
,
"application/json"
)
.
addHeader
(
"Content-Type"
,
"application/json"
)
...
@@ -527,7 +549,7 @@ public class DudaoServiceImpl implements DudaoService {
...
@@ -527,7 +549,7 @@ public class DudaoServiceImpl implements DudaoService {
try
{
try
{
RequestBody
body
=
RequestBody
.
create
(
mediaType
,
JSONObject
.
fromObject
(
uploadClassCodeDTO
).
toString
());
RequestBody
body
=
RequestBody
.
create
(
mediaType
,
JSONObject
.
fromObject
(
uploadClassCodeDTO
).
toString
());
Request
request
=
new
Request
.
Builder
()
Request
request
=
new
Request
.
Builder
()
.
url
(
PREFIX_URL
+
"/bindclass/insertBindClass"
)
.
url
(
renSheConfig
.
getPutuo
()
+
"/bindclass/insertBindClass"
)
.
method
(
"POST"
,
body
)
.
method
(
"POST"
,
body
)
.
addHeader
(
"User-Agent"
,
"Apifox/1.0.0 (https://www.apifox.cn)"
)
.
addHeader
(
"User-Agent"
,
"Apifox/1.0.0 (https://www.apifox.cn)"
)
.
addHeader
(
"Content-Type"
,
"application/json"
)
.
addHeader
(
"Content-Type"
,
"application/json"
)
...
...
src/main/java/com/subsidy/service/impl/RenSheJuServiceImpl.java
View file @
6be77ec
...
@@ -18,7 +18,6 @@ import okhttp3.*;
...
@@ -18,7 +18,6 @@ import okhttp3.*;
import
org.springframework.beans.BeanUtils
;
import
org.springframework.beans.BeanUtils
;
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
java.io.IOException
;
import
java.io.IOException
;
import
java.sql.Timestamp
;
import
java.sql.Timestamp
;
...
...
src/main/java/com/subsidy/util/ExcelFormatUtils.java
View file @
6be77ec
...
@@ -10,7 +10,7 @@ public class ExcelFormatUtils {
...
@@ -10,7 +10,7 @@ public class ExcelFormatUtils {
public
static
final
List
<
String
>
signList
=
Arrays
.
asList
(
"序号"
,
"成员名称"
,
"身份证号"
,
"联系方式"
,
"签到次数"
,
"签到时间"
,
"最近签到ip地址"
,
"最近签到设备型号"
);
public
static
final
List
<
String
>
signList
=
Arrays
.
asList
(
"序号"
,
"成员名称"
,
"身份证号"
,
"联系方式"
,
"签到次数"
,
"签到时间"
,
"最近签到ip地址"
,
"最近签到设备型号"
);
public
static
final
List
<
String
>
scoreList
=
Arrays
.
asList
(
"序号"
,
"成员名称"
,
"身份证号码"
,
"联系方式"
,
"测试成绩"
,
"测试次数"
,
"开始时间"
,
"结束时间"
,
"总评价"
);
public
static
final
List
<
String
>
scoreList
=
Arrays
.
asList
(
"序号"
,
"成员名称"
,
"身份证号码"
,
"联系方式"
,
"测试成绩"
,
"测试次数"
,
"开始时间"
,
"结束时间"
,
"测评时间"
,
"总评价"
);
public
static
final
List
<
String
>
answersList
=
Arrays
.
asList
(
"序号"
,
"提问"
,
"答疑"
,
"提问时间"
,
"提问成员"
,
"答疑时间"
);
public
static
final
List
<
String
>
answersList
=
Arrays
.
asList
(
"序号"
,
"提问"
,
"答疑"
,
"提问时间"
,
"提问成员"
,
"答疑时间"
);
...
...
src/main/java/com/subsidy/util/excel/ExcelUtil.java
View file @
6be77ec
...
@@ -940,7 +940,7 @@ public class ExcelUtil {
...
@@ -940,7 +940,7 @@ public class ExcelUtil {
sheet
.
addMergedRegion
(
cellRangeAddress21
);
sheet
.
addMergedRegion
(
cellRangeAddress21
);
setBorderStyle
(
HSSFCellStyle
.
BORDER_THIN
,
cellRangeAddress21
,
sheet
,
workbook
);
//给合并过的单元格加边框
setBorderStyle
(
HSSFCellStyle
.
BORDER_THIN
,
cellRangeAddress21
,
sheet
,
workbook
);
//给合并过的单元格加边框
CellRangeAddress
cellRangeAddress22
=
new
CellRangeAddress
(
1
,
1
,
4
,
6
);
CellRangeAddress
cellRangeAddress22
=
new
CellRangeAddress
(
1
,
1
,
4
,
9
);
sheet
.
addMergedRegion
(
cellRangeAddress22
);
sheet
.
addMergedRegion
(
cellRangeAddress22
);
setBorderStyle
(
HSSFCellStyle
.
BORDER_THIN
,
cellRangeAddress22
,
sheet
,
workbook
);
//给合并过的单元格加边框
setBorderStyle
(
HSSFCellStyle
.
BORDER_THIN
,
cellRangeAddress22
,
sheet
,
workbook
);
//给合并过的单元格加边框
...
@@ -952,11 +952,11 @@ public class ExcelUtil {
...
@@ -952,11 +952,11 @@ public class ExcelUtil {
//第三行 2
//第三行 2
SXSSFRow
thirdRow
=
sheet
.
createRow
(
2
);
//第二行 rowIndex =1
SXSSFRow
thirdRow
=
sheet
.
createRow
(
2
);
//第二行 rowIndex =1
CellRangeAddress
cellRangeAddress31
=
new
CellRangeAddress
(
2
,
2
,
0
,
4
);
CellRangeAddress
cellRangeAddress31
=
new
CellRangeAddress
(
2
,
2
,
0
,
3
);
sheet
.
addMergedRegion
(
cellRangeAddress31
);
sheet
.
addMergedRegion
(
cellRangeAddress31
);
setBorderStyle
(
HSSFCellStyle
.
BORDER_THIN
,
cellRangeAddress31
,
sheet
,
workbook
);
//给合并过的单元格加边框
setBorderStyle
(
HSSFCellStyle
.
BORDER_THIN
,
cellRangeAddress31
,
sheet
,
workbook
);
//给合并过的单元格加边框
CellRangeAddress
cellRangeAddress32
=
new
CellRangeAddress
(
2
,
2
,
5
,
8
);
CellRangeAddress
cellRangeAddress32
=
new
CellRangeAddress
(
2
,
2
,
4
,
9
);
sheet
.
addMergedRegion
(
cellRangeAddress32
);
sheet
.
addMergedRegion
(
cellRangeAddress32
);
setBorderStyle
(
HSSFCellStyle
.
BORDER_THIN
,
cellRangeAddress32
,
sheet
,
workbook
);
//给合并过的单元格加边框
setBorderStyle
(
HSSFCellStyle
.
BORDER_THIN
,
cellRangeAddress32
,
sheet
,
workbook
);
//给合并过的单元格加边框
thirdRow
.
createCell
(
0
).
setCellValue
(
thirdHead
[
0
]);
thirdRow
.
createCell
(
0
).
setCellValue
(
thirdHead
[
0
]);
...
@@ -1035,6 +1035,10 @@ public class ExcelUtil {
...
@@ -1035,6 +1035,10 @@ public class ExcelUtil {
newCell
=
dataRow
.
createCell
(
8
);
newCell
=
dataRow
.
createCell
(
8
);
newCell
.
setCellStyle
(
cellStyle
);
newCell
.
setCellStyle
(
cellStyle
);
newCell
.
setCellValue
(
exerciseTestVO
.
getPeriod
());
newCell
=
dataRow
.
createCell
(
9
);
newCell
.
setCellStyle
(
cellStyle
);
if
(
exerciseTestVO
.
getScore
()
>=
60
)
{
if
(
exerciseTestVO
.
getScore
()
>=
60
)
{
newCell
.
setCellValue
(
"合格"
);
newCell
.
setCellValue
(
"合格"
);
}
else
{
}
else
{
...
...
src/main/java/com/subsidy/util/websocket/WebSocketUtil.java
View file @
6be77ec
...
@@ -46,6 +46,7 @@ public class WebSocketUtil implements WebSocketHandler {
...
@@ -46,6 +46,7 @@ public class WebSocketUtil implements WebSocketHandler {
private
int
reconnectionSeconds
=
30
;
//每次断连间隔重新连接秒
private
int
reconnectionSeconds
=
30
;
//每次断连间隔重新连接秒
/**
/**
selfExport
* 存放建立连接webSocket对象 Map<memberId,session>
* 存放建立连接webSocket对象 Map<memberId,session>
*/
*/
public
static
ConcurrentHashMap
<
Long
,
WebSocketSession
>
webSocketMap
=
new
ConcurrentHashMap
();
public
static
ConcurrentHashMap
<
Long
,
WebSocketSession
>
webSocketMap
=
new
ConcurrentHashMap
();
...
...
src/main/java/com/subsidy/vo/administer/ExerciseTestVO.java
View file @
6be77ec
...
@@ -32,6 +32,8 @@ public class ExerciseTestVO {
...
@@ -32,6 +32,8 @@ public class ExerciseTestVO {
private
String
endDate
;
private
String
endDate
;
private
String
period
;
private
String
companyName
;
private
String
companyName
;
}
}
src/main/java/com/subsidy/vo/done/TestScoreInfoVO.java
View file @
6be77ec
...
@@ -16,4 +16,6 @@ public class TestScoreInfoVO {
...
@@ -16,4 +16,6 @@ public class TestScoreInfoVO {
private
String
startDate
;
private
String
startDate
;
private
String
endDate
;
private
String
endDate
;
private
Integer
diff
;
}
}
src/main/resources/application-dev.properties
View file @
6be77ec
...
@@ -57,4 +57,5 @@ qxueyou.securityKey=626737T1-65K0-5xC2-0Y0V-2Aq95qxy
...
@@ -57,4 +57,5 @@ qxueyou.securityKey=626737T1-65K0-5xC2-0Y0V-2Aq95qxy
qxueyou.url
=
https://dev.qxueyou.com/auth/user/token
qxueyou.url
=
https://dev.qxueyou.com/auth/user/token
renshe.url
=
https://test.shzypxy.com
renshe.url
=
https://test.shzypxy.com
renshe.secretKey
=
ad927f0b-6a39-43a7-bac7-163baef1fff7
renshe.secretKey
=
ad927f0b-6a39-43a7-bac7-163baef1fff7
\ No newline at end of file
renshe.putuo
=
http://180.167.195.117:18015/ddproject
\ No newline at end of file
src/main/resources/application-prod.properties
View file @
6be77ec
...
@@ -49,4 +49,5 @@ qxueyou.url=https://www.qxueyou.com/auth/user/token
...
@@ -49,4 +49,5 @@ qxueyou.url=https://www.qxueyou.com/auth/user/token
renshe.url
=
https://api.shzypxy.com
renshe.url
=
https://api.shzypxy.com
#renshe.url = http://trial.shzypxy.com/api
#renshe.url = http://trial.shzypxy.com/api
renshe.secretKey
=
ad927f0b-6a39-43a7-bac7-163baef1fff7
renshe.secretKey
=
ad927f0b-6a39-43a7-bac7-163baef1fff7
\ No newline at end of file
renshe.putuo
=
http://180.167.195.117:18025/ddproject
\ No newline at end of file
src/main/resources/application.properties
View file @
6be77ec
# 环境配置
# 环境配置
spring.profiles.active
=
prod
spring.profiles.active
=
dev
#和CPU数
#和CPU数
spring.server.acceptorThreadCount
=
600
spring.server.acceptorThreadCount
=
600
spring.server.minSpareThreads
=
100
spring.server.minSpareThreads
=
100
...
...
src/main/resources/mapper/CourseContentMapper.xml
View file @
6be77ec
...
@@ -45,75 +45,76 @@
...
@@ -45,75 +45,76 @@
<select
id=
"contentVodProcess"
resultType=
"com.subsidy.vo.member.MemberVodVO"
>
<select
id=
"contentVodProcess"
resultType=
"com.subsidy.vo.member.MemberVodVO"
>
SELECT
SELECT
t3.id,
t3.id,
t3.vod_url,
t3.vod_url,
t3.
vod_name,
t3.vod_alias_name as
vod_name,
t3.vod_type,
t3.vod_type,
t3.vod_length,
t3.vod_length,
t3.play_record,
t3.play_record,
if(t3.vod_length - t3.sumPlay > 0, TRUNCATE(t3.vod_length - t3.sumPlay,0), 0 ) AS leftLength,
if(t3.vod_length - t3.sumPlay > 0, TRUNCATE(t3.vod_length - t3.sumPlay,0), 0 ) AS leftLength,
if(TRUNCATE( t3.sumPlay * 100 / t3.vod_length,2)
<
100,TRUNCATE( t3.sumPlay * 100 / t3.vod_length, 2),100) AS percent
if(TRUNCATE( t3.sumPlay * 100 / t3.vod_length,2)
<
100,TRUNCATE( t3.sumPlay * 100 / t3.vod_length, 2),100) AS percent
FROM
FROM
(
(
SELECT
SELECT
t.id,
t.id,
t.vod_url,
t.vod_url,
t.vod_name,
cvm.vod_alias_name,
t.vod_type,
t.vod_type,
t.vod_length,
t.vod_length,
t.order_no,
cvm.order_no as or1,
ifnull( t2.sumPlay, 0 ) AS sumPlay,
t.order_no as or2,
t4.play_record
ifnull( t2.sumPlay, 0 ) AS sumPlay,
FROM
t4.play_record
vod_dict t
FROM
LEFT JOIN content_vod_mapping cvm ON cvm.vod_id = t.id
vod_dict t
LEFT JOIN (
LEFT JOIN content_vod_mapping cvm ON cvm.vod_id = t.id
SELECT
LEFT JOIN (
t.vod_id,
SELECT
t.member_id,
t.vod_id,
sum( t.play_length ) AS sumPlay
t.member_id,
FROM
sum( t.play_length ) AS sumPlay
vod_play_history t
FROM
WHERE
vod_play_history t
t.delete_date IS NULL
WHERE
AND t.member_id = #{memberId}
t.delete_date IS NULL
AND t.class_id = #{classId}
AND t.member_id = #{memberId}
GROUP BY
AND t.class_id = #{classId}
t.vod_id,
GROUP BY
t.member_id,
t.vod_id,
t.class_id
t.member_id,
) t2 ON t.id = t2.vod_id
t.class_id
LEFT JOIN (
) t2 ON t.id = t2.vod_id
SELECT
LEFT JOIN (
t.member_id,
SELECT
t.vod_id,
t.member_id,
t2.play_record
t.vod_id,
FROM
t2.play_record
(
FROM
SELECT
(
t.member_id,
SELECT
t.vod_id,
t.member_id,
max( t.id ) AS id
t.vod_id,
FROM
max( t.id ) AS id
vod_play_history t
FROM
WHERE
vod_play_history t
t.delete_date IS NULL
WHERE
AND t.member_id = #{memberId}
t.delete_date IS NULL
and t.class_id = #{classId}
AND t.member_id = #{memberId}
GROUP BY
and t.class_id = #{classId}
t.member_id,
GROUP BY
t.vod_id,
t.member_id,
t.class_id
t.vod_id,
) t
t.class_id
LEFT JOIN vod_play_history t2 ON t.id = t2.id
) t
) t4 ON t2.vod_id = t4.vod_id
LEFT JOIN vod_play_history t2 ON t.id = t2.id
WHERE
) t4 ON t2.vod_id = t4.vod_id
t.delete_date IS NULL
WHERE
AND cvm.delete_date IS NULL
t.delete_date IS NULL
and cvm.content_id = #{contentId}
AND cvm.delete_date IS NULL
) t3
and cvm.content_id = #{contentId}
) t3
ORDER BY
ORDER BY
t3.order_no
t3.or1,t3.or2
</select>
</select>
<select
id=
"contentFiles"
parameterType=
"long"
resultType=
"com.subsidy.model.FileDictDO"
>
<select
id=
"contentFiles"
parameterType=
"long"
resultType=
"com.subsidy.model.FileDictDO"
>
...
...
src/main/resources/mapper/ExerciseDoneResultMapper.xml
View file @
6be77ec
...
@@ -125,7 +125,8 @@
...
@@ -125,7 +125,8 @@
t1.result,
t1.result,
t2.cnt,
t2.cnt,
t1.startDate,
t1.startDate,
t1.endDate
t1.endDate,
t1.diff
FROM
FROM
(
(
SELECT
SELECT
...
@@ -136,7 +137,8 @@
...
@@ -136,7 +137,8 @@
IF
IF
( ( t.score )>= 60, '合格', '不合格' ) AS result,
( ( t.score )>= 60, '合格', '不合格' ) AS result,
t.start_date startDate,
t.start_date startDate,
t.create_date as endDate
t.create_date as endDate,
TIMESTAMPDIFF( SECOND, t.start_date, t.create_date ) AS diff
FROM
FROM
exercise_done_result t
exercise_done_result t
LEFT JOIN paper_dict t2 ON t.paper_id = t2.id
LEFT JOIN paper_dict t2 ON t.paper_id = t2.id
...
...
src/main/resources/mapper/RenSheJuMapper.xml
View file @
6be77ec
...
@@ -130,7 +130,7 @@
...
@@ -130,7 +130,7 @@
FROM
FROM
opr_mem_dict t1
opr_mem_dict t1
WHERE
WHERE
DATE_FORMAT( DATE_ADD( t1.create_date,
INTERVAL 1 DAY
), '%Y-%m-%d' ) = DATE_FORMAT( NOW(), '%Y-%m-%d' )
DATE_FORMAT( DATE_ADD( t1.create_date,
interval 1 day
), '%Y-%m-%d' ) = DATE_FORMAT( NOW(), '%Y-%m-%d' )
AND t1.delete_date IS NULL
AND t1.delete_date IS NULL
AND opr_type = "登出"
AND opr_type = "登出"
AND result = 1
AND result = 1
...
@@ -146,7 +146,7 @@
...
@@ -146,7 +146,7 @@
FROM
FROM
opr_mem_dict t1
opr_mem_dict t1
WHERE
WHERE
DATE_FORMAT( DATE_ADD( t1.create_date,
INTERVAL 1 DAY
), '%Y-%m-%d' ) = DATE_FORMAT( NOW(), '%Y-%m-%d' )
DATE_FORMAT( DATE_ADD( t1.create_date,
interval 1 day
), '%Y-%m-%d' ) = DATE_FORMAT( NOW(), '%Y-%m-%d' )
AND t1.delete_date IS NULL
AND t1.delete_date IS NULL
AND opr_type = "登录"
AND opr_type = "登录"
AND result = 1
AND result = 1
...
@@ -164,8 +164,9 @@
...
@@ -164,8 +164,9 @@
FROM
FROM
vod_play_history t1
vod_play_history t1
WHERE
WHERE
DATE_FORMAT( DATE_ADD( t1.create_date,
INTERVAL 1 DAY
), '%Y-%m-%d' ) = DATE_FORMAT( NOW(), '%Y-%m-%d' )
DATE_FORMAT( DATE_ADD( t1.create_date,
interval 1 day
), '%Y-%m-%d' ) = DATE_FORMAT( NOW(), '%Y-%m-%d' )
AND t1.delete_date IS NULL
AND t1.delete_date IS NULL
AND t1.class_id = #{classId}
GROUP BY
GROUP BY
t1.class_id,
t1.class_id,
t1.member_id
t1.member_id
...
...
Write
Preview
Markdown
is supported
Attach a file
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to post a comment