更新对非法数据的判断
This commit is contained in:
parent
ef7330f48f
commit
c819bc13ba
@ -80,7 +80,6 @@ public class XhpcInvoiceController extends BaseController {
|
||||
return AjaxResult.success(fileAddress);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 给指定用户开发票,开票完成之后将开出的电子发票发送至用户的接收邮箱
|
||||
* 如果失败,则标记发票为失败发票
|
||||
|
||||
@ -2,6 +2,7 @@ package com.xhpc.workorder.service.impl;
|
||||
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import com.xhpc.common.core.exception.CustomException;
|
||||
import com.xhpc.common.core.utils.StringUtils;
|
||||
import com.xhpc.workorder.domain.XhpcStationDeviceDomain;
|
||||
import com.xhpc.workorder.domain.XhpcWorkStationDomain;
|
||||
import com.xhpc.workorder.mapper.XhpcStationDeviceMapper;
|
||||
@ -52,15 +53,15 @@ public class WorkStationServiceImpl implements WorkStationService {
|
||||
StringBuilder failureMsg = new StringBuilder();
|
||||
|
||||
for (XhpcStationDeviceDomain domain: deviceDomainList){
|
||||
if ("".equals(domain.getStationName())){
|
||||
if (StringUtils.isEmpty(domain.getStationName())){
|
||||
failureNum ++;
|
||||
failureMsg.append("<br/>电站名称: ").append(domain.getStationName()).append(" ,设备编码: ").append(domain.getSerialNumber()).append(" 导入失败; 失败原因: 必填字段为空。");
|
||||
failureMsg.append("<br/>电站名称: ").append(domain.getStationName()).append(" ,设备编码: ").append(domain.getSerialNumber()).append(" 导入失败; 失败原因: 场站名称为空。");
|
||||
continue;
|
||||
}
|
||||
XhpcWorkStationDomain stationDomain = stationMapper.selectByName(domain.getStationName());
|
||||
if (stationDomain == null){
|
||||
failureNum ++;
|
||||
failureMsg.append("<br/>电站名称: ").append(domain.getStationName()).append(" ,设备编码: ").append(domain.getSerialNumber()).append(" 导入失败; 失败原因: 必填字段为空。");
|
||||
failureMsg.append("<br/>电站名称: ").append(domain.getStationName()).append(" ,设备编码: ").append(domain.getSerialNumber()).append(" 导入失败; 失败原因: 场站未找到。");
|
||||
continue;
|
||||
} else {
|
||||
domain.setDeviceId(stationDomain.getWorkStationId());
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user