|
@@ -6,8 +6,10 @@ import com.rongwei.bscommon.sys.service.ZhcxProjectManageService;
|
|
|
import com.rongwei.bsentity.domain.ZhcxProjectManageDo;
|
|
|
import com.rongwei.bsentity.dto.project.SavePorjectSummaryDto;
|
|
|
import com.rongwei.rwcommon.base.R;
|
|
|
+import com.rongwei.rwcommon.base.exception.CustomException;
|
|
|
import io.swagger.annotations.Api;
|
|
|
import io.swagger.annotations.ApiOperation;
|
|
|
+import lombok.extern.slf4j.Slf4j;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.web.bind.annotation.PostMapping;
|
|
|
import org.springframework.web.bind.annotation.RequestBody;
|
|
@@ -27,6 +29,7 @@ import java.util.Map;
|
|
|
@RestController
|
|
|
@RequestMapping("/zhcxProjectManage")
|
|
|
@Api(tags = "项目管理")
|
|
|
+@Slf4j
|
|
|
public class ZhcxProjectManageController {
|
|
|
|
|
|
@Autowired
|
|
@@ -55,7 +58,15 @@ public class ZhcxProjectManageController {
|
|
|
@PostMapping("/saveSummaryData")
|
|
|
@ApiOperation("保存汇总文件数据")
|
|
|
public R saveSummaryData(@RequestBody SavePorjectSummaryDto dto) {
|
|
|
- service.saveSummaryData(dto);
|
|
|
+ try {
|
|
|
+ service.saveSummaryData(dto);
|
|
|
+ } catch (CustomException e) {
|
|
|
+ log.error("保存自定义异常", e);
|
|
|
+ R.error("保存异常");
|
|
|
+ } catch (Exception e) {
|
|
|
+ log.error("保存异常", e);
|
|
|
+ return R.error("保存异常");
|
|
|
+ }
|
|
|
return R.ok();
|
|
|
}
|
|
|
|