Commit 1dc176bf authored by lisong's avatar lisong

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

parents 966cebfb c9b389a2
......@@ -8,6 +8,8 @@ import com.yeejoin.amos.boot.module.common.biz.utils.CommonResponseUtil;
import com.yeejoin.amos.boot.module.jg.api.dto.JgTransferNoticeDto;
import com.yeejoin.amos.boot.module.jg.api.entity.JgTransferNotice;
import com.yeejoin.amos.boot.module.jg.api.service.IJgTransferNoticeService;
import com.yeejoin.amos.boot.module.jg.biz.service.ICommonService;
import com.yeejoin.amos.boot.module.jg.biz.utils.ImageUtils;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
......@@ -19,10 +21,7 @@ import org.typroject.tyboot.core.restful.utils.ResponseHelper;
import org.typroject.tyboot.core.restful.utils.ResponseModel;
import javax.servlet.http.HttpServletRequest;
import java.util.LinkedHashMap;
import java.util.List;
import java.util.Map;
import java.util.Objects;
import java.util.*;
/**
* 移装造告知
......@@ -38,6 +37,9 @@ public class JgTransferNoticeController extends BaseController {
@Autowired
private IJgTransferNoticeService jgTransferNoticeService;
@Autowired
private ICommonService commonService;
/**
* 新增移装造告知
*
......@@ -158,6 +160,24 @@ public class JgTransferNoticeController extends BaseController {
@ApiOperation(httpMethod = "GET", value = "特种设备登记证导出", notes = "特种设备登记证导出")
@GetMapping(value = "/certificate/report")
public ResponseModel<String> generateCertificateReport() {
return ResponseHelper.buildResponse("");
Map<String, Object> map = new HashMap<>();
// 组装模板变量
map.put("useRegistrationCode", "20231225123"); // 编号
map.put("useUnitName", "西安市高科物业服务有限公司"); // 使用单位名称
map.put("fullAddress", "西安市曲江新区春临东街南湖意境1单元2号楼"); // 设备使用地点
map.put("equList", "电梯"); // 设备种类
map.put("equipDefine", "曳引驱动乘客电梯"); // 设备品种
map.put("equipCode", ""); // 设备代码
map.put("equipCategory", "曳引电梯"); // 设备类别
map.put("useInnerCode", "KY-9527"); // 单位内编号
map.put("factoryNum", "G60001"); // 产品编号
map.put("receiveOrgName", "西安市曲江新区质检院"); // 登记机关
map.put("giveOutYear", "2023"); // 发证日期-年
map.put("giveOutMonth", "12"); // 发证日期-月
map.put("giveOutDay", "26"); // 发证日期-日
// 生成二维码
String qrCode = ImageUtils.generateQRCode("YZGZ20231225001", 70, 65);
map.put("supervisoryCode", qrCode); // 监管二维码
return ResponseHelper.buildResponse(commonService.generateCertificateReport(map));
}
}
......@@ -291,21 +291,21 @@ public class CommonServiceImpl implements ICommonService {
throw new IllegalArgumentException("参数不能为空");
}
// 组装模板变量
map.put("useRegistrationCode", "20231225123"); // 编号
map.put("useUnitName", "西安市高科物业服务有限公司"); // 使用单位名称
map.put("fullAddress", "西安市曲江新区春临东街南湖意境1单元2号楼"); // 设备使用地点
map.put("equList", "电梯"); // 设备种类
map.put("equipDefine", "曳引驱动乘客电梯"); // 设备品种
map.put("equipCode", ""); // 设备代码
map.put("equipCategory", "曳引电梯"); // 设备类别
map.put("useInnerCode", "KY-9527"); // 单位内编号
map.put("factoryNum", "G60001"); // 产品编号
map.put("receiveOrgName", "西安市曲江新区质检院"); // 登记机关
map.put("giveOutYear", "2023"); // 发证日期-年
map.put("giveOutMonth", "12"); // 发证日期-月
map.put("giveOutDay", "26"); // 发证日期-日
map.put("useRegistrationCode", map.getOrDefault("useRegistrationCode", "").toString()); // 编号
map.put("useUnitName", map.getOrDefault("useUnitName", "").toString()); // 使用单位名称
map.put("fullAddress", map.getOrDefault("fullAddress", "").toString()); // 设备使用地点
map.put("equList", map.getOrDefault("equList", "").toString()); // 设备种类
map.put("equipDefine", map.getOrDefault("equipDefine", "").toString()); // 设备品种
map.put("equipCode", map.getOrDefault("equipCode", "").toString()); // 设备代码
map.put("equipCategory", map.getOrDefault("equipCategory", "").toString()); // 设备类别
map.put("useInnerCode", map.getOrDefault("useInnerCode", "").toString()); // 单位内编号
map.put("factoryNum", map.getOrDefault("factoryNum", "").toString()); // 产品编号
map.put("receiveOrgName", map.getOrDefault("receiveOrgName", "").toString()); // 登记机关
map.put("giveOutYear", map.getOrDefault("giveOutYear", "").toString()); // 发证日期-年
map.put("giveOutMonth", map.getOrDefault("giveOutMonth", "").toString()); // 发证日期-月
map.put("giveOutDay", map.getOrDefault("giveOutDay", "").toString()); // 发证日期-日
// 生成二维码
String qrCode = ImageUtils.generateQRCode("YZGZ20231225001", 70, 65);
String qrCode = ImageUtils.generateQRCode(map.getOrDefault("supervisoryCode", "").toString(), 70, 65);
map.put("supervisoryCode", qrCode); // 监管二维码
// word转pdf
......
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