Commit 51669d17 by Suvalue

table log记录

疾病排序
parent 15158aee
......@@ -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);
}
......
......@@ -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;
/**
......
......@@ -93,4 +93,5 @@ public class SerDisease {
public void setOrgName(String orgName) {
this.orgName = orgName;
}
}
\ No newline at end of file
......@@ -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;
......
......@@ -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 {
......
......@@ -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
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