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
3b31990b
Commit
3b31990b
authored
Sep 21, 2022
by
limei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
根据模型id和机构id查询检查项总数和不合格总数
parent
4e470095
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
126 additions
and
7 deletions
+126
-7
misc.xml
.idea/misc.xml
+14
-0
CheckTotalDto.java
...m/yeejoin/amos/boot/module/tdc/api/dto/CheckTotalDto.java
+12
-1
CheckTotalMapper.java
...oin/amos/boot/module/tdc/api/mapper/CheckTotalMapper.java
+16
-0
CheckTotalService.java
...n/amos/boot/module/tdc/api/service/CheckTotalService.java
+16
-0
CheckTotalMapper.xml
...le-tdc-api/src/main/resources/mapper/CheckTotalMapper.xml
+4
-4
CheckResultController.java
...boot/module/tdc/biz/controller/CheckResultController.java
+2
-2
CheckTotalController.java
.../boot/module/tdc/biz/controller/CheckTotalController.java
+37
-0
CheckTotalImpl.java
...amos/boot/module/tdc/biz/service/impl/CheckTotalImpl.java
+25
-0
No files found.
.idea/misc.xml
View file @
3b31990b
...
@@ -6,6 +6,20 @@
...
@@ -6,6 +6,20 @@
<option
value=
"$PROJECT_DIR$/pom.xml"
/>
<option
value=
"$PROJECT_DIR$/pom.xml"
/>
</list>
</list>
</option>
</option>
<option
name=
"ignoredFiles"
>
<set>
<option
value=
"$PROJECT_DIR$/amos-boot-data/amos-boot-data-accessapi/pom.xml"
/>
<option
value=
"$PROJECT_DIR$/amos-boot-module/amos-boot-module-api/amos-boot-module-kgd-api/pom.xml"
/>
<option
value=
"$PROJECT_DIR$/amos-boot-module/amos-boot-module-biz/amos-boot-module-kgd-biz/pom.xml"
/>
<option
value=
"$PROJECT_DIR$/amos-boot-system-cas/amos-boot-module-cas-api/pom.xml"
/>
<option
value=
"$PROJECT_DIR$/amos-boot-system-cas/amos-boot-module-cas-biz/pom.xml"
/>
<option
value=
"$PROJECT_DIR$/amos-boot-system-cas/pom.xml"
/>
<option
value=
"$PROJECT_DIR$/amos-boot-system-kgd/pom.xml"
/>
<option
value=
"$PROJECT_DIR$/amos-boot-system-tdc/amos-boot-module-tdc-api/pom.xml"
/>
<option
value=
"$PROJECT_DIR$/amos-boot-system-tdc/amos-boot-module-tdc-biz/pom.xml"
/>
<option
value=
"$PROJECT_DIR$/amos-boot-system-tdc/pom.xml"
/>
</set>
</option>
</component>
</component>
<component
name=
"ProjectRootManager"
version=
"2"
project-jdk-name=
"1.8"
project-jdk-type=
"JavaSDK"
>
<component
name=
"ProjectRootManager"
version=
"2"
project-jdk-name=
"1.8"
project-jdk-type=
"JavaSDK"
>
<output
url=
"file://$PROJECT_DIR$/classes"
/>
<output
url=
"file://$PROJECT_DIR$/classes"
/>
...
...
amos-boot-system-tdc/amos-boot-module-tdc-api/src/main/java/com/yeejoin/amos/boot/module/tdc/api/dto/CheckTotalDto.java
View file @
3b31990b
package
com
.
yeejoin
.
amos
.
boot
.
module
.
tdc
.
api
.
dto
;
package
com
.
yeejoin
.
amos
.
boot
.
module
.
tdc
.
api
.
dto
;
import
com.baomidou.mybatisplus.annotation.IdType
;
import
com.baomidou.mybatisplus.annotation.TableId
;
import
com.baomidou.mybatisplus.annotation.TableName
;
import
com.baomidou.mybatisplus.annotation.TableName
;
import
io.swagger.annotations.ApiModelProperty
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
import
lombok.Data
;
...
@@ -11,6 +13,12 @@ import java.util.Date;
...
@@ -11,6 +13,12 @@ import java.util.Date;
@Accessors
(
chain
=
true
)
@Accessors
(
chain
=
true
)
@TableName
(
"tdc_check_result"
)
@TableName
(
"tdc_check_result"
)
public
class
CheckTotalDto
{
public
class
CheckTotalDto
{
private
static
final
long
serialVersionUID
=
1L
;
@TableId
(
value
=
"sequence_nbr"
,
type
=
IdType
.
ID_WORKER
)
protected
Long
sequenceNbr
;
@ApiModelProperty
(
value
=
"校验时间"
)
@ApiModelProperty
(
value
=
"校验时间"
)
private
Date
checkDate
;
private
Date
checkDate
;
...
@@ -25,14 +33,17 @@ public class CheckTotalDto {
...
@@ -25,14 +33,17 @@ public class CheckTotalDto {
private
String
checkItemLabel
;
private
String
checkItemLabel
;
private
int
modelId
;
private
String
modelId
;
private
String
checkItemValue
;
private
String
checkItemValue
;
private
String
checkExplain
;
private
String
checkExplain
;
private
String
amosOrgCode
;
private
String
total
;
private
String
aaa
;
}
}
amos-boot-system-tdc/amos-boot-module-tdc-api/src/main/java/com/yeejoin/amos/boot/module/tdc/api/mapper/CheckTotalMapper.java
0 → 100644
View file @
3b31990b
package
com
.
yeejoin
.
amos
.
boot
.
module
.
tdc
.
api
.
mapper
;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
import
com.yeejoin.amos.boot.module.tdc.api.dto.CheckResultDto
;
import
com.yeejoin.amos.boot.module.tdc.api.dto.CheckTotalDto
;
import
com.yeejoin.amos.boot.module.tdc.api.entity.CheckResult
;
import
org.mapstruct.Mapper
;
import
java.util.List
;
@Mapper
public
interface
CheckTotalMapper
extends
BaseMapper
<
CheckTotalDto
>
{
List
<
CheckTotalDto
>
selectTotal
(
String
modelId
,
String
amosOrgCode
);
}
amos-boot-system-tdc/amos-boot-module-tdc-api/src/main/java/com/yeejoin/amos/boot/module/tdc/api/service/CheckTotalService.java
0 → 100644
View file @
3b31990b
package
com
.
yeejoin
.
amos
.
boot
.
module
.
tdc
.
api
.
service
;
import
com.baomidou.mybatisplus.extension.service.IService
;
import
com.yeejoin.amos.boot.module.tdc.api.dto.CheckTotalDto
;
import
com.yeejoin.amos.boot.module.tdc.api.entity.CheckResult
;
import
org.springframework.stereotype.Service
;
import
java.util.List
;
@Service
public
interface
CheckTotalService
extends
IService
<
CheckTotalDto
>
{
List
<
CheckTotalDto
>
selectTotal
(
String
modelId
,
String
amosOrgCode
);
}
amos-boot-system-tdc/amos-boot-module-tdc-api/src/main/resources/mapper/CheckTotalMapper.xml
View file @
3b31990b
<?xml version="1.0" encoding="UTF-8"?>
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<!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.tdc.api.mapper.Check
Result
Mapper"
>
<mapper
namespace=
"com.yeejoin.amos.boot.module.tdc.api.mapper.Check
Total
Mapper"
>
<select
id=
"select
Result"
resultType=
"com.yeejoin.amos.boot.module.tdc.api.dto.CheckResult
Dto"
>
<select
id=
"select
Total"
resultType=
"com.yeejoin.amos.boot.module.tdc.api.dto.CheckTotal
Dto"
>
select (select count(*) from `tdc_check_result` where model_id=#{model_id} and amos_org_code='amos_org_code')as `all_count`,
SELECT count(1) as total, COUNT(CASE WHEN (check_item_result=1) THEN check_item_result END) AS aaa
(select count(*) from `tdc_check_result` where check_item_result='1' and model_id='model_id' and amos_org_code='amos_org_code')as `faile_count`;
FROM tdc_check_result WHERE model_id = #{modelId} and amos_org_code = #{amosOrgCode}
</select>
</select>
</mapper>
</mapper>
amos-boot-system-tdc/amos-boot-module-tdc-biz/src/main/java/com/yeejoin/amos/boot/module/tdc/biz/controller/CheckResultController.java
View file @
3b31990b
...
@@ -47,9 +47,9 @@ public class CheckResultController extends BaseController {
...
@@ -47,9 +47,9 @@ public class CheckResultController extends BaseController {
* @return
* @return
*/
*/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
,
needAuth
=
false
)
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
,
needAuth
=
false
)
@GetMapping
(
value
=
"/selectCheckResult
/{modelId}/{amosOrgCode}
"
)
@GetMapping
(
value
=
"/selectCheckResult"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"查询最后一次校验模型"
,
notes
=
"查询最后一次校验模型"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"查询最后一次校验模型"
,
notes
=
"查询最后一次校验模型"
)
public
ResponseModel
<
List
<
CheckResult
>>
selectCheckResult
(
@PathVariable
String
modelId
,
@PathVariable
String
amosOrgCode
)
{
public
ResponseModel
<
List
<
CheckResult
>>
selectCheckResult
(
String
modelId
,
String
amosOrgCode
)
{
return
ResponseHelper
.
buildResponse
(
checkResultService
.
selectCheckResult
(
modelId
,
amosOrgCode
));
return
ResponseHelper
.
buildResponse
(
checkResultService
.
selectCheckResult
(
modelId
,
amosOrgCode
));
}
}
}
}
amos-boot-system-tdc/amos-boot-module-tdc-biz/src/main/java/com/yeejoin/amos/boot/module/tdc/biz/controller/CheckTotalController.java
0 → 100644
View file @
3b31990b
package
com
.
yeejoin
.
amos
.
boot
.
module
.
tdc
.
biz
.
controller
;
import
com.yeejoin.amos.boot.biz.common.controller.BaseController
;
import
com.yeejoin.amos.boot.module.tdc.api.dto.CheckResultDto
;
import
com.yeejoin.amos.boot.module.tdc.api.dto.CheckTotalDto
;
import
com.yeejoin.amos.boot.module.tdc.api.service.CheckResultService
;
import
com.yeejoin.amos.boot.module.tdc.api.service.CheckTotalService
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.GetMapping
;
import
org.springframework.web.bind.annotation.PathVariable
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RestController
;
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
;
@RestController
@Api
(
tags
=
"校验结果Api"
)
@RequestMapping
(
value
=
"/check"
)
public
class
CheckTotalController
extends
BaseController
{
@Autowired
CheckTotalService
checkTotalService
;
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
,
needAuth
=
false
)
@GetMapping
(
value
=
"/selectTotal"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"result"
,
notes
=
"result"
)
public
ResponseModel
<
List
<
CheckTotalDto
>>
selectTotal
(
String
modelId
,
String
amosOrgCode
)
{
return
ResponseHelper
.
buildResponse
(
checkTotalService
.
selectTotal
(
modelId
,
amosOrgCode
));
}
}
amos-boot-system-tdc/amos-boot-module-tdc-biz/src/main/java/com/yeejoin/amos/boot/module/tdc/biz/service/impl/CheckTotalImpl.java
0 → 100644
View file @
3b31990b
package
com
.
yeejoin
.
amos
.
boot
.
module
.
tdc
.
biz
.
service
.
impl
;
import
com.baomidou.mybatisplus.extension.service.impl.ServiceImpl
;
import
com.yeejoin.amos.boot.module.tdc.api.dto.CheckResultDto
;
import
com.yeejoin.amos.boot.module.tdc.api.dto.CheckTotalDto
;
import
com.yeejoin.amos.boot.module.tdc.api.entity.CheckResult
;
import
com.yeejoin.amos.boot.module.tdc.api.mapper.CheckTotalMapper
;
import
com.yeejoin.amos.boot.module.tdc.api.service.CheckResultService
;
import
com.yeejoin.amos.boot.module.tdc.api.service.CheckTotalService
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
java.util.List
;
@Service
public
class
CheckTotalImpl
extends
ServiceImpl
<
CheckTotalMapper
,
CheckTotalDto
>
implements
CheckTotalService
{
@Autowired
CheckTotalMapper
checkTotalMapper
;
@Override
public
List
<
CheckTotalDto
>
selectTotal
(
String
modelId
,
String
amosOrgCode
)
{
return
checkTotalMapper
.
selectTotal
(
modelId
,
amosOrgCode
);
}
}
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