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
7ff006e3
Commit
7ff006e3
authored
Oct 27, 2023
by
tianyiming
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
两员配备-企业两员配备情况查询
parent
6b672855
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
176 additions
and
7 deletions
+176
-7
TzsTwoStaffingCompanyDto.java
...mos/boot/module/tcm/api/dto/TzsTwoStaffingCompanyDto.java
+70
-0
TzsTwoStaffingMapper.java
...amos/boot/module/tcm/api/mapper/TzsTwoStaffingMapper.java
+5
-0
ITzsTwoStaffingService.java
...s/boot/module/tcm/api/service/ITzsTwoStaffingService.java
+6
-0
TzsTwoStaffingMapper.xml
...cm-api/src/main/resources/mapper/TzsTwoStaffingMapper.xml
+18
-0
TzsTwoStaffingController.java
...t/module/tcm/biz/controller/TzsTwoStaffingController.java
+31
-3
TzsTwoStaffingServiceImpl.java
...odule/tcm/biz/service/impl/TzsTwoStaffingServiceImpl.java
+46
-4
No files found.
amos-boot-system-tzs/amos-boot-module-tcm/amos-boot-module-tcm-api/src/main/java/com/yeejoin/amos/boot/module/tcm/api/dto/TzsTwoStaffingCompanyDto.java
0 → 100644
View file @
7ff006e3
package
com
.
yeejoin
.
amos
.
boot
.
module
.
tcm
.
api
.
dto
;
import
com.yeejoin.amos.boot.biz.common.dto.BaseDto
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
import
lombok.EqualsAndHashCode
;
/**
*
*
* @author system_generator
* @date 2023-10-27
*/
@Data
@ApiModel
(
value
=
"TzsTwoStaffingCompanyDto"
,
description
=
""
)
public
class
TzsTwoStaffingCompanyDto
{
@ApiModelProperty
(
value
=
"监管单位ID"
)
private
String
sequenceNbr
;
@ApiModelProperty
(
value
=
"监管单位名称"
)
private
String
superviseOrgName
;
@ApiModelProperty
(
value
=
"监管单位orgCode"
)
private
String
superviseOrgCode
;
@ApiModelProperty
(
value
=
"单位类型"
)
private
String
unitType
;
@ApiModelProperty
(
value
=
"企业名称"
)
private
String
useUnit
;
@ApiModelProperty
(
value
=
"企业编码"
)
private
String
useCode
;
@ApiModelProperty
(
value
=
"企业类型"
)
private
String
mainCharger
;
@ApiModelProperty
(
value
=
"完成配备"
)
private
String
completeNormal
;
@ApiModelProperty
(
value
=
"使用单位完成配备"
)
private
String
useDone
;
@ApiModelProperty
(
value
=
"生产单位完成配备"
)
private
String
productDone
;
@ApiModelProperty
(
value
=
"完成配备"
)
private
String
allDone
;
//下述字段待定
@ApiModelProperty
(
value
=
"主要负责人数"
)
private
String
mainNum
;
@ApiModelProperty
(
value
=
"安全总监数"
)
private
String
majordomoNum
;
@ApiModelProperty
(
value
=
"安全员数"
)
private
String
safetyNum
;
@ApiModelProperty
(
value
=
"质量安全总监数"
)
private
String
QualityMajNumber
;
@ApiModelProperty
(
value
=
"质量安全员数"
)
private
String
QualitySafetyNum
;
}
amos-boot-system-tzs/amos-boot-module-tcm/amos-boot-module-tcm-api/src/main/java/com/yeejoin/amos/boot/module/tcm/api/mapper/TzsTwoStaffingMapper.java
View file @
7ff006e3
package
com
.
yeejoin
.
amos
.
boot
.
module
.
tcm
.
api
.
mapper
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.yeejoin.amos.boot.module.tcm.api.dto.TzsTwoStaffingCompanyDto
;
import
com.yeejoin.amos.boot.module.tcm.api.entity.TzsTwoStaffing
;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
import
org.apache.ibatis.annotations.Param
;
...
...
@@ -14,5 +16,8 @@ import java.util.List;
*/
public
interface
TzsTwoStaffingMapper
extends
BaseMapper
<
TzsTwoStaffing
>
{
Page
<
TzsTwoStaffingCompanyDto
>
getCompanyList
(
@Param
(
"page"
)
Page
<
TzsTwoStaffingCompanyDto
>
page
,
@Param
(
"companyDto"
)
TzsTwoStaffingCompanyDto
companyDto
,
@Param
(
"orgCode"
)
String
orgCode
);
List
<
TzsTwoStaffing
>
getListByOrgCode
(
@Param
(
"orgCode"
)
String
orgCode
,
@Param
(
"type"
)
String
type
);
}
amos-boot-system-tzs/amos-boot-module-tcm/amos-boot-module-tcm-api/src/main/java/com/yeejoin/amos/boot/module/tcm/api/service/ITzsTwoStaffingService.java
View file @
7ff006e3
package
com
.
yeejoin
.
amos
.
boot
.
module
.
tcm
.
api
.
service
;
import
com.yeejoin.amos.boot.module.tcm.api.dto.TzsTwoStaffingCompanyDto
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
java.util.List
;
import
com.yeejoin.amos.boot.module.tcm.api.entity.TzsTwoStaffing
;
import
java.util.LinkedHashMap
;
...
...
@@ -15,4 +20,5 @@ import java.util.List;
public
interface
ITzsTwoStaffingService
{
List
<
TzsTwoStaffing
>
getStatisticsMessage
(
List
<
LinkedHashMap
>
list
);
Page
<
TzsTwoStaffingCompanyDto
>
getCompanyList
(
String
orgCode
,
TzsTwoStaffingCompanyDto
companyDto
,
Page
<
TzsTwoStaffingCompanyDto
>
page
);
}
amos-boot-system-tzs/amos-boot-module-tcm/amos-boot-module-tcm-api/src/main/resources/mapper/TzsTwoStaffingMapper.xml
View file @
7ff006e3
...
...
@@ -2,6 +2,24 @@
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper
namespace=
"com.yeejoin.amos.boot.module.tcm.api.mapper.TzsTwoStaffingMapper"
>
<select
id=
"getCompanyList"
resultType=
"com.yeejoin.amos.boot.module.tcm.api.dto.TzsTwoStaffingCompanyDto"
>
SELECT
*
FROM
view_two_staffing
where
supervise_org_code like concat('%',#{orgCode},'%')
<if
test=
"companyDto.unitType != '' and companyDto.unitType != null"
>
and unit_type like concat('%',#{companyDto.unitType},'%')
</if>
<if
test=
"companyDto.useUnit != '' and companyDto.useUnit != null"
>
and unit_unit like concat('%',#{companyDto.useUnit},'%')
</if>
<if
test=
"companyDto.useCode != '' and companyDto.useCode != null"
>
and use_code like concat('%',#{companyDto.useCode},'%')
</if>
</select>
<select
id=
"getListByOrgCode"
resultType=
"com.yeejoin.amos.boot.module.tcm.api.entity.TzsTwoStaffing"
>
</select>
...
...
amos-boot-system-tzs/amos-boot-module-tcm/amos-boot-module-tcm-biz/src/main/java/com/yeejoin/amos/boot/module/tcm/biz/controller/TzsTwoStaffingController.java
View file @
7ff006e3
package
com
.
yeejoin
.
amos
.
boot
.
module
.
tcm
.
biz
.
controller
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.alibaba.fastjson.JSON
;
import
com.yeejoin.amos.boot.biz.common.bo.ReginParams
;
import
com.yeejoin.amos.boot.biz.common.controller.BaseController
;
import
com.yeejoin.amos.boot.module.tcm.api.dto.TzsEquipListDto
;
import
com.yeejoin.amos.boot.module.tcm.api.dto.TzsTwoStaffingCompanyDto
;
import
com.yeejoin.amos.boot.biz.common.utils.RedisKey
;
import
com.yeejoin.amos.boot.biz.common.utils.RedisUtils
;
import
com.yeejoin.amos.boot.module.tcm.api.service.ITzsTwoStaffingService
;
import
com.yeejoin.amos.boot.module.tcm.biz.service.impl.TzsUserInfoServiceImpl
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
org.springframework.beans.factory.annotation.Autowired
;;
import
org.springframework.web.bind.annotation.*
;
import
org.typroject.tyboot.core.foundation.enumeration.UserType
;
import
org.typroject.tyboot.core.restful.doc.TycloudOperation
;
import
org.typroject.tyboot.core.restful.utils.ResponseHelper
;
import
org.typroject.tyboot.core.restful.utils.ResponseModel
;
import
java.util.List
;
import
java.util.Map
;
import
io.swagger.annotations.ApiOperation
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.util.ObjectUtils
;
import
org.springframework.web.bind.annotation.GetMapping
;
...
...
@@ -29,11 +43,10 @@ import java.util.List;
@Api
(
tags
=
"统计"
)
@RequestMapping
(
value
=
"/twoStaff"
)
public
class
TzsTwoStaffingController
extends
BaseController
{
private
static
final
String
REGULATOR_UNIT_TREE
=
"REGULATOR_UNIT_TREE"
;
@Autowired
private
ITzsTwoStaffingService
tzsTwoStaffingService
;
private
static
final
String
REGULATOR_UNIT_TREE
=
"REGULATOR_UNIT_TREE"
;
private
ITzsTwoStaffingService
tzsTwoStaffingService
;
@Autowired
private
TzsUserInfoServiceImpl
tzsUserInfoServiceImpl
;
...
...
@@ -41,6 +54,21 @@ public class TzsTwoStaffingController extends BaseController {
@Autowired
RedisUtils
redisUtils
;
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@GetMapping
(
value
=
"/getCompanyList"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"企业两员配备情况查询"
,
notes
=
"企业两员配备情况查询"
)
public
ResponseModel
<
IPage
<
TzsTwoStaffingCompanyDto
>>
getCompanyList
(
@RequestParam
(
value
=
"orgCode"
)
String
orgCode
,
@RequestParam
(
value
=
"current"
)
String
current
,
@RequestParam
(
value
=
"size"
)
String
size
,
TzsTwoStaffingCompanyDto
companyDto
)
{
Page
<
TzsTwoStaffingCompanyDto
>
page
=
new
Page
<>();
page
.
setCurrent
(
Long
.
parseLong
(
current
));
page
.
setSize
(
Long
.
parseLong
(
size
));
return
ResponseHelper
.
buildResponse
(
tzsTwoStaffingService
.
getCompanyList
(
orgCode
,
companyDto
,
page
));
}
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@GetMapping
(
value
=
"/getTree"
)
...
...
amos-boot-system-tzs/amos-boot-module-tcm/amos-boot-module-tcm-biz/src/main/java/com/yeejoin/amos/boot/module/tcm/biz/service/impl/TzsTwoStaffingServiceImpl.java
View file @
7ff006e3
package
com
.
yeejoin
.
amos
.
boot
.
module
.
tcm
.
biz
.
service
.
impl
;
import
com.yeejoin.amos.boot.module.tcm.api.dto.TzsTwoStaffingCompanyDto
;
import
com.yeejoin.amos.boot.module.tcm.api.entity.TzsTwoStaffing
;
import
com.yeejoin.amos.boot.module.tcm.api.mapper.TzsTwoStaffingMapper
;
import
com.yeejoin.amos.boot.module.tcm.api.service.ITzsTwoStaffingService
;
import
com.yeejoin.amos.boot.module.tcm.api.dto.TzsTwoStaffingDto
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.util.ObjectUtils
;
import
org.typroject.tyboot.core.rdbms.service.BaseService
;
import
org.springframework.stereotype.Service
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
java.util.ArrayList
;
import
java.util.LinkedHashMap
;
import
java.util.List
;
...
...
@@ -21,19 +24,25 @@ import java.util.List;
* @date 2023-10-27
*/
@Service
public
class
TzsTwoStaffingServiceImpl
extends
BaseService
<
TzsTwoStaffingDto
,
TzsTwoStaffing
,
TzsTwoStaffingMapper
>
implements
ITzsTwoStaffingService
{
public
class
TzsTwoStaffingServiceImpl
extends
BaseService
<
TzsTwoStaffingDto
,
TzsTwoStaffing
,
TzsTwoStaffingMapper
>
implements
ITzsTwoStaffingService
{
@Autowired
TzsTwoStaffingMapper
tzsTwoStaffingMapper
;
/**
* 分页查询
*/
public
Page
<
TzsTwoStaffingDto
>
queryForTzsTwoStaffingPage
(
Page
<
TzsTwoStaffingDto
>
page
)
{
public
Page
<
TzsTwoStaffingDto
>
queryForTzsTwoStaffingPage
(
Page
<
TzsTwoStaffingDto
>
page
)
{
return
this
.
queryForPage
(
page
,
null
,
false
);
}
/**
* 列表查询 示例
*/
public
List
<
TzsTwoStaffingDto
>
queryForTzsTwoStaffingList
()
{
return
this
.
queryForList
(
""
,
false
);
public
List
<
TzsTwoStaffingDto
>
queryForTzsTwoStaffingList
()
{
return
this
.
queryForList
(
""
,
false
);
}
@Override
...
...
@@ -59,4 +68,36 @@ public class TzsTwoStaffingServiceImpl extends BaseService<TzsTwoStaffingDto,Tzs
}
return
result
;
}
@Override
public
Page
<
TzsTwoStaffingCompanyDto
>
getCompanyList
(
String
orgCode
,
TzsTwoStaffingCompanyDto
companyDto
,
Page
<
TzsTwoStaffingCompanyDto
>
page
)
{
Page
<
TzsTwoStaffingCompanyDto
>
companyList
=
tzsTwoStaffingMapper
.
getCompanyList
(
page
,
companyDto
,
orgCode
);
companyList
.
getRecords
().
stream
().
map
(
item
->
{
if
(
item
.
getUnitType
().
contains
(
"使用单位"
))
{
item
.
setCompleteNormal
(
Integer
.
valueOf
(
item
.
getUseDone
())
>
1
?
"是"
:
"否"
);
}
if
(
item
.
getUnitType
().
contains
(
"充装单位"
)
||
item
.
getUnitType
().
contains
(
"安装改造维修单位"
)
||
item
.
getUnitType
().
contains
(
"制造单位"
)
||
item
.
getUnitType
().
contains
(
"设计单位"
))
{
item
.
setCompleteNormal
(
Integer
.
valueOf
(
item
.
getProductDone
())
>
1
?
"是"
:
"否"
);
}
if
(
item
.
getUnitType
().
contains
(
"使用单位"
)
&&
(
item
.
getUnitType
().
contains
(
"充装单位"
)
||
item
.
getUnitType
().
contains
(
"安装改造维修单位"
)
||
item
.
getUnitType
().
contains
(
"制造单位"
)
||
item
.
getUnitType
().
contains
(
"设计单位"
)))
{
item
.
setCompleteNormal
(
Integer
.
valueOf
(
item
.
getAllDone
())
>
1
?
"是"
:
"否"
);
}
return
item
;
});
return
companyList
;
}
}
\ 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