Commit 27215469 by wangweidong

Merge remote-tracking branch 'origin/dev' into dev

parents 965f7ce0 e4526a9d
...@@ -432,11 +432,19 @@ public class CollectUtil { ...@@ -432,11 +432,19 @@ public class CollectUtil {
public static SoilExperimentCollectDataVO getDataVO(String name,String value,String gcbh,String siteNo,String expName){ public static SoilExperimentCollectDataVO getDataVO(String name,String value,String gcbh,String siteNo,String expName){
SoilExperimentCollectDataVO collectData = new SoilExperimentCollectDataVO(); SoilExperimentCollectDataVO collectData = new SoilExperimentCollectDataVO();
collectData.setName(name); collectData.setName(name);
if (value.contains("%")){
value = value.replace("%","");
collectData.setUnit("%");
}
collectData.setTestValue(value); collectData.setTestValue(value);
collectData.setEntrustCode(gcbh); collectData.setEntrustCode(gcbh);
collectData.setSiteNo(siteNo); collectData.setSiteNo(siteNo);
collectData.setExpName(expName); collectData.setExpName(expName);
return collectData; return collectData;
} }
...@@ -545,6 +553,8 @@ public class CollectUtil { ...@@ -545,6 +553,8 @@ public class CollectUtil {
content = content.replace("灵 敏 度","灵敏度"); content = content.replace("灵 敏 度","灵敏度");
content = content.replace("粘 聚 力","凝聚力"); content = content.replace("粘 聚 力","凝聚力");
content = content.replace("粘聚力","凝聚力"); content = content.replace("粘聚力","凝聚力");
content = content.replace("原 状qu","原状Qu");
content = content.replace("重 塑qu'","重塑Qu");
content = content.replace("原 状Qu","原状Qu"); content = content.replace("原 状Qu","原状Qu");
content = content.replace("重 塑Qu","重塑Qu"); content = content.replace("重 塑Qu","重塑Qu");
content = content.replace("固结系数(t90):","固结系数(t90)"); content = content.replace("固结系数(t90):","固结系数(t90)");
......
...@@ -950,7 +950,7 @@ public class SoilEntrustServiceImpl extends BaseServiceImpl<SoilEntrustMapper, S ...@@ -950,7 +950,7 @@ public class SoilEntrustServiceImpl extends BaseServiceImpl<SoilEntrustMapper, S
map.put("#{boreholeName}",StringHandleUtils.getString(entrust.getBoreholeName())); map.put("#{boreholeName}",StringHandleUtils.getString(entrust.getBoreholeName()));
map.put("#{client}",StringHandleUtils.getString(entrust.getClient())); map.put("#{client}",StringHandleUtils.getString(entrust.getClient()));
map.put("#{projectNo}",StringHandleUtils.getString(entrust.getProjectNo())); map.put("#{projectNo}",StringHandleUtils.getString(entrust.getProjectNo()));
map.put("#{entrustCode}","报告编号:"+StringHandleUtils.getString(entrust.getEntrustCode())); map.put("#{entrustCode}",StringHandleUtils.getString(entrust.getEntrustCode()));
map.put("#{waterDepth}",null == entrust.getWaterDepth()?"":entrust.getWaterDepth().toString()); map.put("#{waterDepth}",null == entrust.getWaterDepth()?"":entrust.getWaterDepth().toString());
List<SoilPrepare> soilPrepares = soilPrepareService.list(Condition.create().setSqlSelect("prepare_date").in("sample_id",sampleIdsList).isNotNull("prepare_date")); List<SoilPrepare> soilPrepares = soilPrepareService.list(Condition.create().setSqlSelect("prepare_date").in("sample_id",sampleIdsList).isNotNull("prepare_date"));
......
...@@ -165,7 +165,7 @@ public class SoilExpReportServiceImpl extends BaseServiceImpl<SoilExpReportMappe ...@@ -165,7 +165,7 @@ public class SoilExpReportServiceImpl extends BaseServiceImpl<SoilExpReportMappe
Map<String, String> mapReplace = new HashMap<>(); Map<String, String> mapReplace = new HashMap<>();
mapReplace.put("#{projectName}",StringHandleUtils.getString(entrust.getProjectName())); mapReplace.put("#{projectName}",StringHandleUtils.getString(entrust.getProjectName()));
mapReplace.put("#{reportCode}","报告编号:"+entrust.getEntrustCode()); mapReplace.put("#{reportCode}",entrust.getEntrustCode());
mapReplace.put("#{client}",StringHandleUtils.getString(entrust.getClient())); mapReplace.put("#{client}",StringHandleUtils.getString(entrust.getClient()));
mapReplace.put("#{boreholeName}",StringHandleUtils.getString(entrust.getBoreholeName())); mapReplace.put("#{boreholeName}",StringHandleUtils.getString(entrust.getBoreholeName()));
mapReplace.put("#{projectNo}",StringHandleUtils.getString(entrust.getProjectNo())); mapReplace.put("#{projectNo}",StringHandleUtils.getString(entrust.getProjectNo()));
...@@ -337,6 +337,9 @@ public class SoilExpReportServiceImpl extends BaseServiceImpl<SoilExpReportMappe ...@@ -337,6 +337,9 @@ public class SoilExpReportServiceImpl extends BaseServiceImpl<SoilExpReportMappe
} }
List<Workbook> bookList = new ArrayList<>(); List<Workbook> bookList = new ArrayList<>();
if (!AsposeUtil.getLicense()) { // 验证License 若不验证则转化出的PDP文档会有水印产生
logger.error("Aspose 认证失败");
}
Workbook workbook =null; Workbook workbook =null;
if (null !=xssfWorkbook){ if (null !=xssfWorkbook){
...@@ -653,9 +656,9 @@ public class SoilExpReportServiceImpl extends BaseServiceImpl<SoilExpReportMappe ...@@ -653,9 +656,9 @@ public class SoilExpReportServiceImpl extends BaseServiceImpl<SoilExpReportMappe
logger.error("List<Workbook> bookList = new ArrayList<>();-----"); logger.error("List<Workbook> bookList = new ArrayList<>();-----");
// if (!AsposeUtil.getLicense()) { // 验证License 若不验证则转化出的PDP文档会有水印产生 if (!AsposeUtil.getLicense()) { // 验证License 若不验证则转化出的PDP文档会有水印产生
// logger.error("Aspose 认证失败"); logger.error("Aspose 认证失败");
// } }
Workbook workbook =null; Workbook workbook =null;
logger.error("7-----------------"); logger.error("7-----------------");
...@@ -875,8 +878,26 @@ public class SoilExpReportServiceImpl extends BaseServiceImpl<SoilExpReportMappe ...@@ -875,8 +878,26 @@ public class SoilExpReportServiceImpl extends BaseServiceImpl<SoilExpReportMappe
if (StringHandleUtils.is_alpha(dataAttribute)){ if (StringHandleUtils.is_alpha(dataAttribute)){
cell.setCellValue(StringHandleUtils.getFieldIfNummReturnBlankValueByFieldName(dataAttribute,vo)); cell.setCellValue(StringHandleUtils.getFieldIfNummReturnBlankValueByFieldName(dataAttribute,vo));
}else{ }else{
if (dataAttribute.contains("固结-")){
String expName ="固结";
String itemName = dataAttribute.replace("固结-","");
if (CollectionUtils.isNotEmpty(experimentVOList)){
for (SoilExperimentVO experiment:experimentVOList) {
if (vo.getSampleCode().equals(experiment.getSampleCode())&&expName.equals(experiment.getName())){
if (dataAttribute.contains("-")){ List<SoilItem> itemList = experiment.getItemList();
if (CollectionUtils.isNotEmpty(itemList)){
for (SoilItem item:itemList) {
if (itemName.equals(item.getName())){
cell.setCellValue(item.getTestValue());
break;
}
}
}
}
}
}
} else if (dataAttribute.contains("-")){
String [] attrArrray = dataAttribute.split("-"); String [] attrArrray = dataAttribute.split("-");
if (attrArrray.length < 2){ if (attrArrray.length < 2){
return; return;
...@@ -896,9 +917,7 @@ public class SoilExpReportServiceImpl extends BaseServiceImpl<SoilExpReportMappe ...@@ -896,9 +917,7 @@ public class SoilExpReportServiceImpl extends BaseServiceImpl<SoilExpReportMappe
if (CollectionUtils.isNotEmpty(experimentVOList)){ if (CollectionUtils.isNotEmpty(experimentVOList)){
for (SoilExperimentVO experiment:experimentVOList) { for (SoilExperimentVO experiment:experimentVOList) {
if (expName.equals("三轴压缩CD/CU")|| expName.equals("三轴CD/CU")){ if (expName.equals("三轴压缩CD/CU")|| expName.equals("三轴CD/CU")){
for (int i = 0; i < 2; i++) { for (int i = 0; i < 2; i++) {
if (vo.getSampleCode().equals(experiment.getSampleCode())&&"三轴压缩-CD".equals(experiment.getName())){ if (vo.getSampleCode().equals(experiment.getSampleCode())&&"三轴压缩-CD".equals(experiment.getName())){
...@@ -927,6 +946,38 @@ public class SoilExpReportServiceImpl extends BaseServiceImpl<SoilExpReportMappe ...@@ -927,6 +946,38 @@ public class SoilExpReportServiceImpl extends BaseServiceImpl<SoilExpReportMappe
} }
} }
}else if (expName.equals("颗粒分析")){
if (vo.getSampleCode().equals(experiment.getSampleCode())&&"颗粒分析-Hyd".equals(experiment.getName())){
List<SoilItem> itemList = experiment.getItemList();
if (CollectionUtils.isNotEmpty(itemList)){
for (SoilItem item:itemList) {
if (itemName.equals(item.getName())){
cell.setCellValue(item.getTestValue());
break;
}
}
}
}else if (vo.getSampleCode().equals(experiment.getSampleCode())&&"颗粒分析-Sieve".equals(experiment.getName())){
List<SoilItem> itemList = experiment.getItemList();
if (CollectionUtils.isNotEmpty(itemList)){
for (SoilItem item:itemList) {
if (itemName.equals(item.getName())){
cell.setCellValue(item.getTestValue());
break;
}
}
}
}else if (vo.getSampleCode().equals(experiment.getSampleCode())&&"颗粒分析-200".equals(experiment.getName())){
List<SoilItem> itemList = experiment.getItemList();
if (CollectionUtils.isNotEmpty(itemList)){
for (SoilItem item:itemList) {
if (itemName.equals(item.getName())){
cell.setCellValue(item.getTestValue());
break;
}
}
}
}
}else{ }else{
if (vo.getSampleCode().equals(experiment.getSampleCode())&&expName.equals(experiment.getName())){ if (vo.getSampleCode().equals(experiment.getSampleCode())&&expName.equals(experiment.getName())){
......
...@@ -404,8 +404,11 @@ public class SoilOriginalTemplateServiceImpl extends BaseServiceImpl<SoilOrigina ...@@ -404,8 +404,11 @@ public class SoilOriginalTemplateServiceImpl extends BaseServiceImpl<SoilOrigina
for (int i = sampleBeginRow;i<lastRowNum;i+=sampleMergerNum) { for (int i = sampleBeginRow;i<=lastRowNum;i+=sampleMergerNum) {
XSSFRow xssfRow = sheet.getRow(i); XSSFRow xssfRow = sheet.getRow(i);
if (null == xssfRow){
continue;
}
XSSFCell sampleCodeCell = xssfRow.getCell(sampleCol); XSSFCell sampleCodeCell = xssfRow.getCell(sampleCol);
String sampleCode = HSSFWorkbookUtil.getJavaValue(sampleCodeCell).toString(); String sampleCode = HSSFWorkbookUtil.getJavaValue(sampleCodeCell).toString();
String sampleOfStatus =""; String sampleOfStatus ="";
...@@ -423,11 +426,6 @@ public class SoilOriginalTemplateServiceImpl extends BaseServiceImpl<SoilOrigina ...@@ -423,11 +426,6 @@ public class SoilOriginalTemplateServiceImpl extends BaseServiceImpl<SoilOrigina
shortNames = HSSFWorkbookUtil.getJavaValue(shortNameCell).toString(); shortNames = HSSFWorkbookUtil.getJavaValue(shortNameCell).toString();
} }
for (ItemCollectEntity collectEntity:collectEntitiesList) { for (ItemCollectEntity collectEntity:collectEntitiesList) {
if (null!=collectEntity.getSingleElse()){ if (null!=collectEntity.getSingleElse()){
XSSFRow row = sheet.getRow(collectEntity.getItemMegerRow()); XSSFRow row = sheet.getRow(collectEntity.getItemMegerRow());
......
<License> <License>
<Data> <Data>
<LicensedTo>南京中普安信</LicensedTo>
<EmailTo>zhangmengqi@qd-partner.com</EmailTo>
<LicenseType>Developer Small Business</LicenseType>
<LicenseNote>1 Developer And 1 Deployment Location</LicenseNote>
<OrderID>210401015312</OrderID>
<UserID>879938</UserID>
<OEM>This is not a redistributable license</OEM>
<Products> <Products>
<Product>Aspose.Total for Java</Product> <Product>Aspose.Cells Product Family</Product>
<Product>Aspose.Words for Java</Product>
</Products> </Products>
<EditionType>Enterprise</EditionType> <EditionType>Professional</EditionType>
<SubscriptionExpiry>20991231</SubscriptionExpiry> <SerialNumber>511eb1f9-57ff-4254-bbeb-b9ee82f390cb</SerialNumber>
<LicenseExpiry>20991231</LicenseExpiry> <SubscriptionExpiry>20220401</SubscriptionExpiry>
<SerialNumber>8bfe198c-7f0c-4ef8-8ff0-acc3237bf0d7</SerialNumber> <LicenseExpiry>20210501</LicenseExpiry>
</Data> <ExpiryNote>This is a temporary license for non-commercial use only and it will expire on 2021-05-01</ExpiryNote>
<Signature>sNLLKGMUdF0r8O1kKilWAGdgfs2BvJb/2Xp8p5iuDVfZXmhppo+d0Ran1P9TKdjV4ABwAgKXxJ3jcQTqE/2IRfqwnPf8itN8aFZlV3TJPYeD3yWE7IT55Gz6EijUpC7aKeoohTb4w2fpox58wWoF3SNp6sK6jDfiAUGEHYJ9pjU=</Signature> <LicenseVersion>3.0</LicenseVersion>
<LicenseInstructions>https://purchase.aspose.com/policies/use-license</LicenseInstructions>
</Data>
<Signature>gvk7I3r/lKw/n0K5FhxBBvoAgyYZ/HwbguDGsOCzMFvhbYAabwxly9RVncRENZLSMiZ570I+lG/NK9cfq9IRxyS/2mvuM0IKfIX7QVtnzUZof4/bU55/dj1+obPI6j7T8E+oCqo8O1ec/BdAGw05tJ+GlWvvhcaBfJw9C5b4CRU=</Signature>
</License> </License>
\ No newline at end of file
...@@ -11,24 +11,23 @@ import java.math.BigDecimal; ...@@ -11,24 +11,23 @@ import java.math.BigDecimal;
public class Test { public class Test {
public static void main(String[] args) { public static void main(String[] args) {
try { try {
Workbook workbook1 = new Workbook("D://excel//封面.xlsx");
Workbook workbook2 = new Workbook("D://excel//检测报告(力学试验)三轴.xlsx");
Workbook workbook3 = new Workbook("D://excel//检测报告(力学试验)手动十字板.xlsx"); XSSFWorkbook workbook2 = new XSSFWorkbook(new File("D://颗粒分析实验(甲种)2.xlsx"));
Workbook workbook4 = new Workbook("D://excel//检测报告(力学试验)休止角.xlsx"); XSSFWorkbook workbook3 = new XSSFWorkbook(new File("D://颗粒分析实验(甲种)3.xlsx"));
Workbook workbook5 = new Workbook("D://excel//检测报告(力学试验)袖珍贯入仪.xlsx");
Workbook workbook6 = new Workbook("D://excel//检测报告(力学试验)直剪.xlsx");
Workbook workbook7 = new Workbook("D://excel//附件.xlsx");
workbook1.combine(workbook2); int num = workbook3.getNumberOfSheets();
workbook1.combine(workbook3);
workbook1.combine(workbook4); for (int i = 0; i < num; i++) {
workbook1.combine(workbook5); //workbook2.cloneSheet()
workbook1.combine(workbook6); }
workbook1.combine(workbook7);
FileOutputStream fileOut=null; FileOutputStream fileOut=null;
String allFileName = "d:/excel/0.xlsx"; String allFileName = "d:/excel/0.xlsx";
fileOut = new FileOutputStream(allFileName); fileOut = new FileOutputStream(allFileName);
workbook1.save(fileOut, SaveFormat.XLSX);
File file = new File(allFileName); File file = new File(allFileName);
XSSFWorkbook workbook = new XSSFWorkbook(file); XSSFWorkbook workbook = new XSSFWorkbook(file);
......
INSERT INTO "public"."sys_resource"("id", "system_id", "pid", "name", "type", "code", "uri", "icon", "remark", "status", "sort", "ctime", "ename") VALUES (1377104732162490370, 1304006677087891457, 1304299839215878145, '按项目录入-物性上传图片', 1, 'do-test-sample-item-right-file-physical', '/', NULL, NULL, 1, 1, '2021-03-31 11:45:28.173', NULL);
INSERT INTO "public"."sys_resource"("id", "system_id", "pid", "name", "type", "code", "uri", "icon", "remark", "status", "sort", "ctime", "ename") VALUES (1377104732162490370, 1304006677087891457, 1304299839215878145, '按项目录入-物性上传图片', 1, 'do-test-sample-item-right-file-physical', '/', NULL, NULL, 1, 1, '2021-03-31 11:45:28.173', NULL);
INSERT INTO "public"."sys_resource"("id", "system_id", "pid", "name", "type", "code", "uri", "icon", "remark", "status", "sort", "ctime", "ename") VALUES (1377104795962048514, 1304006677087891457, 1304299839215878145, '按项目录入-界限含水率上传采集', 1, 'do-test-sample-item-right-file-moisture', '/', NULL, NULL, 1, 1, '2021-03-31 11:45:43.384', NULL);
\ 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