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 org.springframework.transaction.annotation.Transactional;
import java.util.*; import java.util.*;
import java.util.stream.Collectors;
/** /**
* @Description: 企业 * @Description: 企业
@ -307,6 +308,7 @@ public class CompanyServiceImpl extends ServiceImpl<CompanyMapper, Company> impl
} }
secondComapnyList = getGroupStatisticsCompany(secondComapnyList, childComapnyList); secondComapnyList = getGroupStatisticsCompany(secondComapnyList, childComapnyList);
fistComapnyList = getGroupStatisticsCompany(fistComapnyList, secondComapnyList); fistComapnyList = getGroupStatisticsCompany(fistComapnyList, secondComapnyList);
fistComapnyList = filterCompanyByProject(fistComapnyList, map);
data.put("companyList", fistComapnyList); data.put("companyList", fistComapnyList);
} else if (tempCompany.getCompanyType() == 2) { } else if (tempCompany.getCompanyType() == 2) {
data.put("companyInfo", tempCompany); data.put("companyInfo", tempCompany);
@ -330,6 +332,7 @@ public class CompanyServiceImpl extends ServiceImpl<CompanyMapper, Company> impl
} }
} }
fistComapnyList = getGroupStatisticsCompany(fistComapnyList, companyList); fistComapnyList = getGroupStatisticsCompany(fistComapnyList, companyList);
fistComapnyList = filterCompanyByProject(fistComapnyList, map);
data.put("companyList", fistComapnyList); data.put("companyList", fistComapnyList);
} else if (tempCompany.getCompanyType() == 3) { } else if (tempCompany.getCompanyType() == 3) {
Company parentCompany = companyMapper.selectById(tempCompany.getParentId()); Company parentCompany = companyMapper.selectById(tempCompany.getParentId());
@ -352,6 +355,7 @@ public class CompanyServiceImpl extends ServiceImpl<CompanyMapper, Company> impl
companyList = getGroupStatisticsProject(companyList, projectList); companyList = getGroupStatisticsProject(companyList, projectList);
} }
} }
companyList = filterCompanyByProject(companyList, map);
data.put("companyList", companyList); data.put("companyList", companyList);
} else { } else {
Company parentCompany = companyMapper.selectById(tempCompany.getParentId()); Company parentCompany = companyMapper.selectById(tempCompany.getParentId());
@ -382,6 +386,14 @@ public class CompanyServiceImpl extends ServiceImpl<CompanyMapper, Company> impl
return data; 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 @Override
public void editCompanyBySn(Company company) { public void editCompanyBySn(Company company) {
QueryWrapper<Company> queryWrapper = new QueryWrapper<>(); QueryWrapper<Company> queryWrapper = new QueryWrapper<>();

View File

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

View File

@ -215,6 +215,9 @@
<if test="companyType == '5'.toString()"> <if test="companyType == '5'.toString()">
and cp.company_sn = #{sn} and cp.company_sn = #{sn}
</if> </if>
<if test="projectName != null and projectName != ''">
and a.project_name like concat('%', #{projectName}, '%')
</if>
</where> </where>
</select> </select>
<select id="selectVideoList" resultType="com.zhgd.jeecg.common.mybatis.EntityMap"> <select id="selectVideoList" resultType="com.zhgd.jeecg.common.mybatis.EntityMap">
@ -655,22 +658,16 @@
where p.project_sn = #{projectSn} where p.project_sn = #{projectSn}
</select> </select>
<select id="groupByProjectType" resultType="com.zhgd.xmgl.modules.project.entity.vo.GroupByProjectTypeVo"> <select id="groupByProjectType" resultType="com.zhgd.xmgl.modules.project.entity.vo.GroupByProjectTypeVo">
SELECT COUNT(p.project_id) AS count,p.custom_project_type SELECT COUNT(p.project_id) AS count, p.custom_project_type
FROM FROM `project` p
`project` p GROUP BY p.custom_project_type
GROUP BY HAVING p.custom_project_type is NOT null
p.custom_project_type
HAVING
p.custom_project_type is NOT null
</select> </select>
<select id="groupByProjectProgress" resultType="com.zhgd.xmgl.modules.project.entity.vo.GroupByProjectProgressVo"> <select id="groupByProjectProgress" resultType="com.zhgd.xmgl.modules.project.entity.vo.GroupByProjectProgressVo">
SELECT COUNT(p.project_id) AS count,p.project_progress SELECT COUNT(p.project_id) AS count, p.project_progress
FROM FROM `project` p
`project` p GROUP BY p.project_progress
GROUP BY HAVING p.project_progress is NOT null
p.project_progress
HAVING
p.project_progress is NOT null
</select> </select>
<select id="queryAllProjectAndVideoInfo" <select id="queryAllProjectAndVideoInfo"
resultType="com.zhgd.xmgl.modules.yunlianwanwu.middle.entity.bo.ProjectBo"> resultType="com.zhgd.xmgl.modules.yunlianwanwu.middle.entity.bo.ProjectBo">

View File

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