| | |
| | | import com.doumee.biz.system.SystemDictDataBiz; |
| | | import com.doumee.core.utils.Constants; |
| | | import com.doumee.dao.business.JkCustomerNavigationMapper; |
| | | import com.doumee.dao.business.JkSketchMapper; |
| | | import com.doumee.dao.business.model.*; |
| | | import com.doumee.service.business.third.model.PageData; |
| | | import com.doumee.service.business.third.model.PageWrap; |
| | |
| | | private SystemDictDataBiz systemDictDataBiz; |
| | | @Autowired |
| | | private JkSketchCustomerMapper jkSketchCustomerMapper; |
| | | @Autowired |
| | | private JkSketchMapper jkSketchMapper; |
| | | @Autowired |
| | | private JkCustomerNavigationMapper jkCustomerNavigationMapper; |
| | | |
| | |
| | | } |
| | | @Override |
| | | public List<JkSketchCustomer> findList(JkSketchCustomer jkSketchCustomer) { |
| | | /* if(jkSketchCustomer.getSketchId()!=null){ |
| | | JkSketch sketch = jkSketchMapper.selectById(jkSketchCustomer.getSketchId()); |
| | | if(sketch!=null){ |
| | | jkSketchCustomer.setType(Constants.formatIntegerNum(sketch.getOptStatus())); |
| | | } |
| | | }*/ |
| | | MPJLambdaWrapper<JkSketchCustomer> queryWrapper = new MPJLambdaWrapper<>(); |
| | | jkSketchCustomer.setIsdeleted(Constants.ZERO); |
| | | queryWrapper.selectAll(JkSketchCustomer.class ) |
| | |
| | | .leftJoin(JkCustomer.class,JkCustomer::getId,JkSketchCustomer::getCustomerId ) ; |
| | | queryWrapper.like(jkSketchCustomer.getCode()!=null,JkCustomer::getCode,jkSketchCustomer.getCode()); |
| | | queryWrapper.like(jkSketchCustomer.getName()!=null,JkCustomer::getName,jkSketchCustomer.getName()); |
| | | queryWrapper.eq(jkSketchCustomer.getType() != null,JkSketchCustomer::getType,jkSketchCustomer.getType()); |
| | | if (jkSketchCustomer.getId() != null) { |
| | | queryWrapper.eq(JkSketchCustomer::getId,jkSketchCustomer.getId()); |
| | | } |
| | | if (jkSketchCustomer.getCreator() != null) { |
| | | queryWrapper.eq(JkSketchCustomer::getCreator,jkSketchCustomer.getCreator()); |
| | | } |
| | | if (jkSketchCustomer.getCreateDate() != null) { |
| | | queryWrapper.ge(JkSketchCustomer::getCreateDate, Utils.Date.getStart(jkSketchCustomer.getCreateDate())); |
| | |
| | | |
| | | @Override |
| | | public PageData<JkSketchCustomer> findPage(PageWrap<JkSketchCustomer> pageWrap) { |
| | | if(pageWrap.getModel().getSketchId()!=null){ |
| | | JkSketch sketch = jkSketchMapper.selectById(pageWrap.getModel().getSketchId()); |
| | | if(sketch!=null){ |
| | | pageWrap.getModel().setType(Constants.formatIntegerNum(sketch.getOptStatus())); |
| | | } |
| | | } |
| | | IPage<JkSketchCustomer> page = new Page<>(pageWrap.getPage(), pageWrap.getCapacity()); |
| | | MPJLambdaWrapper<JkSketchCustomer> queryWrapper = new MPJLambdaWrapper<>(); |
| | | Utils.MP.blankToNull(pageWrap.getModel()); |
| | |
| | | .leftJoin(JkSketchLine.class,JkSketchLine::getId,JkSketchCustomer::getSketchLineId ) |
| | | .leftJoin(JkLine.class,JkLine::getId,JkSketchLine::getLineId ) |
| | | .leftJoin(Category.class,Category::getId,JkLine::getCategoryId ); |
| | | queryWrapper.eq( pageWrap.getModel().getType()!=null,JkSketchCustomer::getType, pageWrap.getModel().getType()); |
| | | queryWrapper.eq( pageWrap.getModel().getCategoryId()!=null,JkLine::getCategoryId, pageWrap.getModel().getCategoryId()); |
| | | queryWrapper.eq( pageWrap.getModel().getDateInfo()!=null,JkSketchCustomer::getDateInfo, pageWrap.getModel().getDateInfo()); |
| | | queryWrapper.like( pageWrap.getModel().getCode()!=null,JkCustomer::getCode, pageWrap.getModel().getCode()); |