Compare commits

..

No commits in common. "4764a89ccb9e1da9f9f2697b454b06966cd371ff" and "366e1ea1e17d9fedde89d12e74b8f238d5b2ef20" have entirely different histories.

5 changed files with 4 additions and 84 deletions

View File

@ -11,8 +11,6 @@ import java.net.URLEncoder;
import java.nio.charset.StandardCharsets;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.io.IOUtils;
import org.apache.commons.lang3.ArrayUtils;
import com.czlis.common.config.RuoYiConfig;
@ -30,37 +28,6 @@ public class FileUtils
{
public static String FILENAME_PATTERN = "[a-zA-Z0-9_\\-\\|\\.\\u4e00-\\u9fa5]+";
public static void writeBytes(HttpServletResponse response,String filePath, OutputStream os) throws IOException
{
FileInputStream fis = null;
try
{
File file = new File(filePath);
if (!file.exists())
{
throw new FileNotFoundException(filePath);
}
response.setHeader("Content-Length", String.valueOf(file.length()));
fis = new FileInputStream(file);
byte[] b = new byte[1024];
int length;
while ((length = fis.read(b)) > 0)
{
os.write(b, 0, length);
}
}
catch (IOException e)
{
throw e;
}
finally
{
IOUtils.close(os);
IOUtils.close(fis);
}
}
/**
* 输出指定文件的byte数组
*

View File

@ -55,7 +55,7 @@ public class CommonController {
response.setContentType(MediaType.APPLICATION_OCTET_STREAM_VALUE);
FileUtils.setAttachmentResponseHeader(response, realFileName);
FileUtils.writeBytes(response,filePath, response.getOutputStream());
FileUtils.writeBytes(filePath, response.getOutputStream());
if (delete) {
FileUtils.deleteFile(filePath);
}

View File

@ -27,7 +27,6 @@ public class Web_fs_printReport {
private String confirmer;
private String sqh;
private String bgdh;
private String bgdhTemp;
private String xmdh;
private String csjg;
private String refs;

View File

@ -24,7 +24,6 @@ import java.io.IOException;
import java.util.Collections;
import java.util.Date;
import java.util.List;
import java.util.stream.Collectors;
@Service
@Slf4j
@ -102,51 +101,8 @@ public class ZybgcxServcieImpl implements ZybgcxService {
@Override
public Result getFSResult(Web_fs_printReport webFsPrintReport) {
//List<Web_fs_printReport> webFsPrintReportList = zybgcxMapper.getFSResult(webFsPrintReport);
String bgdhTemp = "";
String yqdl = webFsPrintReport.getYqdl();
String brdh = webFsPrintReport.getBrdh();
List<Web_fs_printReport> fsResultList = zybgcxMapper.getFSResult(webFsPrintReport);
//查询这个仪器大类数据中包含这个项目的报告单号
List<Web_fs_printReport> webFsPrintReportCollect = fsResultList.stream().filter(webFsPrintReport1 -> webFsPrintReport1.getXmdh().equals(webFsPrintReport.getXmdh())).collect(Collectors.toList());
for (Web_fs_printReport web_fs_printReport : webFsPrintReportCollect) {
bgdhTemp = bgdhTemp + ",'" + web_fs_printReport.getBgdh() + "'";
}
if(bgdhTemp.length() > 0){
bgdhTemp = bgdhTemp.substring(1);
}
Web_fs_printReport webFsPrintReport1 = new Web_fs_printReport();
webFsPrintReport1.setYqdl(yqdl);
webFsPrintReport1.setBrdh(brdh);
webFsPrintReport1.setBgdhTemp(bgdhTemp);
List<Web_fs_printReport> fsResult = zybgcxMapper.getFSResult(webFsPrintReport1);
// for (Web_fs_printReport web_fs_printReport : fsResultList) {
// bgdhTemp = bgdhTemp + "," + web_fs_printReport.getBgdh();
// }
// if(bgdhTemp.length() > 0){
// bgdhTemp = bgdhTemp.substring(1);
// }
// Web_fs_printReport webFsPrintReport1 = new Web_fs_printReport();
// webFsPrintReport1.setYqdl(yqdl);
// webFsPrintReport1.setBrdh(brdh);
// if(webFsPrintReportList.size() > 0){
// String yqdl = webFsPrintReportList.get(0).getYqdl();
// Web_fs_printReport webFsPrintReport1 = new Web_fs_printReport();
// webFsPrintReport1.setBrdh(webFsPrintReportList.get(0).getBrdh());
// webFsPrintReport1.setYqdl(yqdl);
// List<Web_fs_printReport> fsResultList = zybgcxMapper.getFSResult(webFsPrintReport1);
// for (Web_fs_printReport web_fs_printReport : fsResultList) {
// bgdhTemp = bgdhTemp + "," + web_fs_printReport.getBgdh();
// }
// if(bgdhTemp.length() > 0){
// bgdhTemp = bgdhTemp.substring(1);
// }
// }
return new Result("0","获取数据成功!",fsResult);
List<Web_fs_printReport> webFsPrintReportList = zybgcxMapper.getFSResult(webFsPrintReport);
return new Result("0","获取数据成功!",webFsPrintReportList);
}

View File

@ -26,11 +26,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</select>
<select id="getFSResult" resultType="com.czlis.zybgcx.pojo.Web_fs_printReport">
select * from web_fs_printReport where brdh = #{brdh} and jyrq > getdate() - 90 and brlyname = '住院'
select * from web_fs_printReport where brdh = #{brdh}
<if test="xmdh != null and xmdh != ''"> and xmdh = #{xmdh}</if>
<if test="bgdh != null and bgdh != ''"> and bgdh = #{bgdh}</if>
<if test="yqdl != null and yqdl != ''"> and yqdl = #{yqdl}</if>
<if test="bgdhTemp != null and bgdhTemp != ''"> and bgdh in (${bgdhTemp})</if>
order by bgdh
</select>