Commit 25c6da54 authored by 曹盼盼's avatar 曹盼盼

修改检验失败报错

parent 2c0ca704
...@@ -15,9 +15,9 @@ import java.util.Map; ...@@ -15,9 +15,9 @@ import java.util.Map;
@AllArgsConstructor @AllArgsConstructor
public enum StageEnum { public enum StageEnum {
焊前人员("焊前确定","STAFF","人员","人员校验"), 焊前人员("人员确定","STAFF","人员","人员校验"),
焊前设备("焊前确定","EQUIPMENT","设备","设备校验"), 焊前设备("设备确定","EQUIPMENT","设备","设备校验"),
焊前管材质量("焊前确定","BEFORE-WELDING","管材","管材校验"), 焊前管材质量("管材确定","BEFORE-WELDING","管材","管材校验"),
焊接工艺("工艺确定","CRAFT","工艺","工艺校验"), 焊接工艺("工艺确定","CRAFT","工艺","工艺校验"),
管道耐压("耐压确定","VOLTAGE","耐压","耐压校验"), 管道耐压("耐压确定","VOLTAGE","耐压","耐压校验"),
敷设质量("敷设确定","LAY","敷设","敷设校验"), 敷设质量("敷设确定","LAY","敷设","敷设校验"),
......
...@@ -9,6 +9,7 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper; ...@@ -9,6 +9,7 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select; import org.apache.ibatis.annotations.Select;
import java.util.Date;
import java.util.List; import java.util.List;
/** /**
...@@ -35,6 +36,8 @@ public interface VerifyMapper extends BaseMapper<Verify> { ...@@ -35,6 +36,8 @@ public interface VerifyMapper extends BaseMapper<Verify> {
Verify selectByCode(String code,Long projectId,String stage,Long random); Verify selectByCode(String code,Long projectId,String stage,Long random);
List<CodeWeldDto> getCode(); List<CodeWeldDto> getCode();
List<Verify> getVerity(String code); List<Verify> getVerity(String code);
Verify getOnes(Long projectId , String time,String code,String manyCode);
} }
...@@ -133,7 +133,7 @@ ...@@ -133,7 +133,7 @@
stage, stage,
target_info, target_info,
`status`, `status`,
type, `type`,
submit_time, submit_time,
verify_time, verify_time,
verify_unit_id, verify_unit_id,
...@@ -145,5 +145,40 @@ ...@@ -145,5 +145,40 @@
</select> </select>
<select id="getOnes" resultType="com.yeejoin.amos.boot.module.ugp.api.entity.Verify">
select
sequence_nbr,
project_id,
code,
stage,
target_info,
status,
`type`,
submit_time,
verify_time,
verify_unit_id,
charger_person_id,
inspector_id,
rec_date,
rec_user_id,
rec_user_name,
is_delete,
task_id
from
tz_ugp_verify
where
project_id =#{projectId}
and verify_time =#{time}
<if test="code != null and code !=''">
and target_info -> "$.code" =#{code}
</if>
<if test="manyCode != null and manyCode !=''">
and target_info -> "$.code" =#{manyCode}
</if>
</select>
</mapper> </mapper>
...@@ -37,6 +37,11 @@ ...@@ -37,6 +37,11 @@
<artifactId>ugp-welding-evaluation-inspection-sdk</artifactId> <artifactId>ugp-welding-evaluation-inspection-sdk</artifactId>
<version>1.0.1</version> <version>1.0.1</version>
</dependency> </dependency>
<dependency>
<groupId>org.drools</groupId>
<artifactId>drools-compiler</artifactId>
<version>7.10.0.Final</version>
</dependency>
<!--调用python的依赖--> <!--调用python的依赖-->
<dependency> <dependency>
<groupId>org.python</groupId> <groupId>org.python</groupId>
...@@ -44,8 +49,6 @@ ...@@ -44,8 +49,6 @@
<version>2.7.0</version> <version>2.7.0</version>
</dependency> </dependency>
</dependencies> </dependencies>
<build> <build>
<plugins> <plugins>
......
...@@ -4,6 +4,9 @@ import com.alibaba.fastjson.JSONArray; ...@@ -4,6 +4,9 @@ import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject; import com.alibaba.fastjson.JSONObject;
import com.alibaba.fastjson.serializer.SerializerFeature; import com.alibaba.fastjson.serializer.SerializerFeature;
import com.google.common.collect.Lists; import com.google.common.collect.Lists;
import com.mao.expertSystem.WeldingQualification;
import com.mao.expertSystem.material.MyPqr;
import com.mao.expertSystem.material.MyWps;
import com.sun.org.apache.bcel.internal.generic.NEW; import com.sun.org.apache.bcel.internal.generic.NEW;
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.dto.*; import com.yeejoin.amos.boot.module.ugp.api.dto.*;
...@@ -477,6 +480,27 @@ public class VerifyController extends BaseController { ...@@ -477,6 +480,27 @@ public class VerifyController extends BaseController {
return ResponseHelper.buildResponse(verifyServiceImpl.fixedPopovers(code)); return ResponseHelper.buildResponse(verifyServiceImpl.fixedPopovers(code));
} }
@TycloudOperation(ApiLevel = UserType.AGENCY)
@ApiOperation(httpMethod = "GET", value = "测试", notes = "测试")
@GetMapping(value = "/test")
public ResponseModel<HashMap<String, String>> test() {
MyPqr pqr = new MyPqr();
pqr.setMaterial_a_class("Fe-3");
pqr.setMaterial_b_class("Fe-1");
MyWps wps = new MyWps();
wps.setMaterial_a_class("Fe-3");
wps.setMaterial_b_class("Fe-1");
WeldingQualification weldingQualification = new WeldingQualification();
HashMap<String, String> hashMap = weldingQualification.equipmentWeldingQualification(pqr, wps);
System.out.println(hashMap);
return ResponseHelper.buildResponse(hashMap);
}
} }
......
...@@ -255,6 +255,7 @@ public class VerifyServiceImpl extends BaseService<VerifyDto,Verify,VerifyMapper ...@@ -255,6 +255,7 @@ public class VerifyServiceImpl extends BaseService<VerifyDto,Verify,VerifyMapper
//人员 //人员
if (stage.equals(StageEnum.焊前人员.getVerifyName())) { if (stage.equals(StageEnum.焊前人员.getVerifyName())) {
verify.setStage(StageEnum.焊前人员.getStage()); //阶段 verify.setStage(StageEnum.焊前人员.getStage()); //阶段
verify.setCode(jsonObject.getString("code"));
//人脸 //人脸
//1.人脸识别校验 //1.人脸识别校验
//2.焊工资质有效期判断,查询焊工信息获取 //2.焊工资质有效期判断,查询焊工信息获取
...@@ -301,9 +302,8 @@ public class VerifyServiceImpl extends BaseService<VerifyDto,Verify,VerifyMapper ...@@ -301,9 +302,8 @@ public class VerifyServiceImpl extends BaseService<VerifyDto,Verify,VerifyMapper
} }
//管材 //管材
if (stage.equals(StageEnum.焊前管材质量.getVerifyName())){ if (stage.equals(StageEnum.焊前管材质量.getVerifyName())){
verify.setCode(jsonObject.getString("code"));
//从图片中获取管材编号materialId //从图片中获取管材编号materialId
//管材编号(暂时写死) //管材编号(暂时写死)
String materialCode = "1585520415743176365"; String materialCode = "1585520415743176365";
verify.setStage(StageEnum.焊前管材质量.getStage()); verify.setStage(StageEnum.焊前管材质量.getStage());
...@@ -340,6 +340,7 @@ public class VerifyServiceImpl extends BaseService<VerifyDto,Verify,VerifyMapper ...@@ -340,6 +340,7 @@ public class VerifyServiceImpl extends BaseService<VerifyDto,Verify,VerifyMapper
} }
//设备 //设备
if (stage.equals(StageEnum.焊前设备.getVerifyName())){ if (stage.equals(StageEnum.焊前设备.getVerifyName())){
verify.setCode(jsonObject.getString("code"));
verify.setStage(StageEnum.焊前设备.getStage()); verify.setStage(StageEnum.焊前设备.getStage());
Long weldingId = jsonObject.getLong("weldingId"); Long weldingId = jsonObject.getLong("weldingId");
Boolean flag =false ; Boolean flag =false ;
...@@ -650,11 +651,13 @@ public class VerifyServiceImpl extends BaseService<VerifyDto,Verify,VerifyMapper ...@@ -650,11 +651,13 @@ public class VerifyServiceImpl extends BaseService<VerifyDto,Verify,VerifyMapper
qualityProblem.setGenerateStage(stage); qualityProblem.setGenerateStage(stage);
qualityProblem.setProblemDescribe(stage+"不通过"); qualityProblem.setProblemDescribe(stage+"不通过");
//获取智能监检表id(项目id和检验时间) //获取智能监检表id(项目id和检验时间)
LambdaQueryWrapper<Verify> wrapper = new LambdaQueryWrapper<>(); Verify verify2=null;
wrapper.eq(Verify::getVerifyTime,verify.getVerifyTime()) if (ValidationUtil.isEmpty(jsonObject.getString("manyCode"))) {
.eq(Verify::getProjectId,verify.getProjectId()); verify2 = verifyMapper.getOnes(verify.getProjectId(), verify.getVerifyTime().toLocaleString(), jsonObject.getString("code"), null);
Verify verify1 = verifyMapper.selectOne(wrapper); } else {
Long sequenceNbr = verify1.getSequenceNbr( ); verify2 = verifyMapper.getOnes(verify.getProjectId(), verify.getVerifyTime().toLocaleString(), null, jsonObject.getString("manyCode"));
}
Long sequenceNbr = verify2.getSequenceNbr( );
qualityProblem.setStageVerifyId(sequenceNbr); qualityProblem.setStageVerifyId(sequenceNbr);
qualityProblemService.save(qualityProblem); qualityProblemService.save(qualityProblem);
problemInitiationService.start(qualityProblem); problemInitiationService.start(qualityProblem);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment