Commit 7fd0b222 authored by 韩桐桐's avatar 韩桐桐

使用登记证添加补证日期

parent 2147749d
...@@ -6,6 +6,7 @@ import com.fasterxml.jackson.annotation.JsonFormat; ...@@ -6,6 +6,7 @@ import com.fasterxml.jackson.annotation.JsonFormat;
import com.yeejoin.amos.boot.biz.common.entity.BaseEntity; import com.yeejoin.amos.boot.biz.common.entity.BaseEntity;
import lombok.*; import lombok.*;
import lombok.experimental.Accessors; import lombok.experimental.Accessors;
import org.springframework.format.annotation.DateTimeFormat;
import java.util.Date; import java.util.Date;
...@@ -133,6 +134,7 @@ public class JgCertificateReplenish extends BaseEntity { ...@@ -133,6 +134,7 @@ public class JgCertificateReplenish extends BaseEntity {
*/ */
@TableField("loss_damage_time") @TableField("loss_damage_time")
@JsonFormat(pattern = "yyyy-MM-dd") @JsonFormat(pattern = "yyyy-MM-dd")
@DateTimeFormat(pattern = "yyyy-MM-dd")
private Date lossDamageTime; private Date lossDamageTime;
/** /**
...@@ -182,6 +184,7 @@ public class JgCertificateReplenish extends BaseEntity { ...@@ -182,6 +184,7 @@ public class JgCertificateReplenish extends BaseEntity {
*/ */
@TableField("accept_date") @TableField("accept_date")
@JsonFormat(pattern = "yyyy-MM-dd") @JsonFormat(pattern = "yyyy-MM-dd")
@DateTimeFormat(pattern = "yyyy-MM-dd")
private Date acceptDate; private Date acceptDate;
/** /**
...@@ -189,6 +192,7 @@ public class JgCertificateReplenish extends BaseEntity { ...@@ -189,6 +192,7 @@ public class JgCertificateReplenish extends BaseEntity {
*/ */
@TableField("reissue_date") @TableField("reissue_date")
@JsonFormat(pattern = "yyyy-MM-dd") @JsonFormat(pattern = "yyyy-MM-dd")
@DateTimeFormat(pattern = "yyyy-MM-dd")
private Date reissueDate; private Date reissueDate;
/** /**
......
...@@ -979,6 +979,9 @@ public class CommonServiceImpl implements ICommonService { ...@@ -979,6 +979,9 @@ public class CommonServiceImpl implements ICommonService {
map.put("giveOutYear", Optional.ofNullable(map.get("giveOutYear")).orElse("").toString()); // 发证日期-年 map.put("giveOutYear", Optional.ofNullable(map.get("giveOutYear")).orElse("").toString()); // 发证日期-年
map.put("giveOutMonth", Optional.ofNullable(map.get("giveOutMonth")).orElse("").toString()); // 发证日期-月 map.put("giveOutMonth", Optional.ofNullable(map.get("giveOutMonth")).orElse("").toString()); // 发证日期-月
map.put("giveOutDay", Optional.ofNullable(map.get("giveOutDay")).orElse("").toString()); // 发证日期-日 map.put("giveOutDay", Optional.ofNullable(map.get("giveOutDay")).orElse("").toString()); // 发证日期-日
map.put("reissueDateYear", Optional.ofNullable(map.get("reissueDateYear")).orElse("").toString()); // 发证日期-年
map.put("reissueDateMonth", Optional.ofNullable(map.get("reissueDateMonth")).orElse("").toString()); // 发证日期-月
map.put("reissueDateDay", Optional.ofNullable(map.get("reissueDateDay")).orElse("").toString()); // 发证日期-日
map.put("excelType", Optional.ofNullable(map.get("excelType")).orElse("使用登记").toString()); // 发证日期-日 map.put("excelType", Optional.ofNullable(map.get("excelType")).orElse("使用登记").toString()); // 发证日期-日
map.put("tableName", Optional.ofNullable(map.get("tableName")).orElse("特种设备使用登记证").toString()); // 发证日期-日 map.put("tableName", Optional.ofNullable(map.get("tableName")).orElse("特种设备使用登记证").toString()); // 发证日期-日
map.put("carNumber", Optional.ofNullable(map.get("carNumber")).orElse("").toString()); // 车牌号 map.put("carNumber", Optional.ofNullable(map.get("carNumber")).orElse("").toString()); // 车牌号
......
...@@ -65,6 +65,8 @@ import javax.annotation.PostConstruct; ...@@ -65,6 +65,8 @@ import javax.annotation.PostConstruct;
import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpServletResponse;
import java.io.File; import java.io.File;
import java.nio.file.Files; import java.nio.file.Files;
import java.time.LocalDate;
import java.time.ZoneId;
import java.util.*; import java.util.*;
import java.util.concurrent.TimeUnit; import java.util.concurrent.TimeUnit;
import java.util.function.Function; import java.util.function.Function;
...@@ -366,6 +368,7 @@ public class JgCertificateReplenishServiceImpl extends BaseService<JgCertificate ...@@ -366,6 +368,7 @@ public class JgCertificateReplenishServiceImpl extends BaseService<JgCertificate
this.setEquClassification(certRep); this.setEquClassification(certRep);
certRep.setApplyNo(dto.getApplyNo()); certRep.setApplyNo(dto.getApplyNo());
certRep.setApplyDate(date); certRep.setApplyDate(date);
certRep.setLossDamageTime(dto.getLossDamageTime());
certRep.setInstanceId(workflowResultDto.getInstanceId()); certRep.setInstanceId(workflowResultDto.getInstanceId());
certRep.setNextTaskId(workflowResultDto.getNextTaskId()); certRep.setNextTaskId(workflowResultDto.getNextTaskId());
certRep.setPromoter(RequestContext.getExeUserId()); certRep.setPromoter(RequestContext.getExeUserId());
...@@ -472,6 +475,8 @@ public class JgCertificateReplenishServiceImpl extends BaseService<JgCertificate ...@@ -472,6 +475,8 @@ public class JgCertificateReplenishServiceImpl extends BaseService<JgCertificate
} }
public Object approved(JSONObject jsonObj) { public Object approved(JSONObject jsonObj) {
// 获取当前日期(不包含时间)
LocalDate today = LocalDate.now();
JgCertificateReplenish certRep = this.baseMapper.selectById(Objects.toString(jsonObj.get("sequenceNbr"))); JgCertificateReplenish certRep = this.baseMapper.selectById(Objects.toString(jsonObj.get("sequenceNbr")));
certRep.setProcessAdvice(jsonObj.getString(PROCESS_ADVICE)); certRep.setProcessAdvice(jsonObj.getString(PROCESS_ADVICE));
TaskResultDTO workDto = new TaskResultDTO(); TaskResultDTO workDto = new TaskResultDTO();
...@@ -510,8 +515,8 @@ public class JgCertificateReplenishServiceImpl extends BaseService<JgCertificate ...@@ -510,8 +515,8 @@ public class JgCertificateReplenishServiceImpl extends BaseService<JgCertificate
this.createNewTodo(certRep, workflowResultDto, taskV2Model, FlowStatusEnum.TO_BE_PROCESSED); this.createNewTodo(certRep, workflowResultDto, taskV2Model, FlowStatusEnum.TO_BE_PROCESSED);
} }
certRep.setNextTaskId(""); certRep.setNextTaskId("");
certRep.setAcceptDate(new Date()); certRep.setAcceptDate(Date.from(today.atStartOfDay(ZoneId.systemDefault()).toInstant()));
certRep.setReissueDate(new Date()); certRep.setReissueDate(Date.from(today.atStartOfDay(ZoneId.systemDefault()).toInstant()));
this.updateManageWithPass(certRep); this.updateManageWithPass(certRep);
this.saveManageRecord(certRep); this.saveManageRecord(certRep);
return this.updateById(certRep) ? certRep : null; return this.updateById(certRep) ? certRep : null;
...@@ -610,6 +615,7 @@ public class JgCertificateReplenishServiceImpl extends BaseService<JgCertificate ...@@ -610,6 +615,7 @@ public class JgCertificateReplenishServiceImpl extends BaseService<JgCertificate
BeanUtil.copyProperties(certRep, taskMessageDto); BeanUtil.copyProperties(certRep, taskMessageDto);
return TaskModelDto.builder() return TaskModelDto.builder()
.flowCreateDate(certRep.getCreateDate()) .flowCreateDate(certRep.getCreateDate())
.startUserId(certRep.getCreateUserId())
.taskName(workflowResultDto.getNextTaskName()) .taskName(workflowResultDto.getNextTaskName())
.taskCode(certRep.getApplyNo()) .taskCode(certRep.getApplyNo())
.taskType(BusinessTypeEnum.JG_REPLACEMENT_REGISTRATION.getCode()) .taskType(BusinessTypeEnum.JG_REPLACEMENT_REGISTRATION.getCode())
...@@ -657,6 +663,7 @@ public class JgCertificateReplenishServiceImpl extends BaseService<JgCertificate ...@@ -657,6 +663,7 @@ public class JgCertificateReplenishServiceImpl extends BaseService<JgCertificate
.eq(!ValidationUtil.isEmpty(dto.getApplicationReason()), JgCertificateReplenish::getApplicationReason, dto.getApplicationReason()) .eq(!ValidationUtil.isEmpty(dto.getApplicationReason()), JgCertificateReplenish::getApplicationReason, dto.getApplicationReason())
.eq(!ValidationUtil.isEmpty(dto.getLossDamageTime()), JgCertificateReplenish::getLossDamageTime, dto.getLossDamageTime()) .eq(!ValidationUtil.isEmpty(dto.getLossDamageTime()), JgCertificateReplenish::getLossDamageTime, dto.getLossDamageTime())
.eq(!ValidationUtil.isEmpty(dto.getAcceptDate()), JgCertificateReplenish::getAcceptDate, dto.getAcceptDate()) .eq(!ValidationUtil.isEmpty(dto.getAcceptDate()), JgCertificateReplenish::getAcceptDate, dto.getAcceptDate())
.orderByDesc(JgCertificateReplenish::getCreateDate)
.page(page); .page(page);
result.setRecords(replenishIPage.getRecords().stream().peek(item -> { result.setRecords(replenishIPage.getRecords().stream().peek(item -> {
item.setApplyStatusDes(FlowStatusEnum.getNameByType(Long.parseLong(item.getApplyStatus()))); item.setApplyStatusDes(FlowStatusEnum.getNameByType(Long.parseLong(item.getApplyStatus())));
......
...@@ -77,6 +77,7 @@ import java.util.stream.Stream; ...@@ -77,6 +77,7 @@ import java.util.stream.Stream;
import static com.alibaba.fastjson.JSON.parseArray; import static com.alibaba.fastjson.JSON.parseArray;
import static com.yeejoin.amos.boot.module.jg.biz.service.impl.CommonServiceImpl.isValidCreditCode; import static com.yeejoin.amos.boot.module.jg.biz.service.impl.CommonServiceImpl.isValidCreditCode;
import static com.yeejoin.amos.boot.module.jg.biz.service.impl.JgUseRegistrationServiceImpl.getAuditPassedDate; import static com.yeejoin.amos.boot.module.jg.biz.service.impl.JgUseRegistrationServiceImpl.getAuditPassedDate;
import static com.yeejoin.amos.boot.module.jg.biz.service.impl.JgUseRegistrationServiceImpl.getReissueDate;
/** /**
* 服务实现类 * 服务实现类
...@@ -632,6 +633,7 @@ public class JgUseRegistrationManageServiceImpl extends BaseService<JgUseRegistr ...@@ -632,6 +633,7 @@ public class JgUseRegistrationManageServiceImpl extends BaseService<JgUseRegistr
} }
exportParamsMap.put("supervisoryCode", deviceList.get(0).get("SUPERVISORY_CODE")); exportParamsMap.put("supervisoryCode", deviceList.get(0).get("SUPERVISORY_CODE"));
getAuditPassedDate(manage.getAuditPassDate(), exportParamsMap); getAuditPassedDate(manage.getAuditPassDate(), exportParamsMap);
getReissueDate(manage.getReissueDate(), exportParamsMap);
exportParamsMap.put("equList", manage.getEquList()); exportParamsMap.put("equList", manage.getEquList());
exportParamsMap.put("equCategory", manage.getEquCategory()); exportParamsMap.put("equCategory", manage.getEquCategory());
exportParamsMap.put("equDefine", manage.getEquDefine()); exportParamsMap.put("equDefine", manage.getEquDefine());
......
...@@ -256,6 +256,15 @@ public class JgUseRegistrationServiceImpl extends BaseService<JgUseRegistrationD ...@@ -256,6 +256,15 @@ public class JgUseRegistrationServiceImpl extends BaseService<JgUseRegistrationD
exportParamsMap.put("giveOutDay", today.getDayOfMonth()); exportParamsMap.put("giveOutDay", today.getDayOfMonth());
} }
static void getReissueDate(Date reissueDate, Map<String, Object> exportParamsMap) {
if (!ValidationUtil.isEmpty(reissueDate)) {
LocalDate date = reissueDate.toInstant().atZone(ZoneId.systemDefault()).toLocalDate();
exportParamsMap.put("reissueDateYear", date.getYear());
exportParamsMap.put("reissueDateMonth", date.getMonthValue());
exportParamsMap.put("reissueDateDay", date.getDayOfMonth());
}
}
private static void toZipFile(HttpServletResponse response, List<CompletableFuture<byte[]>> futures, String filePrefix, String customFileName) { private static void toZipFile(HttpServletResponse response, List<CompletableFuture<byte[]>> futures, String filePrefix, String customFileName) {
// 打包zip // 打包zip
try (ByteArrayOutputStream outputStream = new ByteArrayOutputStream(); try (ByteArrayOutputStream outputStream = new ByteArrayOutputStream();
......
...@@ -492,7 +492,9 @@ ...@@ -492,7 +492,9 @@
</v:textbox> </v:textbox>
</v:shape> </v:shape>
<#elseif printingType == 2> <#elseif printingType == 2>
<v:shape id="_x0000_s1026" o:spt="202" type="#_x0000_t202" style="position:absolute;left:0pt;margin-left:313pt;margin-top:633.9pt;height:37.45pt;width:215.9pt;z-index:269484032;mso-width-relative:page;mso-height-relative:page;" fillcolor="#FFFFFF" filled="t" stroked="f" coordsize="21600,21600"> <v:shape id="_x0000_s1026" o:spt="202" type="#_x0000_t202"
style="position:absolute;left:0pt;margin-left:313pt;margin-top:611.75pt;height:37.45pt;width:215.9pt;z-index:269484032;mso-width-relative:page;mso-height-relative:page;"
fillcolor="#FFFFFF" filled="t" stroked="f" coordsize="21600,21600">
<v:path/> <v:path/>
<v:fill on="t" color2="#FFFFFF" focussize="0,0"/> <v:fill on="t" color2="#FFFFFF" focussize="0,0"/>
<v:stroke on="f" weight="0.5pt"/> <v:stroke on="f" weight="0.5pt"/>
...@@ -542,7 +544,9 @@ ...@@ -542,7 +544,9 @@
<w:sz w:val="24"/> <w:sz w:val="24"/>
</w:rPr> </w:rPr>
<w:pict> <w:pict>
<v:shape id="文本框 14" o:spid="_x0000_s1027" o:spt="202" type="#_x0000_t202" style="position:absolute;left:0pt;margin-left:205.05pt;margin-top:675.65pt;height:30.25pt;width:320.7pt;z-index:251664384;mso-width-relative:page;mso-height-relative:page;" fillcolor="#FFFFFF" filled="t" stroked="f" coordsize="21600,21600"> <v:shape id="文本框 14" o:spid="_x0000_s1027" o:spt="202" type="#_x0000_t202"
style="position:absolute;left:0pt;margin-left:205.05pt;margin-top:645.65pt;height:30.25pt;width:320.7pt;z-index:251664384;mso-width-relative:page;mso-height-relative:page;"
fillcolor="#FFFFFF" filled="t" stroked="f" coordsize="21600,21600">
<v:path/> <v:path/>
<v:fill on="t" color2="#FFFFFF" focussize="0,0"/> <v:fill on="t" color2="#FFFFFF" focussize="0,0"/>
<v:stroke on="f" weight="0.5pt"/> <v:stroke on="f" weight="0.5pt"/>
...@@ -663,6 +667,156 @@ ...@@ -663,6 +667,156 @@
</v:shape> </v:shape>
</w:pict> </w:pict>
</w:r> </w:r>
<#if reissueDateYear != "" && reissueDateMonth != "" && reissueDateDay != "">
<w:r>
<w:rPr>
<w:sz w:val="24"/>
</w:rPr>
<w:pict>
<v:shape id="文本框 14" o:spid="_x0000_s1027" o:spt="202" type="#_x0000_t202"
style="position:absolute;left:0pt;margin-left:205.05pt;margin-top:675.65pt;height:30.25pt;width:320.7pt;z-index:251664384;mso-width-relative:page;mso-height-relative:page;"
fillcolor="#FFFFFF" filled="t" stroked="f" coordsize="21600,21600">
<v:path/>
<v:fill on="t" color2="#FFFFFF" focussize="0,0"/>
<v:stroke on="f" weight="0.5pt"/>
<v:imagedata o:title=""/>
<o:lock v:ext="edit" aspectratio="f"/>
<v:textbox>
<w:txbxContent>
<w:p>
<w:pPr>
<w:keepNext w:val="off"/>
<w:keepLines w:val="off"/>
<w:pageBreakBefore w:val="off"/>
<w:widowControl w:val="off"/>
<w:kinsoku/>
<w:wordWrap/>
<w:overflowPunct/>
<w:topLinePunct w:val="off"/>
<w:adjustRightInd w:val="off"/>
<w:snapToGrid/>
<w:spacing w:line="400" w:line-rule="exact"/>
<w:ind w:left="0" w:first-line="420"/>
<w:jc w:val="left"/>
<w:textAlignment w:val="auto"/>
<w:rPr>
<w:rFonts w:ascii="黑体" w:h-ansi="黑体" w:fareast="黑体"
w:cs="黑体"
w:hint="fareast"/>
<w:sz w:val="32"/>
<w:sz-cs w:val="32"/>
</w:rPr>
</w:pPr>
<w:r>
<w:rPr>
<w:rFonts w:ascii="黑体" w:h-ansi="黑体" w:fareast="黑体"
w:cs="黑体"
w:hint="fareast"/>
<w:sz w:val="32"/>
<w:sz-cs w:val="32"/>
</w:rPr>
<w:t>补证日期: </w:t>
</w:r>
<w:r>
<w:rPr>
<w:rFonts w:ascii="宋体" w:h-ansi="宋体" w:fareast="宋体"
w:cs="宋体"
w:hint="fareast"/>
<w:sz w:val="24"/>
<w:sz-cs w:val="24"/>
<w:lang w:val="EN-US" w:fareast="ZH-CN"/>
</w:rPr>
<w:t>${(reissueDateYear)!''}</w:t>
</w:r>
<w:r>
<w:rPr>
<w:rFonts w:ascii="黑体" w:h-ansi="黑体" w:fareast="黑体"
w:cs="黑体"
w:hint="fareast"/>
<w:sz w:val="32"/>
<w:sz-cs w:val="32"/>
</w:rPr>
<w:t></w:t>
</w:r>
<w:r>
<w:rPr>
<w:rFonts w:ascii="黑体" w:h-ansi="黑体" w:fareast="黑体"
w:cs="黑体"
w:hint="fareast"/>
<w:sz w:val="24"/>
<w:sz-cs w:val="24"/>
</w:rPr>
<w:t></w:t>
</w:r>
<w:r>
<w:rPr>
<w:rFonts w:ascii="宋体" w:h-ansi="宋体" w:fareast="宋体"
w:cs="宋体"
w:hint="fareast"/>
<w:sz w:val="24"/>
<w:sz-cs w:val="24"/>
<w:lang w:val="EN-US" w:fareast="ZH-CN"/>
</w:rPr>
<w:t>${(reissueDateMonth)!''}</w:t>
</w:r>
<w:r>
<w:rPr>
<w:rFonts w:ascii="黑体" w:h-ansi="黑体" w:fareast="黑体"
w:cs="黑体"
w:hint="fareast"/>
<w:sz w:val="32"/>
<w:sz-cs w:val="32"/>
</w:rPr>
<w:t></w:t>
</w:r>
<w:r>
<w:rPr>
<w:rFonts w:ascii="黑体" w:h-ansi="黑体" w:fareast="黑体"
w:cs="黑体"
w:hint="fareast"/>
<w:sz w:val="24"/>
<w:sz-cs w:val="24"/>
</w:rPr>
<w:t></w:t>
</w:r>
<w:r>
<w:rPr>
<w:rFonts w:ascii="宋体" w:h-ansi="宋体" w:fareast="宋体"
w:cs="宋体"
w:hint="fareast"/>
<w:sz w:val="24"/>
<w:sz-cs w:val="24"/>
<w:lang w:val="EN-US" w:fareast="ZH-CN"/>
</w:rPr>
<w:t>${(reissueDateDay)!''}</w:t>
</w:r>
<w:r>
<w:rPr>
<w:rFonts w:ascii="黑体" w:h-ansi="黑体" w:fareast="黑体"
w:cs="黑体"
w:hint="fareast"/>
<w:sz w:val="32"/>
<w:sz-cs w:val="32"/>
</w:rPr>
<w:t></w:t>
</w:r>
</w:p>
<w:p>
<w:pPr>
<w:rPr>
<w:rFonts w:hint="default"/>
<w:sz w:val="32"/>
<w:sz-cs w:val="32"/>
<w:lang w:val="EN-US" w:fareast="ZH-CN"/>
</w:rPr>
</w:pPr>
</w:p>
</w:txbxContent>
</v:textbox>
</v:shape>
</w:pict>
</w:r>
</#if>
<w:r> <w:r>
<w:rPr> <w:rPr>
<w:sz w:val="24"/> <w:sz w:val="24"/>
...@@ -2225,7 +2379,9 @@ zl/OZWMbAAAAAIAowjYAAAAAAFGEbQAAAAAAovwPNj8bRIboD6oAAAAASUVORK5CYII= ...@@ -2225,7 +2379,9 @@ zl/OZWMbAAAAAIAowjYAAAAAAFGEbQAAAAAAovwPNj8bRIboD6oAAAAASUVORK5CYII=
<w:sz w:val="24"/> <w:sz w:val="24"/>
</w:rPr> </w:rPr>
<w:pict> <w:pict>
<v:shape id="文本框 19" o:spid="_x0000_s1041" o:spt="202" type="#_x0000_t202" style="position:absolute;left:0pt;margin-left:205.05pt;margin-top:631.75pt;height:34.5pt;width:113pt;z-index:251674624;mso-width-relative:page;mso-height-relative:page;" fillcolor="#FFFFFF" filled="t" stroked="f" coordsize="21600,21600"> <v:shape id="文本框 19" o:spid="_x0000_s1041" o:spt="202" type="#_x0000_t202"
style="position:absolute;left:0pt;margin-left:205.05pt;margin-top:611.75pt;height:34.5pt;width:113pt;z-index:251674624;mso-width-relative:page;mso-height-relative:page;"
fillcolor="#FFFFFF" filled="t" stroked="f" coordsize="21600,21600">
<v:path/> <v:path/>
<v:fill on="t" color2="#FFFFFF" focussize="0,0"/> <v:fill on="t" color2="#FFFFFF" focussize="0,0"/>
<v:stroke on="f" weight="0.5pt"/> <v:stroke on="f" weight="0.5pt"/>
......
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