| | |
| | | scale varchar(50), |
| | | resolution varchar(50), |
| | | gather timestamp(6) without time zone, |
| | | batch varchar(10), |
| | | descr varchar(256), |
| | | create_user integer default 1, |
| | | create_time timestamp(6) without time zone default now(), |
| | |
| | | comment on column lf.sys_meta.dirid is '目录ID'; |
| | | comment on column lf.sys_meta.depid is '单位ID'; |
| | | comment on column lf.sys_meta.verid is '版本ID'; |
| | | comment on column lf.sys_meta.type is '格式'; |
| | | comment on column lf.sys_meta.type is '类型:File-文件,DB-数据'; |
| | | comment on column lf.sys_meta.sizes is '大小:单位MB'; |
| | | comment on column lf.sys_meta.cs is '坐标系'; |
| | | comment on column lf.sys_meta.scale is '比例尺'; |
| | | comment on column lf.sys_meta.resolution is '分辨率'; |
| | | comment on column lf.sys_meta.gather is '采集日期'; |
| | | comment on column lf.sys_meta.batch is '批次'; |
| | | comment on column lf.sys_meta.descr is '描述'; |
| | | comment on column lf.sys_meta.create_user is '创建人ID'; |
| | | comment on column lf.sys_meta.create_time is '创建时间'; |
| | |
| | | * 元数据 |
| | | * @author WWW |
| | | */ |
| | | @Api(tags = "数据管理\\元数据管理") |
| | | @Api(tags = "数据管理\\元数据") |
| | | @RestController |
| | | @RequestMapping("/meta") |
| | | public class MetaController extends BaseController { |
| | |
| | | if (pageSize < 1 || pageIndex < 1) { |
| | | return fail("每页页数或分页数小于1", null); |
| | | } |
| | | |
| | | int count = metaService.selectCount(name); |
| | | if (count == 0) { |
| | | return success(0, null); |
| | | } |
| | | |
| | | List<MetaEntity> rs = metaService.selectByPage(name, pageSize, pageSize * (pageIndex - 1)); |
| | | |
| | | return success(count, rs); |
| | |
| | | import com.lf.server.controller.all.BaseController; |
| | | import com.lf.server.entity.all.ResponseMsg; |
| | | import com.lf.server.entity.ctrl.KeyValueEntity; |
| | | import com.lf.server.entity.data.MetaEntity; |
| | | import com.lf.server.entity.data.MetaFileEntity; |
| | | import com.lf.server.entity.data.MetaEntity; |
| | | import com.lf.server.entity.sys.UserEntity; |
| | | import com.lf.server.helper.FileHelper; |
| | | import com.lf.server.helper.PathHelper; |
| | | import com.lf.server.helper.StringHelper; |
| | | import com.lf.server.service.data.UploaderService; |
| | | import com.lf.server.service.sys.TokenService; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiImplicitParam; |
| | | import io.swagger.annotations.ApiImplicitParams; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.apache.commons.logging.Log; |
| | | import org.apache.commons.logging.LogFactory; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.*; |
| | | import org.springframework.web.multipart.MultipartFile; |
| | | import org.springframework.web.multipart.support.StandardMultipartHttpServletRequest; |
| | | |
| | | import javax.servlet.http.HttpServletRequest; |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import java.io.File; |
| | | import java.lang.reflect.Field; |
| | | import java.sql.Timestamp; |
| | | import java.util.*; |
| | | |
| | | /** |
| | |
| | | |
| | | private Timestamp gather; |
| | | |
| | | private String batch; |
| | | |
| | | private String descr; |
| | | |
| | | private int createUser; |
| | |
| | | this.gather = gather; |
| | | } |
| | | |
| | | public String getBatch() { |
| | | return batch; |
| | | } |
| | | |
| | | public void setBatch(String batch) { |
| | | this.batch = batch; |
| | | } |
| | | |
| | | public String getDescr() { |
| | | return descr; |
| | | } |
| | |
| | | return geom; |
| | | } |
| | | |
| | | public void setGeom(String geo) { |
| | | this.geom = geo; |
| | | public void setGeom(String geom) { |
| | | this.geom = geom; |
| | | } |
| | | } |
| | |
| | | |
| | | <insert id="insert" parameterType="com.lf.server.entity.data.MetaEntity"> |
| | | insert into lf.sys_meta |
| | | (name,dirid,depid,verid,type,sizes,cs,scale,resolution,gather,descr,create_user,create_time,geom) |
| | | (name,dirid,depid,verid,type,sizes,cs,scale,resolution,gather,batch,descr,create_user,create_time,geom) |
| | | values |
| | | (#{name},#{dirid},#{depid},#{verid},#{type},#{sizes},#{cs},#{scale},#{resolution},now(),#{descr},#{createUser},now(),#{geom}) |
| | | (#{name},#{dirid},#{depid},#{verid},#{type},#{sizes},#{cs},#{scale},#{resolution},now(),#{batch},#{descr},#{createUser},now(),#{geom}) |
| | | </insert> |
| | | |
| | | <insert id="inserts"> |
| | | insert into lf.sys_meta |
| | | (name,dirid,depid,verid,type,sizes,cs,scale,resolution,gather,descr,create_user,create_time,geom) |
| | | (name,dirid,depid,verid,type,sizes,cs,scale,resolution,gather,batch,descr,create_user,create_time,geom) |
| | | values |
| | | <foreach collection="list" item="item" index="index" separator=","> |
| | | (#{item.name},#{item.dirid},#{item.depid},#{item.verid},#{item.type},#{item.sizes},#{item.cs},#{item.scale},#{item.resolution},now(),#{item.descr},#{item.createUser},now(),#{item.geom}) |
| | | (#{item.name},#{item.dirid},#{item.depid},#{item.verid},#{item.type},#{item.sizes},#{item.cs},#{item.scale},#{item.resolution},now(),#{item.batch},#{item.descr},#{item.createUser},now(),#{item.geom}) |
| | | </foreach> |
| | | </insert> |
| | | |
| | |
| | | |
| | | <update id="update"> |
| | | update lf.sys_meta |
| | | set name=#{name},dirid=#{dirid},depid=#{depid},verid=#{verid},type=#{type},sizes=#{sizes},cs=#{cs},scale=#{scale},resolution=#{resolution},gather=now(),descr=#{descr},update_user=#{updateUser},update_time=now() |
| | | set name=#{name},dirid=#{dirid},depid=#{depid},verid=#{verid},type=#{type},sizes=#{sizes},cs=#{cs},scale=#{scale},resolution=#{resolution},gather=now(),batch=#{batch},descr=#{descr},update_user=#{updateUser},update_time=now(),geom=#{geom} |
| | | where id=#{id} |
| | | </update> |
| | | |
| | |
| | | <foreach collection="list" item="item" index="index" separator=";"> |
| | | update lf.sys_meta |
| | | <set> |
| | | name=#{item.name},dirid=#{item.dirid},depid=#{item.depid},verid=#{item.verid},type=#{item.type},sizes=#{item.sizes},cs=#{item.cs},scale=#{item.scale},resolution=#{item.resolution},gather=now(),descr=#{item.descr},update_user=#{item.updateUser},update_time=now() |
| | | name=#{item.name},dirid=#{item.dirid},depid=#{item.depid},verid=#{item.verid},type=#{item.type},sizes=#{item.sizes},cs=#{item.cs},scale=#{item.scale},resolution=#{item.resolution},gather=now(),batch=#{item.batch},descr=#{item.descr},update_user=#{item.updateUser},update_time=now(),geom=#{item.geom} |
| | | </set> |
| | | where id = #{item.id} |
| | | </foreach> |