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
22b81128
Commit
22b81128
authored
Nov 11, 2022
by
曹盼盼
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改
parent
bb5af7a9
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
155 additions
and
2 deletions
+155
-2
AuditEnum.java
.../com/yeejoin/amos/boot/module/ugp/api/Enum/AuditEnum.java
+39
-0
pom.xml
amos-boot-system-ugp/amos-boot-module-ugp-biz/pom.xml
+9
-0
InspectionController.java
.../boot/module/ugp/biz/controller/InspectionController.java
+1
-1
VerifyController.java
...amos/boot/module/ugp/biz/controller/VerifyController.java
+0
-0
ProjectInitiationServiceImpl.java
...le/ugp/biz/service/impl/ProjectInitiationServiceImpl.java
+106
-1
VerifyServiceImpl.java
...s/boot/module/ugp/biz/service/impl/VerifyServiceImpl.java
+0
-0
No files found.
amos-boot-system-ugp/amos-boot-module-ugp-api/src/main/java/com/yeejoin/amos/boot/module/ugp/api/Enum/AuditEnum.java
0 → 100644
View file @
22b81128
package
com
.
yeejoin
.
amos
.
boot
.
module
.
ugp
.
api
.
Enum
;
import
lombok.AllArgsConstructor
;
import
lombok.Getter
;
import
java.util.ArrayList
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.Map
;
/**
* @Author cpp
* @Description
* @Date 2022/11/10
*/
@Getter
@AllArgsConstructor
public
enum
AuditEnum
{
符合
(
"符合"
,
"1"
),
不符合且不需要整改
(
"不符合且不需要整改"
,
"0"
),
不符合且需要重新提交资料
(
"不符合且需要重新提交资料"
,
"2"
);
private
String
name
;
private
String
status
;
public
static
Map
<
String
,
String
>
getStatusByName
=
new
HashMap
<>();
public
static
Map
<
String
,
String
>
getNameByStatus
=
new
HashMap
<>();
static
{
for
(
AuditEnum
auditEnum:
AuditEnum
.
values
()){
getStatusByName
.
put
(
auditEnum
.
name
,
auditEnum
.
status
);
getNameByStatus
.
put
(
auditEnum
.
status
,
auditEnum
.
name
);
}
}
}
amos-boot-system-ugp/amos-boot-module-ugp-biz/pom.xml
View file @
22b81128
...
...
@@ -31,11 +31,20 @@
<artifactId>
fastjson
</artifactId>
<version>
1.2.24
</version>
</dependency>
<!--pqr 和wps-->
<dependency>
<groupId>
fakepath
</groupId>
<artifactId>
ugp-welding-evaluation-inspection-sdk
</artifactId>
<version>
1.0.1
</version>
</dependency>
<!--调用python的依赖-->
<dependency>
<groupId>
org.python
</groupId>
<artifactId>
jython-standalone
</artifactId>
<version>
2.7.0
</version>
</dependency>
</dependencies>
<build>
...
...
amos-boot-system-ugp/amos-boot-module-ugp-biz/src/main/java/com/yeejoin/amos/boot/module/ugp/biz/controller/InspectionController.java
View file @
22b81128
...
...
@@ -136,7 +136,7 @@ public class InspectionController {
return
page
;
}
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
,
needAuth
=
false
)
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
""
,
notes
=
""
)
@GetMapping
(
"/saveInfo"
)
public
ResponseModel
<
String
>
saveInfo
(
@RequestBody
JSONObject
jsonObject
)
{
...
...
amos-boot-system-ugp/amos-boot-module-ugp-biz/src/main/java/com/yeejoin/amos/boot/module/ugp/biz/controller/VerifyController.java
View file @
22b81128
This diff is collapsed.
Click to expand it.
amos-boot-system-ugp/amos-boot-module-ugp-biz/src/main/java/com/yeejoin/amos/boot/module/ugp/biz/service/impl/ProjectInitiationServiceImpl.java
View file @
22b81128
...
...
@@ -8,10 +8,14 @@ import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
import
com.fasterxml.jackson.databind.ObjectMapper
;
import
com.google.common.collect.Maps
;
import
com.mao.expertSystem.WeldingQualification
;
import
com.mao.expertSystem.material.MyPqr
;
import
com.mao.expertSystem.material.MyWps
;
import
com.yeejoin.amos.boot.biz.common.service.impl.WorkflowExcuteServiceImpl
;
import
com.yeejoin.amos.boot.module.common.api.entity.OrgUsr
;
import
com.yeejoin.amos.boot.module.common.biz.service.impl.OrgUsrServiceImpl
;
import
com.yeejoin.amos.boot.module.common.biz.utils.CommonResponseUtil
;
import
com.yeejoin.amos.boot.module.ugp.api.Enum.AuditEnum
;
import
com.yeejoin.amos.boot.module.ugp.api.Enum.ProjectInitiationEnum
;
import
com.yeejoin.amos.boot.module.ugp.api.Enum.SMSEnum
;
import
com.yeejoin.amos.boot.module.ugp.api.Util.CommonResponse
;
...
...
@@ -153,7 +157,6 @@ public class ProjectInitiationServiceImpl extends BaseService<ProjectInitiationD
}
}
try
{
//组装信息
TaskResultDTO
dto
=
new
TaskResultDTO
();
...
...
@@ -176,6 +179,108 @@ public class ProjectInitiationServiceImpl extends BaseService<ProjectInitiationD
}
}
/*焊评审核(后期优化)
* @return
*/
public
String
evaluateMethod
(
String
sequenceNbr
,
JSONObject
json
)
{
//获取文档信息(2个文档 wps pqr)
JSONArray
subForm
=
json
.
getJSONArray
(
"subForm"
);
JSONObject
jsonObject1
=
subForm
.
getJSONObject
(
0
);
JSONArray
info
=
jsonObject1
.
getJSONArray
(
"info"
);
//info里面上传两个文档
JSONObject
js1
=
info
.
getJSONObject
(
0
);
JSONObject
js2
=
info
.
getJSONObject
(
1
);
String
name1
=
js1
.
getString
(
"name"
);
String
url1
=
js1
.
getString
(
"url"
);
String
name2
=
js1
.
getString
(
"name"
);
String
url2
=
js2
.
getString
(
"url"
);
//文档下载,调用python 文字识别
//识别结果,将结果放到pqr wps
MyPqr
pqr
=
new
MyPqr
(
);
MyWps
wps
=
new
MyWps
(
);
pqr
.
setWelding_method
(
json
.
getString
(
"pqr_welding_method"
));
pqr
.
setMaterial_a_number
(
json
.
getString
(
"pqr_material_a_number"
));
pqr
.
setMaterial_a_class
(
json
.
getString
(
"pqr_material_a_class"
));
pqr
.
setMaterial_a_thickness
(
json
.
getDouble
(
"pqr_material_a_thickness"
));
pqr
.
setMaterial_a_group
(
json
.
getString
(
"pqr_material_a_group"
));
pqr
.
setMaterial_a_standard
(
json
.
getString
(
"pqr_material_a_standard"
));
pqr
.
setMaterial_b_number
(
json
.
getString
(
"pqr_material_b_number"
));
pqr
.
setMaterial_b_class
(
json
.
getString
(
"pqr_material_b_class"
));
pqr
.
setMaterial_b_thickness
(
json
.
getDouble
(
"pqr_material_b_thickness"
));
pqr
.
setMaterial_b_group
(
json
.
getString
(
"pqr_material_b_group"
));
pqr
.
setMaterial_b_standard
(
json
.
getString
(
"pqr_material_b_standard"
));
pqr
.
setIf_shock
(
json
.
getString
(
"pqr_if_shock"
));
pqr
.
setIf_bend
(
json
.
getString
(
"pqr_if_bend"
));
pqr
.
setGtaw_weld_material_class
(
json
.
getString
(
"pqr_gtaw_weld_material_class"
));
pqr
.
setSmaw_weld_material_class
(
json
.
getString
(
"pqr_smaw_weld_material_class"
));
pqr
.
setSaw_weld_material_class_1
(
json
.
getString
(
"pqr_saw_weld_material_class_1"
));
pqr
.
setSaw_weld_material_class_2
(
json
.
getString
(
"pqr_saw_weld_material_class_2"
));
pqr
.
setGmaw_weld_material_class
(
json
.
getString
(
"pqr_gmaw_weld_material_class"
));
pqr
.
setIf_heat_treatment
(
json
.
getString
(
"pqr_if_heat_treatment"
));
pqr
.
setTemperature
(
json
.
getDouble
(
"pqr_temperature"
));
pqr
.
setCombox_type
(
json
.
getString
(
"pqr_combox_type"
));
pqr
.
setTemperature_time
(
json
.
getDouble
(
"pqr_temperature_time"
));
pqr
.
setMaterial_minT_of_a_b_thickness
(
json
.
getDouble
(
"pqr_material_minT_of_a_b_thickness"
));
wps
.
setWelding_method
(
json
.
getString
(
"wps_welding_method"
));
wps
.
setMaterial_a_number
(
json
.
getString
(
"wps_material_a_number"
));
wps
.
setMaterial_a_class
(
json
.
getString
(
"wps_material_a_class"
));
wps
.
setMaterial_a_thickness
(
json
.
getDouble
(
"wps_material_a_thickness"
));
wps
.
setMaterial_a_group
(
json
.
getString
(
"wps_material_a_group"
));
wps
.
setMaterial_a_standard
(
json
.
getString
(
"wps_material_a_standard"
));
wps
.
setMaterial_b_number
(
json
.
getString
(
"wps_material_b_number"
));
wps
.
setMaterial_b_class
(
json
.
getString
(
"wps_material_b_class"
));
wps
.
setMaterial_b_thickness
(
json
.
getDouble
(
"wps_material_b_thickness"
));
wps
.
setMaterial_b_group
(
json
.
getString
(
"wps_material_b_group"
));
wps
.
setMaterial_b_standard
(
json
.
getString
(
"wps_material_b_standard"
));
wps
.
setIf_shock
(
json
.
getString
(
"wps_if_shock"
));
wps
.
setIf_bend
(
json
.
getString
(
"wps_if_bend"
));
wps
.
setGtaw_weld_material_class
(
json
.
getString
(
"wps_gtaw_weld_material_class"
));
wps
.
setSmaw_weld_material_class
(
json
.
getString
(
"wps_smaw_weld_material_class"
));
wps
.
setSaw_weld_material_class_1
(
json
.
getString
(
"wps_saw_weld_material_class_1"
));
wps
.
setSaw_weld_material_class_2
(
json
.
getString
(
"wps_saw_weld_material_class_2"
));
wps
.
setGmaw_weld_material_class
(
json
.
getString
(
"wps_gmaw_weld_material_class"
));
wps
.
setIf_heat_treatment
(
json
.
getString
(
"wps_if_heat_treatment"
));
wps
.
setTemperature
(
json
.
getDouble
(
"wps_temperature"
));
wps
.
setCombox_type
(
json
.
getString
(
"wps_combox_type"
));
wps
.
setTemperature_time
(
json
.
getDouble
(
"wps_temperature_time"
));
wps
.
setMaterial_minT_of_a_b_thickness
(
json
.
getDouble
(
"wps_material_minT_of_a_b_thickness"
));
HashMap
<
String
,
String
>
stringStringHashMap
=
new
WeldingQualification
(
).
equipmentWeldingQualification
(
pqr
,
wps
);
//结果(假设)
String
reslut
=
AuditEnum
.
符合
.
getName
();
String
option
=
AuditEnum
.
getNameByStatus
.
get
(
reslut
);
Project
project
=
projectServiceImpl
.
getById
(
sequenceNbr
);
JSONObject
jsonObject
=
JSON
.
parseObject
(
JSON
.
toJSONString
(
project
));
jsonObject
.
put
(
XJConstant
.
PROCESS_PROJECT_STATE
,
AuditEnum
.
符合
.
getName
());
if
(
AuditEnum
.
不符合且不需要整改
.
getStatus
().
equals
(
option
)){
jsonObject
.
put
(
XJConstant
.
PROCESS_PROJECT_STATE
,
AuditEnum
.
不符合且不需要整改
.
getName
());
projectInitiationService
.
execute
(
project
.
getInstanceId
(),
jsonObject
,
option
);
projectInitiationService
.
execute
(
project
.
getInstanceId
(),
jsonObject
,
option
);
}
else
if
(
AuditEnum
.
不符合且需要重新提交资料
.
getStatus
().
equals
(
option
)){
jsonObject
.
put
(
XJConstant
.
PROCESS_PROJECT_STATE
,
AuditEnum
.
不符合且需要重新提交资料
.
getName
());
}
projectInitiationService
.
execute
(
project
.
getInstanceId
(),
jsonObject
,
option
);
return
stringStringHashMap
.
toString
();
}
/**
* 获取流程当前任务名称
* @param instanceId
...
...
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 @
22b81128
This diff is collapsed.
Click to expand it.
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