代码调整

This commit is contained in:
2024-12-03 10:24:08 +08:00
parent 6a3b848dc0
commit 9be058b9e9
4 changed files with 29 additions and 1 deletions

View File

@@ -106,6 +106,13 @@ public class SgEventController extends BaseController {
@OperateInfo(info = LogEnum.BUSINESS_COMMON, operateType = OperateType.ADD)
public HttpResult<String> importEventData(@RequestParam("file") MultipartFile file, @RequestParam("incomingLineId") String incomingLineId, @RequestParam("productLineId") String productLineId, HttpServletResponse response) {
String methodDescribe = getMethodDescribe("importEventData");
// 检查文件MIME类型是否为csv
String contentType = file.getContentType();
if (!"text/csv".equals(contentType)) {
throw new BusinessException(AdvanceResponseEnum.INVALID_FILE_TYPE);
}
ImportParams params = new ImportParams();
params.setHeadRows(1);
params.setNeedVerify(true);