| | |
| | | from lf.sys_user a inner join lf.sys_role_user b on a.id = b.userid inner join lf.sys_role c on b.roleid = c.id |
| | | where c.id = 15 |
| | | ----------------------------------------------------------------------- 查询 57, 163 |
| | | select * from lf.sys_meta order by id desc limit 10; |
| | | select * from lf.sys_fme_log order by id desc; |
| | | |
| | | select * from lf.sys_dict where ns='bd' and tab='dlg_agnp'; -- 地名表 |
| | | select * from bd.dlg_agnp; |
| | | select depid from bd.dlg_agnp group by depid; |
| | | -- update bd.dlg_agnp set depid=1 where depid is null or depid=0 |
| | | |
| | | select * from lf.sys_meta order by id desc limit 10; |
| | | select * from lf.sys_fme_log order by id desc; |
| | | |
| | | select * from lf.sys_flow where applyid = 9; -- 47,48,49 |
| | | select id,userid,depids,tabs,entities,pwd,status,count,descr,wkt from lf.sys_apply; |
| | | -- status is '状态:-10-作废,-1-打回,0~9-审核中,10-通过'; |
| | | update lf.sys_apply set status = 0 where id = 9; |
| | | -- delete from lf.sys_flow; delete from lf.sys_apply; |
| | | -- 密码:test@12345_lf |
| | | select * from lf.sys_user where id in (47,48,49); |
| | | select * from lf.sys_download; |
| | | |
| | | select * from bs.m_marker -- 三桩一牌 photono |
| | | select * from lf.sys_meta where type='xls' order by id desc |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * 接收数组1:@RequestParam(value = "ids")List<Integer> ids |
| | | * &ids=1209&ids=1180&ids=1387 |
| | | * 接收数据2:Integer[] ids |
| | | * formData.append("ids", 1209); formData.append("ids", 1180); formData.append("ids", 1387); |
| | | */ |
| | | @SysLog() |
| | | @ApiOperation(value = "上传Excel附件") |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(name = "path", value = "路径", dataType = "String", paramType = "query"), |
| | | @ApiImplicitParam(name = "ids", value = "元数据集合", dataType = "Integer", paramType = "query") |
| | | }) |
| | | @ResponseBody |
| | | @PostMapping(value = "/uploadXlsAnnex") |
| | | public ResponseMsg<Object> uploadXlsAnnex(String path, Integer[] ids, HttpServletRequest req, HttpServletResponse res) { |
| | | try { |
| | | if (null == ids || ids.length == 0) { |
| | | return fail("找不到元数据的ID集合"); |
| | | } |
| | | |
| | | List<MetaEntity> ms = metaService.selectXlsAnnex(ids); |
| | | if (null == ms || ms.isEmpty()) { |
| | | return fail("找不到要上传附件的元数据"); |
| | | } |
| | | |
| | | List<MetaFileEntity> list = uploadService.uploadData(null, path, req, res); |
| | | if (null == list || list.isEmpty()) { |
| | | return fail("没有找到上传文件", null); |
| | | } |
| | | |
| | | return success(list); |
| | | } catch (Exception ex) { |
| | | return fail(ex.getMessage(), null); |
| | | } |
| | | } |
| | | |
| | | @SysLog() |
| | | @ApiOperation(value = "查询文件") |
| | | @ApiImplicitParams({ |
| | |
| | | public List<MetaEntity> selectMetaFiles(List<Integer> ids); |
| | | |
| | | /** |
| | | * 查询Excel元数据 |
| | | * |
| | | * @param ids 元数据ID集合 |
| | | * @return 元数据文件集合 |
| | | */ |
| | | public List<MetaEntity> selectXlsAnnex(Integer[] ids); |
| | | |
| | | /** |
| | | * 插入一条 |
| | | * |
| | | * @param entity |
| | |
| | | } |
| | | |
| | | @Override |
| | | public List<MetaEntity> selectXlsAnnex(Integer[] ids) { |
| | | return metaMapper.selectXlsAnnex(ids); |
| | | } |
| | | |
| | | @Override |
| | | public Integer insert(MetaEntity entity) { |
| | | return metaMapper.insert(entity); |
| | | } |
| | |
| | | order by a.id desc |
| | | </select> |
| | | |
| | | <select id="selectMetaFiles" resultType="com.lf.server.entity.data.MetaEntity"> |
| | | select a.* from lf.sys_meta_file a where metaid in |
| | | <select id="selectXlsAnnex" resultType="com.lf.server.entity.data.MetaEntity"> |
| | | select * from lf.sys_meta |
| | | where type in ('xls', 'xlsx') and tab is not null and rows > 0 and id in |
| | | <foreach item="id" collection="ids" index="index" open="(" separator="," close=")"> |
| | | #{id} |
| | | </foreach> |
| | | order by a.id desc |
| | | </select> |
| | | |
| | | <insert id="insert" parameterType="com.lf.server.entity.data.MetaEntity"> |