Commit def67647 authored by 竹天卫's avatar 竹天卫

检测报告 优化

parent 7d9c3fe8
...@@ -4,11 +4,11 @@ import cn.hutool.core.bean.BeanUtil; ...@@ -4,11 +4,11 @@ import cn.hutool.core.bean.BeanUtil;
import cn.hutool.core.date.DateUtil; import cn.hutool.core.date.DateUtil;
import cn.hutool.core.util.StrUtil; import cn.hutool.core.util.StrUtil;
import cn.wise.sc.cement.business.entity.EntityEnclosure; import cn.wise.sc.cement.business.entity.EntityEnclosure;
import cn.wise.sc.cement.business.entity.Sample;
import cn.wise.sc.cement.business.model.*; import cn.wise.sc.cement.business.model.*;
import cn.wise.sc.cement.business.enumation.FileExt; import cn.wise.sc.cement.business.enumation.FileExt;
import cn.wise.sc.cement.business.model.query.SampleHandleEnclosureQuery; import cn.wise.sc.cement.business.model.query.SampleHandleEnclosureQuery;
import cn.wise.sc.cement.business.model.vo.EntrustVo; import cn.wise.sc.cement.business.model.vo.EntrustVo;
import cn.wise.sc.cement.business.model.vo.TenElementReport;
import cn.wise.sc.cement.business.service.IEntityEnclosureService; import cn.wise.sc.cement.business.service.IEntityEnclosureService;
import cn.wise.sc.cement.business.service.IEntrustService; import cn.wise.sc.cement.business.service.IEntrustService;
import cn.wise.sc.cement.business.util.WordUtil; import cn.wise.sc.cement.business.util.WordUtil;
...@@ -21,7 +21,6 @@ import io.swagger.annotations.ApiOperation; ...@@ -21,7 +21,6 @@ import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.util.Assert; import org.springframework.util.Assert;
import org.springframework.util.StringUtils;
import org.springframework.web.bind.annotation.CrossOrigin; import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable; import org.springframework.web.bind.annotation.PathVariable;
...@@ -34,7 +33,6 @@ import javax.servlet.http.HttpServletResponse; ...@@ -34,7 +33,6 @@ import javax.servlet.http.HttpServletResponse;
import java.io.IOException; import java.io.IOException;
import java.time.LocalDateTime; import java.time.LocalDateTime;
import java.util.*; import java.util.*;
import java.util.stream.Collectors;
/** /**
* @description: 报告管理 * @description: 报告管理
...@@ -106,15 +104,20 @@ public class ReportController { ...@@ -106,15 +104,20 @@ public class ReportController {
//十元素1导出 //十元素1导出
List<TenElementReport> list1 = iEntrustService.getTen1List(entrustId); List<TenElementReport> list1 = iEntrustService.getTen1List(entrustId);
beanParams.put("list1", list1); beanParams.put("list1", list1);
//工艺性能
//物理性能
//颗粒分析
//煤的工业分析
List<IndustrialReport> list3 = iEntrustService.getIndustrialList(entrustId);
beanParams.put("list3", list3);
//事项-----不用处理
//十元素2导出 //十元素2导出
List<TenElementReport> list2 = iEntrustService.getTen2List(entrustId); List<TenElementReport> list2 = iEntrustService.getTen2List(entrustId);
beanParams.put("list2", list2); beanParams.put("list2", list2);
//品质-----不用处理
//化学工业导出
List<IndustrialReport> list3 = iEntrustService.getSampleIndustrialCheck(entrustId);
beanParams.put("list3", list3);
WordUtil.writeWordReport(rts.getProjectName() + "(报告)", "report_new.ftl", WordUtil.writeWordReport(rts.getProjectName() + "(报告)", "report_new.ftl",
beanParams, response, FileExt.EXCL); beanParams, response, FileExt.EXCL);
......
...@@ -6,8 +6,8 @@ import java.util.Date; ...@@ -6,8 +6,8 @@ import java.util.Date;
/** /**
* @description: 委托报告 * @description: 委托报告
* @author: qh * @author: ztw
* @create: 2020-09-25 20:36 * @create: 2021-3-19
**/ **/
@Data @Data
public class EntrustReport { public class EntrustReport {
......
...@@ -2,7 +2,7 @@ package cn.wise.sc.cement.business.mapper; ...@@ -2,7 +2,7 @@ package cn.wise.sc.cement.business.mapper;
import cn.wise.sc.cement.business.entity.SampleCheck; import cn.wise.sc.cement.business.entity.SampleCheck;
import cn.wise.sc.cement.business.model.IndustrialReport; import cn.wise.sc.cement.business.model.IndustrialReport;
import cn.wise.sc.cement.business.model.TenElementReport; import cn.wise.sc.cement.business.model.ElementReport;
import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Param; import org.apache.ibatis.annotations.Param;
...@@ -20,12 +20,12 @@ import java.util.Set; ...@@ -20,12 +20,12 @@ import java.util.Set;
public interface SampleCheckMapper extends BaseMapper<SampleCheck> { public interface SampleCheckMapper extends BaseMapper<SampleCheck> {
/** /**
* 获取样品十元素1检测结果 * 获取样品检测结果
* *
* @param entrustId 项目id * @param entrustId 项目id
* @return SixElementReport * @return SixElementReport
*/ */
List<TenElementReport> getSampleElementCheck(@Param("entrustId") Integer entrustId, @Param("teamNames") Set<String> teamNames); List<ElementReport> getSampleElementCheck(@Param("entrustId") Integer entrustId, @Param("teamNames") Set<String> teamNames);
/** /**
* 获取样品工业检测结果 * 获取样品工业检测结果
......
...@@ -330,20 +330,6 @@ ...@@ -330,20 +330,6 @@
</where> </where>
</sql> </sql>
<!-- <select id="getReportDetail" resultType="cn.wise.sc.cement.business.entity.EntrustReport">
SELECT e.id,e.project_name,e.send_name,e.client_id,e.entrust_code,e.project_type,sscct.* FROM entrust e
RIGHT JOIN
(SELECT id,entrust_id,team_ids,method_numbers,name,scct.check_id,
scct.equipment_name,scct.user_id,create_time as send_time,scct.equipment_id FROM sample s
RIGHT JOIN
(SELECT check_id,equipment_name,sample_id,user_id,equipment_id FROM sample_check_team sct
RIGHT JOIN
(SELECT entrust_id,id FROM sample_check WHERE entrust_id = #{entrustId}) sc
ON sct.check_id = sc.id ) scct
ON s.id = scct.sample_id) sscct
ON sscct.entrust_id = e.id
WHERE e.id IS NOT NULL
</select>-->
<select id="getReportDetail" resultType="cn.wise.sc.cement.business.entity.EntrustReport"> <select id="getReportDetail" resultType="cn.wise.sc.cement.business.entity.EntrustReport">
SELECT e.id,e.project_name,e.send_name,e.client_id,e.entrust_code,e.project_type,s_tab.* SELECT e.id,e.project_name,e.send_name,e.client_id,e.entrust_code,e.project_type,s_tab.*
...@@ -356,7 +342,7 @@ ...@@ -356,7 +342,7 @@
RIGHT JOIN( RIGHT JOIN(
SELECT sd.id,sd.check_id,sd.sample_id,sd.user_id, SELECT sd.id,sd.check_id,sd.sample_id,sd.user_id,
sde.equipment_id,sde.equipment_name FROM sample_distribution sd sde.equipment_id,sde.equipment_name FROM sample_distribution sd
left JOIN sample_distribution_equipment sde ON sde.distribution_id = sd.id where sd.entrust_id = 90 left JOIN sample_distribution_equipment sde ON sde.distribution_id = sd.id where sd.entrust_id = #{entrustId}
)sd_tab )sd_tab
ON s.id = sd_tab.sample_id ON s.id = sd_tab.sample_id
) s_tab ) s_tab
...@@ -381,8 +367,6 @@ ...@@ -381,8 +367,6 @@
<select id="getSampleReturnHandlePage" resultType="cn.wise.sc.cement.business.model.vo.SampleReturnHandleVo"> <select id="getSampleReturnHandlePage" resultType="cn.wise.sc.cement.business.model.vo.SampleReturnHandleVo">
select t.id as id, e.id as entrustId, e.entrust_code as entrustCode,p.id as projectId, p.name as projectName, p.code as projectCode, select t.id as id, e.id as entrustId, e.entrust_code as entrustCode,p.id as projectId, p.name as projectName, p.code as projectCode,
e.client_id as clientId, c.name as clientName, e.is_urgent as isUrgent, e.project_type as projectType, e.client_id as clientId, c.name as clientName, e.is_urgent as isUrgent, e.project_type as projectType,
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="cn.wise.sc.cement.business.mapper.SampleCheckMapper"> <mapper namespace="cn.wise.sc.cement.business.mapper.SampleCheckMapper">
<select id="getSampleElementCheck" resultType="cn.wise.sc.cement.business.model.TenElementReport"> <select id="getSampleElementCheck" resultType="cn.wise.sc.cement.business.model.ElementReport">
select s.id,s.name as sampleName,s.sample_form as sampleForm,s.sample_code as sampleCode,s.weight as weight, select s.id,s.name as sampleName,s.sample_form as sampleForm,s.sample_code as sampleCode,s.weight as weight,
s.weight_type as weightType,s.cement_code as cementCode, s.weight_type as weightType,s.cement_code as cementCode,
t.name as teamName,IF(ISNULL(sdc.last_result),'—',sdc.last_result) as lastResult t.name as teamName,IF(ISNULL(sdc.last_result),'—',sdc.last_result) as lastResult
...@@ -19,7 +19,6 @@ ...@@ -19,7 +19,6 @@
</select> </select>
<select id="getSampleIndustrialCheck" resultType="cn.wise.sc.cement.business.model.IndustrialReport"> <select id="getSampleIndustrialCheck" resultType="cn.wise.sc.cement.business.model.IndustrialReport">
SELECT * FROM (SELECT count_results,entrust_id,team_group_name,sct.sample_id FROM sample_check sc SELECT * FROM (SELECT count_results,entrust_id,team_group_name,sct.sample_id FROM sample_check sc
LEFT JOIN LEFT JOIN
(SELECT check_id,sample_id FROM sample_check_team) sct (SELECT check_id,sample_id FROM sample_check_team) sct
......
package cn.wise.sc.cement.business.model; package cn.wise.sc.cement.business.model;
/** /**
* @description: 十元素检测结果中的key * @description: 检测结果中的key
* @author: qh * @author: ztw
* @create: 2020-10-15 14:03 * @create: 2021-3-19
**/ **/
public enum TenElementKey { public enum ElementKey {
//十元素key //十元素key
LOI("L.O.I"), LOI("L.O.I"),
...@@ -23,14 +23,15 @@ public enum TenElementKey { ...@@ -23,14 +23,15 @@ public enum TenElementKey {
TiO2("TiO<sub>2</sub>"), TiO2("TiO<sub>2</sub>"),
MnO("MnO"), MnO("MnO"),
//煤的工业分析key
Gyfx("工业分析"),
Stad("St,ad"),
Km("可磨")
; ;
private String key; private String key;
TenElementKey(String key) { ElementKey(String key) {
this.key = key; this.key = key;
} }
......
package cn.wise.sc.cement.business.model; package cn.wise.sc.cement.business.model;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data; import lombok.Data;
import org.apache.commons.lang3.StringUtils;
import java.io.Serializable; import java.io.Serializable;
import java.math.BigDecimal;
/** /**
* @description: 十元素检测报告 * @description: 样品检测报告
* @author: ztw * @author: ztw
* @create: 2020-10-15 12:24 * @create: 2021-3-19
**/ **/
@Data @Data
public class TenElementReport implements Serializable { public class ElementReport implements Serializable {
private static final long serialVersionUID = 42L; private static final long serialVersionUID = 42L;
/** /**
* 样品id * 样品id
*/ */
...@@ -62,25 +57,4 @@ public class TenElementReport implements Serializable { ...@@ -62,25 +57,4 @@ public class TenElementReport implements Serializable {
*/ */
private String lastResult; private String lastResult;
//下面为十元素1 十元素2共有的
private String loi ="";
private String sio2 ="";
private String fe2o3 ="";
private String cao ="";
private String mgo ="";
private String k2o ="";
private String na2o ="";
private String so3 ="";
private String cl="";
//下面为十元素1
private String al2o3AndTio2 ="";
private String fsio2="";
//下面为十元素2
private String al2o3="";
private String tio2="";
private String mno="";
} }
...@@ -4,52 +4,23 @@ import lombok.Data; ...@@ -4,52 +4,23 @@ import lombok.Data;
import java.io.Serializable; import java.io.Serializable;
/** /**
* @description: 工业分析报告 * @description: 煤的工业分析报告
* @author: qh * @author: qh
* @create: 2020-10-16 14:06 * @create: 2021-3-19
**/ **/
@Data @Data
public class IndustrialReport implements Serializable { public class IndustrialReport extends ElementReport implements Serializable {
private static final long serialVersionUID = 42L; private static final long serialVersionUID = 42L;
/** //下面是煤的工业分析检测项
* 样品名称 private String mad ="";
*/ private String aad ="";
private String sampleName; private String vad ="";
private String qnetadmjkg ="";
/** private String jztx ="";
* 来样状态 private String stad ="";
*/ private String clad ="";
private String sampleForm; private String hgi ="";
private String cyl ="";
/**
* 来样编号
*/
private String sampleCode;
/**
* 样品重量
*/
private String weight;
/**
* 本所编号
*/
private String cementCode;
/**
* 校核数据
*/
private String countResults;
//下面是工业特性得检测项
private String mad;
private String aad;
private String vad;
private String mjkg;
private String jz;
private String qnetstad;
private String stad;
} }
package cn.wise.sc.cement.business.model.vo;
import cn.wise.sc.cement.business.model.ElementReport;
import lombok.Data;
import java.io.Serializable;
/**
* @description: 十元素检测报告
* @author: ztw
* @create: 2021-3-19
**/
@Data
public class TenElementReport extends ElementReport implements Serializable {
private static final long serialVersionUID = 42L;
//下面为十元素1 十元素2共有的
private String loi ="";
private String sio2 ="";
private String fe2o3 ="";
private String cao ="";
private String mgo ="";
private String k2o ="";
private String na2o ="";
private String so3 ="";
private String cl="";
//下面为十元素1
private String al2o3AndTio2 ="";
private String fsio2="";
//下面为十元素2
private String al2o3="";
private String tio2="";
private String mno="";
}
...@@ -142,15 +142,7 @@ public interface IEntrustService extends IService<Entrust> { ...@@ -142,15 +142,7 @@ public interface IEntrustService extends IService<Entrust> {
List<TenElementReport> getTen2List(Integer entrustId); List<TenElementReport> getTen2List(Integer entrustId);
List<IndustrialReport> getIndustrialList(Integer entrustId);
/**
* 查询工业特性
*
* @param entrustId 委托id
* @return 工业特征
*/
List<IndustrialReport> getSampleIndustrialCheck(Integer entrustId);
//质量管理 //质量管理
......
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