| | |
| | | package com.jcdm.main.bs.orderScheduling.service.impl; |
| | | |
| | | import java.util.List; |
| | | import com.jcdm.common.utils.DateUtils; |
| | | import com.jcdm.main.bs.orderScheduling.Query.PrepareOnlineQuery; |
| | | import com.jcdm.main.bs.orderScheduling.domain.BsOrderScheduling; |
| | | import com.jcdm.main.bs.orderScheduling.mapper.BsOrderSchedulingMapper; |
| | | import com.jcdm.main.bs.orderScheduling.service.IBsOrderSchedulingService; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | import com.jcdm.main.bs.orderScheduling.mapper.BsOrderSchedulingMapper; |
| | | import com.jcdm.main.bs.orderScheduling.domain.BsOrderScheduling; |
| | | import com.jcdm.main.bs.orderScheduling.service.IBsOrderSchedulingService; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * 订单排产Service业务层处理 |
| | | * |
| | | * @author jiang |
| | | * @date 2024-01-09 |
| | | * @date 2024-01-13 |
| | | */ |
| | | @Service |
| | | public class BsOrderSchedulingServiceImpl implements IBsOrderSchedulingService |
| | | public class BsOrderSchedulingServiceImpl implements IBsOrderSchedulingService |
| | | { |
| | | @Autowired |
| | | private BsOrderSchedulingMapper bsOrderSchedulingMapper; |
| | |
| | | /** |
| | | * 查询订单排产 |
| | | * |
| | | * @param orderNumber 订单排产主键 |
| | | * @param id 订单排产主键 |
| | | * @return 订单排产 |
| | | */ |
| | | @Override |
| | | public BsOrderScheduling selectBsOrderSchedulingByOrderNumber(String orderNumber) |
| | | public BsOrderScheduling selectBsOrderSchedulingById(Long id) |
| | | { |
| | | return bsOrderSchedulingMapper.selectBsOrderSchedulingByOrderNumber(orderNumber); |
| | | return bsOrderSchedulingMapper.selectBsOrderSchedulingById(id); |
| | | } |
| | | |
| | | /** |
| | |
| | | @Override |
| | | public List<BsOrderScheduling> selectBsOrderSchedulingList(BsOrderScheduling bsOrderScheduling) |
| | | { |
| | | if(bsOrderScheduling.getDateConditions()!=null){ |
| | | String[] conditions = bsOrderScheduling.getDateConditions(); |
| | | bsOrderScheduling.setStartTime(conditions[0]); |
| | | bsOrderScheduling.setEndTime(conditions[1]); |
| | | } |
| | | return bsOrderSchedulingMapper.selectBsOrderSchedulingList(bsOrderScheduling); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 查询合箱上线列表 |
| | | * @param prepareOnlineQuery |
| | | * @return list |
| | | */ |
| | | public List<BsOrderScheduling> getPrepareOnlineList(PrepareOnlineQuery prepareOnlineQuery){ |
| | | return bsOrderSchedulingMapper.getPrepareOnlineList(prepareOnlineQuery); |
| | | } |
| | | /** |
| | | * 新增订单排产 |
| | | * |
| | |
| | | @Override |
| | | public int insertBsOrderScheduling(BsOrderScheduling bsOrderScheduling) |
| | | { |
| | | bsOrderScheduling.setCreateTime(DateUtils.getNowDate()); |
| | | return bsOrderSchedulingMapper.insertBsOrderScheduling(bsOrderScheduling); |
| | | } |
| | | |
| | |
| | | @Override |
| | | public int updateBsOrderScheduling(BsOrderScheduling bsOrderScheduling) |
| | | { |
| | | bsOrderScheduling.setUpdateTime(DateUtils.getNowDate()); |
| | | return bsOrderSchedulingMapper.updateBsOrderScheduling(bsOrderScheduling); |
| | | } |
| | | |
| | | /** |
| | | * 批量删除订单排产 |
| | | * |
| | | * @param orderNumbers 需要删除的订单排产主键 |
| | | * @param ids 需要删除的订单排产主键 |
| | | * @return 结果 |
| | | */ |
| | | @Override |
| | | public int deleteBsOrderSchedulingByOrderNumbers(String[] orderNumbers) |
| | | public int deleteBsOrderSchedulingByIds(Long[] ids) |
| | | { |
| | | return bsOrderSchedulingMapper.deleteBsOrderSchedulingByOrderNumbers(orderNumbers); |
| | | return bsOrderSchedulingMapper.deleteBsOrderSchedulingByIds(ids); |
| | | } |
| | | |
| | | /** |
| | | * 删除订单排产信息 |
| | | * |
| | | * @param orderNumber 订单排产主键 |
| | | * @param id 订单排产主键 |
| | | * @return 结果 |
| | | */ |
| | | @Override |
| | | public int deleteBsOrderSchedulingByOrderNumber(String orderNumber) |
| | | public int deleteBsOrderSchedulingById(Long id) |
| | | { |
| | | return bsOrderSchedulingMapper.deleteBsOrderSchedulingByOrderNumber(orderNumber); |
| | | return bsOrderSchedulingMapper.deleteBsOrderSchedulingById(id); |
| | | } |
| | | } |