Commit 3e406a6a authored by 李秀明's avatar 李秀明

Merge remote-tracking branch 'origin/develop_tzs_register' into develop_tzs_register

parents 3a994dfe 06293619
package com.yeejoin.amos.boot.module.jyjc.api.enums;
public enum AttachmentTypeEnum {
SPECIAL_EQUIPMENT_REPORT("特种设备检验报告","1"),
INSPECTION_CERTIFICATE("监检证书","2");
private String name;
private String code;
public String getName() {
return name;
}
AttachmentTypeEnum(String name, String code) {
this.name = name;
this.code = code;
}
public void setName(String name) {
this.name = name;
}
public String getCode() {
return code;
}
public void setCode(String code) {
this.code = code;
}
}
......@@ -7,6 +7,8 @@ import lombok.EqualsAndHashCode;
import org.typroject.tyboot.core.rdbms.model.BaseModel;
import java.util.Date;
import java.util.List;
import java.util.Map;
/**
* 业务开通申请表
......@@ -124,8 +126,11 @@ public class JyjcInspectionResultModel extends BaseModel {
private String useUnitCreditCode;
@ApiModelProperty(value = "检验结果技术参数")
private JyjcInspectionResultParamModel resultParamModel;
private Map<String,Object> resultParamModelMap;
@ApiModelProperty(value = "检验结果附件")
private JyjcInspectionResultAttachmentModel resultAttachmentModel;
private List<Map<String,Object>> resultAttachmentModelList;
@ApiModelProperty(value = "附件类型(特种设备检验报告:1,监检证书:2)")
private String attachmentType;
}
......@@ -144,9 +144,8 @@ public class JyjcInspectionResultController extends BaseController {
@TycloudOperation(ApiLevel = UserType.AGENCY)
@PutMapping(value = "/updateResult")
@ApiOperation(httpMethod = "PUT", value = "检验结果-上传结果和编辑结果", notes = "检验结果-上传结果和编辑结果")
public ResponseModel<JyjcInspectionResultModel> updateJyjcInspectionResult(@RequestBody Map<String, JyjcInspectionResultModel> model) {
JyjcInspectionResultModel inspectResult = model.get("inspectResult");
return ResponseHelper.buildResponse(jyjcInspectionResultServiceImpl.updateJyjcInspectionResult(inspectResult));
public ResponseModel<JyjcInspectionResultModel> updateJyjcInspectionResult(@RequestBody JyjcInspectionResultModel model) {
return ResponseHelper.buildResponse(jyjcInspectionResultServiceImpl.updateJyjcInspectionResult(model));
}
/**
......
package com.yeejoin.amos.boot.module.jyjc.biz.service.impl;
import cn.hutool.core.bean.BeanUtil;
import cn.hutool.core.util.ObjectUtil;
import com.alibaba.fastjson.JSON;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.yeejoin.amos.boot.biz.common.bo.ReginParams;
......@@ -20,18 +19,15 @@ import com.yeejoin.amos.boot.module.jyjc.biz.utils.JsonUtils;
import com.yeejoin.amos.boot.module.ymt.api.enums.EquipmentClassifityEnum;
import com.yeejoin.amos.boot.module.ymt.api.mapper.EquipmentCategoryMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.core.io.Resource;
import org.springframework.stereotype.Service;
import org.springframework.util.CollectionUtils;
import org.springframework.util.ObjectUtils;
import org.typroject.tyboot.core.foundation.context.RequestContext;
import org.typroject.tyboot.core.foundation.utils.ValidationUtil;
import org.typroject.tyboot.core.rdbms.service.BaseService;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.*;
import java.util.stream.Collectors;
......@@ -95,10 +91,19 @@ public class JyjcInspectionResultServiceImpl extends BaseService<JyjcInspectionR
public JyjcInspectionResultModel updateJyjcInspectionResult(JyjcInspectionResultModel model) {
updateWithModel(model);
if (ObjectUtil.isNotEmpty(model.getResultAttachmentModel()))
attachmentService.createWithModel(model.getResultAttachmentModel());
if (ObjectUtil.isNotEmpty(model.getResultParamModel()))
resultParamService.createWithModel(model.getResultParamModel());
if (!CollectionUtils.isEmpty(model.getResultAttachmentModelList())){
JyjcInspectionResultAttachment attachment = new JyjcInspectionResultAttachment();
attachment.setResultSeq(model.getSequenceNbr());
attachment.setAttachmentUrl(JSON.toJSONString(model.getResultAttachmentModelList()));
attachment.setAttachmentType(model.getAttachmentType());
attachmentService.save(attachment);
}
if (!CollectionUtils.isEmpty(model.getResultParamModelMap())){
JyjcInspectionResultParam resultParam = new JyjcInspectionResultParam();
resultParam.setResultSeq(model.getSequenceNbr());
resultParam.setParamJson(JSON.toJSONString(model.getResultParamModelMap()));
resultParamService.save(resultParam);
}
return model;
}
......
......@@ -65,7 +65,12 @@
USE_PLACE,
ADDRESS,
EQU_STATE,
STATUS
STATUS,
USE_INNER_CODE,
FACTORY_NUM,
PRODUCE_UNIT_NAME,
INSPECT_REPORT,
NEXT_INSPECT_DATE
from idx_biz_view_jg_all
WHERE SEQUENCE_NBR = #{id}
</select>
......
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