| | |
| | | import com.baomidou.mybatisplus.plugins.Page; |
| | | import com.baomidou.mybatisplus.service.impl.ServiceImpl; |
| | | import com.core.common.Cools; |
| | | import com.core.exception.CoolException; |
| | | import com.zy.asrs.entity.OrderDetlPakin; |
| | | import com.zy.asrs.entity.param.OrderDetlByCode; |
| | | import com.zy.asrs.mapper.OrderDetlPakinMapper; |
| | | import com.zy.asrs.service.OrderDetlPakinService; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import java.util.List; |
| | | |
| | | @Service("orderDetlPakinService") |
| | | public class OrderDetlPakinServiceImpl extends ServiceImpl<OrderDetlPakinMapper, OrderDetlPakin> implements OrderDetlPakinService { |
| | | |
| | | @Autowired |
| | | private OrderDetlPakinService orderDetlPakinService; |
| | | @Override |
| | | public List<OrderDetlPakin> selectByOrderId(Long orderId) { |
| | | return this.selectList(new EntityWrapper<OrderDetlPakin>().eq("order_id", orderId)); |
| | |
| | | } |
| | | |
| | | @Override |
| | | public boolean morpt(String orderNo){ |
| | | return this.baseMapper.morpt(orderNo); |
| | | public boolean morpt(String orderNo,String orderNo1){ |
| | | List<OrderDetlPakin> list1 = orderDetlPakinService.selectList(new EntityWrapper<OrderDetlPakin>().eq("order_no",orderNo1)); |
| | | try{ |
| | | for (OrderDetlPakin item : list1) { |
| | | Double anfme = item.getAnfme(); |
| | | Double qty = item.getQty(); |
| | | String matnr = item.getMatnr(); |
| | | if(anfme.equals(qty)){ |
| | | OrderDetlPakin orderDetlPakin = orderDetlPakinService.selectOne( |
| | | new EntityWrapper<OrderDetlPakin>().eq("matnr", matnr).eq("order_no", orderNo) |
| | | ); |
| | | this.baseMapper.morpt(orderNo,matnr); |
| | | } |
| | | } |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | | throw new CoolException("汇报单转换失败:" + e.getMessage()); |
| | | } |
| | | return true; |
| | | } |
| | | |
| | | } |