|  |  | 
 |  |  | package com.dy.pmsProduct.order; | 
 |  |  |  | 
 |  |  | import cn.hutool.core.codec.Base64; | 
 |  |  | import com.dy.common.webFilter.UserTokenContext; | 
 |  |  | import com.dy.common.webUtil.QueryResultVo; | 
 |  |  | import com.dy.pmsGlobal.daoOth.OthFileMapper; | 
 |  |  | import com.dy.pmsGlobal.daoPr.*; | 
 |  |  | import com.dy.pmsGlobal.dyFile.FileOperate; | 
 |  |  | import com.dy.pmsGlobal.pojoBa.BaUser; | 
 |  |  | import com.dy.pmsGlobal.pojoPlt.PltProduct; | 
 |  |  | import com.dy.pmsGlobal.pojoPr.*; | 
 |  |  | import com.dy.pmsGlobal.util.UserUtil; | 
 |  |  | import com.dy.pmsProduct.order.QueryVo; | 
 |  |  | import lombok.extern.slf4j.Slf4j; | 
 |  |  | import org.apache.dubbo.common.utils.PojoUtils; | 
 |  |  | import org.springframework.beans.factory.annotation.Autowired; | 
 |  |  | import org.springframework.beans.factory.annotation.Value; | 
 |  |  | import org.springframework.stereotype.Service; | 
 |  |  | import org.springframework.transaction.annotation.Transactional; | 
 |  |  |  | 
 |  |  | import java.io.IOException; | 
 |  |  | import java.math.BigDecimal; | 
 |  |  | import java.math.RoundingMode; | 
 |  |  | import java.util.List; | 
 |  |  | 
 |  |  |     private PrOrderMapper orderDao; | 
 |  |  |     private PrOrderItemMapper orderItemDao; | 
 |  |  |     private UserUtil userUtil; | 
 |  |  |     private FileOperate fileOperate; | 
 |  |  |     private OthFileMapper othFileMapper; | 
 |  |  |     @Value("${dy.webFile.fmUrl}") | 
 |  |  |     private String fmUrl; | 
 |  |  |  | 
 |  |  |     @Autowired | 
 |  |  |     public void setOrderDao(PrOrderMapper orderDao) { | 
 |  |  | 
 |  |  |     public void setUserUtil(UserUtil userUtil) { | 
 |  |  |         this.userUtil = userUtil; | 
 |  |  |     } | 
 |  |  |  | 
 |  |  |     @Autowired | 
 |  |  |     public void setFileOperate(FileOperate fileOperate) { | 
 |  |  |         this.fileOperate = fileOperate; | 
 |  |  |     } | 
 |  |  |  | 
 |  |  |     @Autowired | 
 |  |  |     public void setOthFileMapper(OthFileMapper othFileMapper) { | 
 |  |  |         this.othFileMapper = othFileMapper; | 
 |  |  |     } | 
 |  |  |  | 
 |  |  |     @Transactional | 
 |  |  |     public int save(PrOrder p) { | 
 |  |  |         p.id = null; | 
 |  |  | 
 |  |  |  | 
 |  |  |     public PrOrder selectById(String proId) { | 
 |  |  |         PrOrder pro = orderDao.selectByPrimaryKey(Long.valueOf(proId)); | 
 |  |  |         changeRate(pro); | 
 |  |  |         return pro; | 
 |  |  |     } | 
 |  |  |  | 
 |  |  | 
 |  |  |                 } | 
 |  |  |             } | 
 |  |  |         } | 
 |  |  |         prOrder.setItems(items); | 
 |  |  |     } | 
 |  |  |  | 
 |  |  |     public List<PrOrder> selectAll(QueryVo queryVo) { | 
 |  |  |         Map<String, Object> params = (Map<String, Object>) PojoUtils.generalize(queryVo); | 
 |  |  |         return orderDao.selectAll(params); | 
 |  |  |         List<PrOrder> orderList = orderDao.selectAll(params); | 
 |  |  |         for (PrOrder prOrder : orderList) { | 
 |  |  |             changeRate(prOrder); | 
 |  |  |         } | 
 |  |  |         return orderList; | 
 |  |  |     } | 
 |  |  | } |