| | |
| | | select * from lf.sys_download; |
| | | |
| | | select * from bs.m_marker -- 三桩一牌 photono |
| | | select * from lf.sys_meta where type='xls' order by id desc |
| | | select * from lf.sys_meta where type='xls' order by id desc; |
| | | |
| | | |
| | | |
| | | select * from lf.sys_meta where type in ('xls', 'xlsx') and tab is not null and rows > 0 and id in (1209,1180,1387) |
| | | |
| | | |
| | | |
| | |
| | | import com.lf.server.service.data.UploadService; |
| | | import com.lf.server.service.show.DataLibService; |
| | | import com.lf.server.service.sys.AttachService; |
| | | import com.lf.server.service.sys.DepService; |
| | | import com.lf.server.service.sys.TokenService; |
| | | import io.swagger.annotations.ApiImplicitParam; |
| | | import io.swagger.annotations.ApiImplicitParams; |
| | |
| | | |
| | | @Autowired |
| | | TokenService tokenService; |
| | | |
| | | @Autowired |
| | | DepService depService; |
| | | |
| | | @Autowired |
| | | DataLibService dataLibService; |
| | |
| | | } |
| | | |
| | | @SysLog() |
| | | @ApiOperation(value = "根据单位ID集合查询单位") |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(name = "ids", value = "单位ID集合", dataType = "Integer", paramType = "query", allowMultiple = true, example = "1,10") |
| | | }) |
| | | @GetMapping(value = "/selectDepsByIds") |
| | | public ResponseMsg<Object> selectDepsByIds(Integer[] ids) { |
| | | try { |
| | | if (null == ids || ids.length == 0) { |
| | | return fail("单位ID集合为空"); |
| | | } |
| | | |
| | | List<IdNameEntity> list = depService.selectDepsByIds(ids); |
| | | |
| | | return success(list); |
| | | } catch (Exception ex) { |
| | | return fail(ex.getMessage(), null); |
| | | } |
| | | } |
| | | |
| | | @SysLog() |
| | | @ApiOperation(value = "请求DB数据下载") |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(name = "reqEntity", value = "请求下载实体", dataType = "DownloadReqEntity", paramType = "body") |
| | |
| | | package com.lf.server.mapper.sys; |
| | | |
| | | import com.lf.server.entity.ctrl.IdNameEntity; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | import org.springframework.stereotype.Repository; |
| | | import com.lf.server.entity.sys.DepEntity; |
| | |
| | | public interface DepMapper { |
| | | /** |
| | | * 插入一条 |
| | | * |
| | | * @param depEntity |
| | | * @return |
| | | */ |
| | |
| | | |
| | | /** |
| | | * 插入多条 |
| | | * |
| | | * @param list |
| | | * @return |
| | | */ |
| | | public Integer insertDeps(List<DepEntity> list); |
| | | |
| | | /** |
| | | * 删除一条 |
| | | * |
| | | * @param id |
| | | * @return |
| | | */ |
| | |
| | | |
| | | /** |
| | | * 删除多条 |
| | | * |
| | | * @param ids |
| | | * @return |
| | | */ |
| | |
| | | |
| | | /** |
| | | * 更新一条 |
| | | * |
| | | * @param depEntity |
| | | * @return |
| | | */ |
| | |
| | | |
| | | /** |
| | | * 查询单条数据 |
| | | * |
| | | * @param id |
| | | * @return |
| | | */ |
| | | public DepEntity selectDep(int id); |
| | | |
| | | /** |
| | | * 根据单位ID集合查询 |
| | | * |
| | | * @param ids |
| | | * @return |
| | | */ |
| | | public List<IdNameEntity> selectDepsByIds(Integer[] ids); |
| | | |
| | | /** |
| | | * 查询所有 |
| | | * |
| | | * @return |
| | | */ |
| | | public List<DepEntity> selectDepAll(); |
| | | |
| | | /** |
| | | * 更新多条 |
| | | * |
| | | * @param list |
| | | * @return |
| | | */ |
| | |
| | | |
| | | /** |
| | | * 递归查询 |
| | | * |
| | | * @param name |
| | | * @return |
| | | */ |
| | |
| | | package com.lf.server.service.sys; |
| | | |
| | | import com.lf.server.entity.ctrl.IdNameEntity; |
| | | import com.lf.server.entity.sys.DepEntity; |
| | | import com.lf.server.mapper.sys.DepMapper; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | |
| | | } |
| | | |
| | | @Override |
| | | public List<IdNameEntity> selectDepsByIds(Integer[] ids) { |
| | | return depMapper.selectDepsByIds(ids); |
| | | } |
| | | |
| | | @Override |
| | | public List<DepEntity> selectDepAll() { |
| | | return depMapper.selectDepAll(); |
| | | } |
| | |
| | | ) |
| | | select * FROM rs order by order_num; |
| | | </select> |
| | | |
| | | <select id="selectDep" resultMap="resultMap" resultType="com.lf.server.entity.sys.DepEntity"> |
| | | select * from lf.sys_dep where id = #{id} |
| | | </select> |
| | | |
| | | <select id="selectDepsByIds" resultType="com.lf.server.entity.ctrl.IdNameEntity"> |
| | | select id "id",fn_rec_query(id, 'dep') "name" from lf.sys_dep where id in |
| | | <foreach item="id" collection="ids" index="index" open="(" separator="," close=")"> |
| | | #{id} |
| | | </foreach> |
| | | </select> |
| | | |
| | | <insert id="insertDep" parameterType="com.lf.server.entity.sys.DepEntity"> |
| | | insert into lf.sys_dep |
| | | (pid,name,sname,code,uncode,addr,contact,fax,email,post,website,level,order_num,create_user,create_time,bak) |