This commit is contained in:
马三炮 2025-09-16 16:26:10 +08:00
parent c20c941662
commit 97eb09437b
3 changed files with 14 additions and 3 deletions

View File

@ -28,4 +28,6 @@ public interface SysDeptMapper {
List<EquipmentDetail> detailsInfo(EquipmentDetail equipmentDetail);
List<NewmydevInfo> listFromDevInfo(String companyId);
String getCityName(String city);
}

View File

@ -119,6 +119,7 @@ public class ProvinceScreenServiceImpl implements ProvinceScreenService {
List<Map<String,Object>> res = new ArrayList<>();
for (SysDept sysDeptNew:sysDeptList) {
Map<String,Object> dept = new HashMap<>();
dept.put("deptName",sysDeptNew.getDeptName());
devInfoReq.setOwnCo(Math.toIntExact(sysDeptNew.getDeptId()));
//装备价值
@ -139,6 +140,9 @@ public class ProvinceScreenServiceImpl implements ProvinceScreenService {
devInfoReq.setTypeId(3);
int cableNum = devInfoMapper.getLineNum(devInfoReq);
dept.put("cableNum",cableNum);
//所在城市
String cityName = sysDeptMapper.getCityName(sysDeptNew.getCity());
dept.put("cityName",cityName);
// 获取装备转换率
DeptConfigRateSummary user = new DeptConfigRateSummary();
List<DeptConfigRateSummary> list = sysDeptService.selectDeptConfigRatePivot(user);

View File

@ -13,7 +13,8 @@
d.status,
d.del_flag,
d.create_by,
d.create_time
d.create_time,
d.city
from sys_dept d
</sql>
<resultMap type="com.bonus.system.api.domain.SysDept" id="SysDeptResult">
@ -110,7 +111,7 @@
grouped.dept_id AS companyId,
grouped.config_type AS configType,
grouped.config_value AS configValue,
grouped.config_rate AS configRate,
if(grouped.config_rate='/',0,grouped.config_rate) AS configRate,
IFNULL(order_stat.order_count, 0) AS orderCount
FROM
(
@ -119,7 +120,7 @@
type_id,
config_type,
SUM(config_value) AS config_value,
SUM(config_rate) AS config_rate
SUM(if(config_rate='/',0,config_rate)) AS config_rate
FROM ma_dept_config
GROUP BY dept_id, type_id, config_type
) grouped
@ -236,6 +237,10 @@
GROUP BY
mt2.type_id
</select>
<select id="getCityName" resultType="java.lang.String">
select name
from base_address where code = #{city}
</select>
</mapper>