guoyuji
2024-06-19 6ef02b9d71b3f6af9bec3355c1f06f3782f1a142
north-glass-erp/src/main/java/com/example/erp/service/sd/OrderService.java
@@ -15,7 +15,6 @@
import com.example.erp.exception.ServiceException;
import com.example.erp.mapper.sd.*;
import com.example.erp.service.userInfo.SysErrorService;
import com.sun.org.apache.regexp.internal.RE;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.transaction.interceptor.TransactionAspectSupport;
@@ -236,12 +235,12 @@
        return map;
    }
    //订单审核
    public boolean reviewOrderById(String id,Integer status) {
    public boolean reviewOrderById(String id, Integer status, String userId, String userName) {
        Order order = orderMapper.selectOne(new QueryWrapper<Order>().eq("order_id",id));
        if(order.getProcessReview()!=2){
            throw  new ServiceException(Constants.Code_600,"该订单还未审核");
        }
        return orderMapper.reviewOrderById(id,status);
        return orderMapper.reviewOrderById(id,status,userId,userName);
    }
    //工艺审核界面审核更新数据
    public boolean reviewProcessById(String id, Integer status,List<OrderGlassDetail> orderGlassDetails) {
@@ -380,10 +379,12 @@
            orderProductDetailMap.put("productName",map.get("productName"));
            List<OrderDetail> orderDetails = orderDetailMapper.getOrderProductByProductId(map.get("productId"),orderId);
            orderDetails.forEach(orderDetail->{
                orderDetail.setGrossArea(
                        Double.parseDouble(String.format("%.3f",
                        Double.parseDouble(String.format("%.3f",Double.parseDouble(
                                String.format("%.3f",
                                orderDetail.getWidth()*orderDetail.getHeight()/1000000)
                                ) * orderDetail.getQuantity()
                                ) * orderDetail.getQuantity()))
                );
            });
@@ -411,9 +412,10 @@
            List<OrderDetail> orderDetails = orderDetailMapper.getOrderProductByProductId(map.get("productId"),orderId);
            orderDetails.forEach(orderDetail->{
                orderDetail.setGrossArea(
                        Double.parseDouble(String.format("%.3f",
                                orderDetail.getWidth()*orderDetail.getHeight()/1000000)
                        ) * orderDetail.getQuantity()
                        Double.parseDouble(String.format("%.3f",Double.parseDouble(
                                String.format("%.3f",
                                        orderDetail.getWidth()*orderDetail.getHeight()/1000000)
                        ) * orderDetail.getQuantity()))
                );
                List<OrderGlassDetail> orderGlassDetails =