|
@@ -27,7 +27,6 @@ import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.security.access.prepost.PreAuthorize;
|
|
|
import org.springframework.web.bind.annotation.*;
|
|
|
|
|
|
-import javax.servlet.http.HttpServletResponse;
|
|
|
import java.io.IOException;
|
|
|
import java.io.OutputStream;
|
|
|
import java.nio.file.Files;
|
|
@@ -149,8 +148,10 @@ public class TEmergencyCctvController extends BaseController {
|
|
|
TPatrolPlan tPatrolPlan = tPatrolPlanService.selectTPatrolPlanById(planId);
|
|
|
if (Objects.nonNull(tPatrolPlan) && Objects.nonNull(tPatrolPlan.getConfirmed())) {
|
|
|
SysUser sysUser = sysUserService.selectUserById(Long.valueOf(tPatrolPlan.getConfirmed()));
|
|
|
- confirmed = sysUser.getSignUrl();
|
|
|
- confirmedDate = tPatrolPlan.getConfirmDate();
|
|
|
+ if (sysUser != null) {
|
|
|
+ confirmed = sysUser.getSignUrl();
|
|
|
+ confirmedDate = tPatrolPlan.getConfirmDate();
|
|
|
+ }
|
|
|
}
|
|
|
// 循环后下一行
|
|
|
int nextRowNum = 5 + list.size();
|
|
@@ -200,7 +201,7 @@ public class TEmergencyCctvController extends BaseController {
|
|
|
}
|
|
|
if (row.getRowNum() == 2) {
|
|
|
for (Cell cell : row) {
|
|
|
- if (cell.getColumnIndex() == 0 || cell.getColumnIndex() == 1 )
|
|
|
+ if (cell.getColumnIndex() == 0 || cell.getColumnIndex() == 1)
|
|
|
cell.setCellStyle(style2);
|
|
|
else
|
|
|
cell.setCellStyle(style);
|
|
@@ -297,7 +298,7 @@ public class TEmergencyCctvController extends BaseController {
|
|
|
tEmergencyCctv.setCheckDate(new Date());
|
|
|
TEmergencyCctv item = tEmergencyCctvService.selectTEmergencyCctvById(tEmergencyCctv.getId());
|
|
|
TPatrolPlan tPatrolPlan = tPatrolPlanService.selectTPatrolPlanById(tEmergencyCctv.getPlanId());
|
|
|
- if (tPatrolPlan.getStatus()==1){
|
|
|
+ if (tPatrolPlan.getStatus() == 1) {
|
|
|
return AjaxResult.error("当前选择的计划已确认!");
|
|
|
}
|
|
|
if (!"1".equals(item.getCheckStatus())) {
|