|
|
@@ -18,6 +18,8 @@ import com.zd.laboratory.mqtt.service.impl.CommonSend;
|
|
|
import com.zd.laboratory.service.ILabNotifyplanService;
|
|
|
import com.zd.model.entity.SysUser;
|
|
|
import org.apache.commons.collections4.CollectionUtils;
|
|
|
+import org.slf4j.Logger;
|
|
|
+import org.slf4j.LoggerFactory;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.stereotype.Service;
|
|
|
import javax.servlet.http.HttpServletRequest;
|
|
|
@@ -39,6 +41,7 @@ import java.util.Locale;
|
|
|
@Service
|
|
|
public class LabNotifyplanServiceImpl implements ILabNotifyplanService
|
|
|
{
|
|
|
+ private static final Logger logger = LoggerFactory.getLogger(ILabNotifyplanService.class);
|
|
|
@Autowired
|
|
|
private LabNotifyplanMapper labNotifyplanMapper;
|
|
|
|
|
|
@@ -155,22 +158,20 @@ public class LabNotifyplanServiceImpl implements ILabNotifyplanService
|
|
|
}
|
|
|
|
|
|
} catch (IOException e) {
|
|
|
- //e.printStackTrace();
|
|
|
if(intstream!=null){
|
|
|
try {
|
|
|
intstream.close();
|
|
|
} catch (IOException ex) {
|
|
|
- ex.printStackTrace();
|
|
|
+ logger.error("文件解析异常:"+ex);
|
|
|
}
|
|
|
}
|
|
|
throw new ServiceException("文件解析异常!");
|
|
|
} catch (Exception e) {
|
|
|
- //e.printStackTrace();
|
|
|
if(intstream!=null){
|
|
|
try {
|
|
|
intstream.close();
|
|
|
} catch (IOException ex) {
|
|
|
- ex.printStackTrace();
|
|
|
+ logger.error("文件解析异常:"+ex);
|
|
|
}
|
|
|
}
|
|
|
throw new ServiceException("文件解析异常!");
|
|
|
@@ -233,22 +234,20 @@ public class LabNotifyplanServiceImpl implements ILabNotifyplanService
|
|
|
}
|
|
|
|
|
|
} catch (IOException e) {
|
|
|
- //e.printStackTrace();
|
|
|
if(intstream!=null){
|
|
|
try {
|
|
|
intstream.close();
|
|
|
} catch (IOException ex) {
|
|
|
- ex.printStackTrace();
|
|
|
+ logger.error("文件解析异常!"+ex);
|
|
|
}
|
|
|
}
|
|
|
throw new ServiceException("文件解析异常!");
|
|
|
} catch (Exception e) {
|
|
|
- //e.printStackTrace();
|
|
|
if(intstream!=null){
|
|
|
try {
|
|
|
intstream.close();
|
|
|
} catch (IOException ex) {
|
|
|
- ex.printStackTrace();
|
|
|
+ logger.error("文件解析异常!"+ex);
|
|
|
}
|
|
|
}
|
|
|
throw new ServiceException("文件解析异常!");
|
|
|
@@ -298,12 +297,11 @@ public class LabNotifyplanServiceImpl implements ILabNotifyplanService
|
|
|
intstream.close();
|
|
|
}
|
|
|
}catch (Exception e) {
|
|
|
- //e.printStackTrace();
|
|
|
if(intstream!=null){
|
|
|
try {
|
|
|
intstream.close();
|
|
|
} catch (IOException ex) {
|
|
|
- ex.printStackTrace();
|
|
|
+ logger.error("文件上传异常:"+ex);
|
|
|
}
|
|
|
}
|
|
|
throw new ServiceException("上传文件格式解析异常!");
|
|
|
@@ -397,17 +395,16 @@ public class LabNotifyplanServiceImpl implements ILabNotifyplanService
|
|
|
try {
|
|
|
intstream.close();
|
|
|
} catch (IOException ex) {
|
|
|
- ex.printStackTrace();
|
|
|
+ logger.error("文件解析异常:"+ex);
|
|
|
}
|
|
|
}
|
|
|
throw new ServiceException("文件解析异常!");
|
|
|
} catch (Exception e) {
|
|
|
- //e.printStackTrace();
|
|
|
if(intstream!=null){
|
|
|
try {
|
|
|
intstream.close();
|
|
|
} catch (IOException ex) {
|
|
|
- ex.printStackTrace();
|
|
|
+ logger.error("文件解析异常:"+ex);
|
|
|
}
|
|
|
}
|
|
|
throw new ServiceException("文件解析异常!");
|