提交 8f4ba123 authored 作者: 孙洁清's avatar 孙洁清

v1.1

上级 238b47a5
...@@ -20,6 +20,7 @@ import org.springframework.beans.factory.annotation.Autowired; ...@@ -20,6 +20,7 @@ import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.core.io.Resource; import org.springframework.core.io.Resource;
import org.springframework.http.HttpEntity; import org.springframework.http.HttpEntity;
import org.springframework.http.HttpMethod; import org.springframework.http.HttpMethod;
import org.springframework.http.HttpStatus;
import org.springframework.http.ResponseEntity; import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.*; import org.springframework.web.bind.annotation.*;
import org.springframework.web.client.RestTemplate; import org.springframework.web.client.RestTemplate;
...@@ -381,6 +382,9 @@ public class InspectController { ...@@ -381,6 +382,9 @@ public class InspectController {
evaluation.setProjectName(reform.getProjectName()); evaluation.setProjectName(reform.getProjectName());
evaluation.setAuthority(reform.getAuthority()); evaluation.setAuthority(reform.getAuthority());
Evaluation save = evaluationService.save(evaluation); Evaluation save = evaluationService.save(evaluation);
if(save==null){
return ResponseEntity.status(400).build();
}
return ResponseEntity.ok(save.getId()); return ResponseEntity.ok(save.getId());
} }
......
...@@ -9,6 +9,7 @@ import com.zjty.inspect.service.EvaluationService; ...@@ -9,6 +9,7 @@ import com.zjty.inspect.service.EvaluationService;
import com.zjty.inspect.utils.TimeUtil; import com.zjty.inspect.utils.TimeUtil;
import com.zjty.inspect.utils.UUIDUtil; import com.zjty.inspect.utils.UUIDUtil;
import io.netty.util.internal.StringUtil; import io.netty.util.internal.StringUtil;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.domain.Page; import org.springframework.data.domain.Page;
import org.springframework.data.domain.PageRequest; import org.springframework.data.domain.PageRequest;
...@@ -27,6 +28,7 @@ import java.util.List; ...@@ -27,6 +28,7 @@ import java.util.List;
import java.util.Map; import java.util.Map;
import java.util.Optional; import java.util.Optional;
@Slf4j
@Service @Service
@Transactional(rollbackFor = Exception.class) @Transactional(rollbackFor = Exception.class)
public class EvaluationServiceImpl implements EvaluationService { public class EvaluationServiceImpl implements EvaluationService {
...@@ -37,6 +39,7 @@ public class EvaluationServiceImpl implements EvaluationService { ...@@ -37,6 +39,7 @@ public class EvaluationServiceImpl implements EvaluationService {
private ExcelDataDao excelDataDao; private ExcelDataDao excelDataDao;
@Override @Override
public Evaluation save(Evaluation evaluation) { public Evaluation save(Evaluation evaluation) {
log.info("evaluation:{}",evaluation);
if (StringUtils.isEmpty(evaluation.getInEva())) { if (StringUtils.isEmpty(evaluation.getInEva())) {
return null; return null;
} }
......
...@@ -91,7 +91,7 @@ public class ExcelUtil { ...@@ -91,7 +91,7 @@ public class ExcelUtil {
} else { } else {
String year = time.replaceAll("年", ""); String year = time.replaceAll("年", "");
Integer newYear = Integer.valueOf(year); Integer newYear = Integer.valueOf(year);
reform.setTime(newYear); reform.setTime(newYear*12);
} }
} }
String address = getExcelCell(7, 2, sheetAt); String address = getExcelCell(7, 2, sheetAt);
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论