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
f23c81d4
Commit
f23c81d4
authored
May 09, 2023
by
tangwei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改bug
parent
3eb4401c
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
66 additions
and
6 deletions
+66
-6
PersonBasicMapper.java
.../amos/boot/module/jxiop/api/mapper/PersonBasicMapper.java
+3
-1
StationBasicMapper.java
...amos/boot/module/jxiop/api/mapper/StationBasicMapper.java
+4
-1
PersonBasicMapper.xml
...jxiop-api/src/main/resources/mapper/PersonBasicMapper.xml
+7
-0
StationBasicMapper.xml
...xiop-api/src/main/resources/mapper/StationBasicMapper.xml
+7
-0
ExcelServiceImpl.java
.../boot/module/jxiop/biz/service/impl/ExcelServiceImpl.java
+45
-4
No files found.
amos-boot-system-jxiop/amos-boot-module-jxiop-api/src/main/java/com/yeejoin/amos/boot/module/jxiop/api/mapper/PersonBasicMapper.java
View file @
f23c81d4
...
...
@@ -41,5 +41,7 @@ public interface PersonBasicMapper extends BaseMapper<PersonBasic> {
List
<
EXPersonUser
>
getEXPersonUserAll
(
@Param
(
"name"
)
String
name
,
@Param
(
"accountName"
)
String
accountName
,
@Param
(
"projectName"
)
String
projectName
,
@Param
(
"orgCode"
)
String
orgCode
);
@Param
(
"orgCode"
)
String
orgCode
,
@Param
(
"ids"
)
String
[]
ids
);
}
amos-boot-system-jxiop/amos-boot-module-jxiop-api/src/main/java/com/yeejoin/amos/boot/module/jxiop/api/mapper/StationBasicMapper.java
View file @
f23c81d4
...
...
@@ -35,7 +35,10 @@ public interface StationBasicMapper extends BaseMapper<StationBasic> {
List
<
ExStationBasicDto
>
getExStationBasicDto
(
@Param
(
"stationMasterName"
)
String
stationMasterName
,
@Param
(
"stationName"
)
String
stationName
,
@Param
(
"stationType"
)
String
stationType
,
@Param
(
"orgCode"
)
String
orgCode
);
@Param
(
"orgCode"
)
String
orgCode
,
@Param
(
"ids"
)
String
[]
ids
);
//获取场站列表信息
List
<
StationInfoDto
>
getStationList
(
@Param
(
"areaCode"
)
String
areaCode
);
...
...
amos-boot-system-jxiop/amos-boot-module-jxiop-api/src/main/resources/mapper/PersonBasicMapper.xml
View file @
f23c81d4
...
...
@@ -181,6 +181,13 @@
AND person_basic.project_org_code like concat('%',#{orgCode},'%')
</if>
<if
test=
"ids != null"
>
and person_basic.sequence_nbr in
<foreach
collection=
"ids"
index=
"index"
item=
"id"
open=
"("
close=
")"
separator=
","
>
#{id}
</foreach>
</if>
</where>
ORDER BY person_basic.rec_date DESC
...
...
amos-boot-system-jxiop/amos-boot-module-jxiop-api/src/main/resources/mapper/StationBasicMapper.xml
View file @
f23c81d4
...
...
@@ -95,6 +95,13 @@
<if
test=
"orgCode != null and orgCode != ''"
>
AND station_basic.project_org_code like concat('%',#{orgCode},'%')
</if>
<if
test=
"ids != null"
>
and station_basic.sequence_nbr in
<foreach
collection=
"ids"
index=
"index"
item=
"id"
open=
"("
close=
")"
separator=
","
>
#{id}
</foreach>
</if>
</where>
ORDER BY station_basic.rec_date DESC
</select>
...
...
amos-boot-system-jxiop/amos-boot-module-jxiop-biz/src/main/java/com/yeejoin/amos/boot/module/jxiop/biz/service/impl/ExcelServiceImpl.java
View file @
f23c81d4
package
com
.
yeejoin
.
amos
.
boot
.
module
.
jxiop
.
biz
.
service
.
impl
;
import
com.alibaba.excel.annotation.ExcelProperty
;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
import
com.fasterxml.jackson.annotation.JsonFormat
;
import
com.yeejoin.amos.boot.biz.common.excel.ExcelUtil
;
import
com.yeejoin.amos.boot.module.common.api.dto.*
;
import
com.yeejoin.amos.boot.module.jxiop.api.dto.EXPersonUser
;
...
...
@@ -13,6 +15,7 @@ import com.yeejoin.amos.component.feign.config.InnerInvokException;
import
com.yeejoin.amos.component.feign.model.FeignClientResult
;
import
com.yeejoin.amos.feign.privilege.Privilege
;
import
com.yeejoin.amos.feign.privilege.model.CompanyModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
org.apache.commons.lang3.ObjectUtils
;
import
org.springframework.beans.BeanUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
...
...
@@ -112,11 +115,19 @@ public class ExcelServiceImpl {
public
List
<
ExStationBasicDto
>
getExStationBasicDto
(
Map
<
String
,
Object
>
map
){
List
<
ExStationBasicDto
>
data
=
null
;
if
(!
map
.
isEmpty
()){
String
[]
ids
=
null
;
if
(
map
.
containsKey
(
"ids"
)&&
map
.
get
(
"ids"
)!=
null
&&!
""
.
equals
(
map
.
get
(
"ids"
).
toString
())){
ids
=
map
.
get
(
"ids"
).
toString
().
split
(
","
);
}
data
=
stationBasicMapper
.
getExStationBasicDto
(
map
.
containsKey
(
"stationMasterName"
)?
map
.
get
(
"stationMasterName"
).
toString
():
null
,
map
.
containsKey
(
"stationName"
)?
map
.
get
(
"stationName"
).
toString
():
null
,
map
.
containsKey
(
"stationType"
)?
map
.
get
(
"stationType"
).
toString
():
null
,
map
.
containsKey
(
"orgCode"
)?
map
.
get
(
"orgCode"
).
toString
():
null
);
map
.
containsKey
(
"orgCode"
)?
map
.
get
(
"orgCode"
).
toString
():
null
,
ids
);
}
return
data
;
...
...
@@ -125,6 +136,22 @@ public class ExcelServiceImpl {
private
void
addExStationBasicDto
(
MultipartFile
multipartFile
)
throws
Exception
{
List
<
ExStationBasicDto
>
excelDtoList
=
ExcelUtil
.
readFirstSheetExcel
(
multipartFile
,
ExStationBasicDto
.
class
,
1
);
List
<
StationBasic
>
excelEntityList
=
new
ArrayList
<>();
//数据验证
for
(
int
i
=
0
;
i
<
excelDtoList
.
size
();
i
++)
{
ExStationBasicDto
exStationBasicDto
=
excelDtoList
.
get
(
i
);
this
.
yanzheng
(
exStationBasicDto
.
getStationName
(),
"场站名称"
,
i
);
this
.
yanzheng
(
exStationBasicDto
.
getStationCode
(),
"场站编号"
,
i
);
this
.
yanzheng
(
exStationBasicDto
.
getStationFlag
(),
"项目状态"
,
i
);
this
.
yanzheng
(
exStationBasicDto
.
getStationType
(),
"场站类型"
,
i
);
this
.
yanzheng
(
exStationBasicDto
.
getStationMasterName
(),
"站长"
,
i
);
this
.
yanzheng
(
exStationBasicDto
.
getMobilePhone
(),
"手机号码"
,
i
);
this
.
yanzheng
(
exStationBasicDto
.
getDevopsTime
(),
"运维时间"
,
i
);
this
.
yanzheng
(
exStationBasicDto
.
getOwnerUnit
(),
"运维单位"
,
i
);
this
.
yanzheng
(
exStationBasicDto
.
getAddress
(),
"场站地址"
,
i
);
this
.
yanzheng
(
exStationBasicDto
.
getArea
(),
"所属片区"
,
i
);
this
.
yanzheng
(
exStationBasicDto
.
getBriefIntroduction
(),
"场站简介"
,
i
);
}
excelDtoList
.
forEach
(
item
->
{
StationBasic
fireChemical
=
new
StationBasic
();
fireChemical
=
Bean
.
toPo
(
item
,
fireChemical
);
...
...
@@ -157,8 +184,6 @@ public class ExcelServiceImpl {
excelEntityList
.
add
(
fireChemical
);
});
stationBasicServiceImpl
.
saveBatch
(
excelEntityList
);
}
...
...
@@ -173,14 +198,30 @@ public class ExcelServiceImpl {
return
listdata
;
}
public
void
yanzheng
(
Object
obj
,
String
name
,
int
i
){
//验证数据库重复
if
(
obj
==
null
){
throw
new
InnerInvokException
(
"第"
+
(
i
+
2
)
+
"行,"
+
name
+
"数据不能空"
,
"403"
,
"第"
+
(
i
+
2
)
+
"行,"
+
name
+
"数据不能空"
,
403
);
}
}
//人员导出
public
List
<
EXPersonUser
>
getEXPersonUserAll
(
Map
map
){
String
[]
ids
=
null
;
if
(
map
.
containsKey
(
"ids"
)&&
map
.
get
(
"ids"
)!=
null
&&!
""
.
equals
(
map
.
get
(
"ids"
).
toString
())){
ids
=
map
.
get
(
"ids"
).
toString
().
split
(
","
);
}
List
<
EXPersonUser
>
listdata
=
personBasicMapper
.
getEXPersonUserAll
(
map
.
containsKey
(
"name"
)?
map
.
get
(
"name"
).
toString
():
null
,
map
.
containsKey
(
"accountName"
)?
map
.
get
(
"accountName"
).
toString
():
null
,
map
.
containsKey
(
"projectName"
)?
map
.
get
(
"projectName"
).
toString
():
null
,
map
.
containsKey
(
"orgCode"
)?
map
.
get
(
"orgCode"
).
toString
():
null
);
map
.
containsKey
(
"orgCode"
)?
map
.
get
(
"orgCode"
).
toString
():
null
,
ids
);
return
listdata
;
}
...
...
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