feat: 老法规企标导入兼容特殊数据

This commit is contained in:
2023-12-04 20:46:13 +08:00
parent 057775d634
commit 2962cf7ca7
2 changed files with 91 additions and 51 deletions
@@ -262,6 +262,9 @@ public class LawsEnterpriseStandardServiceImpl extends ServiceImpl<LawsEnterpris
String ssrq = dto.getSsrq();
SimpleDateFormat sdf = new SimpleDateFormat("yyyyMMdd");
if (StrUtil.isNotBlank(fbrq)) {
if (fbrq.length() == 6) {
fbrq = fbrq + "01";
}
Date newDate = sdf.parse(fbrq.trim());
if (newDate != null) {
fb.setReleaseDate(newDate);
@@ -270,6 +273,9 @@ public class LawsEnterpriseStandardServiceImpl extends ServiceImpl<LawsEnterpris
}
}
if (StrUtil.isNotBlank(ssrq)) {
if (ssrq.length() == 6) {
ssrq = ssrq + "01";
}
Date newDate = sdf.parse(ssrq.trim());
if (newDate != null) {
fb.setImplementationDate(newDate);