Commit 08c5d34d authored by xixinzhao's avatar xixinzhao

fix(jyjc):检验结果问题修复

parent f73925e5
package com.yeejoin.amos.boot.module.jyjc.api.model;
import com.alibaba.excel.annotation.format.DateTimeFormat;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
......@@ -95,6 +97,8 @@ public class JyjcInspectionResultModel extends BaseModel {
private String inspectionTypeName;
@ApiModelProperty(value = "报检日期")
@JsonFormat(pattern="yyyy-MM-dd")
@DateTimeFormat("yyyy-MM-dd")
private Date applicationDate;
@ApiModelProperty("检验结果方式")
......@@ -134,4 +138,17 @@ public class JyjcInspectionResultModel extends BaseModel {
@ApiModelProperty(value = "设备品种")
private String equDefine;
@ApiModelProperty(value = "设备类别名称")
private String equListName;
@ApiModelProperty(value = "设备使用地址")
private String equUseAddress;
@ApiModelProperty(value = "检验检测单")
private String inspectionUnitName;
@ApiModelProperty(value = "报检单位")
private String applicationUnitName;
}
......@@ -9,15 +9,18 @@
res.inspection_conclusion, res.inspection_date, res.next_inspection_date, res.inspection_start_date,
res.inspection_end_date, res.inspection_result_summary, res.non_conformance, res.rectification, res.remark,
res.rec_user_id, res.rec_date, res.biz_type,res.equ_category, res.inspection_type, res.inspection_type_name,
res.application_date,use_unit_name, use_unit_credit_code, province_name, city_name, county_name, street_name,
address, equ_code, use_inner_code, ibjri.equ_list, tec1.name equ_list_name, ibjri.equ_category, tec.name
equ_category_name, use_org_code
res.application_date,use_unit_name, use_unit_credit_code, province_name, city_name, county_name, street_name, equ_code, use_inner_code, ibjri.equ_list,
tec1.name equ_list_name, ibjri.equ_category
, use_org_code, res.equ_define, ibjui.ADDRESS equUseAddress, bei.use_unit inspectionUnitName, bei1.use_unit applicationUnitName, cdb.name inspectionTypeName
from tz_jyjc_inspection_result res
left join idx_biz_jg_other_info ibjoi on res.equip_unicode = ibjoi.supervisory_code
left join idx_biz_jg_use_info ibjui on ibjui.record = ibjoi.record
-- left join idx_biz_jg_other_info ibjoi on res.equip_unicode = ibjoi.supervisory_code
left join idx_biz_jg_use_info ibjui on ibjui.record = res.equip_unicode
left join idx_biz_jg_register_info ibjri on ibjui.record = ibjri.record
left join tz_equipment_category tec on ibjri.equ_category = tec.code
left join tz_equipment_category tec1 on ibjri.equ_list = tec1.code
left join tz_base_enterprise_info bei on res.inspection_unit_code = bei.use_code
left join tz_base_enterprise_info bei1 on res.application_unit_code = bei1.use_code
left join cb_data_dictionary cdb on res.inspection_type = cdb.code
<where>
<if test="jyjcInspectionResultModel.applicationNo != '' and jyjcInspectionResultModel.applicationNo != null">
and res.application_no like concat('%',#{jyjcInspectionResultModel.applicationNo},'%')
......@@ -53,5 +56,6 @@
AND TO_DAYS(res.application_date) = TO_DAYS(#{jyjcInspectionResultModel.applicationDate})
</if>
</where>
ORDER BY application_date DESC
</select>
</mapper>
......@@ -168,6 +168,7 @@ public class JyjcInspectionResultServiceImpl extends BaseService<JyjcInspectionR
if (!CollectionUtils.isEmpty(collect)) {
resultParam.setSequenceNbr(collect.get(0).getSequenceNbr());
}
resultParam.setParamType(k);
resultParam.setResultSeq(model.getSequenceNbr());
resultParam.setParamJson(JSON.toJSONString(tableModel.get(k)));
paramList.add(resultParam);
......@@ -183,12 +184,6 @@ public class JyjcInspectionResultServiceImpl extends BaseService<JyjcInspectionR
wrapper.lambda().eq(InspectionDetectionInfo::getInspectReportNo, model.getResultNo());
List<InspectionDetectionInfo> list = inspectionDetectionInfoMapper.selectList(wrapper);
if (CollectionUtils.isEmpty(list)) {
QueryWrapper<CategoryOtherInfo> queryWrapper = new QueryWrapper<>();
queryWrapper.lambda().eq(CategoryOtherInfo::getSupervisoryCode, model.getEquipUnicode());
List<CategoryOtherInfo> otherInfos = categoryOtherInfoMapper.selectList(queryWrapper);
if (!CollectionUtils.isEmpty(otherInfos)) {
info.setRecord(otherInfos.get(0).getRecord());
}
extracted(model, info);
info.setSequenceNbr(sequence.nextId() + "");
inspectionDetectionInfoMapper.insert(info);
......@@ -203,7 +198,7 @@ public class JyjcInspectionResultServiceImpl extends BaseService<JyjcInspectionR
private void extracted(JyjcInspectionResultModel model, InspectionDetectionInfo info) {
info.setInspectType(model.getInspectionType());
info.setInspectOrgName(model.getInspectionUnitCode());
// info.setInspectReport(JSON.toJSONString(model.getResultAttachmentModelList()));
info.setRecord(model.getEquipUnicode());
info.setInspectDate(model.getInspectionDate());
info.setInspectConclusion(model.getInspectionConclusion());
info.setProblemRemark(model.getNonConformance());
......
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