Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
yangxiujun
/
paidan_demo
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit 100b1ee7
authored
Aug 01, 2023
by
张晓
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
技术员中心点增加分站内所有区块数据
1 parent
4598058a
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
31 additions
and
5 deletions
project-order/src/main/java/com/dituhui/pea/order/controller/EngineerCenterPoiController.java
project-order/src/main/java/com/dituhui/pea/order/dao/MapBlockInfoDao.java
project-order/src/main/java/com/dituhui/pea/order/dto/EngineerBusinessDTO.java
project-order/src/main/java/com/dituhui/pea/order/service/EngineerBusinessService.java
project-order/src/main/java/com/dituhui/pea/order/service/impl/EngineerBusinessServiceImpl.java
project-order/src/main/java/com/dituhui/pea/order/controller/EngineerCenterPoiController.java
View file @
100b1ee
...
...
@@ -41,6 +41,7 @@ public class EngineerCenterPoiController {
result
.
setGroup
(
engineerBusinessService
.
getGroupInfo
(
engineerReq
));
result
.
setWarehouse
(
engineerBusinessService
.
getWareHouse
(
result
.
getGroup
().
getWarehouseId
()));
result
.
setBlocks
(
engineerBusinessService
.
getBlocks
(
engineerReq
));
res
=
Result
.
success
(
result
);
}
catch
(
BusinessException
e
)
{
return
Result
.
failed
(
e
.
getMessage
());
...
...
project-order/src/main/java/com/dituhui/pea/order/dao/MapBlockInfoDao.java
View file @
100b1ee
...
...
@@ -13,5 +13,7 @@ public interface MapBlockInfoDao extends JpaRepository<MapBlockInfoEntity, Integ
List
<
MapBlockInfoEntity
>
findByBlockIdInAndLayerIdIn
(
List
<
String
>
blockIds
,
List
<
String
>
layerIds
);
MapBlockInfoEntity
findByBlockId
(
String
blockId
);
List
<
MapBlockInfoEntity
>
findByGroupId
(
String
groupId
);
}
project-order/src/main/java/com/dituhui/pea/order/dto/EngineerBusinessDTO.java
View file @
100b1ee
...
...
@@ -28,7 +28,7 @@ public class EngineerBusinessDTO {
private
Group
group
;
private
WareHouse
warehouse
;
// @JsonIgnore
//
private List<Blocks> blocks;
private
List
<
Blocks
>
blocks
;
}
...
...
@@ -59,6 +59,14 @@ public class EngineerBusinessDTO {
private
String
location
;
}
@lombok
.
Data
public
static
class
Blocks
{
private
String
blockId
;
private
String
blockName
;
private
String
blockData
;
private
String
teamId
;
}
@lombok
.
Data
public
static
class
EngineerCenterUpdateReqDTO
{
...
...
project-order/src/main/java/com/dituhui/pea/order/service/EngineerBusinessService.java
View file @
100b1ee
...
...
@@ -12,4 +12,6 @@ public interface EngineerBusinessService {
EngineerBusinessDTO
.
WareHouse
getWareHouse
(
String
wareHouseId
);
void
updateEngineerCenter
(
EngineerBusinessDTO
.
EngineerCenterUpdateReqDTO
centerReq
);
List
<
EngineerBusinessDTO
.
Blocks
>
getBlocks
(
EngineerBusinessDTO
.
Request
engineerReq
);
}
project-order/src/main/java/com/dituhui/pea/order/service/impl/EngineerBusinessServiceImpl.java
View file @
100b1ee
package
com
.
dituhui
.
pea
.
order
.
service
.
impl
;
import
com.dituhui.pea.order.dao.EngineerBusinessDao
;
import
com.dituhui.pea.order.dao.EngineerInfoDao
;
import
com.dituhui.pea.order.dao.OrgGroupDao
;
import
com.dituhui.pea.order.dao.WarehouseInfoDao
;
import
com.dituhui.pea.order.dao.*
;
import
com.dituhui.pea.order.dto.EngineerBusinessDTO
;
import
com.dituhui.pea.order.entity.*
;
import
com.dituhui.pea.order.service.EngineerBusinessService
;
...
...
@@ -37,6 +34,8 @@ public class EngineerBusinessServiceImpl implements EngineerBusinessService {
@Autowired
private
WarehouseInfoDao
warehouseInfoDao
;
@Autowired
private
MapBlockInfoDao
mapBlockInfoDao
;
@Autowired
private
JdbcTemplate
jdbcTemplate
;
...
...
@@ -115,4 +114,18 @@ public class EngineerBusinessServiceImpl implements EngineerBusinessService {
String
[]
xyArr
=
location
.
split
(
","
);
engineerBusinessDao
.
updateEngineerCenter
(
centerReq
.
getAddress
(),
xyArr
[
0
],
xyArr
[
1
],
centerReq
.
getEngineerCode
());
}
@Override
public
List
<
EngineerBusinessDTO
.
Blocks
>
getBlocks
(
EngineerBusinessDTO
.
Request
engineerReq
)
{
List
<
MapBlockInfoEntity
>
blockInfoList
=
mapBlockInfoDao
.
findByGroupId
(
engineerReq
.
getLevelValue
());
return
blockInfoList
.
stream
().
map
(
item
->
{
EngineerBusinessDTO
.
Blocks
block
=
new
EngineerBusinessDTO
.
Blocks
();
block
.
setBlockId
(
item
.
getBlockId
());
block
.
setBlockName
(
item
.
getBlockName
());
block
.
setBlockData
(
item
.
getAreaData
());
block
.
setTeamId
(
item
.
getTeamId
());
return
block
;
}).
collect
(
Collectors
.
toList
());
}
}
Write
Preview
Markdown
is supported
Attach a file
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 post a comment