| | |
| | | import com.lf.server.entity.data.VerEntity; |
| | | import com.lf.server.entity.sys.UserEntity; |
| | | import com.lf.server.helper.StringHelper; |
| | | import com.lf.server.service.all.UploadAttachService; |
| | | import com.lf.server.service.data.UploadService; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiImplicitParam; |
| | |
| | | import javax.servlet.http.HttpServletRequest; |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * 数据入库 |
| | |
| | | public class UploadController extends QueryController { |
| | | @Autowired |
| | | UploadService uploadService; |
| | | |
| | | @Autowired |
| | | UploadAttachService uploadAttachService; |
| | | |
| | | @SysLog() |
| | | @ApiOperation(value = "查询路径") |
| | |
| | | return fail("没有找到上传文件", null); |
| | | } |
| | | |
| | | uploadService.copePath(list); |
| | | |
| | | return success(list); |
| | | } catch (Exception ex) { |
| | | return fail(ex.getMessage(), null); |
| | |
| | | return fail("找不到元数据的ID集合"); |
| | | } |
| | | |
| | | List<MetaEntity> ms = metaService.selectXlsAnnex(ids); |
| | | List<MetaEntity> ms = metaService.selectXlsAnnex(ids, UploadAttachService.getTabs()); |
| | | if (null == ms || ms.isEmpty()) { |
| | | return fail("找不到要上传附件的元数据"); |
| | | } |
| | |
| | | return fail("没有找到上传文件", null); |
| | | } |
| | | |
| | | return success(list); |
| | | Map<String, Integer> map = uploadAttachService.uploadXlsAnnex(ms, list, path); |
| | | if (null == map || map.size() == 0) { |
| | | return fail("没有要更新的元数据"); |
| | | } |
| | | |
| | | return success(map); |
| | | } catch (Exception ex) { |
| | | return fail(ex.getMessage(), null); |
| | | } |