法规清单 导出补充子弹
This commit is contained in:
+3
-2
@@ -65,8 +65,9 @@ public class StandAttrInfoDto {
|
|||||||
// //关联模块--乘用车vpps中文名称
|
// //关联模块--乘用车vpps中文名称
|
||||||
// @ExcelProperty("关联模块--乘用车vpps中文名称")
|
// @ExcelProperty("关联模块--乘用车vpps中文名称")
|
||||||
// private String CYCVPPSCN;
|
// private String CYCVPPSCN;
|
||||||
|
|
||||||
private Long unCount;
|
private Long unCount;
|
||||||
|
@ExcelProperty("合规性情况")
|
||||||
|
private String unCountShow;
|
||||||
|
@ExcelProperty("整改完成时间")
|
||||||
private String endTimes;
|
private String endTimes;
|
||||||
}
|
}
|
||||||
+85
-2
@@ -647,7 +647,28 @@ public class SarStandProjectLibraryServiceImpl extends ServiceImpl<SarStandProje
|
|||||||
String idmis=String.join(",",ids);
|
String idmis=String.join(",",ids);
|
||||||
System.out.println(idmis);
|
System.out.println(idmis);
|
||||||
QueryWrapper<SarStandardsInfo> wrapper1 = new QueryWrapper<>();
|
QueryWrapper<SarStandardsInfo> wrapper1 = new QueryWrapper<>();
|
||||||
wrapper1.select("ID","STAND_NUMBER","STAND_NAME","STAND_EN_NAME","STAND_TYPE","STAND_YEAR","STAND_SORT");
|
wrapper1.select("ID","STAND_NUMBER","STAND_NAME","STAND_EN_NAME","STAND_TYPE","STAND_YEAR","STAND_SORT",
|
||||||
|
|
||||||
|
"(select count(*) from sar_stand_unqualified ssu " +
|
||||||
|
"inner join sar_stand_project_library pn on pn.project_number = ssu.product_id" +
|
||||||
|
" where ssu.STAND_ID = r.stand_id and ssu.CLOSE_STATE = '1' and pn.id = '" + id + "') as unCount ",
|
||||||
|
|
||||||
|
"(select count(*) from sar_standard_compliance_product_assess ssu " +
|
||||||
|
"inner join sar_stand_project_library pn on pn.project_number = ssu.product_id" +
|
||||||
|
" where ssu.STAND_ID = r.stand_id and ssu.no_involve is not null and pn.id = '" + id + "') as isOverCount ",
|
||||||
|
|
||||||
|
"(select count(*) from sar_standard_compliance_product_assess ssu " +
|
||||||
|
"inner join sar_stand_project_library pn on pn.project_number = ssu.product_id" +
|
||||||
|
" where ssu.STAND_ID = r.stand_id and ssu.no_involve is null and pn.id = '" + id + "') as isCount ",
|
||||||
|
|
||||||
|
"(select count(*) from sar_stand_unqualified ssu " +
|
||||||
|
"inner join sar_stand_project_library pn on pn.project_number = ssu.product_id" +
|
||||||
|
" where ssu.STAND_ID = r.stand_id and ssu.CLOSE_STATE = '2' and pn.id = '" + id + "') as counts ",
|
||||||
|
|
||||||
|
"(select GROUP_CONCAT( DISTINCT DATE_FORMAT( ssu.PLAN_CLOSE_TIME, '%Y-%m-%d' ) ORDER BY ssu.PLAN_CLOSE_TIME ) from sar_stand_unqualified ssu " +
|
||||||
|
"inner join sar_stand_project_library pn on pn.project_number = ssu.product_id" +
|
||||||
|
" where ssu.STAND_ID = r.stand_id and ssu.CLOSE_STATE = '1' AND ssu.PLAN_CLOSE_TIME is NOT NULL and pn.id = '" + id + "') as endTimes "
|
||||||
|
);
|
||||||
// wrapper1.last("INNER JOIN sar_stand_project_relation r ON r.stand_id = sar_standards_info.ID WHERE r.stand_id in ("+ idmis +") and r.project_id = '"+ id+"'");
|
// wrapper1.last("INNER JOIN sar_stand_project_relation r ON r.stand_id = sar_standards_info.ID WHERE r.stand_id in ("+ idmis +") and r.project_id = '"+ id+"'");
|
||||||
wrapper1.last("INNER JOIN sar_stand_project_relation r ON r.stand_id = sar_standards_info.ID WHERE r.stand_id in ("+ idmis +") and r.project_id = '"+ id+"'" +
|
wrapper1.last("INNER JOIN sar_stand_project_relation r ON r.stand_id = sar_standards_info.ID WHERE r.stand_id in ("+ idmis +") and r.project_id = '"+ id+"'" +
|
||||||
"union all " +
|
"union all " +
|
||||||
@@ -658,7 +679,35 @@ public class SarStandProjectLibraryServiceImpl extends ServiceImpl<SarStandProje
|
|||||||
"STAND_EN_NAME, " +
|
"STAND_EN_NAME, " +
|
||||||
"'' as STAND_TYPE, " +
|
"'' as STAND_TYPE, " +
|
||||||
"STAND_YEAR, " +
|
"STAND_YEAR, " +
|
||||||
"STAND_SORT " +
|
"STAND_SORT," +
|
||||||
|
|
||||||
|
"(select count(*) from sar_stand_unqualified ssu " +
|
||||||
|
"inner join sar_stand_project_library pn on pn.project_number = ssu.product_id" +
|
||||||
|
" where ssu.STAND_ID = r.stand_id and ssu.CLOSE_STATE = '1' and pn.id = '" + id + "') as unCount, "+
|
||||||
|
|
||||||
|
"(select count(*) from sar_standard_compliance_product_assess ssu " +
|
||||||
|
"inner join sar_stand_project_library pn on pn.project_number = ssu.product_id" +
|
||||||
|
" where ssu.STAND_ID = r.stand_id and ssu.no_involve is not null and pn.id = '" + id + "') as isOverCount, "+
|
||||||
|
|
||||||
|
"(select count(*) from sar_standard_compliance_product_assess ssu " +
|
||||||
|
"inner join sar_stand_project_library pn on pn.project_number = ssu.product_id" +
|
||||||
|
" where ssu.STAND_ID = r.stand_id and ssu.no_involve is null and pn.id = '" + id + "') as isCount, "+
|
||||||
|
"(select count(*) from sar_stand_unqualified ssu " +
|
||||||
|
"inner join sar_stand_project_library pn on pn.project_number = ssu.product_id" +
|
||||||
|
" where ssu.STAND_ID = r.stand_id and ssu.CLOSE_STATE = '2' and pn.id = '" + id + "') as counts, "+
|
||||||
|
|
||||||
|
"(" +
|
||||||
|
"SELECT " +
|
||||||
|
"GROUP_CONCAT( DISTINCT DATE_FORMAT( ssu.PLAN_CLOSE_TIME, '%Y-%m-%d' ) ORDER BY ssu.PLAN_CLOSE_TIME ) " +
|
||||||
|
"FROM " +
|
||||||
|
"sar_stand_unqualified ssu inner join sar_stand_project_library pn on pn.project_number = ssu.product_id " +
|
||||||
|
"WHERE " +
|
||||||
|
"ssu.STAND_ID = r.stand_id " +
|
||||||
|
"AND ssu.CLOSE_STATE = '1' " +
|
||||||
|
"AND ssu.PLAN_CLOSE_TIME IS NOT NULL " +
|
||||||
|
"AND pn.id = '" + id + "' " +
|
||||||
|
") AS endTimes " +
|
||||||
|
|
||||||
"FROM " +
|
"FROM " +
|
||||||
"sar_bussioness_stand " +
|
"sar_bussioness_stand " +
|
||||||
"INNER JOIN sar_stand_project_relation r ON r.stand_id = sar_bussioness_stand.ID " +
|
"INNER JOIN sar_stand_project_relation r ON r.stand_id = sar_bussioness_stand.ID " +
|
||||||
@@ -732,8 +781,42 @@ public class SarStandProjectLibraryServiceImpl extends ServiceImpl<SarStandProje
|
|||||||
p.setZRBM(a.getZrbm());
|
p.setZRBM(a.getZrbm());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if (s.getUnCount()==0L && s.getCounts()>0L) {
|
||||||
|
p.setUnCount(s.getUnCount()); // uncount==0
|
||||||
|
}else if (s.getUnCount() == 0L && s.getCounts()==0L){
|
||||||
|
p.setUnCount(2L);
|
||||||
|
}else { // 有不满足时
|
||||||
|
p.setUnCount(1L); // 不符合
|
||||||
|
}
|
||||||
|
// 只显示第一个
|
||||||
|
if(StringUtils.isNotBlank(s.getEndTimes())){
|
||||||
|
String[] split = s.getEndTimes().split(",");
|
||||||
|
if(split.length>1){
|
||||||
|
p.setEndTimes(split[0]);
|
||||||
|
}else {
|
||||||
|
p.setEndTimes(s.getEndTimes());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (0L == s.getUnCount()) { // 没有不满足时
|
||||||
|
if (s.getIsCount() != 0L) { // 只有满足和不涉及---符合
|
||||||
|
p.setUnCount(0L); // 符合
|
||||||
|
} else if (s.getIsOverCount() != 0L) { //只有不涉及---不涉及
|
||||||
|
p.setUnCount(-1L); // 不涉及
|
||||||
|
}
|
||||||
|
}
|
||||||
list.add(p);
|
list.add(p);
|
||||||
}
|
}
|
||||||
|
for (StandAttrInfoDto data : list){
|
||||||
|
if(data.getUnCount()== 0){
|
||||||
|
data.setUnCountShow("符合"); // 符合
|
||||||
|
}
|
||||||
|
if(data.getUnCount()== 1){
|
||||||
|
data.setUnCountShow("不符合"); // 不符合
|
||||||
|
}
|
||||||
|
if(data.getUnCount()== -1){
|
||||||
|
data.setUnCountShow("不涉及"); // 不涉及
|
||||||
|
}
|
||||||
|
}
|
||||||
return list;
|
return list;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user