Commit 324f778e by wangweidong

土工平台修改

parent e3b15eda
......@@ -45,4 +45,6 @@ public interface SoilExperimentMapper extends BaseMapper<SoilExperiment> {
List<SoilExperimentVO> listTestByExpBath(Page<SoilExperimentVO> page, SoilExperimentQueryDTO dto);
List<SoilExperimentVO> listExpRightBath(Page<SoilExperimentVO> page, @Param("vo")SoilExperimentQueryDTO dto);
List<SoilExperimentVO> listGroupVOListByEntrustIds( @Param("entrustIdList")List<Long> entrustIdList);
}
......@@ -93,4 +93,6 @@ public interface ISoilExperimentService extends IBaseService<SoilExperiment> {
Page<SoilExperimentVO> pageTestByExpBath(Page<SoilExperimentVO> page, SoilExperimentQueryDTO dto);
Page<SoilExperimentVO> pageExpRightBath(Page<SoilExperimentVO> page, SoilExperimentQueryDTO dto);
List<SoilExperimentVO> listGroupVOListByEntrustIds(List<Long> entrustIdList);
}
......@@ -588,6 +588,28 @@ public class SoilExperimentServiceImpl extends BaseServiceImpl<SoilExperimentMap
}else{
int index = 0;
XSSFSheet xssfSheet = xssfWorkbook.getSheetAt(0);
int rowNum = xssfSheet.getLastRowNum();
for (int i = 0; i < rowNum ; i++) {
XSSFRow row = xssfSheet.getRow(i);
int cellNum = row.getLastCellNum();
for (int j = 0; j < cellNum; j++) {
XSSFCell cell = row.getCell(j);
if (cell.getCellType().equals(CellType.FORMULA)){
String formula = cell.getCellFormula();
if (StringUtils.isNotBlank(formula)){
cell.setCellFormula(formula);
}
}
}
}
xssfSheet.setForceFormulaRecalculation(true);
for (SoilExperimentVO vo:voList) {
if (index==0){
xssfWorkbook.setSheetName(index,vo.getSampleCode());
......@@ -597,8 +619,6 @@ public class SoilExperimentServiceImpl extends BaseServiceImpl<SoilExperimentMap
XSSFSheet sheet = xssfWorkbook.cloneSheet(0);
xssfWorkbook.setSheetName(index,vo.getSampleCode());
sheet.setForceFormulaRecalculation(true);
index++;
}
......@@ -1055,6 +1075,11 @@ public class SoilExperimentServiceImpl extends BaseServiceImpl<SoilExperimentMap
}
@Override
public List<SoilExperimentVO> listGroupVOListByEntrustIds(List<Long> entrustIdList) {
return baseMapper.listGroupVOListByEntrustIds(entrustIdList);
}
@Override
public Page<SoilExperimentVO> pageBySampleIds(Page<SoilExperimentVO> page, Long[] sampleIds, SoilExperimentVO vo) {
......
......@@ -6,9 +6,8 @@ import java.util.List;
import java.util.Map;
public class SoilEntrustSummaryDTO {
private List<KeyValueEntity> start =new ArrayList<>();
private List<List<KeyValueEntity>> branch = new ArrayList<>();
private List<KeyValueEntity> end = new ArrayList<>();
private SoilSummaryDTO soilSummaryDTO = new SoilSummaryDTO();
......@@ -26,29 +25,6 @@ public class SoilEntrustSummaryDTO {
this.entrustVO = entrustVO;
}
public List<KeyValueEntity> getStart() {
return start;
}
public void setStart(List<KeyValueEntity> start) {
this.start = start;
}
public List<List<KeyValueEntity>> getBranch() {
return branch;
}
public void setBranch(List<List<KeyValueEntity>> branch) {
this.branch = branch;
}
public List<KeyValueEntity> getEnd() {
return end;
}
public void setEnd(List<KeyValueEntity> end) {
this.end = end;
}
public List<Map<String, Object>> getData() {
return data;
......@@ -57,4 +33,12 @@ public class SoilEntrustSummaryDTO {
public void setData(List<Map<String, Object>> data) {
this.data = data;
}
public SoilSummaryDTO getSoilSummaryDTO() {
return soilSummaryDTO;
}
public void setSoilSummaryDTO(SoilSummaryDTO soilSummaryDTO) {
this.soilSummaryDTO = soilSummaryDTO;
}
}
package com.patzn.cloud.service.lims.summary;
import com.patzn.cloud.service.soil.vo.SoilEntrustVO;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
public class SoilSummaryDTO {
private List<KeyValueEntity> start =new ArrayList<>();
private List<List<KeyValueEntity>> branch = new ArrayList<>();
private List<KeyValueEntity> end = new ArrayList<>();
public List<KeyValueEntity> getStart() {
return start;
}
public void setStart(List<KeyValueEntity> start) {
this.start = start;
}
public List<List<KeyValueEntity>> getBranch() {
return branch;
}
public void setBranch(List<List<KeyValueEntity>> branch) {
this.branch = branch;
}
public List<KeyValueEntity> getEnd() {
return end;
}
public void setEnd(List<KeyValueEntity> end) {
this.end = end;
}
}
......@@ -353,12 +353,16 @@
SELECT count(1) FROM soil_sample WHERE entrust_id = e.id AND deleted = 0
),(
) AS sample_count ,(
SELECT count(1) FROM soil_sample WHERE entrust_id = e.id AND deleted = 0 AND status IN (0,10,15,20,22)
) AS make_no FROM soil_entrust e JOIN soil_entrust_operation o ON e.id = o.entrust_id
) AS make_no_count FROM soil_entrust e JOIN soil_entrust_operation o ON e.id = o.entrust_id
WHERE e.deleted = 0
<include refid="sqlWhere"/>
</select>
</mapper>
......@@ -408,5 +408,19 @@
<select id="listGroupVOListByEntrustIds" resultType="com.patzn.cloud.service.soil.vo.SoilExperimentVO">
SELECT
t.id,t.group_id,t.group_name,t.status,t.progress ,e.id AS entrust_id
FROM
soil_experiment
t JOIN soil_sample s ON T.sample_id = s.ID
JOIN soil_entrust e ON s.entrust_id = e.id
WHERE t.deleted = 0 AND s.deleted = 0 AND e.deleted = 0 AND t.group_name IS NOT NULL AND t.group_id IS NOT NULL
AND e.id IN
<foreach collection="entrustIdList" index="index" item="entrustId" open="(" separator="," close=")">
#{entrustId}
</foreach>
</select>
</mapper>
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