Commit a36ff5a7 authored by lisong's avatar lisong

修改bug

parent 902d00dc
......@@ -16,12 +16,15 @@
hpd.parent_id = #{id}
</select>
<select id="countHouseholdById" resultType="java.lang.Integer">
SELECT COUNT(1)
FROM household_pv hp
WHERE hp.platform_company_id IN
(SELECT hpd.sequence_nbr
FROM household_pv_district hpd
WHERE hpd.sequence_nbr = #{id} OR hpd.parent_id = #{id})
SELECT
COUNT( 1 )
FROM
household_pv hp
LEFT JOIN household_pv_install hpi ON hp.sequence_nbr = hpi.household_pv_id
WHERE
hp.platform_company_id = #{id}
OR hp.district_id = #{id}
OR hpi.platform_company_id = #{id}
</select>
<select id="selectIds" resultType="java.lang.Long">
......
......@@ -177,6 +177,9 @@ public class HouseholdPvDeviceController extends BaseController {
if (EquipType.OTHER.getName().equals(dto.getType()) && ObjectUtils.isEmpty(dto.getDescription())) {
return "第" + line + "行" + "描述不能为空!";
}
if (EquipType.OTHER.getName().equals(dto.getType()) && dto.getDescription().length() > 1000){
return "第" + line + "行" + "描述最多输入1000个字符!";
}
line = line + 1;
}
}
......
......@@ -255,16 +255,18 @@ public class HouseholdPvServiceImpl extends BaseService<HouseholdPvDto, Househol
StringBuilder stringBuilder = new StringBuilder();
list.forEach(item -> {
stringBuilder.append("类型:").append(ObjectUtils.isEmpty(item.getType()) ? "" : item.getType());
stringBuilder.append(" 名称:").append(ObjectUtils.isEmpty(item.getName()) ? "" : item.getName());
stringBuilder.append(" 品牌:").append(ObjectUtils.isEmpty(item.getBrand()) ? "" : item.getBrand());
stringBuilder.append(" SN编码:").append(ObjectUtils.isEmpty(item.getSNCode()) ? "" : item.getSNCode());
if (!ObjectUtils.isEmpty(item.getType()) && item.getType().equals(EquipType.OTHER.getName())) {
stringBuilder.append(" 描述:").append(ObjectUtils.isEmpty(item.getDescription()) ? "" : item.getDescription());
}else {
stringBuilder.append(" 名称:").append(ObjectUtils.isEmpty(item.getName()) ? "" : item.getName());
stringBuilder.append(" 品牌:").append(ObjectUtils.isEmpty(item.getBrand()) ? "" : item.getBrand());
stringBuilder.append(" 型号:").append(ObjectUtils.isEmpty(item.getModel()) ? "" : item.getModel());
stringBuilder.append(" SN编码:").append(ObjectUtils.isEmpty(item.getSNCode()) ? "" : item.getSNCode());
}
if (!ObjectUtils.isEmpty(item.getType()) && item.getType().equals(EquipType.INVERTER.getName())) {
stringBuilder.append(" 序列号:").append(ObjectUtils.isEmpty(item.getSerialNumber()) ? "" : item.getSerialNumber());
stringBuilder.append(" 功率:").append(ObjectUtils.isEmpty(item.getPower()) ? "" : item.getPower());
}
if (!ObjectUtils.isEmpty(item.getType()) && item.getType().equals(EquipType.OTHER.getName())) {
stringBuilder.append(" 描述:").append(ObjectUtils.isEmpty(item.getDescription()) ? "" : item.getDescription());
}
stringBuilder.append("\r\n");
});
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment