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

检测报告 优化

parent 7d9c3fe8
......@@ -4,11 +4,11 @@ import cn.hutool.core.bean.BeanUtil;
import cn.hutool.core.date.DateUtil;
import cn.hutool.core.util.StrUtil;
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.enumation.FileExt;
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.TenElementReport;
import cn.wise.sc.cement.business.service.IEntityEnclosureService;
import cn.wise.sc.cement.business.service.IEntrustService;
import cn.wise.sc.cement.business.util.WordUtil;
......@@ -21,7 +21,6 @@ import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.util.Assert;
import org.springframework.util.StringUtils;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
......@@ -34,7 +33,6 @@ import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.time.LocalDateTime;
import java.util.*;
import java.util.stream.Collectors;
/**
* @description: 报告管理
......@@ -106,15 +104,20 @@ public class ReportController {
//十元素1导出
List<TenElementReport> list1 = iEntrustService.getTen1List(entrustId);
beanParams.put("list1", list1);
//工艺性能
//物理性能
//颗粒分析
//煤的工业分析
List<IndustrialReport> list3 = iEntrustService.getIndustrialList(entrustId);
beanParams.put("list3", list3);
//事项-----不用处理
//十元素2导出
List<TenElementReport> list2 = iEntrustService.getTen2List(entrustId);
beanParams.put("list2", list2);
//化学工业导出
List<IndustrialReport> list3 = iEntrustService.getSampleIndustrialCheck(entrustId);
beanParams.put("list3", list3);
//品质-----不用处理
WordUtil.writeWordReport(rts.getProjectName() + "(报告)", "report_new.ftl",
beanParams, response, FileExt.EXCL);
......
......@@ -6,8 +6,8 @@ import java.util.Date;
/**
* @description: 委托报告
* @author: qh
* @create: 2020-09-25 20:36
* @author: ztw
* @create: 2021-3-19
**/
@Data
public class EntrustReport {
......
......@@ -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.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 org.apache.ibatis.annotations.Param;
......@@ -20,12 +20,12 @@ import java.util.Set;
public interface SampleCheckMapper extends BaseMapper<SampleCheck> {
/**
* 获取样品十元素1检测结果
* 获取样品检测结果
*
* @param entrustId 项目id
* @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 @@
</where>
</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 e.id,e.project_name,e.send_name,e.client_id,e.entrust_code,e.project_type,s_tab.*
......@@ -356,7 +342,7 @@
RIGHT JOIN(
SELECT sd.id,sd.check_id,sd.sample_id,sd.user_id,
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
ON s.id = sd_tab.sample_id
) s_tab
......@@ -381,8 +367,6 @@
<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,
e.client_id as clientId, c.name as clientName, e.is_urgent as isUrgent, e.project_type as projectType,
......
......@@ -2,7 +2,7 @@
<!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">
<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,
s.weight_type as weightType,s.cement_code as cementCode,
t.name as teamName,IF(ISNULL(sdc.last_result),'—',sdc.last_result) as lastResult
......@@ -19,7 +19,6 @@
</select>
<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
LEFT JOIN
(SELECT check_id,sample_id FROM sample_check_team) sct
......
package cn.wise.sc.cement.business.model;
/**
* @description: 十元素检测结果中的key
* @author: qh
* @create: 2020-10-15 14:03
* @description: 检测结果中的key
* @author: ztw
* @create: 2021-3-19
**/
public enum TenElementKey {
public enum ElementKey {
//十元素key
LOI("L.O.I"),
......@@ -23,14 +23,15 @@ public enum TenElementKey {
TiO2("TiO<sub>2</sub>"),
MnO("MnO"),
//煤的工业分析key
Gyfx("工业分析"),
Stad("St,ad"),
Km("可磨")
;
private String key;
TenElementKey(String key) {
ElementKey(String key) {
this.key = key;
}
......
package cn.wise.sc.cement.business.model;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.apache.commons.lang3.StringUtils;
import java.io.Serializable;
import java.math.BigDecimal;
/**
* @description: 十元素检测报告
* @description: 样品检测报告
* @author: ztw
* @create: 2020-10-15 12:24
* @create: 2021-3-19
**/
@Data
public class TenElementReport implements Serializable {
public class ElementReport implements Serializable {
private static final long serialVersionUID = 42L;
/**
* 样品id
*/
......@@ -62,25 +57,4 @@ public class TenElementReport implements Serializable {
*/
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;
import java.io.Serializable;
/**
* @description: 工业分析报告
* @description: 煤的工业分析报告
* @author: qh
* @create: 2020-10-16 14:06
* @create: 2021-3-19
**/
@Data
public class IndustrialReport implements Serializable {
public class IndustrialReport extends ElementReport implements Serializable {
private static final long serialVersionUID = 42L;
/**
* 样品名称
*/
private String sampleName;
/**
* 来样状态
*/
private String sampleForm;
/**
* 来样编号
*/
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;
//下面是煤的工业分析检测项
private String mad ="";
private String aad ="";
private String vad ="";
private String qnetadmjkg ="";
private String jztx ="";
private String stad ="";
private String clad ="";
private String hgi ="";
private String cyl ="";
}
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> {
List<TenElementReport> getTen2List(Integer entrustId);
/**
* 查询工业特性
*
* @param entrustId 委托id
* @return 工业特征
*/
List<IndustrialReport> getSampleIndustrialCheck(Integer entrustId);
List<IndustrialReport> getIndustrialList(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