项目清单 新增字段符合-未符合-不展示逻辑 以及部分条件下未维护清单不显示问题
This commit is contained in:
committed by
zhaokaiyao@91isoft.com
parent
0e68e431ea
commit
4478fecf73
+9
-2
@@ -379,7 +379,8 @@ public class SarStandProjectLibraryServiceImpl extends ServiceImpl<SarStandProje
|
|||||||
|
|
||||||
QueryWrapper<SarStandardsInfo> wrapper1 = new QueryWrapper<>();
|
QueryWrapper<SarStandardsInfo> wrapper1 = new QueryWrapper<>();
|
||||||
wrapper1.select("ID","STAND_NUMBER","STAND_SORT","STAND_YEAR","STAND_NAME","STAND_EN_NAME","STAND_TYPE","(select count(*) from sar_stand_unqualified" +
|
wrapper1.select("ID","STAND_NUMBER","STAND_SORT","STAND_YEAR","STAND_NAME","STAND_EN_NAME","STAND_TYPE","(select count(*) from sar_stand_unqualified" +
|
||||||
" where STAND_ID = r.stand_id and CLOSE_STATE = '1' ) as unCount ",
|
" where STAND_ID = r.stand_id and CLOSE_STATE = '1' ) as unCount ","(select count(*) from sar_stand_unqualified" +
|
||||||
|
" where STAND_ID = r.stand_id and CLOSE_STATE = '2' ) as counts ",
|
||||||
"(select GROUP_CONCAT( DISTINCT DATE_FORMAT( PLAN_CLOSE_TIME, '%Y-%m-%d' ) ORDER BY PLAN_CLOSE_TIME ) from sar_stand_unqualified where " +
|
"(select GROUP_CONCAT( DISTINCT DATE_FORMAT( PLAN_CLOSE_TIME, '%Y-%m-%d' ) ORDER BY PLAN_CLOSE_TIME ) from sar_stand_unqualified where " +
|
||||||
" STAND_ID = r.stand_id and CLOSE_STATE = '1' AND PLAN_CLOSE_TIME is NOT NULL ) as endTimes ");
|
" STAND_ID = r.stand_id and CLOSE_STATE = '1' AND PLAN_CLOSE_TIME is NOT NULL ) as endTimes ");
|
||||||
wrapper1.last("INNER JOIN sar_stand_project_relation r ON r.stand_id = sar_standards_info.ID WHERE r.project_id ='" + standId + "'");
|
wrapper1.last("INNER JOIN sar_stand_project_relation r ON r.stand_id = sar_standards_info.ID WHERE r.project_id ='" + standId + "'");
|
||||||
@@ -408,7 +409,13 @@ public class SarStandProjectLibraryServiceImpl extends ServiceImpl<SarStandProje
|
|||||||
p.setStandName(s.getStandName());
|
p.setStandName(s.getStandName());
|
||||||
p.setStandType(s.getStandType());
|
p.setStandType(s.getStandType());
|
||||||
p.setStandEnName(s.getStandEnName());
|
p.setStandEnName(s.getStandEnName());
|
||||||
p.setUnCount(s.getUnCount());
|
if (s.getUnCount()==0L && s.getCounts()>0L) {
|
||||||
|
p.setUnCount(s.getUnCount());
|
||||||
|
}else if (s.getUnCount() == 0L && s.getCounts()==0L){
|
||||||
|
p.setUnCount(2L);
|
||||||
|
}else {
|
||||||
|
p.setUnCount(1L);
|
||||||
|
}
|
||||||
p.setEndTimes(s.getEndTimes());
|
p.setEndTimes(s.getEndTimes());
|
||||||
for (SarStandAttrInfo a:list2){
|
for (SarStandAttrInfo a:list2){
|
||||||
if(s.getId().equals(a.getStandId())){
|
if(s.getId().equals(a.getStandId())){
|
||||||
|
|||||||
+4
@@ -146,6 +146,10 @@ public class SarStandardsInfo extends BaseEntity {
|
|||||||
@TableField(exist = false)
|
@TableField(exist = false)
|
||||||
private Long unCount;
|
private Long unCount;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "为符合数量")
|
||||||
|
@TableField(exist = false)
|
||||||
|
private Long counts;
|
||||||
|
|
||||||
@ApiModelProperty(value = "整改完成时间")
|
@ApiModelProperty(value = "整改完成时间")
|
||||||
@TableField(exist = false)
|
@TableField(exist = false)
|
||||||
private String endTimes;
|
private String endTimes;
|
||||||
|
|||||||
+2
-2
@@ -120,10 +120,10 @@
|
|||||||
ON team.project_code = library.project_number
|
ON team.project_code = library.project_number
|
||||||
WHERE
|
WHERE
|
||||||
<if test="flag == 1">
|
<if test="flag == 1">
|
||||||
library.id NOT IN ( SELECT project_id FROM sar_stand_project_relation )
|
library.id NOT IN ( SELECT DISTINCT project_id FROM sar_stand_project_relation WHERE project_id is NOT NULL )
|
||||||
</if>
|
</if>
|
||||||
<if test="flag == 2">
|
<if test="flag == 2">
|
||||||
library.id IN ( SELECT project_id FROM sar_stand_project_relation )
|
library.id IN ( SELECT DISTINCT project_id FROM sar_stand_project_relation WHERE project_id is NOT NULL )
|
||||||
</if>
|
</if>
|
||||||
<if test="flag == 4">
|
<if test="flag == 4">
|
||||||
1=1
|
1=1
|
||||||
|
|||||||
Reference in New Issue
Block a user