Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
S
sv-springboot
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
bsoft
sv-springboot
Commits
51669d17
Commit
51669d17
authored
Nov 20, 2019
by
Suvalue
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
table log记录
疾病排序
parent
15158aee
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
15 additions
and
6 deletions
+15
-6
bsoft-api/src/main/java/com/bsoft/api/controller/ExcelController.java
+6
-1
bsoft-api/src/main/java/com/bsoft/api/controller/SerDiseaseController.java
+1
-1
bsoft-api/src/main/java/com/bsoft/api/model/SerDisease.java
+2
-0
bsoft-api/src/main/java/com/bsoft/api/model/reqmodel/Disease.java
+1
-0
bsoft-api/src/main/java/com/bsoft/api/service/Impl/AsynBlockValuesServiceImpl.java
+1
-4
bsoft-api/src/main/resources/mapper/SerDiseaseMapper.xml
+4
-0
No files found.
bsoft-api/src/main/java/com/bsoft/api/controller/ExcelController.java
View file @
51669d17
...
...
@@ -2,9 +2,12 @@ package com.bsoft.api.controller;
import
com.bsoft.api.common.Result
;
import
com.bsoft.api.common.annotations.Token
;
import
com.bsoft.api.common.handlers.GlobalExceptionHandler
;
import
com.bsoft.api.service.ExcelService
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.PostMapping
;
import
org.springframework.web.bind.annotation.RequestBody
;
...
...
@@ -16,6 +19,7 @@ import javax.servlet.http.HttpServletRequest;
@RestController
public
class
ExcelController
{
static
final
Logger
log
=
LoggerFactory
.
getLogger
(
GlobalExceptionHandler
.
class
);
@Autowired
private
ExcelService
excelService
;
...
...
@@ -23,8 +27,9 @@ public class ExcelController {
@Token
@ApiOperation
(
"将Table转换为Xls"
)
public
Object
tableToXls
(
HttpServletRequest
request
,
@RequestBody
String
tableStr
){
log
.
info
(
"table参数:"
+
tableStr
);
String
realPath
=
request
.
getSession
().
getServletContext
().
getRealPath
(
"/"
);
System
.
out
.
println
(
realPath
);
String
fileUrl
=
excelService
.
tableToXls
(
realPath
,
tableStr
);
return
Result
.
success
(
fileUrl
);
}
...
...
bsoft-api/src/main/java/com/bsoft/api/controller/SerDiseaseController.java
View file @
51669d17
...
...
@@ -13,13 +13,13 @@ import org.springframework.web.bind.annotation.PostMapping;
import
org.springframework.web.bind.annotation.RequestBody
;
import
org.springframework.web.bind.annotation.RestController
;
import
java.util.ArrayList
;
import
java.util.List
;
@Api
(
tags
=
"疾病信息Api"
)
@RestController
public
class
SerDiseaseController
{
private
final
static
Object
obj
=
new
Object
();
@Autowired
private
SerDiseaseService
serDiseaseService
;
/**
...
...
bsoft-api/src/main/java/com/bsoft/api/model/SerDisease.java
View file @
51669d17
...
...
@@ -93,4 +93,5 @@ public class SerDisease {
public
void
setOrgName
(
String
orgName
)
{
this
.
orgName
=
orgName
;
}
}
\ No newline at end of file
bsoft-api/src/main/java/com/bsoft/api/model/reqmodel/Disease.java
View file @
51669d17
...
...
@@ -70,6 +70,7 @@ public class Disease {
public
static
class
DiseaseName
{
@ApiModelProperty
(
value
=
"时间"
,
required
=
true
)
@NotNull
(
message
=
"date 参数必传"
)
private
String
date
;
@ApiModelProperty
(
"疾病名称"
)
private
String
mdcName
;
...
...
bsoft-api/src/main/java/com/bsoft/api/service/Impl/AsynBlockValuesServiceImpl.java
View file @
51669d17
...
...
@@ -7,7 +7,6 @@ import org.springframework.scheduling.annotation.Async;
import
org.springframework.stereotype.Service
;
import
javax.annotation.Resource
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.concurrent.CountDownLatch
;
...
...
@@ -46,14 +45,12 @@ public class AsynBlockValuesServiceImpl implements AsynBlockValuesService {
@Override
public
void
getBlockValuesNew
(
List
<
BlockValue
>
list
,
Long
blockId
,
Map
<
String
,
String
>
whereClause
,
CountDownLatch
latch
)
{
try
{
System
.
out
.
println
(
"开始"
+
whereClause
.
get
(
"tableName"
));
List
<
Map
<
String
,
Object
>>
dataList
=
blockValuesMapper
.
selectByWhereNew
(
whereClause
);
log
.
info
(
"开始查询"
+
whereClause
.
get
(
"tableName"
)+
",数据条数:"
+
dataList
.
size
()+
",查询条件:"
+
whereClause
);
BlockValue
blockValue
=
new
BlockValue
(
blockId
,
dataList
);
synchronized
(
obj
){
list
.
add
(
blockValue
);
}
System
.
out
.
println
(
"结束"
+
whereClause
.
get
(
"tableName"
));
}
catch
(
Exception
e
){
log
.
error
(
e
.
getMessage
(),
e
);
}
finally
{
...
...
bsoft-api/src/main/resources/mapper/SerDiseaseMapper.xml
View file @
51669d17
...
...
@@ -107,6 +107,7 @@
<if
test=
"deptCode!=null"
>
and rs.DEPT_CODE=#{deptCode,jdbcType=VARCHAR}
</if>
order by d.MDC_NUM
</select>
<select
id=
"selectByParentId"
resultMap=
"DiseaseLevel"
>
select DISTINCT d.ID, d.CREATE_DATE, d.CREATE_USERID, d.STATE, d.MDC_CODE, d.MDC_NAME, d."DATE",d.MDC_NUM,
...
...
@@ -125,6 +126,7 @@
<if
test=
"deptCode!=null"
>
and rs.DEPT_CODE=#{deptCode,jdbcType=VARCHAR}
</if>
order by d.MDC_NUM
</select>
<select
id=
"selectParentById"
resultMap=
"DiseaseLevel"
>
select *
...
...
@@ -154,5 +156,6 @@
<if
test=
"deptCode!=null"
>
and rs.DEPT_CODE=#{deptCode,jdbcType=VARCHAR}
</if>
order by d.MDC_NUM
</select>
</mapper>
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
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 comment