Commit 9db85389 by jiang'yun

修改

parent 3f4adc3d
...@@ -1004,7 +1004,7 @@ public class SjDjjcController extends BaseController ...@@ -1004,7 +1004,7 @@ public class SjDjjcController extends BaseController
} }
SjZjyCljl cljl =new SjZjyCljl(); SjZjyCljl cljl =new SjZjyCljl();
cljl.setJh(jh); cljl.setJh(jh);
int ks =0; int ks =1;
String clmc=new DataFormatter().formatCellValue(row.getCell(ks)); String clmc=new DataFormatter().formatCellValue(row.getCell(ks));
if(StringUtils.isEmpty(clmc)){ if(StringUtils.isEmpty(clmc)){
continue; continue;
...@@ -2127,6 +2127,8 @@ public class SjDjjcController extends BaseController ...@@ -2127,6 +2127,8 @@ public class SjDjjcController extends BaseController
} }
if(!map.isEmpty()){ if(!map.isEmpty()){
map.computeIfAbsent("工程补充", k -> new ArrayList<>());
map.computeIfAbsent("地质补充", k -> new ArrayList<>());
System.out.println("第一次map"+map); System.out.println("第一次map"+map);
Map<String,Object> map2 =new HashMap<>(); Map<String,Object> map2 =new HashMap<>();
map2.put("dict_content",map); map2.put("dict_content",map);
...@@ -2191,7 +2193,7 @@ public class SjDjjcController extends BaseController ...@@ -2191,7 +2193,7 @@ public class SjDjjcController extends BaseController
InputStream in = null; InputStream in = null;
XWPFTemplate template = null; XWPFTemplate template = null;
OutputStream os = null; OutputStream os = null;
try { // try {
in = this.getClass().getResourceAsStream("/static/excel/sgfamb.docx"); in = this.getClass().getResourceAsStream("/static/excel/sgfamb.docx");
os = response.getOutputStream(); os = response.getOutputStream();
String fileName = sjDjjc.getJh() + "井施工方案"; String fileName = sjDjjc.getJh() + "井施工方案";
...@@ -2269,21 +2271,21 @@ public class SjDjjcController extends BaseController ...@@ -2269,21 +2271,21 @@ public class SjDjjcController extends BaseController
template = compile.render(data); template = compile.render(data);
template.write(os); template.write(os);
os.flush(); os.flush();
} catch (Exception e) { // } catch (Exception e) {
throw e; // throw e;
} finally { // } finally {
if (in != null) { // if (in != null) {
in.close(); // in.close();
} // }
if (template != null) { // if (template != null) {
template.close(); // template.close();
} // }
//
if (os != null) { // if (os != null) {
os.close(); // os.close();
} // }
//
} // }
} }
public Map<String, Object> buildDataModel(SjDjjc sjDjjc) { public Map<String, Object> buildDataModel(SjDjjc sjDjjc) {
......
...@@ -772,6 +772,7 @@ public class SjDjjcServiceImpl implements ISjDjjcService ...@@ -772,6 +772,7 @@ public class SjDjjcServiceImpl implements ISjDjjcService
BeanUtils.copyProperties(item,sjZtgjsj); BeanUtils.copyProperties(item,sjZtgjsj);
sjZtgjsj.setJh(jh); sjZtgjsj.setJh(jh);
sjZtgjsj.setLjjh(item.getJh()); sjZtgjsj.setLjjh(item.getJh());
sjZtgjsj.setZjymd(item.getZjymd()!=null?item.getZjymd().toString():"");
String kc =item.getKc(); String kc =item.getKc();
if(kc.equals("1")){ if(kc.equals("1")){
kc="一开"; kc="一开";
......
...@@ -382,8 +382,8 @@ public class DjdcServiceImpl implements DjdcService { ...@@ -382,8 +382,8 @@ public class DjdcServiceImpl implements DjdcService {
// 转换为天数(保留两位小数) // 转换为天数(保留两位小数)
double daysDiff = secondsDiff / (24.0 * 60 * 60); double daysDiff = secondsDiff / (24.0 * 60 * 60);
daysDiff= Math.abs(daysDiff);
item.setZjzq(Double.parseDouble(df.format(daysDiff))); item.setZjzq(Double.parseDouble(df.format( daysDiff)));
//计算异常周期 //计算异常周期
Jswa jswa =new Jswa(); Jswa jswa =new Jswa();
jswa.setKsrq(kssj); jswa.setKsrq(kssj);
...@@ -394,7 +394,7 @@ public class DjdcServiceImpl implements DjdcService { ...@@ -394,7 +394,7 @@ public class DjdcServiceImpl implements DjdcService {
for(Jswa wa:jswaList){ for(Jswa wa:jswaList){
zjycsl=zjycsl+(wa.getSg()+wa.getXl()+wa.getZrtg()+wa.getZztg()+wa.getFzqk()); zjycsl=zjycsl+(wa.getSg()+wa.getXl()+wa.getZrtg()+wa.getZztg()+wa.getFzqk());
} }
zjycsl= Math.abs(zjycsl);
//异常周期 //异常周期
item.setZjycsl(Double.parseDouble(df.format(zjycsl/24))); item.setZjycsl(Double.parseDouble(df.format(zjycsl/24)));
//生产周期 //生产周期
...@@ -429,7 +429,7 @@ public class DjdcServiceImpl implements DjdcService { ...@@ -429,7 +429,7 @@ public class DjdcServiceImpl implements DjdcService {
// 转换为天数(保留两位小数) // 转换为天数(保留两位小数)
double daysDiff = secondsDiff / (24.0 * 60 * 60); double daysDiff = secondsDiff / (24.0 * 60 * 60);
daysDiff=Math.abs(daysDiff);
item.setZwzq(Double.parseDouble(df.format(daysDiff))); item.setZwzq(Double.parseDouble(df.format(daysDiff)));
item.setZwzq(Double.parseDouble(df.format(daysDiff))); item.setZwzq(Double.parseDouble(df.format(daysDiff)));
...@@ -443,6 +443,7 @@ public class DjdcServiceImpl implements DjdcService { ...@@ -443,6 +443,7 @@ public class DjdcServiceImpl implements DjdcService {
for(Jswa wa:jswaList){ for(Jswa wa:jswaList){
zjycsl=zjycsl+(wa.getSg()+wa.getXl()+wa.getZrtg()+wa.getZztg()+wa.getFzqk()); zjycsl=zjycsl+(wa.getSg()+wa.getXl()+wa.getZrtg()+wa.getZztg()+wa.getFzqk());
} }
zjycsl=Math.abs(zjycsl);
item.setWjycsl(Double.parseDouble(df.format(zjycsl/24))); item.setWjycsl(Double.parseDouble(df.format(zjycsl/24)));
//生产周期 //生产周期
item.setWjsczq(Double.parseDouble(df.format(item.getZwzq()-item.getWjycsl()))); item.setWjsczq(Double.parseDouble(df.format(item.getZwzq()-item.getWjycsl())));
......
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