|
|
@@ -8,6 +8,7 @@ import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
|
|
import com.github.yulichang.base.MPJBaseServiceImpl;
|
|
|
import com.github.yulichang.wrapper.MPJLambdaWrapper;
|
|
|
import com.xjrsoft.common.enums.DeleteMark;
|
|
|
+import com.xjrsoft.common.exception.MyException;
|
|
|
import com.xjrsoft.common.utils.VoToColumnUtil;
|
|
|
import com.xjrsoft.module.base.entity.BaseClass;
|
|
|
import com.xjrsoft.module.generator.entity.ImportConfig;
|
|
|
@@ -187,7 +188,14 @@ public class LeagueMembersManageServiceImpl extends MPJBaseServiceImpl<LeagueMem
|
|
|
// 处理入团时间
|
|
|
if(StringUtils.isNotEmpty(dto.getJoinTime())){
|
|
|
// 将字符串解析为 YearMonth
|
|
|
- YearMonth yearMonth = YearMonth.parse(dto.getJoinTime(), joinTimeFormatter);
|
|
|
+ YearMonth yearMonth;
|
|
|
+ try {
|
|
|
+ yearMonth = YearMonth.parse(dto.getJoinTime(), joinTimeFormatter);
|
|
|
+ }catch (Exception e){
|
|
|
+ sb.append("第").append(i + 4).append("行数据的加入日期格式错误,应该为202501");
|
|
|
+ throw new MyException(sb.toString());
|
|
|
+ }
|
|
|
+
|
|
|
|
|
|
// 设置为当月的第一天并转换为 LocalDate
|
|
|
LocalDate localDate = yearMonth.atDay(1);
|
|
|
@@ -198,7 +206,13 @@ public class LeagueMembersManageServiceImpl extends MPJBaseServiceImpl<LeagueMem
|
|
|
// 处理转入时间
|
|
|
if(StringUtils.isNotEmpty(dto.getTransferTime())){
|
|
|
// 将字符串解析为 YearMonth
|
|
|
- YearMonth yearMonth = YearMonth.parse(dto.getTransferTime(), transferFormatter);
|
|
|
+ YearMonth yearMonth;
|
|
|
+ try {
|
|
|
+ yearMonth = YearMonth.parse(dto.getJoinTime(), joinTimeFormatter);
|
|
|
+ }catch (Exception e){
|
|
|
+ sb.append("第").append(i + 4).append("行数据的转入日期格式错误,应该为2025.01");
|
|
|
+ throw new MyException(sb.toString());
|
|
|
+ }
|
|
|
|
|
|
// 设置为当月的第一天并转换为 LocalDate
|
|
|
LocalDate localDate = yearMonth.atDay(1);
|