|
@@ -12,6 +12,7 @@ import com.gree.mall.manager.exception.RemoteServiceException;
|
|
|
import com.gree.mall.manager.helper.ResponseHelper;
|
|
|
import com.gree.mall.manager.logic.policy.PolicyOrderLogic;
|
|
|
import com.gree.mall.manager.plus.entity.PolicyOrder;
|
|
|
+import com.gree.mall.manager.utils.excel.ExcelUtils;
|
|
|
import com.gree.mall.manager.zfire.bean.ZfireParamBean;
|
|
|
import com.gree.mall.manager.zfire.util.FieldUtils;
|
|
|
import io.swagger.annotations.Api;
|
|
@@ -20,10 +21,13 @@ import io.swagger.annotations.ApiParam;
|
|
|
import lombok.extern.slf4j.Slf4j;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.web.bind.annotation.*;
|
|
|
+import org.springframework.web.multipart.MultipartFile;
|
|
|
|
|
|
import javax.servlet.http.HttpServletRequest;
|
|
|
import javax.servlet.http.HttpServletResponse;
|
|
|
+import java.io.IOException;
|
|
|
import java.text.ParseException;
|
|
|
+import java.util.List;
|
|
|
|
|
|
@Slf4j
|
|
|
@RestController
|
|
@@ -136,5 +140,16 @@ public class PolicyOrderController {
|
|
|
}
|
|
|
|
|
|
|
|
|
+ @PostMapping("/import")
|
|
|
+ @ApiOperation(value = "工伤保险导入购买")
|
|
|
+ public ResponseHelper wait2Del(
|
|
|
+ @RequestParam MultipartFile file
|
|
|
+ ) throws RemoteServiceException, IOException {
|
|
|
+ List<Object> objects = ExcelUtils.importExcel(file);
|
|
|
+ policyOrderLogic.importData(objects);
|
|
|
+ return ResponseHelper.success();
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
|
|
|
}
|