Commit a87a0278 authored by yangyang's avatar yangyang

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

parents aa629d39 50cafbfc
......@@ -16,7 +16,8 @@
isn.province_name AS provinceName,
isn.city_name AS cityName,
isn.county_name AS countyName,
isn.instance_id AS instanceId
isn.instance_id AS instanceId,
isn.notice_report_url AS noticeReportUrl
FROM
tzs_jg_installation_notice isn
<where>
......@@ -61,10 +62,10 @@
isn.install_leader_name AS installLeaderName,
isn.install_leader_phone AS installLeaderPhone,
isn.use_unit_name AS useUnitName,
isn.equ_register_code AS equRegisterCode,
ri.equ_list AS equList,
ri.equ_category AS equCategory,
ri.EQU_DEFINE AS equDefine,
-- 产品编号
ri.product_name AS productName,
ri.brand_name AS brandName,
ri.equ_type AS equType,
......@@ -89,7 +90,13 @@
fi.produce_country AS produceCountry,
fi.factory_standard AS factoryStandard,
fi.product_quality_yield_prove AS productQualityYieldProve,
fi.ins_use_maintain_explain AS insUseMaintainExplain
fi.ins_use_maintain_explain AS insUseMaintainExplain,
ui.safety_manager AS safetyManager,
ui.phone AS safetyManagerPhone,
ui.PROVINCE_NAME AS useUnitProvinceName,
ui.CITY_NAME AS useUnitCityName,
ui.COUNTY_NAME AS useUnitCountyName,
ui.ADDRESS AS useUnitAddress
FROM
tzs_jg_installation_notice isn
LEFT JOIN tzs_jg_relation_equip re ON re.business_id = isn.sequence_nbr
......@@ -97,7 +104,9 @@
LEFT JOIN idx_biz_jg_design_info di ON di.record = re.equip_id
LEFT JOIN idx_biz_jg_factory_info fi ON fi.record = re.equip_id
LEFT JOIN idx_biz_jg_inspection_detection_info idi ON idi.record = re.equip_id
LEFT JOIN idx_biz_jg_use_info ui ON ui.record = re.equip_id
WHERE
isn.sequence_nbr = #{sequenceNbr}
LIMIT 1
</select>
</mapper>
......@@ -310,7 +310,7 @@ public class JgInstallationNoticeServiceImpl extends BaseService<JgInstallationN
placeholders.put("applyNo", getValue.apply("applyNo"));
placeholders.put("productName", getValue.apply("productName"));
placeholders.put("equipType", getValue.apply("equType"));
placeholders.put("equipCode", getValue.apply("equipCode")); // TODO: 设备代码
placeholders.put("equipCode", getValue.apply("equRegisterCode"));
placeholders.put("produceCode", getValue.apply("produceCode")); // TODO: 制造编号
placeholders.put("produceUnitName", getValue.apply("produceUnitName"));
placeholders.put("produceLicenseNum", getValue.apply("produceLicenseNum"));
......@@ -321,11 +321,11 @@ public class JgInstallationNoticeServiceImpl extends BaseService<JgInstallationN
placeholders.put("installLicenseExpirationDate", getValue.apply("installLicenseExpirationDate"));
placeholders.put("installLeaderName", getValue.apply("installLeaderName"));
placeholders.put("installLeaderPhone", getValue.apply("installLeaderPhone"));
placeholders.put("installUnitAddress", getValue.apply("useUnitName")); // TODO: 施工单位地址
placeholders.put("installUnitAddress", getValue.apply("installUnitAddress")); // TODO: 施工单位地址
placeholders.put("useUnitName", getValue.apply("useUnitName"));
placeholders.put("useUnitLeaderName", getValue.apply("useUnitLeaderName")); // TODO: 使用单位联系人
placeholders.put("useUnitLeaderPhone", getValue.apply("useUnitLeaderPhone")); // TODO: 使用单位联系人电话
placeholders.put("useUnitLeaderAddress", getValue.apply("useUnitLeaderAddress")); // TODO: 使用单位联系人地址
placeholders.put("useUnitLeaderName", getValue.apply("safetyManager"));
placeholders.put("useUnitLeaderPhone", getValue.apply("safetyManagerPhone"));
placeholders.put("useUnitLeaderAddress", getValue.apply("useUnitProvinceName") + getValue.apply("useUnitCityName") + getValue.apply("useUnitCountyName") + getValue.apply("useUnitAddress"));
// 生成二维码
String qrCode = ImageUtils.generateQRCode(getValue.apply("applyNo"), 300, 300);
placeholders.put("qrCode", qrCode);
......
......@@ -66,7 +66,6 @@ public class WordTemplateUtils {
// 获取模板, 生成Word文档
Template freemarkerTemplate = configuration.getTemplate(templatePath, "UTF-8");
map = new HashMap<>(map);
File docFile = createDoc(templatePath, map, freemarkerTemplate);
// 转换Word文档
......
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