Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
R
rs-cloud-platform
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
周健威
rs-cloud-platform
Commits
6da72f22
Commit
6da72f22
authored
Dec 22, 2020
by
unset
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/dev' into dev
parents
92f6a5ed
3c81ac98
Changes
27
Show whitespace changes
Inline
Side-by-side
Showing
27 changed files
with
1409 additions
and
382 deletions
+1409
-382
pom.xml
ace-auth/ace-auth-client/pom.xml
+1
-1
RabbitConstant.java
...wxiaoqi/security/common/config/rabbit/RabbitConstant.java
+10
-17
BaseController.java
...m/github/wxiaoqi/security/common/rest/BaseController.java
+24
-0
CommonBaseController.java
...ub/wxiaoqi/security/common/rest/CommonBaseController.java
+0
-7
AppPermissionService.java
...aoqi/security/admin/rpc/service/AppPermissionService.java
+2
-3
pom.xml
rs-common/rs-common-platform-web/pom.xml
+4
-0
RscpImageDataInputFail.java
...platform/rs/datacenter/entity/RscpImageDataInputFail.java
+921
-0
RscpImageInputLog.java
...yuns/platform/rs/datacenter/entity/RscpImageInputLog.java
+45
-0
DatacenterFeign.java
.../upyuns/platform/rs/datacenter/fegin/DatacenterFeign.java
+2
-1
ImageInputVO.java
...va/com/upyuns/platform/rs/datacenter/vo/ImageInputVO.java
+1
-1
RscpImageDataInputFailBiz.java
...platform/rs/datacenter/biz/RscpImageDataInputFailBiz.java
+13
-0
RscpImageInputLogBiz.java
...yuns/platform/rs/datacenter/biz/RscpImageInputLogBiz.java
+13
-0
RabbitConfig.java
...om/upyuns/platform/rs/datacenter/config/RabbitConfig.java
+33
-0
RscpImageDataInputFailMapper.java
...rm/rs/datacenter/mapper/RscpImageDataInputFailMapper.java
+10
-0
RscpImageInputLogMapper.java
...latform/rs/datacenter/mapper/RscpImageInputLogMapper.java
+10
-0
ImageInputLogMQHandler.java
...tform/rs/datacenter/mqhandler/ImageInputLogMQHandler.java
+80
-0
GtdataController.java
.../upyuns/platform/rs/datacenter/rest/GtdataController.java
+3
-2
FileOperateUtil.java
.../upyuns/platform/rs/datacenter/utils/FileOperateUtil.java
+0
-40
ImageStorageParseUtil.java
...s/platform/rs/datacenter/utils/ImageStorageParseUtil.java
+0
-163
TarFileOperateUtil.java
...yuns/platform/rs/datacenter/utils/TarFileOperateUtil.java
+0
-90
XmlFileOperateUtil.java
...yuns/platform/rs/datacenter/utils/XmlFileOperateUtil.java
+0
-46
RscpImageDataInputFailMapper.xml
...rc/main/resources/mapper/RscpImageDataInputFailMapper.xml
+62
-0
RscpImageInputLogMapper.xml
...ver/src/main/resources/mapper/RscpImageInputLogMapper.xml
+24
-0
CustomQueryDTO.java
...upyuns/platform/rs/website/dto/custom/CustomQueryDTO.java
+10
-0
CustomForm.java
...ava/com/upyuns/platform/rs/website/entity/CustomForm.java
+54
-5
CustomFormController.java
.../platform/rs/website/controller/CustomFormController.java
+21
-0
CustomFormWebController.java
...rm/rs/website/controller/web/CustomFormWebController.java
+66
-6
No files found.
ace-auth/ace-auth-client/pom.xml
View file @
6da72f22
...
...
@@ -30,7 +30,7 @@
<dependency>
<groupId>
org.springframework.cloud
</groupId>
<artifactId>
spring-cloud-openfeign-core
</artifactId>
<version>
2.0.
0.M1
</version>
<version>
2.0.
2.RELEASE
</version>
<scope>
provided
</scope>
</dependency>
<dependency>
...
...
ace-common/src/main/java/com/github/wxiaoqi/security/common/config/rabbit/RabbitConstant.java
View file @
6da72f22
...
...
@@ -9,16 +9,20 @@ public class RabbitConstant {
public
static
String
TOPIC_EXC
=
"_topic_exchange"
;
public
static
String
DIRECT_EXC
=
"_direct_exchange"
;
/**************************admin公用主题*********************************/
public
static
final
String
ADMIN
=
"admin"
;
public
static
final
String
ADMIN_TOPIC
=
ADMIN
+
TOPIC_EXC
;
public
static
final
String
ORDER
=
"order"
;
public
static
final
String
ORDER_TOPIC
=
ORDER
+
TOPIC_EXC
;
public
static
final
String
INTEGRAL
=
"integral"
;
public
static
final
String
INTEGRAL_TOPIC
=
INTEGRAL
+
TOPIC_EXC
;
public
static
final
String
ACTIVITY_PRIZE
=
"activity:prize"
;
public
static
final
String
ACTIVITY_PRIZE_TOPIC
=
ACTIVITY_PRIZE
+
TOPIC_EXC
;
/**************************数据中心公用主题*********************************/
public
static
final
String
DATACENTER
=
"datacenter"
;
public
static
final
String
DATACENTER_TOPIC
=
DATACENTER
+
TOPIC_EXC
;
/**************************key*********************************/
//数据中心
//入库
public
static
final
String
KEY_IMAGE_INPUT_SUCC
=
"image.input.succ"
;
//用户
public
static
final
String
KEY_APPUSER_REGISTER
=
"appUser.register"
;
public
static
final
String
KEY_APPUSER_AUTH
=
"appUser.auth"
;
...
...
@@ -32,20 +36,9 @@ public class RabbitConstant {
public
static
final
String
KEY_ORDER_CANCEL
=
"order.cancel"
;
public
static
final
String
KEY_ORDER_PART_DEPOSIT
=
"order.partDeposit"
;
//钱包
public
static
final
String
KEY_WALLET_ADD
=
"wallet.add"
;
public
static
final
String
KEY_WALLET_WITH_DRAW
=
"wallet.withdraw"
;
//抽奖
public
static
final
String
KEY_ACTIVITY_PRIZE_RECORD
=
"prize:record"
;
static
{
exchangeTopicSet
=
new
HashSet
<
String
>()
{{
add
(
ADMIN_TOPIC
);
add
(
ORDER_TOPIC
);
add
(
INTEGRAL_TOPIC
);
add
(
ACTIVITY_PRIZE_TOPIC
);
}};
}
}
ace-common/src/main/java/com/github/wxiaoqi/security/common/rest/BaseController.java
View file @
6da72f22
...
...
@@ -5,12 +5,15 @@ import com.github.wxiaoqi.security.common.context.BaseContextHandler;
import
com.github.wxiaoqi.security.common.msg.ObjectRestResponse
;
import
com.github.wxiaoqi.security.common.msg.TableResultResponse
;
import
com.github.wxiaoqi.security.common.util.Query
;
import
com.github.wxiaoqi.security.common.util.ReflectionUtils
;
import
io.swagger.annotations.ApiOperation
;
import
lombok.Data
;
import
lombok.extern.slf4j.Slf4j
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.*
;
import
javax.servlet.http.HttpServletRequest
;
import
java.lang.reflect.Field
;
import
java.util.List
;
import
java.util.Map
;
...
...
@@ -87,5 +90,26 @@ public class BaseController<Biz extends BaseBiz,Entity> extends CommonBaseContro
return
ObjectRestResponse
.
succ
(
baseBiz
.
selectList
(
entity
));
}
@ApiOperation
(
"删除"
)
@RequestMapping
(
value
=
"/del"
,
method
=
RequestMethod
.
DELETE
)
@ResponseBody
public
ObjectRestResponse
del
(
Entity
entity
){
Field
field
=
ReflectionUtils
.
getAccessibleField
(
entity
,
"isDel"
);
Field
field2
=
ReflectionUtils
.
getAccessibleField
(
entity
,
"delete"
);
if
(
null
!=
field
)
{
ReflectionUtils
.
setFieldValue
(
entity
,
"isDel"
,
1
);
}
if
(
null
!=
field2
)
{
ReflectionUtils
.
setFieldValue
(
entity
,
"delete"
,
1
);
}
baseBiz
.
updateSelectiveById
(
entity
);
return
ObjectRestResponse
.
succ
();
}
@Data
public
static
class
BaseDetailDTO
{
Integer
id
;
}
}
ace-common/src/main/java/com/github/wxiaoqi/security/common/rest/CommonBaseController.java
View file @
6da72f22
package
com
.
github
.
wxiaoqi
.
security
.
common
.
rest
;
import
com.github.wxiaoqi.security.common.biz.BaseBiz
;
import
com.github.wxiaoqi.security.common.context.BaseContextHandler
;
import
com.github.wxiaoqi.security.common.msg.ObjectRestResponse
;
import
com.github.wxiaoqi.security.common.msg.TableResultResponse
;
import
com.github.wxiaoqi.security.common.util.Query
;
import
lombok.extern.slf4j.Slf4j
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.*
;
import
javax.servlet.http.HttpServletRequest
;
import
javax.servlet.http.HttpServletResponse
;
import
java.util.List
;
import
java.util.Map
;
/**
* ${DESCRIPTION}
...
...
ace-modules/ace-admin/src/main/java/com/github/wxiaoqi/security/admin/rpc/service/AppPermissionService.java
View file @
6da72f22
...
...
@@ -15,7 +15,6 @@ import com.github.wxiaoqi.security.admin.vo.ImiVo;
import
com.github.wxiaoqi.security.api.vo.authority.PermissionInfo
;
import
com.github.wxiaoqi.security.api.vo.user.AppUserInfo
;
import
com.github.wxiaoqi.security.common.config.rabbit.RabbitConstant
;
import
com.github.wxiaoqi.security.common.msg.BaseResponse
;
import
com.github.wxiaoqi.security.common.msg.ObjectRestResponse
;
import
com.github.wxiaoqi.security.common.util.EmojiFilter
;
import
com.github.wxiaoqi.security.common.util.ReferralCodeUtil
;
...
...
@@ -48,7 +47,7 @@ import java.util.*;
import
java.util.concurrent.TimeUnit
;
import
static
com
.
github
.
wxiaoqi
.
security
.
common
.
config
.
rabbit
.
RabbitConstant
.
KEY_APPUSER_AUTH
;
import
static
com
.
github
.
wxiaoqi
.
security
.
common
.
config
.
rabbit
.
RabbitConstant
.
KEY_
APPUSER_REGISTER
;
import
static
com
.
github
.
wxiaoqi
.
security
.
common
.
config
.
rabbit
.
RabbitConstant
.
KEY_
IMAGE_INPUT_SUCC
;
/**
* @author keliii
...
...
@@ -367,7 +366,7 @@ public class AppPermissionService {
// 注册成功,发送队列
switch
(
sign
){
case
1
:
mqSenderFeign
.
sendMessage
(
RabbitConstant
.
ADMIN_TOPIC
,
KEY_
APPUSER_REGISTER
,
JSONUtil
.
toJsonStr
(
registerQueueDTO
));
mqSenderFeign
.
sendMessage
(
RabbitConstant
.
ADMIN_TOPIC
,
KEY_
IMAGE_INPUT_SUCC
,
JSONUtil
.
toJsonStr
(
registerQueueDTO
));
break
;
case
2
:
mqSenderFeign
.
sendMessage
(
RabbitConstant
.
ADMIN_TOPIC
,
KEY_APPUSER_AUTH
,
JSONUtil
.
toJsonStr
(
registerQueueDTO
));
...
...
rs-common/rs-common-platform-web/pom.xml
View file @
6da72f22
...
...
@@ -29,6 +29,10 @@
<dependencies>
<!-- spring -->
<dependency>
<groupId>
org.springframework.boot
</groupId>
<artifactId>
spring-boot-starter-amqp
</artifactId>
</dependency>
<dependency>
<groupId>
org.springframework.boot
</groupId>
<artifactId>
spring-boot-starter-web
</artifactId>
...
...
rs-datacenter/rs-datacenter-api/src/main/java/com/upyuns/platform/rs/datacenter/entity/RscpImageDataInputFail.java
0 → 100644
View file @
6da72f22
package
com
.
upyuns
.
platform
.
rs
.
datacenter
.
entity
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
import
javax.persistence.Table
;
import
java.math.BigDecimal
;
@Data
@Table
(
name
=
"rscp_image_data_input_fail"
)
@ApiModel
(
description
=
"影像数据表(分表空间)"
)
public
class
RscpImageDataInputFail
implements
java
.
io
.
Serializable
{
/** 版本号 */
private
static
final
long
serialVersionUID
=
-
3916940633746492673L
;
/* This code was generated by TableGo tools, mark 1 begin. */
/** 标识id */
@ApiModelProperty
(
value
=
"标识id"
)
private
Long
id
;
/** 编号 */
@ApiModelProperty
(
value
=
"编号"
)
private
String
dataNo
;
/** 名称 */
@ApiModelProperty
(
value
=
"名称"
)
private
String
name
;
/** 数据范围数据 */
@ApiModelProperty
(
value
=
"数据范围数据"
)
private
String
range
;
/** 缩略图存储路径 */
@ApiModelProperty
(
value
=
"缩略图存储路径"
)
private
String
thumbnailPath
;
/** 显示名称 */
@ApiModelProperty
(
value
=
"显示名称"
)
private
String
displayName
;
/** 分辨率[数组] */
@ApiModelProperty
(
value
=
"分辨率[数组]"
)
private
String
imageResolution
;
/** 光谱 */
@ApiModelProperty
(
value
=
"光谱"
)
private
String
imageSpectrumType
;
/** 光谱名称 */
@ApiModelProperty
(
value
=
"光谱名称"
)
private
String
imageSpectrumTypeDisplay
;
/** 影像存储地址目录 */
@ApiModelProperty
(
value
=
"影像存储地址目录"
)
private
String
imageFilePath
;
/** 中心点 */
@ApiModelProperty
(
value
=
"中心点"
)
private
String
imageCenterPoint
;
/** 投影 */
@ApiModelProperty
(
value
=
"投影"
)
private
String
imageProjection
;
/** 卫星 */
@ApiModelProperty
(
value
=
"卫星"
)
private
String
imageSatelliteType
;
/** 卫星名称 */
@ApiModelProperty
(
value
=
"卫星名称"
)
private
String
imageSatelliteTypeDisplay
;
/** 拍摄时间 */
@ApiModelProperty
(
value
=
"拍摄时间"
)
private
String
imageTakeTime
;
/** 云量 */
@ApiModelProperty
(
value
=
"云量"
)
private
BigDecimal
imageCloudage
;
/** 传感器类型 */
@ApiModelProperty
(
value
=
"传感器类型"
)
private
String
imageSensorType
;
/** 包含那几个文件名称[数组]1个xml 1个jpg */
@ApiModelProperty
(
value
=
"包含那几个文件名称[数组]1个xml 1个jpg"
)
private
String
files
;
/** 是否存在数据,0不存在 1已存在 */
@ApiModelProperty
(
value
=
"是否存在数据,0不存在 1已存在"
)
private
Integer
imageIsSave
;
/** 景id */
@ApiModelProperty
(
value
=
"景id"
)
private
String
imageSceneId
;
/** 产品格式 GEOTIFF 、 TIFF */
@ApiModelProperty
(
value
=
"产品格式 GEOTIFF 、 TIFF"
)
private
String
imageProductFormat
;
/** 产品时间 */
@ApiModelProperty
(
value
=
"产品时间"
)
private
String
imageProductTime
;
/** sat行号 */
@ApiModelProperty
(
value
=
"sat行号"
)
private
String
imageSatPath
;
/** sat列号 */
@ApiModelProperty
(
value
=
"sat列号"
)
private
String
imageSatRow
;
/** 影像开始时间 */
@ApiModelProperty
(
value
=
"影像开始时间"
)
private
String
imageStartTime
;
/** 影像结束时间 */
@ApiModelProperty
(
value
=
"影像结束时间"
)
private
String
imageEndTime
;
/** 影像中间时间 */
@ApiModelProperty
(
value
=
"影像中间时间"
)
private
String
imageCenterTime
;
/** 影像宽度 */
@ApiModelProperty
(
value
=
"影像宽度"
)
private
String
imageWidthInPixels
;
/** 卫星平台平均俯仰角 */
@ApiModelProperty
(
value
=
"卫星平台平均俯仰角"
)
private
String
imagePitchSatellitessAngle
;
/** 太阳方位角 */
@ApiModelProperty
(
value
=
"太阳方位角"
)
private
String
imageSolarAzimuth
;
/** 太阳高度角 */
@ApiModelProperty
(
value
=
"太阳高度角"
)
private
String
imageSolarZenith
;
/** 卫星方向角 */
@ApiModelProperty
(
value
=
"卫星方向角"
)
private
String
imageSatelliteAzimuth
;
/** 卫星高度角 */
@ApiModelProperty
(
value
=
"卫星高度角"
)
private
String
imageSatelliteZenith
;
/** 影像高度 */
@ApiModelProperty
(
value
=
"影像高度"
)
private
String
imageHeightInPixels
;
/** 卫星平台平均偏航角 */
@ApiModelProperty
(
value
=
"卫星平台平均偏航角"
)
private
String
imageYawSatelliteAngle
;
/** 传感器id */
@ApiModelProperty
(
value
=
"传感器id"
)
private
String
imageSensorId
;
/** 状态:10展示,20不展示 */
@ApiModelProperty
(
value
=
"状态:10展示,20不展示"
)
private
Integer
recordStatus
;
/** 创建时间 */
@ApiModelProperty
(
value
=
"创建时间"
)
private
String
crtTime
;
/** 更新时间 */
@ApiModelProperty
(
value
=
"更新时间"
)
private
String
updTime
;
/* This code was generated by TableGo tools, mark 1 end. */
/* This code was generated by TableGo tools, mark 2 begin. */
/**
* 获取标识id
*
* @return 标识id
*/
public
Long
getId
()
{
return
this
.
id
;
}
/**
* 设置标识id
*
* @param id
* 标识id
*/
public
void
setId
(
Long
id
)
{
this
.
id
=
id
;
}
/**
* 获取编号
*
* @return 编号
*/
public
String
getDataNo
()
{
return
this
.
dataNo
;
}
/**
* 设置编号
*
* @param dataNo
* 编号
*/
public
void
setDataNo
(
String
dataNo
)
{
this
.
dataNo
=
dataNo
;
}
/**
* 获取名称
*
* @return 名称
*/
public
String
getName
()
{
return
this
.
name
;
}
/**
* 设置名称
*
* @param name
* 名称
*/
public
void
setName
(
String
name
)
{
this
.
name
=
name
;
}
/**
* 获取数据范围数据
*
* @return 数据范围数据
*/
public
String
getRange
()
{
return
this
.
range
;
}
/**
* 设置数据范围数据
*
* @param range
* 数据范围数据
*/
public
void
setRange
(
String
range
)
{
this
.
range
=
range
;
}
/**
* 获取缩略图存储路径
*
* @return 缩略图存储路径
*/
public
String
getThumbnailPath
()
{
return
this
.
thumbnailPath
;
}
/**
* 设置缩略图存储路径
*
* @param thumbnailPath
* 缩略图存储路径
*/
public
void
setThumbnailPath
(
String
thumbnailPath
)
{
this
.
thumbnailPath
=
thumbnailPath
;
}
/**
* 获取显示名称
*
* @return 显示名称
*/
public
String
getDisplayName
()
{
return
this
.
displayName
;
}
/**
* 设置显示名称
*
* @param displayName
* 显示名称
*/
public
void
setDisplayName
(
String
displayName
)
{
this
.
displayName
=
displayName
;
}
/**
* 获取分辨率[数组]
*
* @return 分辨率[数组]
*/
public
String
getImageResolution
()
{
return
this
.
imageResolution
;
}
/**
* 设置分辨率[数组]
*
* @param imageResolution
* 分辨率[数组]
*/
public
void
setImageResolution
(
String
imageResolution
)
{
this
.
imageResolution
=
imageResolution
;
}
/**
* 获取光谱
*
* @return 光谱
*/
public
String
getImageSpectrumType
()
{
return
this
.
imageSpectrumType
;
}
/**
* 设置光谱
*
* @param imageSpectrumType
* 光谱
*/
public
void
setImageSpectrumType
(
String
imageSpectrumType
)
{
this
.
imageSpectrumType
=
imageSpectrumType
;
}
/**
* 获取光谱名称
*
* @return 光谱名称
*/
public
String
getImageSpectrumTypeDisplay
()
{
return
this
.
imageSpectrumTypeDisplay
;
}
/**
* 设置光谱名称
*
* @param imageSpectrumTypeDisplay
* 光谱名称
*/
public
void
setImageSpectrumTypeDisplay
(
String
imageSpectrumTypeDisplay
)
{
this
.
imageSpectrumTypeDisplay
=
imageSpectrumTypeDisplay
;
}
/**
* 获取影像存储地址目录
*
* @return 影像存储地址目录
*/
public
String
getImageFilePath
()
{
return
this
.
imageFilePath
;
}
/**
* 设置影像存储地址目录
*
* @param imageFilePath
* 影像存储地址目录
*/
public
void
setImageFilePath
(
String
imageFilePath
)
{
this
.
imageFilePath
=
imageFilePath
;
}
/**
* 获取中心点
*
* @return 中心点
*/
public
String
getImageCenterPoint
()
{
return
this
.
imageCenterPoint
;
}
/**
* 设置中心点
*
* @param imageCenterPoint
* 中心点
*/
public
void
setImageCenterPoint
(
String
imageCenterPoint
)
{
this
.
imageCenterPoint
=
imageCenterPoint
;
}
/**
* 获取投影
*
* @return 投影
*/
public
String
getImageProjection
()
{
return
this
.
imageProjection
;
}
/**
* 设置投影
*
* @param imageProjection
* 投影
*/
public
void
setImageProjection
(
String
imageProjection
)
{
this
.
imageProjection
=
imageProjection
;
}
/**
* 获取卫星
*
* @return 卫星
*/
public
String
getImageSatelliteType
()
{
return
this
.
imageSatelliteType
;
}
/**
* 设置卫星
*
* @param imageSatelliteType
* 卫星
*/
public
void
setImageSatelliteType
(
String
imageSatelliteType
)
{
this
.
imageSatelliteType
=
imageSatelliteType
;
}
/**
* 获取卫星名称
*
* @return 卫星名称
*/
public
String
getImageSatelliteTypeDisplay
()
{
return
this
.
imageSatelliteTypeDisplay
;
}
/**
* 设置卫星名称
*
* @param imageSatelliteTypeDisplay
* 卫星名称
*/
public
void
setImageSatelliteTypeDisplay
(
String
imageSatelliteTypeDisplay
)
{
this
.
imageSatelliteTypeDisplay
=
imageSatelliteTypeDisplay
;
}
/**
* 获取拍摄时间
*
* @return 拍摄时间
*/
public
String
getImageTakeTime
()
{
return
this
.
imageTakeTime
;
}
/**
* 设置拍摄时间
*
* @param imageTakeTime
* 拍摄时间
*/
public
void
setImageTakeTime
(
String
imageTakeTime
)
{
this
.
imageTakeTime
=
imageTakeTime
;
}
/**
* 获取云量
*
* @return 云量
*/
public
BigDecimal
getImageCloudage
()
{
return
this
.
imageCloudage
;
}
/**
* 设置云量
*
* @param imageCloudage
* 云量
*/
public
void
setImageCloudage
(
BigDecimal
imageCloudage
)
{
this
.
imageCloudage
=
imageCloudage
;
}
/**
* 获取传感器类型
*
* @return 传感器类型
*/
public
String
getImageSensorType
()
{
return
this
.
imageSensorType
;
}
/**
* 设置传感器类型
*
* @param imageSensorType
* 传感器类型
*/
public
void
setImageSensorType
(
String
imageSensorType
)
{
this
.
imageSensorType
=
imageSensorType
;
}
/**
* 获取包含那几个文件名称[数组]1个xml 1个jpg
*
* @return 包含那几个文件名称[数组]1个xml 1个jpg
*/
public
String
getFiles
()
{
return
this
.
files
;
}
/**
* 设置包含那几个文件名称[数组]1个xml 1个jpg
*
* @param files
* 包含那几个文件名称[数组]1个xml 1个jpg
*/
public
void
setFiles
(
String
files
)
{
this
.
files
=
files
;
}
/**
* 获取是否存在数据,0不存在 1已存在
*
* @return 是否存在数据
*/
public
Integer
getImageIsSave
()
{
return
this
.
imageIsSave
;
}
/**
* 设置是否存在数据,0不存在 1已存在
*
* @param imageIsSave
* 是否存在数据
*/
public
void
setImageIsSave
(
Integer
imageIsSave
)
{
this
.
imageIsSave
=
imageIsSave
;
}
/**
* 获取景id
*
* @return 景id
*/
public
String
getImageSceneId
()
{
return
this
.
imageSceneId
;
}
/**
* 设置景id
*
* @param imageSceneId
* 景id
*/
public
void
setImageSceneId
(
String
imageSceneId
)
{
this
.
imageSceneId
=
imageSceneId
;
}
/**
* 获取产品格式 GEOTIFF 、 TIFF
*
* @return 产品格式 GEOTIFF 、 TIFF
*/
public
String
getImageProductFormat
()
{
return
this
.
imageProductFormat
;
}
/**
* 设置产品格式 GEOTIFF 、 TIFF
*
* @param imageProductFormat
* 产品格式 GEOTIFF 、 TIFF
*/
public
void
setImageProductFormat
(
String
imageProductFormat
)
{
this
.
imageProductFormat
=
imageProductFormat
;
}
/**
* 获取产品时间
*
* @return 产品时间
*/
public
String
getImageProductTime
()
{
return
this
.
imageProductTime
;
}
/**
* 设置产品时间
*
* @param imageProductTime
* 产品时间
*/
public
void
setImageProductTime
(
String
imageProductTime
)
{
this
.
imageProductTime
=
imageProductTime
;
}
/**
* 获取sat行号
*
* @return sat行号
*/
public
String
getImageSatPath
()
{
return
this
.
imageSatPath
;
}
/**
* 设置sat行号
*
* @param imageSatPath
* sat行号
*/
public
void
setImageSatPath
(
String
imageSatPath
)
{
this
.
imageSatPath
=
imageSatPath
;
}
/**
* 获取sat列号
*
* @return sat列号
*/
public
String
getImageSatRow
()
{
return
this
.
imageSatRow
;
}
/**
* 设置sat列号
*
* @param imageSatRow
* sat列号
*/
public
void
setImageSatRow
(
String
imageSatRow
)
{
this
.
imageSatRow
=
imageSatRow
;
}
/**
* 获取影像开始时间
*
* @return 影像开始时间
*/
public
String
getImageStartTime
()
{
return
this
.
imageStartTime
;
}
/**
* 设置影像开始时间
*
* @param imageStartTime
* 影像开始时间
*/
public
void
setImageStartTime
(
String
imageStartTime
)
{
this
.
imageStartTime
=
imageStartTime
;
}
/**
* 获取影像结束时间
*
* @return 影像结束时间
*/
public
String
getImageEndTime
()
{
return
this
.
imageEndTime
;
}
/**
* 设置影像结束时间
*
* @param imageEndTime
* 影像结束时间
*/
public
void
setImageEndTime
(
String
imageEndTime
)
{
this
.
imageEndTime
=
imageEndTime
;
}
/**
* 获取影像中间时间
*
* @return 影像中间时间
*/
public
String
getImageCenterTime
()
{
return
this
.
imageCenterTime
;
}
/**
* 设置影像中间时间
*
* @param imageCenterTime
* 影像中间时间
*/
public
void
setImageCenterTime
(
String
imageCenterTime
)
{
this
.
imageCenterTime
=
imageCenterTime
;
}
/**
* 获取影像宽度
*
* @return 影像宽度
*/
public
String
getImageWidthInPixels
()
{
return
this
.
imageWidthInPixels
;
}
/**
* 设置影像宽度
*
* @param imageWidthInPixels
* 影像宽度
*/
public
void
setImageWidthInPixels
(
String
imageWidthInPixels
)
{
this
.
imageWidthInPixels
=
imageWidthInPixels
;
}
/**
* 获取卫星平台平均俯仰角
*
* @return 卫星平台平均俯仰角
*/
public
String
getImagePitchSatellitessAngle
()
{
return
this
.
imagePitchSatellitessAngle
;
}
/**
* 设置卫星平台平均俯仰角
*
* @param imagePitchSatellitessAngle
* 卫星平台平均俯仰角
*/
public
void
setImagePitchSatellitessAngle
(
String
imagePitchSatellitessAngle
)
{
this
.
imagePitchSatellitessAngle
=
imagePitchSatellitessAngle
;
}
/**
* 获取太阳方位角
*
* @return 太阳方位角
*/
public
String
getImageSolarAzimuth
()
{
return
this
.
imageSolarAzimuth
;
}
/**
* 设置太阳方位角
*
* @param imageSolarAzimuth
* 太阳方位角
*/
public
void
setImageSolarAzimuth
(
String
imageSolarAzimuth
)
{
this
.
imageSolarAzimuth
=
imageSolarAzimuth
;
}
/**
* 获取太阳高度角
*
* @return 太阳高度角
*/
public
String
getImageSolarZenith
()
{
return
this
.
imageSolarZenith
;
}
/**
* 设置太阳高度角
*
* @param imageSolarZenith
* 太阳高度角
*/
public
void
setImageSolarZenith
(
String
imageSolarZenith
)
{
this
.
imageSolarZenith
=
imageSolarZenith
;
}
/**
* 获取卫星方向角
*
* @return 卫星方向角
*/
public
String
getImageSatelliteAzimuth
()
{
return
this
.
imageSatelliteAzimuth
;
}
/**
* 设置卫星方向角
*
* @param imageSatelliteAzimuth
* 卫星方向角
*/
public
void
setImageSatelliteAzimuth
(
String
imageSatelliteAzimuth
)
{
this
.
imageSatelliteAzimuth
=
imageSatelliteAzimuth
;
}
/**
* 获取卫星高度角
*
* @return 卫星高度角
*/
public
String
getImageSatelliteZenith
()
{
return
this
.
imageSatelliteZenith
;
}
/**
* 设置卫星高度角
*
* @param imageSatelliteZenith
* 卫星高度角
*/
public
void
setImageSatelliteZenith
(
String
imageSatelliteZenith
)
{
this
.
imageSatelliteZenith
=
imageSatelliteZenith
;
}
/**
* 获取影像高度
*
* @return 影像高度
*/
public
String
getImageHeightInPixels
()
{
return
this
.
imageHeightInPixels
;
}
/**
* 设置影像高度
*
* @param imageHeightInPixels
* 影像高度
*/
public
void
setImageHeightInPixels
(
String
imageHeightInPixels
)
{
this
.
imageHeightInPixels
=
imageHeightInPixels
;
}
/**
* 获取卫星平台平均偏航角
*
* @return 卫星平台平均偏航角
*/
public
String
getImageYawSatelliteAngle
()
{
return
this
.
imageYawSatelliteAngle
;
}
/**
* 设置卫星平台平均偏航角
*
* @param imageYawSatelliteAngle
* 卫星平台平均偏航角
*/
public
void
setImageYawSatelliteAngle
(
String
imageYawSatelliteAngle
)
{
this
.
imageYawSatelliteAngle
=
imageYawSatelliteAngle
;
}
/**
* 获取传感器id
*
* @return 传感器id
*/
public
String
getImageSensorId
()
{
return
this
.
imageSensorId
;
}
/**
* 设置传感器id
*
* @param imageSensorId
* 传感器id
*/
public
void
setImageSensorId
(
String
imageSensorId
)
{
this
.
imageSensorId
=
imageSensorId
;
}
/**
* 获取状态:10展示,20不展示
*
* @return 状态:10展示
*/
public
Integer
getRecordStatus
()
{
return
this
.
recordStatus
;
}
/**
* 设置状态:10展示,20不展示
*
* @param recordStatus
* 状态:10展示
*/
public
void
setRecordStatus
(
Integer
recordStatus
)
{
this
.
recordStatus
=
recordStatus
;
}
/**
* 获取创建时间
*
* @return 创建时间
*/
public
String
getCrtTime
()
{
return
this
.
crtTime
;
}
/**
* 设置创建时间
*
* @param crtTime
* 创建时间
*/
public
void
setCrtTime
(
String
crtTime
)
{
this
.
crtTime
=
crtTime
;
}
/**
* 获取更新时间
*
* @return 更新时间
*/
public
String
getUpdTime
()
{
return
this
.
updTime
;
}
/**
* 设置更新时间
*
* @param updTime
* 更新时间
*/
public
void
setUpdTime
(
String
updTime
)
{
this
.
updTime
=
updTime
;
}
/* This code was generated by TableGo tools, mark 2 end. */
}
\ No newline at end of file
rs-datacenter/rs-datacenter-api/src/main/java/com/upyuns/platform/rs/datacenter/entity/RscpImageInputLog.java
0 → 100644
View file @
6da72f22
package
com
.
upyuns
.
platform
.
rs
.
datacenter
.
entity
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
import
javax.persistence.Table
;
@Data
@Table
(
name
=
"rscp_image_input_log"
)
@ApiModel
(
description
=
""
)
public
class
RscpImageInputLog
implements
java
.
io
.
Serializable
{
/** 版本号 */
private
static
final
long
serialVersionUID
=
-
6625661497803837040L
;
public
static
final
int
STATU_ING
=
1
;
public
static
final
int
STATU_SUCC
=
2
;
public
static
final
int
STATU_FAIL
=
-
1
;
/* This code was generated by TableGo tools, mark 1 begin. */
/** id */
@ApiModelProperty
(
value
=
""
)
private
Long
id
;
/** 创建时间 */
@ApiModelProperty
(
value
=
"创建时间"
)
private
Long
crtTime
;
/** 更新时间 */
@ApiModelProperty
(
value
=
"更新时间"
)
private
Long
updTime
;
/** 状态 */
@ApiModelProperty
(
value
=
"状态"
)
private
Integer
status
;
/** json文本 */
@ApiModelProperty
(
value
=
"json文本"
)
private
String
contextJson
;
/* This code was generated by TableGo tools, mark 1 end. */
/* This code was generated by TableGo tools, mark 2 begin. */
}
\ No newline at end of file
rs-datacenter/rs-datacenter-api/src/main/java/com/upyuns/platform/rs/datacenter/fegin/DatacenterFeign.java
View file @
6da72f22
...
...
@@ -7,6 +7,7 @@ import com.upyuns.platform.rs.datacenter.pojo.ImageDataVO;
import
org.springframework.cloud.openfeign.FeignClient
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RequestMethod
;
import
org.springframework.web.bind.annotation.RequestParam
;
import
java.util.List
;
...
...
@@ -21,7 +22,7 @@ import java.util.List;
public
interface
DatacenterFeign
{
@RequestMapping
(
value
=
"/web/areaInfo/app/unauth/Fegin/queryByCodeFegin"
,
method
=
RequestMethod
.
GET
)
public
ObjectRestResponse
<
RscpAreaInfo
>
queryByCode
(
String
areaCode
);
public
ObjectRestResponse
<
RscpAreaInfo
>
queryByCode
(
@RequestParam
(
"areaCode"
)
String
areaCode
);
@RequestMapping
(
value
=
"/web/imageData/app/unauth/Fegin/queryByIds"
,
method
=
RequestMethod
.
GET
)
public
ObjectRestResponse
<
List
<
ImageDataVO
>>
queryByIds
(
String
ids
);
...
...
rs-datacenter/rs-datacenter-api/src/main/java/com/upyuns/platform/rs/datacenter/vo/Image
StorageVo
.java
→
rs-datacenter/rs-datacenter-api/src/main/java/com/upyuns/platform/rs/datacenter/vo/Image
InputVO
.java
View file @
6da72f22
...
...
@@ -6,7 +6,7 @@ import java.math.BigDecimal;
import
java.util.List
;
@Data
public
class
Image
StorageVo
{
public
class
Image
InputVO
{
//左上角经度
private
BigDecimal
leftTopLon
;
...
...
rs-datacenter/rs-datacenter-server/src/main/java/com/upyuns/platform/rs/datacenter/biz/RscpImageDataInputFailBiz.java
0 → 100644
View file @
6da72f22
package
com
.
upyuns
.
platform
.
rs
.
datacenter
.
biz
;
import
com.github.wxiaoqi.security.common.biz.BaseBiz
;
import
com.upyuns.platform.rs.datacenter.entity.RscpImageDataInputFail
;
import
com.upyuns.platform.rs.datacenter.entity.RscpImagePrice
;
import
com.upyuns.platform.rs.datacenter.mapper.RscpImageDataInputFailMapper
;
import
com.upyuns.platform.rs.datacenter.mapper.RscpImagePriceMapper
;
import
org.springframework.stereotype.Service
;
@Service
public
class
RscpImageDataInputFailBiz
extends
BaseBiz
<
RscpImageDataInputFailMapper
,
RscpImageDataInputFail
>
{
}
rs-datacenter/rs-datacenter-server/src/main/java/com/upyuns/platform/rs/datacenter/biz/RscpImageInputLogBiz.java
0 → 100644
View file @
6da72f22
package
com
.
upyuns
.
platform
.
rs
.
datacenter
.
biz
;
import
com.github.wxiaoqi.security.common.biz.BaseBiz
;
import
com.upyuns.platform.rs.datacenter.entity.RscpImageInputLog
;
import
com.upyuns.platform.rs.datacenter.entity.RscpImagePrice
;
import
com.upyuns.platform.rs.datacenter.mapper.RscpImageInputLogMapper
;
import
com.upyuns.platform.rs.datacenter.mapper.RscpImagePriceMapper
;
import
org.springframework.stereotype.Service
;
@Service
public
class
RscpImageInputLogBiz
extends
BaseBiz
<
RscpImageInputLogMapper
,
RscpImageInputLog
>
{
}
rs-datacenter/rs-datacenter-server/src/main/java/com/upyuns/platform/rs/datacenter/config/RabbitConfig.java
0 → 100644
View file @
6da72f22
package
com
.
upyuns
.
platform
.
rs
.
datacenter
.
config
;
import
com.github.wxiaoqi.security.common.config.rabbit.BindDTO
;
import
com.github.wxiaoqi.security.common.config.rabbit.RabbitCommonConfig
;
import
org.springframework.context.annotation.Configuration
;
import
java.util.ArrayList
;
import
static
com
.
github
.
wxiaoqi
.
security
.
common
.
config
.
rabbit
.
RabbitConstant
.*;
/**
* @author libin
* @version 1.0
* @description
* @data 2019/10/17 17:23
*/
@Configuration
public
class
RabbitConfig
extends
RabbitCommonConfig
{
/**
* 获取成功入库数据。
*/
public
static
final
String
IMAGE_INPUT_LOG_QUEUE
=
"image.input.log.queue"
;
static
{
myQueue
=
new
ArrayList
<
BindDTO
>()
{{
//添加接收
//入库日志队列+数据中心主题+入库完成KEY
add
(
new
BindDTO
(
IMAGE_INPUT_LOG_QUEUE
,
DATACENTER_TOPIC
,
KEY_IMAGE_INPUT_SUCC
));
}};
}
}
rs-datacenter/rs-datacenter-server/src/main/java/com/upyuns/platform/rs/datacenter/mapper/RscpImageDataInputFailMapper.java
0 → 100644
View file @
6da72f22
package
com
.
upyuns
.
platform
.
rs
.
datacenter
.
mapper
;
import
com.upyuns.platform.rs.datacenter.entity.RscpImageDataInputFail
;
import
com.upyuns.platform.rs.datacenter.entity.RscpImagePrice
;
import
tk.mybatis.mapper.common.Mapper
;
public
interface
RscpImageDataInputFailMapper
extends
Mapper
<
RscpImageDataInputFail
>
{
}
\ No newline at end of file
rs-datacenter/rs-datacenter-server/src/main/java/com/upyuns/platform/rs/datacenter/mapper/RscpImageInputLogMapper.java
0 → 100644
View file @
6da72f22
package
com
.
upyuns
.
platform
.
rs
.
datacenter
.
mapper
;
import
com.upyuns.platform.rs.datacenter.entity.RscpImageDataInputFail
;
import
com.upyuns.platform.rs.datacenter.entity.RscpImageInputLog
;
import
tk.mybatis.mapper.common.Mapper
;
public
interface
RscpImageInputLogMapper
extends
Mapper
<
RscpImageInputLog
>
{
}
\ No newline at end of file
rs-datacenter/rs-datacenter-server/src/main/java/com/upyuns/platform/rs/datacenter/mqhandler/ImageInputLogMQHandler.java
0 → 100644
View file @
6da72f22
package
com
.
upyuns
.
platform
.
rs
.
datacenter
.
mqhandler
;
import
cn.hutool.json.JSONUtil
;
import
com.rabbitmq.client.Channel
;
import
com.upyuns.platform.rs.datacenter.biz.RscpImageDataTotalBiz
;
import
com.upyuns.platform.rs.datacenter.biz.RscpImageInputLogBiz
;
import
com.upyuns.platform.rs.datacenter.entity.RscpImageDataTotal
;
import
com.upyuns.platform.rs.datacenter.entity.RscpImageInputLog
;
import
com.upyuns.platform.rs.datacenter.vo.ImageInputVO
;
import
lombok.extern.slf4j.Slf4j
;
import
org.springframework.amqp.core.Message
;
import
org.springframework.amqp.rabbit.annotation.RabbitListener
;
import
org.springframework.amqp.support.AmqpHeaders
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.messaging.handler.annotation.Headers
;
import
org.springframework.stereotype.Component
;
import
java.io.IOException
;
import
java.util.Map
;
import
java.util.concurrent.ExecutorService
;
import
java.util.concurrent.Executors
;
import
static
com
.
upyuns
.
platform
.
rs
.
datacenter
.
config
.
RabbitConfig
.
IMAGE_INPUT_LOG_QUEUE
;
@Component
@Slf4j
public
class
ImageInputLogMQHandler
{
@Autowired
RscpImageInputLogBiz
rscpImageInputLogBiz
;
@Autowired
RscpImageDataTotalBiz
rscpImageDataTotalBiz
;
/**
* 同步门店信息
* @param
*/
@RabbitListener
(
queues
=
IMAGE_INPUT_LOG_QUEUE
)
public
void
integralHandler
(
Message
message
,
@Headers
Map
<
String
,
Object
>
headers
,
Channel
channel
)
{
log
.
info
(
"同步门店信息 messageJson:"
+
JSONUtil
.
parse
(
message
));
ExecutorService
executorService
=
Executors
.
newCachedThreadPool
();
executorService
.
execute
(()
->
{
try
{
String
messageId
=
message
.
getMessageProperties
().
getMessageId
();
String
msg
=
new
String
(
message
.
getBody
(),
"UTF-8"
);
ImageInputVO
ii
=
JSONUtil
.
toBean
(
msg
,
ImageInputVO
.
class
);
rscpImageInputLogBiz
.
insertSelective
(
new
RscpImageInputLog
(){{
setContextJson
(
JSONUtil
.
toJsonStr
(
ii
));
setStatus
(
STATU_ING
);
}});
executorService
.
shutdown
();
Long
deliveryTag
=
(
Long
)
headers
.
get
(
AmqpHeaders
.
DELIVERY_TAG
);
// 手动签收
channel
.
basicAck
(
deliveryTag
,
false
);
ExecutorService
executorService2
=
Executors
.
newCachedThreadPool
();
executorService2
.
execute
(()
->
{
try
{
//查询数据是否存在
rscpImageDataTotalBiz
.
selectCount
(
new
RscpImageDataTotal
(){{
setName
(
ii
.
getName
());
}});
}
catch
(
Exception
e
)
{
log
.
error
(
e
.
getMessage
(),
e
);
throw
e
;
}
});
}
catch
(
Exception
e
)
{
log
.
info
(
"接收到的消息失败"
);
try
{
channel
.
basicNack
(
message
.
getMessageProperties
().
getDeliveryTag
(),
false
,
false
);
}
catch
(
IOException
i
)
{
log
.
error
(
e
.
getMessage
(),
i
);
}
log
.
error
(
e
.
getMessage
(),
e
);
}
});
}
}
rs-datacenter/rs-datacenter-server/src/main/java/com/upyuns/platform/rs/datacenter/rest/GtdataController.java
View file @
6da72f22
...
...
@@ -35,9 +35,10 @@ public class GtdataController extends CommonBaseController {
public
void
queryAreaInfoByAreaId
()
throws
Exception
{
String
url
=
request
.
getRequestURI
();
String
fileName
=
url
.
substring
(
url
.
lastIndexOf
(
"/"
)+
1
);
String
filePath
=
"https://box.bdimg.com/static/fisp_static/common/img/searchbox/logo_news_276_88_1f9876a.png"
;
// String filePath = "/obt/thumbnail/"+ url.substring(url.lastIndexOf("/app/unauth/image/")+18);
String
filePath
=
"/obt/thumbnail/data/VDM2/20200613/VDM2_20200525232637_0015_L1_MSS_CMOS5/VDM2_20200525232637_0015_L1_MSS_CMOS5_98_98.jpg"
;
filePath
=
gtDataRestClient
.
openUrl
(
filePath
);
//
String filePath = "/obt/thumbnail/data/VDM2/20200613/VDM2_20200525232637_0015_L1_MSS_CMOS5/VDM2_20200525232637_0015_L1_MSS_CMOS5_98_98.jpg";
//
filePath = gtDataRestClient.openUrl(filePath);
downloadVideoById
(
fileName
,
filePath
,
getResponse
());
return
;
}
...
...
rs-datacenter/rs-datacenter-server/src/main/java/com/upyuns/platform/rs/datacenter/utils/FileOperateUtil.java
deleted
100644 → 0
View file @
92f6a5ed
package
com
.
upyuns
.
platform
.
rs
.
datacenter
.
utils
;
import
java.io.File
;
public
class
FileOperateUtil
{
public
static
String
getFileNameNotFormat
(
String
filePath
)
{
filePath
=
filePath
.
replaceAll
(
"\\\\"
,
"/"
);
Integer
indexOf
=
filePath
.
lastIndexOf
(
"/"
);
String
fileName
=
filePath
.
substring
(
indexOf
);
String
dirName
=
fileName
;
indexOf
=
filePath
.
lastIndexOf
(
"."
);
if
(
indexOf
>
0
)
{
dirName
=
dirName
.
substring
(
0
,
indexOf
);
}
return
dirName
;
}
public
static
String
getFileName
(
String
filePath
)
{
filePath
=
filePath
.
replaceAll
(
"\\\\"
,
"/"
);
Integer
indexOf
=
filePath
.
lastIndexOf
(
"/"
);
String
fileName
=
filePath
.
substring
(
indexOf
);
return
fileName
;
}
public
static
String
getlocalFileParentPath
(
String
filePath
)
{
File
file
=
new
File
(
filePath
);
return
file
.
getParent
();
}
public
static
String
getPathParentPath
(
String
filePath
)
{
filePath
=
filePath
.
replaceAll
(
"\\\\"
,
"/"
);
Integer
indexOf
=
filePath
.
lastIndexOf
(
"/"
);
String
parentPath
=
filePath
;
if
(
indexOf
>
0
)
{
parentPath
=
parentPath
.
substring
(
0
,
indexOf
);
}
return
parentPath
;
}
}
rs-datacenter/rs-datacenter-server/src/main/java/com/upyuns/platform/rs/datacenter/utils/ImageStorageParseUtil.java
deleted
100644 → 0
View file @
92f6a5ed
package
com
.
upyuns
.
platform
.
rs
.
datacenter
.
utils
;
import
com.github.wxiaoqi.security.common.constant.RestCode
;
import
com.github.wxiaoqi.security.common.exception.BaseException
;
import
com.github.wxiaoqi.security.common.util.process.ResultCode
;
import
com.upyuns.platform.rs.datacenter.utils.gdal.ImageOperateTools
;
import
com.upyuns.platform.rs.datacenter.vo.ImageStorageVo
;
import
com.upyuns.platform.rs.gtdata.GtDataRestClient
;
import
org.apache.commons.collections.map.HashedMap
;
import
org.apache.commons.lang.time.DateUtils
;
import
org.apache.commons.lang3.StringUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Value
;
import
java.io.File
;
import
java.io.FileOutputStream
;
import
java.io.IOException
;
import
java.io.OutputStream
;
import
java.math.BigDecimal
;
import
java.text.SimpleDateFormat
;
import
java.util.*
;
public
class
ImageStorageParseUtil
{
@Value
(
"${localDirTemp.tarFileTemp}"
)
private
static
String
tarFileTempDir
;
@Autowired
private
static
GtDataRestClient
gtDataRestClient
;
public
static
ImageStorageVo
tarFileParseGtData
(
String
inputGtPath
,
String
ouputGtDir
)
throws
BaseException
{
//将GT上压缩包下载到本地
Integer
indexOf
=
inputGtPath
.
lastIndexOf
(
"/"
);
String
fileName
=
inputGtPath
.
substring
(
indexOf
);
String
dirName
=
fileName
;
indexOf
=
inputGtPath
.
lastIndexOf
(
"."
);
if
(
indexOf
>
0
)
{
dirName
=
dirName
.
substring
(
0
,
indexOf
);
}
File
localDir
=
new
File
(
tarFileTempDir
+
"/"
+
dirName
);
localDir
.
mkdirs
();
String
localInputPath
=
localDir
+
"/"
+
fileName
;
Map
<
String
,
Object
>
result
=
gtDataRestClient
.
open
(
inputGtPath
);
if
((
Integer
)
result
.
get
(
"HttpStatusCode"
)
!=
200
)
{
throw
new
BaseException
(
"文件下载失败"
,
ResultCode
.
FAILED_CODE
);
}
try
{
OutputStream
outputStream
=
new
FileOutputStream
(
new
File
(
localInputPath
));
outputStream
.
write
((
byte
[])
result
.
get
(
"file"
));
outputStream
.
flush
();
outputStream
.
close
();
}
catch
(
Exception
e
)
{
throw
new
BaseException
(
"文件保存失败"
,
ResultCode
.
FAILED_CODE
);
}
return
tarFileParse
(
localInputPath
,
localDir
.
getPath
(),
ouputGtDir
);
}
public
static
ImageStorageVo
tarFileParse
(
String
inputLocalPath
,
String
localOutputDir
,
String
outputGtPath
)
throws
BaseException
{
if
(
inputLocalPath
.
endsWith
(
"zip"
))
{
//Satellogic 压缩包解析
return
satellogicParse
(
inputLocalPath
,
localOutputDir
,
outputGtPath
);
}
else
if
(
inputLocalPath
.
endsWith
(
"tar.gz"
))
{
throw
new
BaseException
(
"tar.gz 压缩包未实现"
,
ResultCode
.
FAILED_CODE
);
}
else
{
throw
new
BaseException
(
"压缩包格式不支持"
,
ResultCode
.
FAILED_CODE
);
}
}
//Satellogic 压缩包解析
public
static
ImageStorageVo
satellogicParse
(
String
inputLocalPath
,
String
localOutputDir
,
String
outputGtPath
)
throws
BaseException
{
//1、提取解析xml文件
List
<
String
>
xmlPathList
=
TarFileOperateUtil
.
zipFileRead
(
inputLocalPath
,
localOutputDir
,
".xml"
);
if
(
xmlPathList
==
null
||
xmlPathList
.
size
()
==
0
)
{
throw
new
BaseException
(
"xml文件提取失败"
,
ResultCode
.
FAILED_CODE
);
}
List
<
String
>
fileNameList
=
new
ArrayList
<>();
ImageStorageVo
imageStorageVo
=
new
ImageStorageVo
();
//初始基础或固定信息
imageStorageVo
.
setName
(
FileOperateUtil
.
getFileNameNotFormat
(
inputLocalPath
));
imageStorageVo
.
setImageProductFormat
(
"TIFF"
);
imageStorageVo
.
setImageSpectrumType
(
"{QS,DGP}"
);
imageStorageVo
.
setImageSpectrumTypeDisplay
(
"{全色,多光谱}"
);
imageStorageVo
.
setImageProjection
(
"WGS-84"
);
Map
<
String
,
String
>
paramsMap
=
new
HashedMap
();
boolean
xmlFlag
=
false
;
for
(
String
xmlPath
:
xmlPathList
)
{
paramsMap
.
clear
();
XmlFileOperateUtil
.
xmlParse
(
xmlPath
,
paramsMap
);
if
(
paramsMap
.
get
(
"camera"
)
!=
null
&&
paramsMap
.
get
(
"bounds"
)
!=
null
)
{
//拍摄时间
String
takeTime
=
paramsMap
.
get
(
"created_at"
);
if
(
StringUtils
.
isNotBlank
(
takeTime
))
{
String
takeTimeFormat
=
takeTime
.
replace
(
"T"
,
" "
);
Integer
indexOf
=
takeTimeFormat
.
lastIndexOf
(
"."
);
if
(
indexOf
>
0
)
{
takeTimeFormat
=
takeTimeFormat
.
substring
(
0
,
indexOf
);
}
if
(
takeTime
.
toLowerCase
().
endsWith
(
"z"
))
{
//UTC格林标准时区
SimpleDateFormat
sdf
=
new
SimpleDateFormat
(
"yyyy-MM-dd HH:mm:ss"
);
try
{
Date
date
=
sdf
.
parse
(
takeTimeFormat
);
DateUtils
.
addHours
(
date
,
8
);
//增加8小时,转为北京时区
takeTimeFormat
=
sdf
.
format
(
date
);
}
catch
(
Exception
e
)
{
throw
new
BaseException
(
"时间解析失败"
,
ResultCode
.
FAILED_CODE
);
}
}
imageStorageVo
.
setImageTakeTime
(
takeTimeFormat
);
imageStorageVo
.
setImageProductTime
(
takeTimeFormat
);
imageStorageVo
.
setImageEndTime
(
takeTimeFormat
);
imageStorageVo
.
setImageStartTime
(
takeTimeFormat
);
imageStorageVo
.
setImageCenterTime
(
takeTimeFormat
);
}
//供应商
imageStorageVo
.
setSupplier
(
paramsMap
.
get
(
"supplier"
));
//卫星名称、类型
imageStorageVo
.
setImageSatelliteType
(
paramsMap
.
get
(
"satellite_name"
));
imageStorageVo
.
setImageSatelliteTypeDisplay
(
paramsMap
.
get
(
"satellite_name"
));
//云量
imageStorageVo
.
setImageCloudage
(
new
BigDecimal
(
paramsMap
.
get
(
"cloud_pctg"
)));
//传感器类型
imageStorageVo
.
setImageSensorType
(
paramsMap
.
get
(
"camera"
));
imageStorageVo
.
setImageSensorId
(
paramsMap
.
get
(
"camera"
));
//景id
imageStorageVo
.
setImageSceneId
(
paramsMap
.
get
(
"scene_id"
));
xmlFlag
=
true
;
break
;
}
}
if
(!
xmlFlag
)
{
throw
new
BaseException
(
"xml 解析失败"
,
ResultCode
.
FAILED_CODE
);
}
//2、提取tiff,生成缩略图
List
<
String
>
tifPathList
=
TarFileOperateUtil
.
zipFileRead
(
inputLocalPath
,
localOutputDir
,
".tif"
);
if
(
tifPathList
==
null
||
tifPathList
.
size
()
==
0
)
{
tifPathList
=
TarFileOperateUtil
.
zipFileRead
(
inputLocalPath
,
localOutputDir
,
".tiff"
);
}
if
(
tifPathList
==
null
||
tifPathList
.
size
()
==
0
)
{
throw
new
BaseException
(
"tif 文件提取失败"
,
ResultCode
.
FAILED_CODE
);
}
//生成缩略图
List
<
String
>
picPathList
=
new
ArrayList
<>();
for
(
String
tifPath
:
tifPathList
)
{
if
(
tifPath
.
toLowerCase
().
contains
(
"_quicklook"
))
{
String
localPicPrefix
=
FileOperateUtil
.
getlocalFileParentPath
(
tifPath
)
+
"/"
+
FileOperateUtil
.
getFileNameNotFormat
(
tifPath
);
String
localPngPic
=
localPicPrefix
+
".png"
;
ImageOperateTools
.
tif2Pic
(
tifPath
,
localPngPic
);
picPathList
.
add
(
localPngPic
);
String
localTargetPngPic
=
localPicPrefix
+
"_800_800.png"
;
ImageOperateTools
.
zipImageFile
(
localPngPic
,
localTargetPngPic
,
800
,
1.0f
);
break
;
}
}
//3、转坐标系
return
imageStorageVo
;
}
}
rs-datacenter/rs-datacenter-server/src/main/java/com/upyuns/platform/rs/datacenter/utils/TarFileOperateUtil.java
deleted
100644 → 0
View file @
92f6a5ed
package
com
.
upyuns
.
platform
.
rs
.
datacenter
.
utils
;
import
com.github.wxiaoqi.security.common.exception.BaseException
;
import
com.github.wxiaoqi.security.common.util.process.ResultCode
;
import
org.apache.commons.lang3.StringUtils
;
import
java.io.*
;
import
java.util.ArrayList
;
import
java.util.Enumeration
;
import
java.util.List
;
import
java.util.zip.ZipEntry
;
import
java.util.zip.ZipFile
;
public
class
TarFileOperateUtil
{
/**
* 解压zip压缩包中,指定文件类型的文件
* @param file
* @param saveRootDirectory
* @param suffix
* @return 返回解压后的文件路径列表
* @throws Exception
*/
public
static
List
<
String
>
zipFileRead
(
String
file
,
String
saveRootDirectory
,
String
suffix
)
throws
BaseException
{
try
{
List
<
String
>
filePathList
=
new
ArrayList
<>();
String
lowerCaseSuffix
=
suffix
;
if
(
StringUtils
.
isBlank
(
lowerCaseSuffix
))
{
lowerCaseSuffix
=
lowerCaseSuffix
.
toLowerCase
();
}
ZipFile
zipFile
=
new
ZipFile
(
file
);
@SuppressWarnings
(
"unchecked"
)
Enumeration
<
ZipEntry
>
enu
=
(
Enumeration
<
ZipEntry
>)
zipFile
.
entries
();
while
(
enu
.
hasMoreElements
())
{
ZipEntry
zipElement
=
enu
.
nextElement
();
InputStream
read
=
zipFile
.
getInputStream
(
zipElement
);
String
fileName
=
zipElement
.
getName
();
if
(!
zipElement
.
isDirectory
()
&&
fileName
!=
null
)
{
//是否为文件
if
(
StringUtils
.
isBlank
(
lowerCaseSuffix
))
{
if
(
zipExecute
(
zipElement
,
read
,
saveRootDirectory
))
{
filePathList
.
add
(
saveRootDirectory
+
"/"
+
fileName
);
}
}
else
if
(
fileName
.
toLowerCase
().
endsWith
(
lowerCaseSuffix
))
{
//指定文件类型
if
(
zipExecute
(
zipElement
,
read
,
saveRootDirectory
))
{
filePathList
.
add
(
saveRootDirectory
+
"/"
+
fileName
);
}
}
}
}
return
filePathList
;
}
catch
(
Exception
e
)
{
throw
new
BaseException
(
"xml解析失败"
,
ResultCode
.
FAILED_CODE
);
}
}
private
static
boolean
zipExecute
(
ZipEntry
ze
,
InputStream
read
,
String
saveRootDirectory
)
throws
IOException
{
String
fileName
=
ze
.
getName
();
File
file
=
new
File
(
saveRootDirectory
+
"/"
+
fileName
);
if
(!
file
.
exists
())
{
File
rootDirectoryFile
=
new
File
(
file
.
getParent
());
//创建目录
if
(!
rootDirectoryFile
.
exists
())
{
boolean
ifSuccess
=
rootDirectoryFile
.
mkdirs
();
if
(
ifSuccess
)
{
System
.
out
.
println
(
"文件夹创建成功!"
);
}
else
{
return
false
;
}
}
//创建文件
try
{
file
.
createNewFile
();
}
catch
(
IOException
e
)
{
e
.
printStackTrace
();
return
false
;
}
}
//写入文件
BufferedOutputStream
write
=
new
BufferedOutputStream
(
new
FileOutputStream
(
file
));
int
cha
=
0
;
while
((
cha
=
read
.
read
())
!=
-
1
)
{
write
.
write
(
cha
);
}
//要注意IO流关闭的先后顺序
write
.
flush
();
write
.
close
();
read
.
close
();
return
true
;
}
}
rs-datacenter/rs-datacenter-server/src/main/java/com/upyuns/platform/rs/datacenter/utils/XmlFileOperateUtil.java
deleted
100644 → 0
View file @
92f6a5ed
package
com
.
upyuns
.
platform
.
rs
.
datacenter
.
utils
;
import
com.github.wxiaoqi.security.common.exception.BaseException
;
import
com.github.wxiaoqi.security.common.util.process.ResultCode
;
import
org.dom4j.Attribute
;
import
org.dom4j.Document
;
import
org.dom4j.Element
;
import
org.dom4j.io.SAXReader
;
import
java.io.File
;
import
java.util.Iterator
;
import
java.util.List
;
import
java.util.Map
;
public
class
XmlFileOperateUtil
{
public
static
void
xmlParse
(
String
xmlPath
,
Map
<
String
,
String
>
paramsMap
)
throws
BaseException
{
try
{
//1.创建Reader对象
SAXReader
reader
=
new
SAXReader
();
//2.加载xml
Document
document
=
reader
.
read
(
new
File
(
xmlPath
));
//3.获取根节点
Element
rootElement
=
document
.
getRootElement
();
Iterator
iterator
=
rootElement
.
elementIterator
();
while
(
iterator
.
hasNext
())
{
Element
stu
=
(
Element
)
iterator
.
next
();
List
<
Attribute
>
attributes
=
stu
.
attributes
();
System
.
out
.
println
(
"======获取属性值======"
);
for
(
Attribute
attribute
:
attributes
)
{
System
.
out
.
println
(
attribute
.
getValue
());
}
System
.
out
.
println
(
"======遍历子节点======"
);
Iterator
iterator1
=
stu
.
elementIterator
();
while
(
iterator1
.
hasNext
())
{
Element
stuChild
=
(
Element
)
iterator1
.
next
();
paramsMap
.
put
(
stuChild
.
getName
(),
stuChild
.
getStringValue
());
}
}
}
catch
(
Exception
e
)
{
throw
new
BaseException
(
"xml解析失败"
,
ResultCode
.
FAILED_CODE
);
}
}
}
rs-datacenter/rs-datacenter-server/src/main/resources/mapper/RscpImageDataInputFailMapper.xml
0 → 100644
View file @
6da72f22
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<!-- 影像数据表(分表空间)(rscp_image_data_input_fail) -->
<mapper
namespace=
"com.upyuns.platform.rs.datacenter.mapper.RscpImageDataInputFailMapper"
>
<!-- This code was generated by TableGo tools, mark 1 begin. -->
<!-- 字段映射 -->
<resultMap
id=
"rscpImageDataInputFailMap"
type=
"com.upyuns.platform.rs.datacenter.entity.RscpImageDataInputFail"
>
<id
column=
"id"
property=
"id"
jdbcType=
"INTEGER"
/>
<result
column=
"data_no"
property=
"dataNo"
jdbcType=
"VARCHAR"
/>
<result
column=
"name"
property=
"name"
jdbcType=
"VARCHAR"
/>
<result
column=
"range"
property=
"range"
jdbcType=
"VARCHAR"
/>
<result
column=
"thumbnail_path"
property=
"thumbnailPath"
jdbcType=
"VARCHAR"
/>
<result
column=
"display_name"
property=
"displayName"
jdbcType=
"VARCHAR"
/>
<result
column=
"image_resolution"
property=
"imageResolution"
jdbcType=
"VARCHAR"
/>
<result
column=
"image_spectrum_type"
property=
"imageSpectrumType"
jdbcType=
"VARCHAR"
/>
<result
column=
"image_spectrum_type_display"
property=
"imageSpectrumTypeDisplay"
jdbcType=
"VARCHAR"
/>
<result
column=
"image_file_path"
property=
"imageFilePath"
jdbcType=
"VARCHAR"
/>
<result
column=
"image_center_point"
property=
"imageCenterPoint"
jdbcType=
"VARCHAR"
/>
<result
column=
"image_projection"
property=
"imageProjection"
jdbcType=
"VARCHAR"
/>
<result
column=
"image_satellite_type"
property=
"imageSatelliteType"
jdbcType=
"VARCHAR"
/>
<result
column=
"image_satellite_type_display"
property=
"imageSatelliteTypeDisplay"
jdbcType=
"VARCHAR"
/>
<result
column=
"image_take_time"
property=
"imageTakeTime"
jdbcType=
"VARCHAR"
/>
<result
column=
"image_cloudage"
property=
"imageCloudage"
jdbcType=
"INTEGER"
/>
<result
column=
"image_sensor_type"
property=
"imageSensorType"
jdbcType=
"VARCHAR"
/>
<result
column=
"files"
property=
"files"
jdbcType=
"VARCHAR"
/>
<result
column=
"image_is_save"
property=
"imageIsSave"
jdbcType=
"INTEGER"
/>
<result
column=
"image_scene_id"
property=
"imageSceneId"
jdbcType=
"VARCHAR"
/>
<result
column=
"image_product_format"
property=
"imageProductFormat"
jdbcType=
"VARCHAR"
/>
<result
column=
"image_product_time"
property=
"imageProductTime"
jdbcType=
"VARCHAR"
/>
<result
column=
"image_sat_path"
property=
"imageSatPath"
jdbcType=
"VARCHAR"
/>
<result
column=
"image_sat_row"
property=
"imageSatRow"
jdbcType=
"VARCHAR"
/>
<result
column=
"image_start_time"
property=
"imageStartTime"
jdbcType=
"VARCHAR"
/>
<result
column=
"image_end_time"
property=
"imageEndTime"
jdbcType=
"VARCHAR"
/>
<result
column=
"image_center_time"
property=
"imageCenterTime"
jdbcType=
"VARCHAR"
/>
<result
column=
"image_width_in_pixels"
property=
"imageWidthInPixels"
jdbcType=
"VARCHAR"
/>
<result
column=
"image_pitch_satellitess_angle"
property=
"imagePitchSatellitessAngle"
jdbcType=
"VARCHAR"
/>
<result
column=
"image_solar_azimuth"
property=
"imageSolarAzimuth"
jdbcType=
"VARCHAR"
/>
<result
column=
"image_solar_zenith"
property=
"imageSolarZenith"
jdbcType=
"VARCHAR"
/>
<result
column=
"image_satellite_azimuth"
property=
"imageSatelliteAzimuth"
jdbcType=
"VARCHAR"
/>
<result
column=
"image_satellite_zenith"
property=
"imageSatelliteZenith"
jdbcType=
"VARCHAR"
/>
<result
column=
"image_height_in_pixels"
property=
"imageHeightInPixels"
jdbcType=
"VARCHAR"
/>
<result
column=
"image_yaw_satellite_angle"
property=
"imageYawSatelliteAngle"
jdbcType=
"VARCHAR"
/>
<result
column=
"image_sensor_id"
property=
"imageSensorId"
jdbcType=
"VARCHAR"
/>
<result
column=
"record_status"
property=
"recordStatus"
jdbcType=
"INTEGER"
/>
<result
column=
"crt_time"
property=
"crtTime"
jdbcType=
"VARCHAR"
/>
<result
column=
"upd_time"
property=
"updTime"
jdbcType=
"VARCHAR"
/>
</resultMap>
<!-- This code was generated by TableGo tools, mark 1 end. -->
<!-- This code was generated by TableGo tools, mark 2 begin. -->
<!-- 表查询字段 -->
<sql
id=
"allColumns"
>
ridif.id, ridif.data_no, ridif.name, ridif.range, ridif.thumbnail_path, ridif.display_name, ridif.image_resolution, ridif.image_spectrum_type,
ridif.image_spectrum_type_display, ridif.image_file_path, ridif.image_center_point, ridif.image_projection, ridif.image_satellite_type, ridif.image_satellite_type_display, ridif.image_take_time, ridif.image_cloudage,
ridif.image_sensor_type, ridif.files, ridif.image_is_save, ridif.image_scene_id, ridif.image_product_format, ridif.image_product_time, ridif.image_sat_path, ridif.image_sat_row,
ridif.image_start_time, ridif.image_end_time, ridif.image_center_time, ridif.image_width_in_pixels, ridif.image_pitch_satellitess_angle, ridif.image_solar_azimuth, ridif.image_solar_zenith, ridif.image_satellite_azimuth,
ridif.image_satellite_zenith, ridif.image_height_in_pixels, ridif.image_yaw_satellite_angle, ridif.image_sensor_id, ridif.record_status, ridif.crt_time, ridif.upd_time
</sql>
<!-- This code was generated by TableGo tools, mark 2 end. -->
</mapper>
\ No newline at end of file
rs-datacenter/rs-datacenter-server/src/main/resources/mapper/RscpImageInputLogMapper.xml
0 → 100644
View file @
6da72f22
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<!-- rscp_image_input_log -->
<mapper
namespace=
"com.upyuns.platform.rs.datacenter.mapper.RscpImageInputLogMapper"
>
<!-- This code was generated by TableGo tools, mark 1 begin. -->
<!-- 字段映射 -->
<resultMap
id=
"rscpImageInputLogMap"
type=
"com.upyuns.platform.rs.datacenter.entity.RscpImageInputLog"
>
<id
column=
"id"
property=
"id"
jdbcType=
"INTEGER"
/>
<result
column=
"crt_time"
property=
"crtTime"
jdbcType=
"INTEGER"
/>
<result
column=
"upd_time"
property=
"updTime"
jdbcType=
"INTEGER"
/>
<result
column=
"status"
property=
"status"
jdbcType=
"INTEGER"
/>
<result
column=
"context_json"
property=
"contextJson"
jdbcType=
"VARCHAR"
/>
</resultMap>
<!-- This code was generated by TableGo tools, mark 1 end. -->
<!-- This code was generated by TableGo tools, mark 2 begin. -->
<!-- 表查询字段 -->
<sql
id=
"allColumns"
>
riil.id, riil.crt_time, riil.upd_time, riil.status, riil.context_json
</sql>
<!-- This code was generated by TableGo tools, mark 2 end. -->
</mapper>
\ No newline at end of file
rs-website/rs-website-api/src/main/java/com/upyuns/platform/rs/website/dto/custom/CustomQueryDTO.java
0 → 100644
View file @
6da72f22
package
com
.
upyuns
.
platform
.
rs
.
website
.
dto
.
custom
;
import
com.github.wxiaoqi.security.common.vo.PageParam
;
import
lombok.Data
;
@Data
public
class
CustomQueryDTO
extends
PageParam
{
private
Integer
type
;
private
Integer
status
;
}
\ No newline at end of file
rs-website/rs-website-api/src/main/java/com/upyuns/platform/rs/website/entity/CustomForm.java
View file @
6da72f22
...
...
@@ -19,6 +19,13 @@ import lombok.Data;
public
class
CustomForm
implements
Serializable
{
private
static
final
long
serialVersionUID
=
1L
;
public
static
final
int
STATUS_SUBMIT
=
1
;
public
static
final
int
STATUS_ORDER
=
2
;
public
static
final
int
TYPE_IMAGE
=
1
;
public
static
final
int
TYPE_INDUSTRY
=
2
;
public
static
final
int
TYPE_STORAGE
=
3
;
/**
*
*/
...
...
@@ -137,14 +144,14 @@ public class CustomForm implements Serializable {
*/
@Column
(
name
=
"data_type"
)
@ApiModelProperty
(
value
=
"数据类型"
)
private
Integer
dataType
;
private
String
dataType
;
/**
* 数据格式
*/
@Column
(
name
=
"data_format"
)
@ApiModelProperty
(
value
=
"数据格式"
)
private
Integer
dataFormat
;
private
String
dataFormat
;
/**
* 订单id
...
...
@@ -195,4 +202,46 @@ public class CustomForm implements Serializable {
@ApiModelProperty
(
value
=
"几何json"
)
private
String
geojson
;
/**
* 创建时间
*/
@Column
(
name
=
"crt_time"
)
@ApiModelProperty
(
value
=
"创建时间"
,
hidden
=
true
)
private
Long
crtTime
;
/**
* 创建者id
*/
@Column
(
name
=
"crt_user"
)
@ApiModelProperty
(
value
=
"创建者id"
)
private
String
crtUser
;
/**
* 更新时间
*/
@Column
(
name
=
"upd_time"
)
@ApiModelProperty
(
value
=
"更新时间"
,
hidden
=
true
)
private
Long
updTime
;
/**
* 创建者id
*/
@Column
(
name
=
"upd_user"
)
@ApiModelProperty
(
value
=
"更新者id"
)
private
String
updUser
;
/**
* 用户id
*/
@Column
(
name
=
"user_id"
)
@ApiModelProperty
(
value
=
"用户id"
)
private
Integer
userId
;
/**
* 状态 1--已提交;2--已转订单
*/
@Column
(
name
=
"status"
)
@ApiModelProperty
(
value
=
"状态 1--已提交;2--已转订单"
)
private
Integer
status
;
}
rs-website/rs-website-server/src/main/java/com/upyuns/platform/rs/website/controller/CustomFormController.java
View file @
6da72f22
package
com
.
upyuns
.
platform
.
rs
.
website
.
controller
;
import
com.github.wxiaoqi.security.common.msg.ObjectRestResponse
;
import
com.github.wxiaoqi.security.common.rest.BaseController
;
import
com.github.wxiaoqi.security.common.vo.PageDataVO
;
import
com.github.wxiaoqi.security.common.vo.PageParam
;
import
com.upyuns.platform.rs.website.biz.CustomFormBiz
;
import
com.upyuns.platform.rs.website.dto.custom.CustomQueryDTO
;
import
com.upyuns.platform.rs.website.entity.CustomForm
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RequestMethod
;
import
org.springframework.web.bind.annotation.RestController
;
import
static
com
.
github
.
wxiaoqi
.
security
.
common
.
constant
.
CommonConstants
.
SYS_FALSE
;
@RestController
@RequestMapping
(
"customForm"
)
public
class
CustomFormController
extends
BaseController
<
CustomFormBiz
,
CustomForm
>
{
@RequestMapping
(
value
=
"pageList"
,
method
=
RequestMethod
.
GET
)
public
ObjectRestResponse
<
PageDataVO
<
CustomForm
>>
pageList
(
CustomQueryDTO
dto
)
{
return
ObjectRestResponse
.
succ
(
PageDataVO
.
pageInfo
(
dto
.
initQuery
(),
()
->
baseBiz
.
selectByWeekend
(
w
->
{
w
.
andEqualTo
(
CustomForm:
:
getIsDel
,
SYS_FALSE
);
if
(
null
!=
dto
.
getType
())
{
w
.
andEqualTo
(
CustomForm:
:
getType
,
dto
.
getType
());
}
if
(
null
!=
dto
.
getStatus
())
{
w
.
andEqualTo
(
CustomForm:
:
getStatus
,
dto
.
getStatus
());
}
return
w
;
},
" 'status' asc, crt_time desc"
)));
}
}
\ No newline at end of file
rs-website/rs-website-server/src/main/java/com/upyuns/platform/rs/website/controller/web/CustomFormWebController.java
View file @
6da72f22
package
com
.
upyuns
.
platform
.
rs
.
website
.
controller
.
web
;
import
cn.hutool.core.util.StrUtil
;
import
com.github.wxiaoqi.security.admin.feign.UserFeign
;
import
com.github.wxiaoqi.security.admin.feign.rest.UserRestInterface
;
import
com.github.wxiaoqi.security.common.exception.BaseException
;
import
com.github.wxiaoqi.security.common.msg.ObjectRestResponse
;
import
com.github.wxiaoqi.security.common.rest.BaseController
;
import
com.github.wxiaoqi.security.common.util.AssertUtils
;
import
com.github.wxiaoqi.security.common.util.ReflectionUtils
;
import
com.github.wxiaoqi.security.common.util.process.ResultCode
;
import
com.github.wxiaoqi.security.common.vo.PageDataVO
;
import
com.github.wxiaoqi.security.common.vo.PageParam
;
import
com.upyuns.platform.rs.datacenter.fegin.DatacenterFeign
;
import
com.upyuns.platform.rs.website.biz.CustomFormBiz
;
import
com.upyuns.platform.rs.website.dto.custom.CustomQueryDTO
;
import
com.upyuns.platform.rs.website.entity.CustomForm
;
import
io.swagger.annotations.ApiOperation
;
import
lombok.Data
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.RequestBody
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RequestMethod
;
import
org.springframework.web.bind.annotation.RestController
;
import
org.springframework.web.bind.annotation.*
;
import
java.lang.reflect.Field
;
import
static
com
.
github
.
wxiaoqi
.
security
.
common
.
constant
.
CommonConstants
.
SYS_FALSE
;
import
static
com
.
github
.
wxiaoqi
.
security
.
common
.
constant
.
CommonConstants
.
SYS_TRUE
;
@RestController
@RequestMapping
(
"customForm/web"
)
public
class
CustomFormWebController
extends
BaseController
<
CustomFormBiz
,
CustomForm
>
{
public
class
CustomFormWebController
extends
BaseController
<
CustomFormBiz
,
CustomForm
>
implements
UserRestInterface
{
@Autowired
UserFeign
userFeign
;
@Autowired
DatacenterFeign
datacenterFegin
;
@Override
public
UserFeign
getUserFeign
()
{
return
userFeign
;
}
@RequestMapping
(
value
=
"customIndustry"
,
method
=
RequestMethod
.
POST
)
public
ObjectRestResponse
customIndustry
(
@RequestBody
CustomForm
entity
)
{
if
(
StrUtil
.
isNotBlank
(
entity
.
getProvinceCode
()))
{
...
...
@@ -31,13 +51,25 @@ public class CustomFormWebController extends BaseController<CustomFormBiz,Custom
if
(
StrUtil
.
isNotBlank
(
entity
.
getAreaCode
()))
{
entity
.
setAreaName
(
datacenterFegin
.
queryByCode
(
entity
.
getAreaCode
()).
getData
().
getName
());
}
entity
.
setUserId
(
getAppUser
().
getUserid
());
entity
.
setType
(
CustomForm
.
TYPE_INDUSTRY
);
baseBiz
.
insertSelective
(
entity
);
return
ObjectRestResponse
.
succ
();
}
@RequestMapping
(
value
=
"customImgStorage"
,
method
=
RequestMethod
.
POST
)
public
ObjectRestResponse
customImgStorage
(
@RequestBody
CustomForm
entity
)
{
if
(
StrUtil
.
isNotBlank
(
entity
.
getProvinceCode
()))
{
entity
.
setProvinceName
(
datacenterFegin
.
queryByCode
(
entity
.
getProvinceCode
()).
getData
().
getName
());
}
if
(
StrUtil
.
isNotBlank
(
entity
.
getCityCode
()))
{
entity
.
setCityName
(
datacenterFegin
.
queryByCode
(
entity
.
getCityCode
()).
getData
().
getName
());
}
if
(
StrUtil
.
isNotBlank
(
entity
.
getAreaCode
()))
{
entity
.
setAreaName
(
datacenterFegin
.
queryByCode
(
entity
.
getAreaCode
()).
getData
().
getName
());
}
entity
.
setUserId
(
getAppUser
().
getUserid
());
entity
.
setType
(
CustomForm
.
TYPE_STORAGE
);
baseBiz
.
insertSelective
(
entity
);
return
ObjectRestResponse
.
succ
();
}
...
...
@@ -53,7 +85,35 @@ public class CustomFormWebController extends BaseController<CustomFormBiz,Custom
if
(
StrUtil
.
isNotBlank
(
entity
.
getAreaCode
()))
{
entity
.
setAreaName
(
datacenterFegin
.
queryByCode
(
entity
.
getAreaCode
()).
getData
().
getName
());
}
entity
.
setUserId
(
getAppUser
().
getUserid
());
entity
.
setType
(
CustomForm
.
TYPE_IMAGE
);
baseBiz
.
insertSelective
(
entity
);
return
ObjectRestResponse
.
succ
();
}
@RequestMapping
(
value
=
"myCustoms"
,
method
=
RequestMethod
.
GET
)
public
ObjectRestResponse
<
PageDataVO
<
CustomForm
>>
myCustoms
(
CustomQueryDTO
dto
)
{
return
ObjectRestResponse
.
succ
(
PageDataVO
.
pageInfo
(
dto
.
initQuery
(),
()
->
baseBiz
.
selectByWeekend
(
w
->
{
w
.
andEqualTo
(
CustomForm:
:
getUserId
,
getAppUser
().
getUserid
());
w
.
andEqualTo
(
CustomForm:
:
getIsDel
,
SYS_FALSE
);
if
(
null
!=
dto
.
getType
())
{
w
.
andEqualTo
(
CustomForm:
:
getType
,
dto
.
getType
());
}
return
w
;
},
" crt_time desc"
)));
}
@ApiOperation
(
"删除"
)
@RequestMapping
(
value
=
"/delCustom"
,
method
=
RequestMethod
.
DELETE
)
@ResponseBody
public
ObjectRestResponse
delCustom
(
@RequestBody
CustomForm
entity
){
CustomForm
db
=
baseBiz
.
selectById
(
entity
.
getId
());
if
(
CustomForm
.
STATUS_SUBMIT
!=
db
.
getStatus
())
{
throw
new
BaseException
(
"该定制不能删除"
,
ResultCode
.
PARAM_ILLEGAL_CODE
);
}
entity
.
setIsDel
(
SYS_TRUE
);
baseBiz
.
updateSelectiveById
(
entity
);
return
ObjectRestResponse
.
succ
();
}
}
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment