From 5ee01fc4a99461d7c2fba7dad4fcdcbe3cb064f3 Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Tue, 11 May 2021 18:13:46 +0800 Subject: [PATCH] monthId:yyyyMM --- .../screen/impl/ShiBeiScreenCollServiceImpl.java | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/impl/ShiBeiScreenCollServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/impl/ShiBeiScreenCollServiceImpl.java index 65f54cbefc..28532046fb 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/impl/ShiBeiScreenCollServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/impl/ShiBeiScreenCollServiceImpl.java @@ -40,6 +40,7 @@ import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; import org.springframework.util.CollectionUtils; +import org.springframework.util.StringUtils; import java.math.BigDecimal; import java.util.ArrayList; @@ -132,6 +133,9 @@ public class ShiBeiScreenCollServiceImpl implements ShiBeiScreenCollService { @Override @Transactional(rollbackFor = Exception.class) public void insertPartyBranchData(PartyBranchDataListFormDTO formDTO, String customerId) { + if (StringUtils.isEmpty(formDTO.getMonthId()) || formDTO.getMonthId().length() != NumConstant.SIX) { + throw new RenException("monthId格式应为: yyyyMM,当前传入:"+formDTO.getMonthId()); + } if (formDTO.getIsFirst()) { int deleteNum; do { @@ -147,6 +151,9 @@ public class ShiBeiScreenCollServiceImpl implements ShiBeiScreenCollService { @Override @Transactional(rollbackFor = Exception.class) public void insertOrgRankData(OrgRankDataListFormDTO formDTO, String customerId) { + if (StringUtils.isEmpty(formDTO.getMonthId()) || formDTO.getMonthId().length() != NumConstant.SIX) { + throw new RenException("monthId格式应为: yyyyMM,当前传入:"+formDTO.getMonthId()); + } if (formDTO.getIsFirst()) { int deleteNum; do { @@ -162,6 +169,9 @@ public class ShiBeiScreenCollServiceImpl implements ShiBeiScreenCollService { @Override @Transactional(rollbackFor = Exception.class) public void insertGovernRankData(GovernRankDataListFormDTO formDTO, String customerId) { + if (StringUtils.isEmpty(formDTO.getMonthId()) || formDTO.getMonthId().length() != NumConstant.SIX) { + throw new RenException("monthId格式应为: yyyyMM,当前传入:"+formDTO.getMonthId()); + } if (formDTO.getIsFirst()) { int deleteNum; do { @@ -250,6 +260,9 @@ public class ShiBeiScreenCollServiceImpl implements ShiBeiScreenCollService { @Override @Transactional(rollbackFor = Exception.class) public void insertIndexDataMonthly(IndexDataListMonthlyFormDTO formDTO, String customerId) { + if (StringUtils.isEmpty(formDTO.getMonthId()) || formDTO.getMonthId().length() != NumConstant.SIX) { + throw new RenException("monthId格式应为: yyyyMM,当前传入:"+formDTO.getMonthId()); + } if (formDTO.getIsFirst()) { int deleteNum; do { @@ -345,6 +358,9 @@ public class ShiBeiScreenCollServiceImpl implements ShiBeiScreenCollService { @Override @Transactional(rollbackFor = Exception.class) public void insertUserJoin(UserJoinListFormDTO formDTO, String customerId) { + if (StringUtils.isEmpty(formDTO.getMonthId()) || formDTO.getMonthId().length() != NumConstant.SIX) { + throw new RenException("monthId格式应为: yyyyMM,当前传入:"+formDTO.getMonthId()); + } if (formDTO.getIsFirst()) { int deleteNum; do {