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
9649611e
Commit
9649611e
authored
Apr 24, 2023
by
tangwei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改bug
parent
710e493f
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
78 additions
and
66 deletions
+78
-66
PersonBasicMapper.java
.../amos/boot/module/jxiop/api/mapper/PersonBasicMapper.java
+18
-16
StationBasicMapper.java
...amos/boot/module/jxiop/api/mapper/StationBasicMapper.java
+14
-13
StationBasicMapper.xml
...xiop-api/src/main/resources/mapper/StationBasicMapper.xml
+6
-6
ExcelServiceImpl.java
.../boot/module/jxiop/biz/service/impl/ExcelServiceImpl.java
+40
-31
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 @
9649611e
...
...
@@ -5,6 +5,7 @@ import com.yeejoin.amos.boot.module.jxiop.api.dto.StationBasicDto;
import
com.yeejoin.amos.boot.module.jxiop.api.dto.UserMapperDto
;
import
com.yeejoin.amos.boot.module.jxiop.api.entity.PersonBasic
;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
import
org.apache.ibatis.annotations.Param
;
import
java.util.List
;
...
...
@@ -17,27 +18,28 @@ import java.util.List;
public
interface
PersonBasicMapper
extends
BaseMapper
<
PersonBasic
>
{
List
<
UserMapperDto
>
queryPage
(
Long
current
,
Long
size
,
String
name
,
String
accountName
,
String
projectName
,
String
orgCode
);
List
<
UserMapperDto
>
queryPage
(
@Param
(
"current"
)
Long
current
,
@Param
(
"size"
)
Long
size
,
@Param
(
"name"
)
String
name
,
@Param
(
"accountName"
)
String
accountName
,
@Param
(
"projectName"
)
String
projectName
,
@Param
(
"orgCode"
)
String
orgCode
);
List
<
UserMapperDto
>
queryPagecount
(
String
name
,
String
accountName
,
String
projectName
,
String
orgCode
);
@Param
(
"name"
)
String
name
,
@Param
(
"accountName"
)
String
accountName
,
@Param
(
"projectName"
)
String
projectName
,
@Param
(
"orgCode"
)
String
orgCode
);
int
deleteList
(
String
[]
ids
);
List
<
EXPersonUser
>
getEXPersonUser
(
String
name
,
String
accountName
,
String
projectName
,
String
orgCode
);
List
<
EXPersonUser
>
getEXPersonUser
(
@Param
(
"name"
)
String
name
,
@Param
(
"accountName"
)
String
accountName
,
@Param
(
"projectName"
)
String
projectName
,
@Param
(
"orgCode"
)
String
orgCode
);
List
<
EXPersonUser
>
getEXPersonUserAll
(
String
name
,
String
accountName
,
String
projectName
,
String
orgCode
);
List
<
EXPersonUser
>
getEXPersonUserAll
(
@Param
(
"name"
)
String
name
,
@Param
(
"accountName"
)
String
accountName
,
@Param
(
"projectName"
)
String
projectName
,
@Param
(
"orgCode"
)
String
orgCode
);
}
amos-boot-system-jxiop/amos-boot-module-jxiop-api/src/main/java/com/yeejoin/amos/boot/module/jxiop/api/mapper/StationBasicMapper.java
View file @
9649611e
...
...
@@ -5,6 +5,7 @@ import com.yeejoin.amos.boot.module.jxiop.api.dto.ExStationBasicDto;
import
com.yeejoin.amos.boot.module.jxiop.api.dto.StationBasicDto
;
import
com.yeejoin.amos.boot.module.jxiop.api.entity.StationBasic
;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
import
org.apache.ibatis.annotations.Param
;
import
java.util.List
;
...
...
@@ -16,24 +17,24 @@ import java.util.List;
*/
public
interface
StationBasicMapper
extends
BaseMapper
<
StationBasic
>
{
//分页
List
<
StationBasicDto
>
queryPage
(
Long
current
,
Long
size
,
String
stationMasterName
,
String
stationName
,
String
stationType
,
String
orgCode
);
List
<
StationBasicDto
>
queryPage
(
@Param
(
"current"
)
Long
current
,
@Param
(
"size"
)
Long
size
,
@Param
(
"stationMasterName"
)
String
stationMasterName
,
@Param
(
"stationName"
)
String
stationName
,
@Param
(
"stationType"
)
String
stationType
,
@Param
(
"orgCode"
)
String
orgCode
);
//统计
List
<
StationBasicDto
>
queryPagecount
(
String
stationMasterName
,
String
stationName
,
String
stationType
,
String
orgCode
);
@Param
(
"stationMasterName"
)
String
stationMasterName
,
@Param
(
"stationName"
)
String
stationName
,
@Param
(
"stationType"
)
String
stationType
,
@Param
(
"orgCode"
)
String
orgCode
);
//删除
int
deleteList
(
String
[]
ids
);
//导出
List
<
ExStationBasicDto
>
getExStationBasicDto
(
String
stationMasterName
,
String
stationName
,
String
stationType
,
String
orgCode
);
List
<
ExStationBasicDto
>
getExStationBasicDto
(
@Param
(
"stationMasterName"
)
String
stationMasterName
,
@Param
(
"stationName"
)
String
stationName
,
@Param
(
"stationType"
)
String
stationType
,
@Param
(
"orgCode"
)
String
orgCode
);
}
amos-boot-system-jxiop/amos-boot-module-jxiop-api/src/main/resources/mapper/StationBasicMapper.xml
View file @
9649611e
...
...
@@ -26,8 +26,8 @@
<if
test=
"stationType != null and stationType != ''"
>
AND station_basic.station_type = #{stationType}
</if>
<if
test=
"orgCo
ce != null and orgCoc
e != ''"
>
AND station_basic.project_org_code like concat('%',#{orgCo
c
e},'%')
<if
test=
"orgCo
de != null and orgCod
e != ''"
>
AND station_basic.project_org_code like concat('%',#{orgCo
d
e},'%')
</if>
</where>
ORDER BY station_basic.rec_date DESC
...
...
@@ -50,8 +50,8 @@
<if
test=
"stationType != null and stationType != ''"
>
AND station_basic.station_type = #{stationType}
</if>
<if
test=
"orgCo
ce != null and orgCoc
e != ''"
>
AND station_basic.project_org_code like concat('%',#{orgCo
c
e},'%')
<if
test=
"orgCo
de != null and orgCod
e != ''"
>
AND station_basic.project_org_code like concat('%',#{orgCo
d
e},'%')
</if>
</where>
</select>
...
...
@@ -96,8 +96,8 @@
<if
test=
"stationType != null and stationType != ''"
>
AND station_basic.station_type = #{stationType}
</if>
<if
test=
"orgCo
ce != null and orgCoc
e != ''"
>
AND station_basic.project_org_code like concat('%',#{orgCo
c
e},'%')
<if
test=
"orgCo
de != null and orgCod
e != ''"
>
AND station_basic.project_org_code like concat('%',#{orgCo
d
e},'%')
</if>
</where>
ORDER BY station_basic.rec_date DESC
...
...
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 @
9649611e
...
...
@@ -8,6 +8,7 @@ import com.yeejoin.amos.boot.module.jxiop.api.dto.ExStationBasicDto;
import
com.yeejoin.amos.boot.module.jxiop.api.entity.*
;
import
com.yeejoin.amos.boot.module.jxiop.api.mapper.PersonBasicMapper
;
import
com.yeejoin.amos.boot.module.jxiop.api.mapper.StationBasicMapper
;
import
com.yeejoin.amos.feign.privilege.model.CompanyModel
;
import
org.springframework.beans.BeanUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
...
...
@@ -32,21 +33,21 @@ public class ExcelServiceImpl {
PersonBasicServiceImpl
personBasicServiceImpl
;
//
// @Autowired
// PersonBasicMapper personBasicMapper;
// @Autowired
// StationBasicMapper stationBasicMapper;
// //人员资质信息service
// @Autowired
// PersonCertificateServiceImpl personCertificateService;
// //人员教育信息
// @Autowired
// PersonSkillEducationServiceImpl personSkillEducationService;
// @Autowired
// PersonAccountServiceImpl personAccountServiceImpl;
@Autowired
PersonBasicMapper
personBasicMapper
;
@Autowired
StationBasicMapper
stationBasicMapper
;
//人员资质信息service
@Autowired
PersonCertificateServiceImpl
personCertificateService
;
//人员教育信息
@Autowired
PersonSkillEducationServiceImpl
personSkillEducationService
;
@Autowired
PersonAccountServiceImpl
personAccountServiceImpl
;
public
void
templateExport
(
HttpServletResponse
response
,
ExcelDto
excelDto
,
Map
par
)
throws
ClassNotFoundException
{
String
url
=
excelDto
.
getClassUrl
();
...
...
@@ -105,7 +106,11 @@ public class ExcelServiceImpl {
public
List
<
ExStationBasicDto
>
getExStationBasicDto
(
Map
<
String
,
Object
>
map
){
List
<
ExStationBasicDto
>
data
=
null
;
if
(!
map
.
isEmpty
()){
data
=
stationBasicServiceImpl
.
stationBasicMapper
.
getExStationBasicDto
(
map
.
get
(
"stationMasterName"
).
toString
(),
map
.
get
(
"stationName"
).
toString
(),
map
.
get
(
"stationType"
).
toString
(),
map
.
get
(
"orgCode"
).
toString
());
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
);
}
return
data
;
...
...
@@ -121,7 +126,11 @@ public class ExcelServiceImpl {
String
[]
type
=
fireChemical
.
getArea
().
split
(
"@"
);
fireChemical
.
setAreaName
(
type
[
0
]);
fireChemical
.
setArea
(
type
[
1
]);
CompanyModel
companyModel
=
personBasicServiceImpl
.
getCompanyModel
(
Long
.
parseLong
(
type
[
1
]));
fireChemical
.
setProjectOrgCode
(
companyModel
.
getOrgCode
());
}
excelEntityList
.
add
(
fireChemical
);
});
stationBasicServiceImpl
.
saveBatch
(
excelEntityList
);
...
...
@@ -130,22 +139,22 @@ public class ExcelServiceImpl {
//获取人员数据
public
List
<
EXPersonUser
>
getEXPersonUser
(
Map
map
){
List
<
EXPersonUser
>
listdata
=
personBasic
ServiceImpl
.
personBasic
Mapper
.
getEXPersonUser
(
map
.
get
(
"name"
).
toString
()
,
map
.
get
(
"accountName"
).
toString
()
,
map
.
get
(
"projectName"
).
toString
()
,
map
.
get
(
"orgCode"
).
toString
()
);
List
<
EXPersonUser
>
listdata
=
personBasicMapper
.
getEXPersonUser
(
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
);
return
listdata
;
}
//人员导出
public
List
<
EXPersonUser
>
getEXPersonUserAll
(
Map
map
){
List
<
EXPersonUser
>
listdata
=
personBasic
ServiceImpl
.
personBasic
Mapper
.
getEXPersonUserAll
(
map
.
get
(
"name"
).
toString
()
,
map
.
get
(
"accountName"
).
toString
()
,
map
.
get
(
"projectName"
).
toString
()
,
map
.
get
(
"orgCode"
).
toString
()
);
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
);
return
listdata
;
}
...
...
@@ -167,27 +176,27 @@ private void updateEXPersonUser(MultipartFile multipartFile) throws Exception {
//根据平台账号获取用户id
QueryWrapper
<
PersonAccount
>
wrapper
=
new
QueryWrapper
();
wrapper
.
eq
(
"account_name"
,
exPersonUser
.
getAccountName
());
PersonAccount
personAccount
=
person
BasicServiceImpl
.
personAccountService
.
getOne
(
wrapper
);
PersonAccount
personAccount
=
person
AccountServiceImpl
.
getOne
(
wrapper
);
//获取基本信息
PersonBasic
personBasic
=
personBasic
ServiceImpl
.
personBasic
Mapper
.
selectById
(
personAccount
.
getPersonId
());
PersonBasic
personBasic
=
personBasicMapper
.
selectById
(
personAccount
.
getPersonId
());
BeanUtils
.
copyProperties
(
exPersonUser
,
personBasic
);
listPersonBasic
.
add
(
personBasic
);
//人员技能
QueryWrapper
<
PersonSkillEducation
>
wrapper1
=
new
QueryWrapper
();
wrapper1
.
eq
(
"person_id"
,
personAccount
.
getPersonId
());
PersonSkillEducation
personSkillEducation
=
person
BasicServiceImpl
.
person
SkillEducationService
.
getOne
(
wrapper1
);
PersonSkillEducation
personSkillEducation
=
personSkillEducationService
.
getOne
(
wrapper1
);
BeanUtils
.
copyProperties
(
exPersonUser
,
personSkillEducation
);
listPersonSkillEducation
.
add
(
personSkillEducation
);
//人员资质
QueryWrapper
<
PersonCertificate
>
wrapper2
=
new
QueryWrapper
();
wrapper2
.
eq
(
"person_id"
,
personAccount
.
getPersonId
());
PersonCertificate
personCertificate
=
person
BasicServiceImpl
.
person
CertificateService
.
getOne
(
wrapper2
);
PersonCertificate
personCertificate
=
personCertificateService
.
getOne
(
wrapper2
);
BeanUtils
.
copyProperties
(
exPersonUser
,
personCertificate
);
listPersonCertificate
.
add
(
personCertificate
);
}
personBasicServiceImpl
.
saveOrUpdateBatch
(
listPersonBasic
);
person
BasicServiceImpl
.
person
SkillEducationService
.
saveOrUpdateBatch
(
listPersonSkillEducation
);
person
BasicServiceImpl
.
person
CertificateService
.
saveOrUpdateBatch
(
listPersonCertificate
);
personSkillEducationService
.
saveOrUpdateBatch
(
listPersonSkillEducation
);
personCertificateService
.
saveOrUpdateBatch
(
listPersonCertificate
);
}
...
...
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