Commit 51669d17 by Suvalue

table log记录

疾病排序
parent 15158aee
...@@ -2,9 +2,12 @@ package com.bsoft.api.controller; ...@@ -2,9 +2,12 @@ package com.bsoft.api.controller;
import com.bsoft.api.common.Result; import com.bsoft.api.common.Result;
import com.bsoft.api.common.annotations.Token; import com.bsoft.api.common.annotations.Token;
import com.bsoft.api.common.handlers.GlobalExceptionHandler;
import com.bsoft.api.service.ExcelService; import com.bsoft.api.service.ExcelService;
import io.swagger.annotations.Api; import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation; import io.swagger.annotations.ApiOperation;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody; import org.springframework.web.bind.annotation.RequestBody;
...@@ -16,6 +19,7 @@ import javax.servlet.http.HttpServletRequest; ...@@ -16,6 +19,7 @@ import javax.servlet.http.HttpServletRequest;
@RestController @RestController
public class ExcelController { public class ExcelController {
static final Logger log = LoggerFactory.getLogger(GlobalExceptionHandler.class);
@Autowired @Autowired
private ExcelService excelService; private ExcelService excelService;
...@@ -23,8 +27,9 @@ public class ExcelController { ...@@ -23,8 +27,9 @@ public class ExcelController {
@Token @Token
@ApiOperation("将Table转换为Xls") @ApiOperation("将Table转换为Xls")
public Object tableToXls(HttpServletRequest request,@RequestBody String tableStr){ public Object tableToXls(HttpServletRequest request,@RequestBody String tableStr){
log.info("table参数:"+tableStr);
String realPath = request.getSession().getServletContext().getRealPath("/"); String realPath = request.getSession().getServletContext().getRealPath("/");
System.out.println(realPath);
String fileUrl =excelService.tableToXls(realPath,tableStr); String fileUrl =excelService.tableToXls(realPath,tableStr);
return Result.success(fileUrl); return Result.success(fileUrl);
} }
......
...@@ -13,13 +13,13 @@ import org.springframework.web.bind.annotation.PostMapping; ...@@ -13,13 +13,13 @@ import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody; import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RestController; import org.springframework.web.bind.annotation.RestController;
import java.util.ArrayList;
import java.util.List; import java.util.List;
@Api(tags = "疾病信息Api") @Api(tags = "疾病信息Api")
@RestController @RestController
public class SerDiseaseController { public class SerDiseaseController {
private final static Object obj = new Object();
@Autowired @Autowired
private SerDiseaseService serDiseaseService; private SerDiseaseService serDiseaseService;
/** /**
......
...@@ -93,4 +93,5 @@ public class SerDisease { ...@@ -93,4 +93,5 @@ public class SerDisease {
public void setOrgName(String orgName) { public void setOrgName(String orgName) {
this.orgName = orgName; this.orgName = orgName;
} }
} }
\ No newline at end of file
...@@ -70,6 +70,7 @@ public class Disease { ...@@ -70,6 +70,7 @@ public class Disease {
public static class DiseaseName { public static class DiseaseName {
@ApiModelProperty(value = "时间",required = true) @ApiModelProperty(value = "时间",required = true)
@NotNull(message = "date 参数必传")
private String date; private String date;
@ApiModelProperty("疾病名称") @ApiModelProperty("疾病名称")
private String mdcName; private String mdcName;
......
...@@ -7,7 +7,6 @@ import org.springframework.scheduling.annotation.Async; ...@@ -7,7 +7,6 @@ import org.springframework.scheduling.annotation.Async;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import javax.annotation.Resource; import javax.annotation.Resource;
import java.util.HashMap;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
import java.util.concurrent.CountDownLatch; import java.util.concurrent.CountDownLatch;
...@@ -46,14 +45,12 @@ public class AsynBlockValuesServiceImpl implements AsynBlockValuesService { ...@@ -46,14 +45,12 @@ public class AsynBlockValuesServiceImpl implements AsynBlockValuesService {
@Override @Override
public void getBlockValuesNew(List<BlockValue> list, Long blockId, Map<String,String> whereClause, CountDownLatch latch) { public void getBlockValuesNew(List<BlockValue> list, Long blockId, Map<String,String> whereClause, CountDownLatch latch) {
try{ try{
System.out.println("开始"+ whereClause.get("tableName"));
List<Map<String,Object>> dataList = blockValuesMapper.selectByWhereNew(whereClause); List<Map<String,Object>> dataList = blockValuesMapper.selectByWhereNew(whereClause);
log.info("开始查询"+whereClause.get("tableName")+",数据条数:"+dataList.size()+",查询条件:"+whereClause);
BlockValue blockValue = new BlockValue(blockId, dataList); BlockValue blockValue = new BlockValue(blockId, dataList);
synchronized (obj){ synchronized (obj){
list.add(blockValue); list.add(blockValue);
} }
System.out.println("结束"+ whereClause.get("tableName"));
}catch (Exception e){ }catch (Exception e){
log.error(e.getMessage(), e); log.error(e.getMessage(), e);
}finally { }finally {
......
...@@ -107,6 +107,7 @@ ...@@ -107,6 +107,7 @@
<if test="deptCode!=null"> <if test="deptCode!=null">
and rs.DEPT_CODE=#{deptCode,jdbcType=VARCHAR} and rs.DEPT_CODE=#{deptCode,jdbcType=VARCHAR}
</if> </if>
order by d.MDC_NUM
</select> </select>
<select id="selectByParentId" resultMap="DiseaseLevel"> <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, 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 @@ ...@@ -125,6 +126,7 @@
<if test="deptCode!=null"> <if test="deptCode!=null">
and rs.DEPT_CODE=#{deptCode,jdbcType=VARCHAR} and rs.DEPT_CODE=#{deptCode,jdbcType=VARCHAR}
</if> </if>
order by d.MDC_NUM
</select> </select>
<select id="selectParentById" resultMap="DiseaseLevel"> <select id="selectParentById" resultMap="DiseaseLevel">
select * select *
...@@ -154,5 +156,6 @@ ...@@ -154,5 +156,6 @@
<if test="deptCode!=null"> <if test="deptCode!=null">
and rs.DEPT_CODE=#{deptCode,jdbcType=VARCHAR} and rs.DEPT_CODE=#{deptCode,jdbcType=VARCHAR}
</if> </if>
order by d.MDC_NUM
</select> </select>
</mapper> </mapper>
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment