|
@ -11,11 +11,17 @@ import com.ruoyi.common.utils.ShiroUtils; |
|
|
import com.ruoyi.common.utils.StringUtils; |
|
|
import com.ruoyi.common.utils.StringUtils; |
|
|
import com.ruoyi.erp.domain.ErpMaterial; |
|
|
import com.ruoyi.erp.domain.ErpMaterial; |
|
|
import com.ruoyi.erp.domain.ErpMaterialVo; |
|
|
import com.ruoyi.erp.domain.ErpMaterialVo; |
|
|
|
|
|
import com.ruoyi.erp.domain.vo.ErpMaterialPurchaseHistoryVo; |
|
|
import com.ruoyi.erp.domain.vo.ErpMaterialSalesHistoryVo; |
|
|
import com.ruoyi.erp.domain.vo.ErpMaterialSalesHistoryVo; |
|
|
import com.ruoyi.erp.mapper.ErpMaterialMapper; |
|
|
import com.ruoyi.erp.mapper.ErpMaterialMapper; |
|
|
import com.ruoyi.erp.service.IErpMaterialService; |
|
|
import com.ruoyi.erp.service.IErpMaterialService; |
|
|
import com.ruoyi.process.general.service.IProcessService; |
|
|
import com.ruoyi.process.general.service.IProcessService; |
|
|
import com.ruoyi.process.todoitem.mapper.BizTodoItemMapper; |
|
|
import com.ruoyi.process.todoitem.mapper.BizTodoItemMapper; |
|
|
|
|
|
import com.ruoyi.purchase.domain.PurchaseOrder; |
|
|
|
|
|
import com.ruoyi.purchase.domain.PurchaseOrderChild; |
|
|
|
|
|
import com.ruoyi.purchase.mapper.PurchaseOrderChildMapper; |
|
|
|
|
|
import com.ruoyi.purchase.mapper.PurchaseOrderMapper; |
|
|
|
|
|
import com.ruoyi.purchase.mapper.PurchasePlanChildMapper; |
|
|
import com.ruoyi.system.domain.*; |
|
|
import com.ruoyi.system.domain.*; |
|
|
import com.ruoyi.system.domain.Vo.ExportCustomerQuoteChildVo; |
|
|
import com.ruoyi.system.domain.Vo.ExportCustomerQuoteChildVo; |
|
|
import com.ruoyi.system.mapper.SysSalesOrderChildMapper; |
|
|
import com.ruoyi.system.mapper.SysSalesOrderChildMapper; |
|
@ -79,13 +85,20 @@ public class ErpMaterialServiceImpl implements IErpMaterialService |
|
|
@Autowired |
|
|
@Autowired |
|
|
private ISysRoleService roleService; |
|
|
private ISysRoleService roleService; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@Autowired |
|
|
@Autowired |
|
|
private SysSalesOrderChildMapper sysSalesOrderChildMapper; |
|
|
private SysSalesOrderChildMapper sysSalesOrderChildMapper; |
|
|
|
|
|
|
|
|
@Autowired |
|
|
@Autowired |
|
|
private SysSalesOrderMapper sysSalesOrderMapper; |
|
|
private SysSalesOrderMapper sysSalesOrderMapper; |
|
|
|
|
|
|
|
|
|
|
|
@Autowired |
|
|
|
|
|
private PurchaseOrderMapper purchaseOrderMapper; |
|
|
|
|
|
|
|
|
|
|
|
@Autowired |
|
|
|
|
|
private PurchaseOrderChildMapper purchaseOrderChildMapper; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private final static String RMB = "1"; //RMB
|
|
|
private final static String RMB = "1"; //RMB
|
|
|
|
|
|
|
|
|
/** |
|
|
/** |
|
@ -547,6 +560,32 @@ public class ErpMaterialServiceImpl implements IErpMaterialService |
|
|
return erpMaterialSalesHistoryVos; |
|
|
return erpMaterialSalesHistoryVos; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
|
* 查询物料采购价历史 |
|
|
|
|
|
* */ |
|
|
|
|
|
@Override |
|
|
|
|
|
public List<ErpMaterialPurchaseHistoryVo> selectErpMaterialPurchaseHistoryList(String materialNo) { |
|
|
|
|
|
List<ErpMaterialPurchaseHistoryVo> erpMaterialPurchaseHistoryVos = new ArrayList<>(); |
|
|
|
|
|
|
|
|
|
|
|
List<PurchaseOrderChild> purchaseOrderChildList = purchaseOrderChildMapper.selectOrderChildListByMaterialNo(materialNo); |
|
|
|
|
|
for (PurchaseOrderChild purchaseOrderChild : purchaseOrderChildList) { |
|
|
|
|
|
ErpMaterialPurchaseHistoryVo erpMaterialPurchaseHistoryVo = new ErpMaterialPurchaseHistoryVo(); |
|
|
|
|
|
String purchaseOrderCode = purchaseOrderChild.getPurchaseOrderCode(); |
|
|
|
|
|
PurchaseOrder purchaseOrder = purchaseOrderMapper.selectPurchaseOrderByOrderCode(purchaseOrderCode); |
|
|
|
|
|
erpMaterialPurchaseHistoryVo.setMaterialNum(purchaseOrderChild.getMaterialNum()); |
|
|
|
|
|
erpMaterialPurchaseHistoryVo.setPurchaseUser(purchaseOrder.getPurchaseBuyer()); |
|
|
|
|
|
erpMaterialPurchaseHistoryVo.setPurchaseOrderCode(purchaseOrder.getPurchaseOrderCode()); |
|
|
|
|
|
erpMaterialPurchaseHistoryVo.setPurchaseTime(purchaseOrderChild.getCreateTime()); |
|
|
|
|
|
erpMaterialPurchaseHistoryVo.setTaxPrice(purchaseOrderChild.getMaterialRmb()); |
|
|
|
|
|
erpMaterialPurchaseHistoryVo.setNoTaxPrice(purchaseOrderChild.getMaterialNoRmb()); |
|
|
|
|
|
erpMaterialPurchaseHistoryVo.setTaxSum(purchaseOrderChild.getMaterialRmbSum()); |
|
|
|
|
|
erpMaterialPurchaseHistoryVo.setNoTaxSum(purchaseOrderChild.getMaterialNoRmbSum()); |
|
|
|
|
|
erpMaterialPurchaseHistoryVos.add(erpMaterialPurchaseHistoryVo); |
|
|
|
|
|
} |
|
|
|
|
|
return erpMaterialPurchaseHistoryVos; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
//区分不同币种的金额
|
|
|
//区分不同币种的金额
|
|
|
private void setMaterialPrice(ErpMaterialSalesHistoryVo vo, SysSalesOrderVo sysSalesOrderVo, SysSalesOrderChild child) { |
|
|
private void setMaterialPrice(ErpMaterialSalesHistoryVo vo, SysSalesOrderVo sysSalesOrderVo, SysSalesOrderChild child) { |
|
|
if (RMB.equals(sysSalesOrderVo.getCommonCurrency())) { |
|
|
if (RMB.equals(sysSalesOrderVo.getCommonCurrency())) { |
|
|