提交 b3ddb87e authored 作者: zhoushaopan's avatar zhoushaopan

fix(日常检查模块): 解决了数据为空的原因

解决了数据为空的原因
上级 7b4e7be4
...@@ -282,7 +282,7 @@ public class DailyCheckBillServiceImpl implements DailyCheckBillService { ...@@ -282,7 +282,7 @@ public class DailyCheckBillServiceImpl implements DailyCheckBillService {
//根据billid查询实体 //根据billid查询实体
DailyCheckBill checkBill = getOne(billId); DailyCheckBill checkBill = getOne(billId);
//日常设备信息 //日常设备信息
if (checkBill.getCheckDetail() != null) { if (checkBill.getCheckDetail() != null && !"".equals(checkBill.getCheckDetail())) {
String dayDeviceList = checkBill.getCheckDetail(); String dayDeviceList = checkBill.getCheckDetail();
String[] ids = dayDeviceList.split(","); String[] ids = dayDeviceList.split(",");
...@@ -395,4 +395,13 @@ public class DailyCheckBillServiceImpl implements DailyCheckBillService { ...@@ -395,4 +395,13 @@ public class DailyCheckBillServiceImpl implements DailyCheckBillService {
historyDailyDeviceBillService.batchSave(historyDeviceBillList); historyDailyDeviceBillService.batchSave(historyDeviceBillList);
} }
public static void main(String[] args) {
String a = "";
String[] split = a.split(",");
for (int i = 0; i < split.length; i++) {
System.out.println("split = " + split[i]);
}
System.out.println("split = " + split.length);
}
} }
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论