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
fa063d22
Commit
fa063d22
authored
Nov 24, 2022
by
DESKTOP-BQLVS7A\admin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
新增根据单位名称判断是否唯一接口
parent
2ee81ccd
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
32 additions
and
4 deletions
+32
-4
CompanyController.java
...mos/boot/module/ugp/biz/controller/CompanyController.java
+20
-0
InstallationQualityController.java
...ule/ugp/biz/controller/InstallationQualityController.java
+1
-1
InstallationQualityImpl.java
.../module/ugp/biz/service/impl/InstallationQualityImpl.java
+11
-3
No files found.
amos-boot-system-ugp/amos-boot-module-ugp-biz/src/main/java/com/yeejoin/amos/boot/module/ugp/biz/controller/CompanyController.java
View file @
fa063d22
...
@@ -43,6 +43,8 @@ import org.typroject.tyboot.core.restful.utils.ResponseHelper;
...
@@ -43,6 +43,8 @@ import org.typroject.tyboot.core.restful.utils.ResponseHelper;
import
org.typroject.tyboot.core.restful.utils.ResponseModel
;
import
org.typroject.tyboot.core.restful.utils.ResponseModel
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
javax.servlet.http.HttpServletRequest
;
import
javax.servlet.http.HttpServletRequest
;
import
javax.swing.text.StyledEditorKit
;
import
org.springframework.web.bind.annotation.*
;
import
org.springframework.web.bind.annotation.*
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.yeejoin.amos.boot.module.ugp.api.dto.CompanyDto
;
import
com.yeejoin.amos.boot.module.ugp.api.dto.CompanyDto
;
...
@@ -452,6 +454,24 @@ public class CompanyController extends BaseController {
...
@@ -452,6 +454,24 @@ public class CompanyController extends BaseController {
}
}
return
ResponseHelper
.
buildResponse
(
flag
);
return
ResponseHelper
.
buildResponse
(
flag
);
}
}
/**
* 通过企业单位名称判断是否存在
*
* @return
*/
@TycloudOperation
(
needAuth
=
false
,
ApiLevel
=
UserType
.
AGENCY
)
@GetMapping
(
value
=
"/hasExistCompanyName/{name}"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"判断企业名称是否存在"
,
notes
=
"判断企业名称是否存在"
)
public
ResponseModel
<
Boolean
>
hasExistCompanyName
(
@PathVariable
(
value
=
"name"
)
String
name
){
Boolean
exist
=
false
;
LambdaQueryWrapper
<
Company
>
wrapper
=
new
LambdaQueryWrapper
<>();
wrapper
.
eq
(
Company:
:
getName
,
name
);
Company
companyName
=
companyServiceImpl
.
getOne
(
wrapper
);
if
(!
ValidationUtil
.
isEmpty
(
companyName
)){
exist
=
true
;
}
return
ResponseHelper
.
buildResponse
(
exist
);
}
/**
/**
* 发送手机号验证码
* 发送手机号验证码
...
...
amos-boot-system-ugp/amos-boot-module-ugp-biz/src/main/java/com/yeejoin/amos/boot/module/ugp/biz/controller/InstallationQualityController.java
View file @
fa063d22
...
@@ -41,7 +41,7 @@ private InstallationQualityImpl services;
...
@@ -41,7 +41,7 @@ private InstallationQualityImpl services;
private
WeldServiceImpl
weld
;
private
WeldServiceImpl
weld
;
//查看质量监检信息
//查看质量监检信息
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
,
needAuth
=
false
)
@GetMapping
(
value
=
"/find"
)
@GetMapping
(
value
=
"/find"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"质量问题闭环管理-安装质量监检信息-质量监检信息"
,
notes
=
"质量问题闭环管理-安装质量监检信息-质量监检信息"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"质量问题闭环管理-安装质量监检信息-质量监检信息"
,
notes
=
"质量问题闭环管理-安装质量监检信息-质量监检信息"
)
public
ResponseModel
<
Page
<
PercentOfPassDto
>>
find
(
@RequestParam
(
value
=
"current"
)
int
current
,
@RequestParam
public
ResponseModel
<
Page
<
PercentOfPassDto
>>
find
(
@RequestParam
(
value
=
"current"
)
int
current
,
@RequestParam
...
...
amos-boot-system-ugp/amos-boot-module-ugp-biz/src/main/java/com/yeejoin/amos/boot/module/ugp/biz/service/impl/InstallationQualityImpl.java
View file @
fa063d22
...
@@ -16,11 +16,13 @@ import com.yeejoin.amos.boot.module.ugp.api.mapper.IInstallationQualityMapper;
...
@@ -16,11 +16,13 @@ import com.yeejoin.amos.boot.module.ugp.api.mapper.IInstallationQualityMapper;
import
com.yeejoin.amos.boot.module.ugp.api.mapper.ProjectMapper
;
import
com.yeejoin.amos.boot.module.ugp.api.mapper.ProjectMapper
;
import
com.yeejoin.amos.boot.module.ugp.api.service.IInstallationQualityService
;
import
com.yeejoin.amos.boot.module.ugp.api.service.IInstallationQualityService
;
import
com.yeejoin.amos.boot.module.ugp.biz.framework.BusinessIdentify
;
import
com.yeejoin.amos.boot.module.ugp.biz.framework.BusinessIdentify
;
import
com.yeejoin.amos.boot.module.ugp.biz.framework.BusinessIdentify
;
import
jdk.nashorn.internal.runtime.logging.Logger
;
import
jdk.nashorn.internal.runtime.logging.Logger
;
import
lombok.extern.log4j.Log4j
;
import
lombok.extern.log4j.Log4j
;
import
lombok.extern.slf4j.Slf4j
;
import
lombok.extern.slf4j.Slf4j
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
import
org.springframework.transaction.annotation.Transactional
;
import
org.springframework.util.StringUtils
;
import
org.springframework.util.StringUtils
;
import
org.typroject.tyboot.core.foundation.utils.ValidationUtil
;
import
org.typroject.tyboot.core.foundation.utils.ValidationUtil
;
import
org.typroject.tyboot.core.rdbms.service.BaseService
;
import
org.typroject.tyboot.core.rdbms.service.BaseService
;
...
@@ -32,7 +34,6 @@ import java.util.HashSet;
...
@@ -32,7 +34,6 @@ import java.util.HashSet;
import
java.util.List
;
import
java.util.List
;
import
java.util.Set
;
import
java.util.Set
;
import
java.util.regex.Pattern
;
import
java.util.regex.Pattern
;
import
java.util.stream.Collectors
;
import
java.util.stream.Stream
;
import
java.util.stream.Stream
;
/**
/**
...
@@ -65,6 +66,7 @@ public class InstallationQualityImpl extends BaseService<PercentOfPassDto, Quali
...
@@ -65,6 +66,7 @@ public class InstallationQualityImpl extends BaseService<PercentOfPassDto, Quali
//分页查询项目质量监检信息
//分页查询项目质量监检信息
@Override
@Override
@BusinessIdentify
@BusinessIdentify
@Transactional
public
Page
<
PercentOfPassDto
>
find
(
int
current
,
int
size
,
PercentOfPassDto
pd
)
{
public
Page
<
PercentOfPassDto
>
find
(
int
current
,
int
size
,
PercentOfPassDto
pd
)
{
Page
page
=
new
Page
<>();
Page
page
=
new
Page
<>();
page
.
setCurrent
(
current
);
page
.
setCurrent
(
current
);
...
@@ -132,8 +134,14 @@ public class InstallationQualityImpl extends BaseService<PercentOfPassDto, Quali
...
@@ -132,8 +134,14 @@ public class InstallationQualityImpl extends BaseService<PercentOfPassDto, Quali
//获取焊口信息总条数
//获取焊口信息总条数
int
sum
=
weldDtoList
.
size
(
);
int
sum
=
weldDtoList
.
size
(
);
//焊口合格数
//焊口合格数
List
<
WeldDto
>
collect
=
weldDtoList
.
stream
(
).
filter
(
weld
->
StageEnum
.
焊接工艺
.
getName
(
).
equals
(
weld
.
getSuperInspecStatus
(
))).
collect
(
Collectors
.
toList
(
));
int
qualifiedData
=
0
;
int
qualifiedData
=
collect
.
size
();
for
(
WeldDto
weldDto
:
weldDtoList
)
{
String
superInspecStatus
=
weldDto
.
getSuperInspecStatus
(
);
if
(
superInspecStatus
.
equals
(
"合格"
))
{
qualifiedData
++;
}
}
//合格率
//合格率
BigDecimal
sums
=
new
BigDecimal
(
sum
);
BigDecimal
sums
=
new
BigDecimal
(
sum
);
BigDecimal
qualifiedDatas
=
new
BigDecimal
(
qualifiedData
);
BigDecimal
qualifiedDatas
=
new
BigDecimal
(
qualifiedData
);
...
...
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