Browse Source

[feat]

采购管理 采购计划
修改采购计划实体类,价格相关字段改为BigDecimal类型;
修改采购计划详情实体类,补全方法;
修改采购计划service根据生产订单生成采购计划接口,修正类型转换;
修改采购计划详情mapper,修正插入语句错误;
dev
王晓迪 3 months ago
parent
commit
f05cf1ed41
  1. 15
      ruoyi-admin/src/main/java/com/ruoyi/purchase/domain/PurchasePlan.java
  2. 10
      ruoyi-admin/src/main/java/com/ruoyi/purchase/domain/PurchasePlanChild.java
  3. 7
      ruoyi-admin/src/main/java/com/ruoyi/purchase/service/impl/PurchasePlanServiceImpl.java
  4. 2
      ruoyi-admin/src/main/resources/mapper/purchase/PurchasePlanChildMapper.xml

15
ruoyi-admin/src/main/java/com/ruoyi/purchase/domain/PurchasePlan.java

@ -5,6 +5,7 @@ import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;
import java.math.BigDecimal;
import java.util.List;
/**
@ -46,11 +47,11 @@ public class PurchasePlan extends BaseEntity
/** 不含税总价(RMB) */
@Excel(name = "不含税总价(RMB)")
private Long noRmbSum;
private BigDecimal noRmbSum;
/** 含税总价(RMB) */
@Excel(name = "含税总价(RMB)")
private Long rmbSum;
private BigDecimal rmbSum;
/** 申请人 */
@Excel(name = "申请人")
@ -140,25 +141,25 @@ public class PurchasePlan extends BaseEntity
this.materialSum = materialSum;
}
public Long getMaterialSum()
public Long getMaterialSum()
{
return materialSum;
}
public void setNoRmbSum(Long noRmbSum)
public void setNoRmbSum(BigDecimal noRmbSum)
{
this.noRmbSum = noRmbSum;
}
public Long getNoRmbSum()
public BigDecimal getNoRmbSum()
{
return noRmbSum;
}
public void setRmbSum(Long rmbSum)
public void setRmbSum(BigDecimal rmbSum)
{
this.rmbSum = rmbSum;
}
public Long getRmbSum()
public BigDecimal getRmbSum()
{
return rmbSum;
}

10
ruoyi-admin/src/main/java/com/ruoyi/purchase/domain/PurchasePlanChild.java

@ -222,6 +222,16 @@ public class PurchasePlanChild extends BaseEntity
this.materialNum = materialNum;
}
public List<PurchaseQuoteChild> getParseSupplierMaterialCombinations() {
return parseSupplierMaterialCombinations;
}
public void setParseSupplierMaterialCombinations(List<PurchaseQuoteChild> parseSupplierMaterialCombinations) {
this.parseSupplierMaterialCombinations = parseSupplierMaterialCombinations;
}
public void setMaterialSole(Long materialSole)
{
this.materialSole = materialSole;

7
ruoyi-admin/src/main/java/com/ruoyi/purchase/service/impl/PurchasePlanServiceImpl.java

@ -1,5 +1,6 @@
package com.ruoyi.purchase.service.impl;
import java.math.BigDecimal;
import java.time.LocalDateTime;
import java.time.format.DateTimeFormatter;
import java.util.*;
@ -422,11 +423,11 @@ public class PurchasePlanServiceImpl implements IPurchasePlanService
//添加数量合计
purchasePlan.setMaterialSum((long) purchasePlanMaterialSum);
purchasePlan.setNoRmbSum(sysMakeOrder.getNoRate());
purchasePlan.setRmbSum(sysMakeOrder.getRate());
purchasePlan.setNoRmbSum(new BigDecimal(sysMakeOrder.getNoRate()));
purchasePlan.setRmbSum(new BigDecimal(sysMakeOrder.getRate()));
purchasePlan.setApplyUser(sysMakeOrder.getSalesman());
purchasePlan.setCreateBy(ShiroUtils.getLoginName());
purchasePlan.setCreateTime(new Date());
purchasePlan.setCreateTime(DateUtils.getNowDate());
purchasePlan.setAuditStatus("0");
purchasePlan.setUseStatus("0");
purchasePlan.setPurchasePlanStatus("0");

2
ruoyi-admin/src/main/resources/mapper/purchase/PurchasePlanChildMapper.xml

@ -125,7 +125,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="materialNum != null">#{materialNum},</if>
<if test="materialSole != null">#{materialSole},</if>
<if test="materialRmb != null">#{materialRmb},</if>
<if test="materialNoRmb != null">#{materialNormb},</if>
<if test="materialNoRmb != null">#{materialNoRmb},</if>
<if test="createBy != null">#{createBy},</if>
<if test="createTime != null">#{createTime},</if>
<if test="updateBy != null">#{updateBy},</if>

Loading…
Cancel
Save