|
@@ -55,18 +55,34 @@ public class QcsMainCostController {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- //数据导入
|
|
|
+ //预防、鉴定数据导入
|
|
|
@RequestMapping("/importMainCost")
|
|
|
@ResponseBody
|
|
|
public R importMainCost(@RequestParam MultipartFile file, String costType, String unitId) {
|
|
|
try {
|
|
|
if (file == null) {
|
|
|
- return R.error("文件解析失败");
|
|
|
+ return R.error("预防鉴定文件解析失败");
|
|
|
}
|
|
|
return qcsMainCostService.importMainCost(file, costType, unitId);
|
|
|
} catch (Exception e) {
|
|
|
e.printStackTrace();
|
|
|
- log.info("数据导入异常..." + e.getMessage());
|
|
|
+ log.info("预防鉴定数据导入异常..." + e.getMessage());
|
|
|
+ return R.error();
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ //内外部数据导入
|
|
|
+ @RequestMapping("/importLossMainCost")
|
|
|
+ @ResponseBody
|
|
|
+ public R importLossMainCost(@RequestParam MultipartFile file, String costType, String unitId) {
|
|
|
+ try {
|
|
|
+ if (file == null) {
|
|
|
+ return R.error("内外部文件解析失败");
|
|
|
+ }
|
|
|
+ return qcsMainCostService.importLossMainCost(file, costType, unitId);
|
|
|
+ } catch (Exception e) {
|
|
|
+ e.printStackTrace();
|
|
|
+ log.info("内外部数据导入异常..." + e.getMessage());
|
|
|
return R.error();
|
|
|
}
|
|
|
}
|