| | |
| | | import cn.hutool.core.date.DateTime; |
| | | import cn.hutool.core.date.DateUtil; |
| | | import cn.hutool.core.util.IdcardUtil; |
| | | import com.baomidou.mybatisplus.core.conditions.Wrapper; |
| | | import cn.hutool.core.util.PhoneUtil; |
| | | import com.doumee.core.annotation.excel.ExcelImporter; |
| | | import com.doumee.core.constants.ResponseStatus; |
| | | import com.doumee.core.exception.BusinessException; |
| | | import com.doumee.core.model.LoginUserInfo; |
| | |
| | | import com.doumee.core.model.PageWrap; |
| | | import com.doumee.core.utils.Constants; |
| | | import com.doumee.core.utils.Utils; |
| | | import com.doumee.dao.admin.request.LaborEmpowerDTO; |
| | | import com.doumee.dao.admin.request.LaborMemberDTO; |
| | | import com.doumee.dao.admin.response.MemberInfoDTO; |
| | | import com.doumee.dao.business.MemberMapper; |
| | |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.github.yulichang.wrapper.MPJLambdaWrapper; |
| | | import org.apache.commons.collections.CollectionUtils; |
| | | import org.apache.commons.lang3.StringUtils; |
| | | import org.apache.shiro.SecurityUtils; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | import org.springframework.util.CollectionUtils; |
| | | |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | import java.util.Objects; |
| | |
| | | |
| | | LoginUserInfo loginUserInfo = (LoginUserInfo) SecurityUtils.getSubject().getPrincipal(); |
| | | |
| | | if (PhoneUtil.isPhone(member.getPhone())){ |
| | | throw new BusinessException(ResponseStatus.BAD_REQUEST.getCode(),"çµè¯å·ç æ ¼å¼æè¯¯"); |
| | | } |
| | | if (IdcardUtil.isValidCard(member.getIdcardNo())){ |
| | | throw new BusinessException(ResponseStatus.BAD_REQUEST.getCode(),"身份è¯å·æ ¼å¼æè¯¯"); |
| | | } |
| | |
| | | QueryWrapper<Member> wrapper = new QueryWrapper<>(member); |
| | | return memberMapper.selectCount(wrapper); |
| | | } |
| | | |
| | | @Override |
| | | public void importMemberBatch(LaborEmpowerDTO laborEmpowerDTO) { |
| | | try { |
| | | ExcelImporter ie = new ExcelImporter(laborEmpowerDTO.getFile(),0,0); |
| | | |
| | | List<LaborEmpowerDTO.LaborMemberEmpower> dataList = ie.getDataList(LaborEmpowerDTO.LaborMemberEmpower.class,null); |
| | | |
| | | if (CollectionUtils.isEmpty(dataList)){ |
| | | throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(),"æä»¶æ æ°æ®è®°å½"); |
| | | } |
| | | |
| | | } catch (Exception e) { |
| | | |
| | | } |
| | | // |
| | | |
| | | } |
| | | } |