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
5fea6b38
Commit
5fea6b38
authored
Oct 19, 2022
by
wanglong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
焊接工艺效验
parent
a0945dd2
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
84 additions
and
2 deletions
+84
-2
VerifyEnum.java
...com/yeejoin/amos/boot/module/ugp/api/Enum/VerifyEnum.java
+26
-0
Verify.java
...a/com/yeejoin/amos/boot/module/ugp/api/entity/Verify.java
+6
-0
VerifyController.java
...amos/boot/module/ugp/biz/controller/VerifyController.java
+11
-0
VerifyServiceImpl.java
...s/boot/module/ugp/biz/service/impl/VerifyServiceImpl.java
+41
-2
No files found.
amos-boot-system-ugp/amos-boot-module-ugp-api/src/main/java/com/yeejoin/amos/boot/module/ugp/api/Enum/VerifyEnum.java
0 → 100644
View file @
5fea6b38
package
com
.
yeejoin
.
amos
.
boot
.
module
.
ugp
.
api
.
Enum
;
import
lombok.AllArgsConstructor
;
import
lombok.Getter
;
import
java.util.HashMap
;
import
java.util.Map
;
@Getter
@AllArgsConstructor
public
enum
VerifyEnum
{
未通过
(
"0"
,
"未通过"
),
已通过
(
"1"
,
"已通过"
);
private
String
status
;
private
String
name
;
public
static
Map
<
String
,
String
>
getTaskStatus
=
new
HashMap
<>();
static
{
for
(
VerifyEnum
verifyEnum
:
VerifyEnum
.
values
()){
getTaskStatus
.
put
(
verifyEnum
.
status
,
verifyEnum
.
name
);
}
}
}
amos-boot-system-ugp/amos-boot-module-ugp-api/src/main/java/com/yeejoin/amos/boot/module/ugp/api/entity/Verify.java
View file @
5fea6b38
...
@@ -88,6 +88,12 @@ public class Verify extends BaseEntity {
...
@@ -88,6 +88,12 @@ public class Verify extends BaseEntity {
@TableField
(
"inspector_id"
)
@TableField
(
"inspector_id"
)
private
Long
inspectorId
;
private
Long
inspectorId
;
@TableField
(
"task_id"
)
private
Long
taskId
;
/**
* 检验员id
*/
//项目表
//项目表
@TableField
(
exist
=
false
)
private
Project
project
;
private
Project
project
;
}
}
amos-boot-system-ugp/amos-boot-module-ugp-biz/src/main/java/com/yeejoin/amos/boot/module/ugp/biz/controller/VerifyController.java
View file @
5fea6b38
package
com
.
yeejoin
.
amos
.
boot
.
module
.
ugp
.
biz
.
controller
;
package
com
.
yeejoin
.
amos
.
boot
.
module
.
ugp
.
biz
.
controller
;
import
com.alibaba.fastjson.JSONObject
;
import
com.yeejoin.amos.boot.module.ugp.api.dto.*
;
import
com.yeejoin.amos.boot.module.ugp.api.dto.*
;
import
com.yeejoin.amos.boot.module.ugp.api.service.IVerifyService
;
import
com.yeejoin.amos.boot.module.ugp.api.service.IVerifyService
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RequestMapping
;
...
@@ -207,6 +208,16 @@ public class VerifyController extends BaseController {
...
@@ -207,6 +208,16 @@ public class VerifyController extends BaseController {
return
ResponseHelper
.
buildResponse
(
verifyServiceImpl
.
checks
(
dto
));
return
ResponseHelper
.
buildResponse
(
verifyServiceImpl
.
checks
(
dto
));
}
}
/**
* 焊接工艺效验
*/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
,
needAuth
=
false
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"焊接工艺效验"
,
notes
=
"焊接工艺效验"
)
@PostMapping
(
value
=
"/weldeffect"
)
public
ResponseModel
<
String
>
weldEffect
(
@RequestBody
JSONObject
jsonObject
){
return
ResponseHelper
.
buildResponse
(
verifyServiceImpl
.
weldEffect
(
jsonObject
));
}
}
}
amos-boot-system-ugp/amos-boot-module-ugp-biz/src/main/java/com/yeejoin/amos/boot/module/ugp/biz/service/impl/VerifyServiceImpl.java
View file @
5fea6b38
package
com
.
yeejoin
.
amos
.
boot
.
module
.
ugp
.
biz
.
service
.
impl
;
package
com
.
yeejoin
.
amos
.
boot
.
module
.
ugp
.
biz
.
service
.
impl
;
import
com.alibaba.fastjson.JSON
;
import
com.alibaba.fastjson.JSONArray
;
import
com.alibaba.fastjson.JSONObject
;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
import
com.yeejoin.amos.boot.module.ugp.api.Enum.StageEnum
;
import
com.yeejoin.amos.boot.module.ugp.api.Enum.StageEnum
;
import
com.yeejoin.amos.boot.module.ugp.api.Enum.VerifyEnum
;
import
com.yeejoin.amos.boot.module.ugp.api.dto.*
;
import
com.yeejoin.amos.boot.module.ugp.api.dto.*
;
import
com.yeejoin.amos.boot.module.ugp.api.entity.Verify
;
import
com.yeejoin.amos.boot.module.ugp.api.entity.Verify
;
import
com.yeejoin.amos.boot.module.ugp.api.mapper.VerifyMapper
;
import
com.yeejoin.amos.boot.module.ugp.api.mapper.VerifyMapper
;
...
@@ -21,6 +26,11 @@ import java.util.List;
...
@@ -21,6 +26,11 @@ import java.util.List;
*/
*/
@Service
@Service
public
class
VerifyServiceImpl
extends
BaseService
<
VerifyDto
,
Verify
,
VerifyMapper
>
implements
IVerifyService
{
public
class
VerifyServiceImpl
extends
BaseService
<
VerifyDto
,
Verify
,
VerifyMapper
>
implements
IVerifyService
{
@Autowired
InstallNoticeServiceImpl
installNoticeService
;
@Autowired
VerifyMapper
verifyMapper
;
/**
/**
* 分页查询
* 分页查询
*/
*/
...
@@ -41,8 +51,7 @@ public class VerifyServiceImpl extends BaseService<VerifyDto,Verify,VerifyMapper
...
@@ -41,8 +51,7 @@ public class VerifyServiceImpl extends BaseService<VerifyDto,Verify,VerifyMapper
@Autowired
private
VerifyMapper
verifyMapper
;
/**
/**
* 智能监检共用查询方法
* 智能监检共用查询方法
*
*
...
@@ -170,4 +179,33 @@ private VerifyMapper verifyMapper;
...
@@ -170,4 +179,33 @@ private VerifyMapper verifyMapper;
}
}
/**
* 焊接工艺效验
*/
public
String
weldEffect
(
JSONObject
jsonObject
){
Verify
verify
=
new
Verify
();
LambdaQueryWrapper
<
Verify
>
wrapper
=
new
LambdaQueryWrapper
<>();
//筛选出本次任务
wrapper
.
eq
(
Verify:
:
getCode
,
jsonObject
.
getString
(
"code"
));
wrapper
.
eq
(
Verify:
:
getStatus
,
VerifyEnum
.
已通过
.
getStatus
());
List
<
Verify
>
verifies
=
verifyMapper
.
selectList
(
wrapper
);
//判断前三次已经入库
if
(
verifies
.
stream
().
count
()
==
3
)
{
//获取效验接口
Boolean
i
=
true
;
if
(
i
)
{
verify
.
setProjectId
(
jsonObject
.
getLong
(
"projectId"
));
verify
.
setCode
(
jsonObject
.
getString
(
"code"
));
verify
.
setTargetInfo
(
jsonObject
.
getString
(
"target_info"
));
}
}
save
(
verify
);
return
"效验成功"
;
}
}
}
\ 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