| | |
| | | import com.zy.asrs.wms.asrs.entity.*;
|
| | | import com.zy.asrs.wms.asrs.entity.dto.OrderInfoDto;
|
| | | import com.zy.asrs.wms.asrs.entity.enums.OrderSettleType;
|
| | | import com.zy.asrs.wms.asrs.entity.enums.OrderType;
|
| | | import com.zy.asrs.wms.asrs.entity.param.CreateOrderParam;
|
| | | import com.zy.asrs.wms.asrs.entity.param.UpdateOrderParam;
|
| | | import com.zy.asrs.wms.asrs.mapper.OrderMapper;
|
| | |
| | | import org.springframework.transaction.annotation.Transactional;
|
| | |
|
| | | import java.text.SimpleDateFormat;
|
| | | import java.util.Collections;
|
| | | import java.util.Date;
|
| | | import java.util.HashMap;
|
| | | import java.util.List;
|
| | | import java.util.*;
|
| | |
|
| | | @Service("orderService")
|
| | | public class OrderServiceImpl extends ServiceImpl<OrderMapper, Order> implements OrderService {
|
| | |
| | | private OrderNoRuleService orderNoRuleService;
|
| | | @Autowired
|
| | | private OrderUtils orderUtils;
|
| | | @Autowired
|
| | | private WaitPakinService waitPakinService;
|
| | |
|
| | | @Override
|
| | | @Transactional
|
| | |
| | | Order order = new Order();
|
| | | order.setOrderNo(orderNo);
|
| | | order.setOrderType(param.getOrderType());
|
| | | order.setCustomer(param.getCustomer());
|
| | | order.setPhone(param.getPhone());
|
| | | order.setAddress(param.getAddress());
|
| | | order.setOrderSettle(OrderSettleType.INIT.val());
|
| | | order.setIoPri(orderUtils.getIoPri());
|
| | | order.setOrderTime(format.format(new Date()));
|
| | |
| | | throw new CoolException("更新明细索引失败");
|
| | | }
|
| | |
|
| | | mat.setUtiliz(Objects.isNull(mat.getUtiliz()) ? 0 : mat.getUtiliz() + 1);
|
| | |
|
| | | if (!matService.updateById(mat)) {
|
| | | throw new CoolException("物料使用率修改失败!!");
|
| | | }
|
| | | }
|
| | |
|
| | | return true;
|
| | |
| | | throw new CoolException("订单已经生成波次,删除失败");
|
| | | }
|
| | |
|
| | | List<WaitPakin> waitPakins = waitPakinService.list(new LambdaQueryWrapper<WaitPakin>().eq(WaitPakin::getOrderId, orderId));
|
| | | if (!waitPakins.isEmpty()) {
|
| | | throw new CoolException("单据已生成组托,不可执行删除操作!!");
|
| | | }
|
| | | //删除订单
|
| | | this.removeById(orderId);
|
| | | //删除明细
|