Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
A
amos-boot-biz
Project
Project
Details
Activity
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
项目统一框架
amos-boot-biz
Commits
be235edf
Commit
be235edf
authored
Aug 16, 2021
by
tianbo
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改水源、联动单位、警情地址bug
parent
94fc52cf
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
88 additions
and
59 deletions
+88
-59
BizConstant.java
...m/yeejoin/amos/boot/biz/common/constants/BizConstant.java
+24
-0
WorkflowFeignService.java
.../boot/biz/common/workflow/feign/WorkflowFeignService.java
+8
-8
WaterResourceController.java
...module/common/biz/controller/WaterResourceController.java
+12
-27
LinkageUnitServiceImpl.java
...odule/common/biz/service/impl/LinkageUnitServiceImpl.java
+14
-24
WaterResourceServiceImpl.java
...ule/common/biz/service/impl/WaterResourceServiceImpl.java
+30
-0
AlertCalledServiceImpl.java
...t/module/jcs/biz/service/impl/AlertCalledServiceImpl.java
+0
-0
No files found.
amos-boot-biz-common/src/main/java/com/yeejoin/amos/boot/biz/common/constants/BizConstant.java
0 → 100644
View file @
be235edf
package
com
.
yeejoin
.
amos
.
boot
.
biz
.
common
.
constants
;
/**
* @Description: 业务通用常量类
* @Author: DELL
* @Date: 2021/5/26
*/
public
interface
BizConstant
{
/**
* 经度
*/
public
final
static
String
LONGITUDE
=
"longitude"
;
/**
* 纬度
*/
public
final
static
String
LATITUDE
=
"latitude"
;
/**
* 地址
*/
public
final
static
String
ADDRESS
=
"address"
;
}
amos-boot-biz-common/src/main/java/com/yeejoin/amos/boot/biz/common/workflow/feign/WorkflowFeignService.java
View file @
be235edf
...
...
@@ -11,11 +11,11 @@ import org.springframework.web.bind.annotation.RequestParam;
import
com.alibaba.fastjson.JSONObject
;
@FeignClient
(
name
=
"AMOS-API-WORKFLOW"
,
path
=
"workflow"
,
configuration
=
{
CommonMultipartSupportConfig
.
class
})
@FeignClient
(
name
=
"AMOS-API-WORKFLOW
-CJHENHAO
"
,
path
=
"workflow"
,
configuration
=
{
CommonMultipartSupportConfig
.
class
})
public
interface
WorkflowFeignService
{
/**
* 发起流程
*
*
* @param params
* @return
*/
...
...
@@ -24,7 +24,7 @@ public interface WorkflowFeignService {
/**
* 完成任务
*
*
* @param taskID
* @param variable
* @return
...
...
@@ -36,7 +36,7 @@ public interface WorkflowFeignService {
/**
* 查询当前流程下所有的可执行任务
*
*
* @param processInstanceId
* @return
*/
...
...
@@ -45,13 +45,13 @@ public interface WorkflowFeignService {
/**
* 查询当前任务的执行用户组
*
*
* @param processInstanceId
* @return
*/
@RequestMapping
(
value
=
"/task/getTaskGroupName/{taskId}"
,
method
=
RequestMethod
.
GET
)
JSONObject
getTaskGroupName
(
@PathVariable
(
"taskId"
)
String
taskId
);
/**
* 我的待办
* @param processDefinitionKey
...
...
@@ -74,7 +74,7 @@ public interface WorkflowFeignService {
* @param processInstanceId
* @return
*/
@RequestMapping
(
value
=
"/activitiHistory/
tasks
/{processInstanceId}"
,
method
=
RequestMethod
.
GET
)
JSONObject
queryTasksByProcessInstanceId
(
@PathVariable
(
"processInstanceId"
)
String
processInstanceId
);
@RequestMapping
(
value
=
"/activitiHistory/
historyTask
/{processInstanceId}"
,
method
=
RequestMethod
.
GET
)
JSONObject
query
History
TasksByProcessInstanceId
(
@PathVariable
(
"processInstanceId"
)
String
processInstanceId
);
}
amos-boot-module/amos-boot-module-biz/amos-boot-module-common-biz/src/main/java/com/yeejoin/amos/boot/module/common/biz/controller/WaterResourceController.java
View file @
be235edf
...
...
@@ -5,6 +5,7 @@ import com.alibaba.fastjson.JSONArray;
import
com.alibaba.fastjson.JSONObject
;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.yeejoin.amos.boot.biz.common.constants.BizConstant
;
import
com.yeejoin.amos.boot.biz.common.controller.BaseController
;
import
com.yeejoin.amos.boot.biz.common.utils.EnumsUtils
;
import
com.yeejoin.amos.boot.module.common.api.dto.WaterResourceCraneDto
;
...
...
@@ -91,19 +92,11 @@ public class WaterResourceController extends BaseController {
model
.
setRealityImg
(
JSONArray
.
toJSONString
(
model
.
getRealityImgList
()));
model
.
setOrientationImg
(
JSONArray
.
toJSONString
(
model
.
getOrientationImgList
()));
if
(
model
.
getAddress
()!=
null
){
String
[]
data
=
model
.
getAddress
().
split
(
"@address@"
);
model
.
setAddress
(
data
[
0
]);
if
(
data
[
1
]!=
null
&&!
""
.
equals
(
data
[
1
])){
JSONObject
jSONObject
=
JSON
.
parseObject
(
data
[
1
]);
if
(
jSONObject
.
getString
(
"longitude"
)!=
null
&&!
""
.
equals
(
jSONObject
.
getString
(
"longitude"
)))
{
model
.
setLongitude
(
Double
.
valueOf
(
jSONObject
.
getString
(
"longitude"
)));
}
if
(
jSONObject
.
getString
(
"longitude"
)!=
null
&&!
""
.
equals
(
jSONObject
.
getString
(
"longitude"
)))
{
model
.
setLatitude
(
Double
.
valueOf
(
jSONObject
.
getString
(
"latitude"
)));
}
}
JSONObject
address
=
WaterResourceServiceImpl
.
getLongLatFromAddress
(
model
.
getAddress
());
model
.
setAddress
(
address
.
getString
(
BizConstant
.
ADDRESS
));
model
.
setLongitude
(
Double
.
valueOf
(
address
.
getString
(
BizConstant
.
LONGITUDE
)));
model
.
setLatitude
(
Double
.
valueOf
(
address
.
getString
(
BizConstant
.
LATITUDE
)));
}
if
(!
StringUtils
.
isEmpty
(
resourceType
))
{
...
...
@@ -174,21 +167,13 @@ public class WaterResourceController extends BaseController {
@ApiOperation
(
httpMethod
=
"PUT"
,
value
=
"根据sequenceNbr更新"
,
notes
=
"根据sequenceNbr更新"
)
public
ResponseModel
<
WaterResourceDto
>
updateBySequenceNbrWaterResource
(
@RequestBody
WaterResourceDto
model
,
@PathVariable
(
value
=
"sequenceNbr"
)
Long
sequenceNbr
)
{
if
(
model
.
getAddress
()!=
null
){
String
[]
data
=
model
.
getAddress
().
split
(
"@address@"
);
model
.
setAddress
(
data
[
0
]);
if
(
data
[
1
]!=
null
&&!
""
.
equals
(
data
[
1
])){
JSONObject
jSONObject
=
JSON
.
parseObject
(
data
[
1
]);
if
(
jSONObject
.
getString
(
"longitude"
)!=
null
&&!
""
.
equals
(
jSONObject
.
getString
(
"longitude"
)))
{
model
.
setLongitude
(
Double
.
valueOf
(
jSONObject
.
getString
(
"longitude"
)));
}
if
(
jSONObject
.
getString
(
"longitude"
)!=
null
&&!
""
.
equals
(
jSONObject
.
getString
(
"longitude"
)))
{
model
.
setLatitude
(
Double
.
valueOf
(
jSONObject
.
getString
(
"latitude"
)));
}
}
}
if
(
StringUtils
.
isNotEmpty
(
model
.
getAddress
()))
{
JSONObject
address
=
WaterResourceServiceImpl
.
getLongLatFromAddress
(
model
.
getAddress
());
model
.
setAddress
(
address
.
getString
(
BizConstant
.
ADDRESS
));
model
.
setLongitude
(
Double
.
valueOf
(
address
.
getString
(
BizConstant
.
LONGITUDE
)));
model
.
setLatitude
(
Double
.
valueOf
(
address
.
getString
(
BizConstant
.
LATITUDE
)));
}
// 更新基本信息
model
.
setSequenceNbr
(
sequenceNbr
);
model
.
setRealityImg
(
JSONArray
.
toJSONString
(
model
.
getRealityImgList
()));
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-common-biz/src/main/java/com/yeejoin/amos/boot/module/common/biz/service/impl/LinkageUnitServiceImpl.java
View file @
be235edf
...
...
@@ -7,6 +7,7 @@ import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.google.common.collect.Lists
;
import
com.yeejoin.amos.boot.biz.common.constants.BizConstant
;
import
com.yeejoin.amos.boot.biz.common.entity.DataDictionary
;
import
com.yeejoin.amos.boot.biz.common.service.impl.DataDictionaryServiceImpl
;
import
com.yeejoin.amos.boot.biz.common.utils.DateUtils
;
...
...
@@ -26,6 +27,7 @@ import org.springframework.beans.factory.annotation.Autowired;
import
org.springframework.stereotype.Service
;
import
org.springframework.transaction.annotation.Transactional
;
import
org.typroject.tyboot.core.foundation.utils.Bean
;
import
org.typroject.tyboot.core.foundation.utils.ValidationUtil
;
import
org.typroject.tyboot.core.rdbms.annotation.Condition
;
import
org.typroject.tyboot.core.rdbms.annotation.Operator
;
import
org.typroject.tyboot.core.rdbms.service.BaseService
;
...
...
@@ -124,17 +126,10 @@ public class LinkageUnitServiceImpl extends BaseService<LinkageUnitDto, LinkageU
public
LinkageUnitDto
saveModel
(
LinkageUnitDto
linkageUnitDto
)
{
if
(
linkageUnitDto
.
getAddress
()
!=
null
)
{
String
[]
data
=
linkageUnitDto
.
getAddress
().
split
(
"@address@"
);
linkageUnitDto
.
setAddress
(
data
[
0
]);
if
(
data
[
1
]
!=
null
&&
!
""
.
equals
(
data
[
1
]))
{
JSONObject
jSONObject
=
JSON
.
parseObject
(
data
[
1
]);
if
(
jSONObject
.
getString
(
"longitude"
)
!=
null
&&
!
""
.
equals
(
jSONObject
.
getString
(
"longitude"
)))
{
linkageUnitDto
.
setLongitude
(
Double
.
valueOf
(
jSONObject
.
getString
(
"longitude"
)));
}
if
(
jSONObject
.
getString
(
"longitude"
)
!=
null
&&
!
""
.
equals
(
jSONObject
.
getString
(
"longitude"
)))
{
linkageUnitDto
.
setLatitude
(
Double
.
valueOf
(
jSONObject
.
getString
(
"latitude"
)));
}
}
JSONObject
address
=
WaterResourceServiceImpl
.
getLongLatFromAddress
(
linkageUnitDto
.
getAddress
());
linkageUnitDto
.
setAddress
(
address
.
getString
(
BizConstant
.
ADDRESS
));
linkageUnitDto
.
setLongitude
(
Double
.
valueOf
(
address
.
getString
(
BizConstant
.
LONGITUDE
)));
linkageUnitDto
.
setLatitude
(
Double
.
valueOf
(
address
.
getString
(
BizConstant
.
LATITUDE
)));
}
// 1.保存行数据
String
groupCode
=
this
.
getGroupCode
();
...
...
@@ -178,8 +173,10 @@ public class LinkageUnitServiceImpl extends BaseService<LinkageUnitDto, LinkageU
.
list
(
new
LambdaQueryWrapper
<
DynamicFormColumn
>().
eq
(
DynamicFormColumn:
:
getGroupCode
,
groupCode
));
Map
<
String
,
Object
>
fieldCodes
=
Bean
.
listToMap
(
columns
,
"fieldCode"
,
"queryStrategy"
,
DynamicFormColumn
.
class
);
LinkageUnitDto
linkageUnitDto
=
linkageUnitMapper
.
selectOne
(
false
,
fieldCodes
,
groupCode
,
sequenceNbr
);
List
<
SourceFile
>
sourceFiles
=
sourceFileServiceImpl
.
findBySourceId
(
linkageUnitDto
.
getSequenceNbr
());
linkageUnitDto
.
setImage
(
sourceFiles
);
if
(!
ValidationUtil
.
isEmpty
(
linkageUnitDto
))
{
List
<
SourceFile
>
sourceFiles
=
sourceFileServiceImpl
.
findBySourceId
(
linkageUnitDto
.
getSequenceNbr
());
linkageUnitDto
.
setImage
(
sourceFiles
);
}
return
linkageUnitDto
;
}
...
...
@@ -204,17 +201,10 @@ public class LinkageUnitServiceImpl extends BaseService<LinkageUnitDto, LinkageU
public
LinkageUnitDto
updateById
(
LinkageUnitDto
linkageUnitDto
)
{
if
(
linkageUnitDto
.
getAddress
()
!=
null
)
{
String
[]
data
=
linkageUnitDto
.
getAddress
().
split
(
"@address@"
);
linkageUnitDto
.
setAddress
(
data
[
0
]);
if
(
data
[
1
]
!=
null
&&
!
""
.
equals
(
data
[
1
]))
{
JSONObject
jSONObject
=
JSON
.
parseObject
(
data
[
1
]);
if
(
jSONObject
.
getString
(
"longitude"
)
!=
null
&&
!
""
.
equals
(
jSONObject
.
getString
(
"longitude"
)))
{
linkageUnitDto
.
setLongitude
(
Double
.
valueOf
(
jSONObject
.
getString
(
"longitude"
)));
}
if
(
jSONObject
.
getString
(
"longitude"
)
!=
null
&&
!
""
.
equals
(
jSONObject
.
getString
(
"longitude"
)))
{
linkageUnitDto
.
setLatitude
(
Double
.
valueOf
(
jSONObject
.
getString
(
"latitude"
)));
}
}
JSONObject
address
=
WaterResourceServiceImpl
.
getLongLatFromAddress
(
linkageUnitDto
.
getAddress
());
linkageUnitDto
.
setAddress
(
address
.
getString
(
BizConstant
.
ADDRESS
));
linkageUnitDto
.
setLongitude
(
Double
.
valueOf
(
address
.
getString
(
BizConstant
.
LONGITUDE
)));
linkageUnitDto
.
setLatitude
(
Double
.
valueOf
(
address
.
getString
(
BizConstant
.
LATITUDE
)));
}
// 修改基本信息
updateWithModel
(
linkageUnitDto
);
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-common-biz/src/main/java/com/yeejoin/amos/boot/module/common/biz/service/impl/WaterResourceServiceImpl.java
View file @
be235edf
...
...
@@ -6,7 +6,10 @@ import java.util.Optional;
import
javax.annotation.Resource
;
import
com.alibaba.fastjson.JSON
;
import
com.alibaba.fastjson.JSONObject
;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
import
com.yeejoin.amos.boot.biz.common.constants.BizConstant
;
import
com.yeejoin.amos.boot.biz.common.utils.MenuFrom
;
import
com.yeejoin.amos.boot.module.common.api.dto.*
;
import
com.yeejoin.amos.boot.module.common.api.entity.*
;
...
...
@@ -235,4 +238,31 @@ public class WaterResourceServiceImpl extends BaseService<WaterResourceDto, Wate
public
List
<
WaterResourceTypeDto
>
getWaterResourceTypeList
(
Boolean
isDelete
)
{
return
waterResourceMapper
.
getWaterResourceTypeList
(
isDelete
);
}
public
static
JSONObject
getLongLatFromAddress
(
String
address
)
{
JSONObject
result
=
new
JSONObject
();
result
.
put
(
BizConstant
.
ADDRESS
,
""
);
result
.
put
(
BizConstant
.
LONGITUDE
,
"0"
);
result
.
put
(
BizConstant
.
LATITUDE
,
"0"
);
if
(
StringUtils
.
isNotEmpty
(
address
))
{
String
[]
addressData
=
address
.
split
(
"@address@"
);
if
(
addressData
.
length
>
1
)
{
result
.
put
(
BizConstant
.
ADDRESS
,
addressData
[
0
]);
JSONObject
langLatObj
=
JSON
.
parseObject
(
addressData
[
1
]);
if
(
StringUtils
.
isNotEmpty
(
langLatObj
.
getString
(
BizConstant
.
LONGITUDE
)))
{
result
.
put
(
BizConstant
.
LONGITUDE
,
langLatObj
.
getString
(
BizConstant
.
LONGITUDE
));
}
else
{
result
.
put
(
BizConstant
.
LONGITUDE
,
"0"
);
}
if
(
StringUtils
.
isNotEmpty
(
langLatObj
.
getString
(
BizConstant
.
LATITUDE
)))
{
result
.
put
(
BizConstant
.
LATITUDE
,
langLatObj
.
getString
(
BizConstant
.
LATITUDE
));
}
else
{
result
.
put
(
BizConstant
.
LATITUDE
,
"0"
);
}
}
else
{
result
.
put
(
BizConstant
.
ADDRESS
,
addressData
[
0
]);
}
}
return
result
;
}
}
amos-boot-module/amos-boot-module-biz/amos-boot-module-jcs-biz/src/main/java/com/yeejoin/amos/boot/module/jcs/biz/service/impl/AlertCalledServiceImpl.java
View file @
be235edf
This diff is collapsed.
Click to expand it.
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