Commit 1f18b752 authored by 韩桐桐's avatar 韩桐桐

申请日期的月日统一两位

parent 8661015a
...@@ -44,4 +44,6 @@ public interface JgUseRegistrationManageMapper extends BaseMapper<JgUseRegistrat ...@@ -44,4 +44,6 @@ public interface JgUseRegistrationManageMapper extends BaseMapper<JgUseRegistrat
@Param("sort") SortVo sortMap); @Param("sort") SortVo sortMap);
JgUseRegistrationManage getLatestJgUseRegistrationManage(@Param("useUnitCreditCode")String useUnitCreditCode, @Param("equDefineCode")String equDefineCode); JgUseRegistrationManage getLatestJgUseRegistrationManage(@Param("useUnitCreditCode")String useUnitCreditCode, @Param("equDefineCode")String equDefineCode);
Integer checkUseRegCertInBusiness(@Param("useRegistrationCode")String useRegistrationCode);
} }
...@@ -152,6 +152,21 @@ ...@@ -152,6 +152,21 @@
</where> </where>
</select> </select>
<select id="checkUseRegCertInBusiness"
resultType="java.lang.Integer">
select 1
from tzs_jg_use_registration_manage tjurm
where
tjurm.is_delete = 0
-- 使用登记证编号
<if test="useRegistrationCode != null and useRegistrationCode != ''">
and tjurm.use_registration_code = #{useRegistrationCode}
</if>
and NOT EXISTS (
<include refid="useRegCertInBusiness"/>
)
</select>
<sql id="useRegCertInBusiness"> <sql id="useRegCertInBusiness">
SELECT 1 SELECT 1
FROM (SELECT use_registration_code FROM (SELECT use_registration_code
......
...@@ -108,6 +108,7 @@ import java.util.stream.IntStream; ...@@ -108,6 +108,7 @@ import java.util.stream.IntStream;
import java.util.stream.Stream; import java.util.stream.Stream;
import java.util.zip.ZipEntry; import java.util.zip.ZipEntry;
import java.util.zip.ZipOutputStream; import java.util.zip.ZipOutputStream;
import static java.util.stream.Collectors.toList; import static java.util.stream.Collectors.toList;
import static java.util.stream.Collectors.toSet; import static java.util.stream.Collectors.toSet;
...@@ -252,16 +253,16 @@ public class JgUseRegistrationServiceImpl extends BaseService<JgUseRegistrationD ...@@ -252,16 +253,16 @@ public class JgUseRegistrationServiceImpl extends BaseService<JgUseRegistrationD
today = auditPassDate.toInstant().atZone(ZoneId.systemDefault()).toLocalDate(); today = auditPassDate.toInstant().atZone(ZoneId.systemDefault()).toLocalDate();
} }
exportParamsMap.put("giveOutYear", today.getYear()); exportParamsMap.put("giveOutYear", today.getYear());
exportParamsMap.put("giveOutMonth", today.getMonthValue()); exportParamsMap.put("giveOutMonth", String.format("%02d",today.getMonthValue()));
exportParamsMap.put("giveOutDay", today.getDayOfMonth()); exportParamsMap.put("giveOutDay", String.format("%02d",today.getDayOfMonth()));
} }
static void getReissueDate(Date reissueDate, Map<String, Object> exportParamsMap) { static void getReissueDate(Date reissueDate, Map<String, Object> exportParamsMap) {
if (!ValidationUtil.isEmpty(reissueDate)) { if (!ValidationUtil.isEmpty(reissueDate)) {
LocalDate date = reissueDate.toInstant().atZone(ZoneId.systemDefault()).toLocalDate(); LocalDate date = reissueDate.toInstant().atZone(ZoneId.systemDefault()).toLocalDate();
exportParamsMap.put("reissueDateYear", date.getYear()); exportParamsMap.put("reissueDateYear", date.getYear());
exportParamsMap.put("reissueDateMonth", date.getMonthValue()); exportParamsMap.put("reissueDateMonth", String.format("%02d",date.getMonthValue()));
exportParamsMap.put("reissueDateDay", date.getDayOfMonth()); exportParamsMap.put("reissueDateDay", String.format("%02d",date.getDayOfMonth()));
} }
} }
......
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