bug修复

This commit is contained in:
guo 2023-08-29 17:40:42 +08:00
parent 814726bc70
commit 333f232034
4 changed files with 48 additions and 35 deletions

View File

@ -36,6 +36,7 @@ import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import java.util.*;
import java.util.stream.Collectors;
/**
* @Description: 企业
@ -307,6 +308,7 @@ public class CompanyServiceImpl extends ServiceImpl<CompanyMapper, Company> impl
}
secondComapnyList = getGroupStatisticsCompany(secondComapnyList, childComapnyList);
fistComapnyList = getGroupStatisticsCompany(fistComapnyList, secondComapnyList);
fistComapnyList = filterCompanyByProject(fistComapnyList, map);
data.put("companyList", fistComapnyList);
} else if (tempCompany.getCompanyType() == 2) {
data.put("companyInfo", tempCompany);
@ -330,6 +332,7 @@ public class CompanyServiceImpl extends ServiceImpl<CompanyMapper, Company> impl
}
}
fistComapnyList = getGroupStatisticsCompany(fistComapnyList, companyList);
fistComapnyList = filterCompanyByProject(fistComapnyList, map);
data.put("companyList", fistComapnyList);
} else if (tempCompany.getCompanyType() == 3) {
Company parentCompany = companyMapper.selectById(tempCompany.getParentId());
@ -352,6 +355,7 @@ public class CompanyServiceImpl extends ServiceImpl<CompanyMapper, Company> impl
companyList = getGroupStatisticsProject(companyList, projectList);
}
}
companyList = filterCompanyByProject(companyList, map);
data.put("companyList", companyList);
} else {
Company parentCompany = companyMapper.selectById(tempCompany.getParentId());
@ -382,6 +386,14 @@ public class CompanyServiceImpl extends ServiceImpl<CompanyMapper, Company> impl
return data;
}
@NotNull
private List<EntityMap> filterCompanyByProject(List<EntityMap> fistComapnyList, Map<String, Object> map) {
if (StringUtils.isBlank(MapUtils.getString(map, "projectName"))) {
return fistComapnyList;
}
return fistComapnyList.stream().filter(entityMap -> MapUtils.getInteger(entityMap, "projectNum") != 0).collect(Collectors.toList());
}
@Override
public void editCompanyBySn(Company company) {
QueryWrapper<Company> queryWrapper = new QueryWrapper<>();

View File

@ -397,14 +397,14 @@
and f.company_sn = #{sn}
</if>
<if test="companyType == '3'.toString()">
#{sn}
and b.company_sn = #{sn}
</if>
<if test="companyType == '4'.toString()">
#{sn}
and a.project_sn = #{sn}
GROUP BY a.project_id
</if>
<if test="companyType == '5'.toString()">
#{sn}
GROUP BY a.project_id
and cp.company_sn = #{sn}
</if>
</where>
order by devNum desc

View File

@ -215,6 +215,9 @@
<if test="companyType == '5'.toString()">
and cp.company_sn = #{sn}
</if>
<if test="projectName != null and projectName != ''">
and a.project_name like concat('%', #{projectName}, '%')
</if>
</where>
</select>
<select id="selectVideoList" resultType="com.zhgd.jeecg.common.mybatis.EntityMap">
@ -463,14 +466,14 @@
IFNULL(SUM((CASE WHEN a.bulid_status = 3 THEN 1 else 0 END)), 0) checkProjectNum,
IFNULL(SUM((CASE WHEN a.bulid_status = 4 THEN 1 else 0 END)), 0) completedProjectNum,
IFNULL(SUM((CASE
WHEN DATE_FORMAT(a.start_work_date, "%Y") = DATE_FORMAT(now(), "%Y") THEN 1
else 0 END)), 0)
newlyBuildProjectNum,
IFNULL(SUM((CASE WHEN a.major_project_type = 1 THEN 1 else 0 END)), 0) majorProjectNum
WHEN DATE_FORMAT(a.start_work_date, "%Y") = DATE_FORMAT(now(), "%Y") THEN 1
else 0 END)), 0)
newlyBuildProjectNum,
IFNULL(SUM((CASE WHEN a.major_project_type = 1 THEN 1 else 0 END)), 0) majorProjectNum
FROM project a
INNER JOIN company cp ON a.company_sn = cp.company_sn
INNER JOIN company b ON cp.parent_id = b.company_id
Left JOIN company f ON b.parent_id = f.company_id
INNER JOIN company cp ON a.company_sn = cp.company_sn
INNER JOIN company b ON cp.parent_id = b.company_id
Left JOIN company f ON b.parent_id = f.company_id
<where>
<if test="companyType == '1'.toString()">
and f.headquarters_sn = #{sn}
@ -655,22 +658,16 @@
where p.project_sn = #{projectSn}
</select>
<select id="groupByProjectType" resultType="com.zhgd.xmgl.modules.project.entity.vo.GroupByProjectTypeVo">
SELECT COUNT(p.project_id) AS count,p.custom_project_type
FROM
`project` p
GROUP BY
p.custom_project_type
HAVING
p.custom_project_type is NOT null
SELECT COUNT(p.project_id) AS count, p.custom_project_type
FROM `project` p
GROUP BY p.custom_project_type
HAVING p.custom_project_type is NOT null
</select>
<select id="groupByProjectProgress" resultType="com.zhgd.xmgl.modules.project.entity.vo.GroupByProjectProgressVo">
SELECT COUNT(p.project_id) AS count,p.project_progress
FROM
`project` p
GROUP BY
p.project_progress
HAVING
p.project_progress is NOT null
SELECT COUNT(p.project_id) AS count, p.project_progress
FROM `project` p
GROUP BY p.project_progress
HAVING p.project_progress is NOT null
</select>
<select id="queryAllProjectAndVideoInfo"
resultType="com.zhgd.xmgl.modules.yunlianwanwu.middle.entity.bo.ProjectBo">

View File

@ -1,12 +1,12 @@
http.port=21323
spring.datasource.url=jdbc:mysql://localhost:3306/wisdomsite?useUnicode=true&characterEncoding=utf-8&zeroDateTimeBehavior=convertToNull&autoReconnect=true&useSSL=false
http.port=23912
spring.datasource.url=jdbc:mysql://127.0.0.1:3306/wisdomsite?useUnicode=true&characterEncoding=utf-8&zeroDateTimeBehavior=convertToNull&autoReconnect=true&useSSL=false
spring.datasource.username=ENC(XR4C/hvTYCUqudS49Wh/jA==)
spring.datasource.password=ENC(xT9YaFn7TUdYeNlqJidLZg==)
server.port=8188
spring.datasource.password=ENC(LsKaVL2ycDu+uUNoPndYLA==)
server.port=30002
basePath=C:/jxj/prod/backEnd/itbgpImage/
server.tomcat.basedir=C:/jxj/prod/backEnd/tempImage/
arcsoft.dllPath=C:/jxj/prod/backEnd/dll
security.enable=false
security.enable=true
isGetStandardData=false
isGetEnvironmentData=false
isGetFaceFeatureDate=false
@ -15,7 +15,7 @@ video.alarm.newUrl=223.82.100.80:6040
wx-appid=
wx-AppSecret=
mqtt-scope=zjsjTopic
serverUrl=http://127.0.0.1:8188/
serverUrl=http://127.0.0.1:23912/
#视频分析url
video-analysis-url=
server.ssl.enabled=false
@ -56,7 +56,11 @@ double-carbon.water-data-url=http://test.cesms.net
double-carbon.ammeter-data-url=http://test.cesms.net
license.licensePath=C:/jxj/prod/backEnd/license/license.lic
license.publicKeysStorePath=C:/jxj/prod/backEnd/license/publicCerts.keystore
#高支模的tcp服务端的端口号
high_formwork.netty.port=15333
#同步bim进度管理的ip端口号
bimProgressIpPort=http://47.105.67.193:8086
#图片访问路径
sj.upload.image.url.prefix=http://127.0.0.1:11111/image/
active.environment.name=dev
#携稳扬尘
xiwon.postEnvironmentDustData=http://openapi.xiwon588.com/dust/realTimeData
#携稳的appid和appsecret
xiwon.appId=1690940695416
xiwon.appSecret=b6162078-6f1c-4f2c-8cd5-0873f45199b2