| | |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.github.yulichang.wrapper.MPJLambdaWrapper; |
| | | import com.sun.xml.internal.messaging.saaj.util.ByteInputStream; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.apache.commons.lang3.StringUtils; |
| | | import org.apache.poi.ss.usermodel.CellType; |
| | |
| | | queryWrapper.eq(pageWrap.getModel().getDoneNum() != null,ImportRecord::getDoneNum, pageWrap.getModel().getDoneNum()); |
| | | queryWrapper.eq(pageWrap.getModel().getErrorNum() != null,ImportRecord::getErrorNum, pageWrap.getModel().getErrorNum()); |
| | | queryWrapper.like(StringUtils.isNotBlank(pageWrap.getModel().getUpdateUserName()),SystemUser::getRealname, pageWrap.getModel().getUpdateUserName()); |
| | | queryWrapper.ge(pageWrap.getModel().getEndtime() != null,ImportRecord::getCreateTime, pageWrap.getModel().getEndtime()); |
| | | queryWrapper.ne(pageWrap.getModel().getStarttime() != null,ImportRecord::getCreateTime, pageWrap.getModel().getStarttime()); |
| | | queryWrapper.ge(pageWrap.getModel().getStarttime() != null,ImportRecord::getCreateTime, pageWrap.getModel().getStarttime()); |
| | | queryWrapper.le(pageWrap.getModel().getEndtime() != null,ImportRecord::getCreateTime, pageWrap.getModel().getEndtime()); |
| | | queryWrapper.orderByDesc(ImportRecord::getId); |
| | | return PageData.from(importRecordMapper.selectPage(page, queryWrapper)); |
| | | } |
| | |
| | | try { |
| | | List<Category> categoryList = null; |
| | | if(type == 0){ |
| | | categoryList = categoryMapper.selectList(new QueryWrapper<Category>().lambda().eq(Category::getDeleted,Constants.ZERO)); |
| | | categoryList = categoryMapper.selectList(new QueryWrapper<Category>().lambda().eq(Category::getDeleted,Constants.ZERO).eq(Category::getStatus,Constants.ZERO)); |
| | | if(categoryList == null || categoryList.size()==0){ |
| | | throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(),"对不起, 读取老师基数数据配置出错,请先配置基础数据信息!"); |
| | | } |
| | |
| | | if(StringUtils.isBlank(param.getTypeNames())){ |
| | | throw new BusinessException(ResponseStatus.BAD_REQUEST.getCode(),"对不起,第"+index+"行数据, 商业化类型信息不能为空"); |
| | | } |
| | | if(StringUtils.isBlank(param.getFieldNames())){ |
| | | throw new BusinessException(ResponseStatus.BAD_REQUEST.getCode(),"对不起,第"+index+"行数据, 擅长领域信息不能为空"); |
| | | } |
| | | if(StringUtils.isBlank(param.getFee())){ |
| | | throw new BusinessException(ResponseStatus.BAD_REQUEST.getCode(),"对不起,第"+index+"行数据, 费用标准信息不能为空"); |
| | | } |
| | | |
| | | /* if(pics!=null && StringUtils.isNotBlank(param.getImgurl())){ |
| | | log.info("===================="+param.getImgurl()); |
| | | int start = param.getImgurl().indexOf("(\"")+2; |
| | |
| | | member.setFee(new BigDecimal(param.getFee())); |
| | | }catch (Exception e){ |
| | | } |
| | | member.setSex(StringUtils.equals(param.getSex(),"男")?Constants.ZERO:(StringUtils.equals(param.getSex(),"女")?Constants.ZERO:null)); |
| | | member.setSex(StringUtils.equals(param.getSex(),"男")?Constants.ZERO: |
| | | (StringUtils.equals(param.getSex(),"女")?Constants.ONE:null)); |
| | | member.setZhanquIds(getIdStrListByList(list0)); |
| | | member.setBustypeIds(getIdStrListByList(list1)); |
| | | member.setFieldIds(getIdStrListByList(list2)); |
| | |
| | | List<ImportRecord> records = importRecordMapper.selectList(new QueryWrapper<ImportRecord>() |
| | | .select("id,total_num,(select count(c.id) from cases c where c.import_id= import_record.id) as doneNum") |
| | | .lambda() |
| | | .eq(ImportRecord::getDetail,Constants.ZERO) |
| | | .eq(ImportRecord::getDeleted,Constants.ZERO) |
| | | .ne(ImportRecord::getStatus,Constants.TWO) |
| | | ); |
| | | for(ImportRecord importRecord : records){ |