数量字段统一提交
This commit is contained in:
parent
171bf24536
commit
1a18962c28
|
|
@ -38,7 +38,7 @@ spring:
|
|||
datasource:
|
||||
ds1:
|
||||
nacos:
|
||||
server-addr: 192.168.0.56:8848
|
||||
server-addr: 192.168.1.2:8848
|
||||
dataId: sentinel-sgzb-gateway
|
||||
groupId: DEFAULT_GROUP
|
||||
data-type: json
|
||||
|
|
|
|||
|
|
@ -152,7 +152,7 @@ public class LeaseApplyDetails implements Serializable {
|
|||
* 实时库存
|
||||
*/
|
||||
@ApiModelProperty(value = "实时库存")
|
||||
private Double num;
|
||||
private Integer num;
|
||||
|
||||
@ApiModelProperty(value = "库管员id")
|
||||
private Integer userId;
|
||||
|
|
@ -172,5 +172,5 @@ public class LeaseApplyDetails implements Serializable {
|
|||
@ApiModelProperty(value="设备状态")
|
||||
private String maStatus;
|
||||
@ApiModelProperty(value="预领数量-已领数量的差值")
|
||||
private Double nums;
|
||||
private Integer nums;
|
||||
}
|
||||
|
|
@ -8,6 +8,7 @@ import io.swagger.annotations.ApiModelProperty;
|
|||
import lombok.Data;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
|
|
@ -128,13 +129,13 @@ public class StorageStatus {
|
|||
* 在用总价值
|
||||
*/
|
||||
@ApiModelProperty(value = "在用总价值")
|
||||
private Double usPrice;
|
||||
private BigDecimal usPrice;
|
||||
|
||||
/**
|
||||
* 投入总价值
|
||||
*/
|
||||
@ApiModelProperty(value = "投入总价值")
|
||||
private Double totalPrice;
|
||||
private BigDecimal totalPrice;
|
||||
|
||||
/**
|
||||
* 退料人
|
||||
|
|
|
|||
|
|
@ -13,7 +13,7 @@ public class CarUseVo {
|
|||
private String carNo;
|
||||
|
||||
/** 使用频次油耗*/
|
||||
private int useNum;
|
||||
private Integer useNum;
|
||||
|
||||
/** 油耗*/
|
||||
private double squander;
|
||||
|
|
|
|||
|
|
@ -13,7 +13,7 @@ public class MaTypeDo {
|
|||
private String typeName;
|
||||
|
||||
/** 数量*/
|
||||
private double num;
|
||||
private Integer num;
|
||||
|
||||
/** 管理方式(0编号 1计数)*/
|
||||
private String manageType;
|
||||
|
|
|
|||
|
|
@ -13,5 +13,5 @@ public class MaterialDataVo {
|
|||
private String unitName;
|
||||
|
||||
/** 数量*/
|
||||
private double num;
|
||||
private Integer num;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -33,11 +33,11 @@ public class MaterialDetailVo {
|
|||
|
||||
/** 领、退料数量*/
|
||||
@ApiModelProperty(value = "领、退料数量")
|
||||
private Double num;
|
||||
private Integer num;
|
||||
|
||||
/** 实际退料数量*/
|
||||
@ApiModelProperty(value = "实际退料数量")
|
||||
private Double realityNum;
|
||||
private Integer realityNum;
|
||||
|
||||
/** 设备负责人*/
|
||||
@ApiModelProperty(value = "设备负责人")
|
||||
|
|
|
|||
|
|
@ -151,11 +151,11 @@ public class CommonUtil {
|
|||
MaterialDataVo vo = lyList.get(i);
|
||||
if (Objects.nonNull(vo.getUnitName())) {
|
||||
nameList.add(vo.getUnitName());
|
||||
valueList.add((int) Math.round(vo.getNum()));
|
||||
valueList.add(vo.getNum());
|
||||
for (int j = 0; j < bfList.size(); j++) {
|
||||
MaterialDataVo vo2 = bfList.get(j);
|
||||
if (Objects.nonNull(vo2.getUnitName()) && Objects.equals(vo.getUnitName(), vo2.getUnitName())) {
|
||||
valueList2.add((int) Math.round(vo2.getNum()));
|
||||
valueList2.add(vo2.getNum());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -181,6 +181,6 @@ public class BackRecord {
|
|||
* 实时库存
|
||||
*/
|
||||
@ApiModelProperty(value = "实时库存")
|
||||
private Double num;
|
||||
private Integer num;
|
||||
|
||||
}
|
||||
|
|
@ -7,6 +7,7 @@ import lombok.Data;
|
|||
import lombok.NoArgsConstructor;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
|
|
@ -37,19 +38,19 @@ public class CheckDetailsInfo {
|
|||
|
||||
/** 计划单价 */
|
||||
@ApiModelProperty(value = "计划单价")
|
||||
private Double purchasePrice;
|
||||
private BigDecimal purchasePrice;
|
||||
|
||||
/** 计划数量 */
|
||||
@ApiModelProperty(value = "计划数量")
|
||||
private Double purchaseNum;
|
||||
private Integer purchaseNum;
|
||||
|
||||
/** 借出数量 */
|
||||
@ApiModelProperty(value = "借出数量")
|
||||
private Double borrowNum;
|
||||
private Integer borrowNum;
|
||||
|
||||
/** 计划总价 */
|
||||
@ApiModelProperty(value = "计划总价")
|
||||
private Double totalPrice;
|
||||
private BigDecimal totalPrice;
|
||||
|
||||
/** 备注 */
|
||||
@ApiModelProperty(value = "备注")
|
||||
|
|
|
|||
|
|
@ -69,7 +69,7 @@ public class InputRecord {
|
|||
*/
|
||||
@ApiModelProperty(value = "入库数量")
|
||||
@Excel(name = "入库数量",cellType = Excel.ColumnType.NUMERIC)
|
||||
private Double inputNum;
|
||||
private Integer inputNum;
|
||||
|
||||
/**
|
||||
* 创建时间
|
||||
|
|
@ -214,6 +214,6 @@ public class InputRecord {
|
|||
* 实时库存
|
||||
*/
|
||||
@ApiModelProperty(value = "实时库存")
|
||||
private Double num;
|
||||
private Integer num;
|
||||
|
||||
}
|
||||
|
|
@ -145,6 +145,6 @@ public class LeaseApplyDetails implements Serializable {
|
|||
* 实时库存
|
||||
*/
|
||||
@ApiModelProperty(value = "实时库存")
|
||||
private Double num;
|
||||
private Integer num;
|
||||
|
||||
}
|
||||
|
|
@ -6,6 +6,7 @@ import io.swagger.annotations.ApiModelProperty;
|
|||
import lombok.Data;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
|
|
@ -55,12 +56,12 @@ public class PlanManagementVO {
|
|||
/** 借出方原计划数 */
|
||||
@Excel(name = "原计划数")
|
||||
@ApiModelProperty(value = "借出方原计划数")
|
||||
private Double borrowerOrigPlanNum;
|
||||
private Integer borrowerOrigPlanNum;
|
||||
|
||||
/** 借出方现计划数 */
|
||||
@Excel(name = "现计划数")
|
||||
@ApiModelProperty(value = "借出方现计划数")
|
||||
private Double borrowerNowPlanNum;
|
||||
private Integer borrowerNowPlanNum;
|
||||
|
||||
/** 借入方单位 */
|
||||
@Excel(name = "借入方单位")
|
||||
|
|
@ -69,25 +70,25 @@ public class PlanManagementVO {
|
|||
|
||||
/** 借入方原计划数 */
|
||||
@ApiModelProperty(value = "借入方原计划数")
|
||||
private Double lenderOrigPlanNum;
|
||||
private Integer lenderOrigPlanNum;
|
||||
|
||||
/** 借入方现计划数 */
|
||||
@Excel(name = "现有计划数")
|
||||
@ApiModelProperty(value = "借入方现计划数")
|
||||
private Double lenderNowPlanNum;
|
||||
private Integer lenderNowPlanNum;
|
||||
|
||||
/** 借出数 */
|
||||
@Excel(name = "借调数量")
|
||||
@ApiModelProperty(value = "借出数")
|
||||
private Double borrowNum;
|
||||
private Integer borrowNum;
|
||||
|
||||
/** 计划单价 */
|
||||
@ApiModelProperty(value = "计划单价")
|
||||
private Double planPrice;
|
||||
private BigDecimal planPrice;
|
||||
|
||||
/** 计划总价 */
|
||||
@ApiModelProperty(value = "计划总价")
|
||||
private Double planCost;
|
||||
private BigDecimal planCost;
|
||||
|
||||
/** 类型id */
|
||||
@ApiModelProperty(value = "类型id")
|
||||
|
|
|
|||
|
|
@ -6,6 +6,7 @@ import io.swagger.annotations.ApiModelProperty;
|
|||
import lombok.Data;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
|
|
@ -47,17 +48,17 @@ public class PlanVO {
|
|||
/** 计划数 */
|
||||
@Excel(name = "计划数")
|
||||
@ApiModelProperty(value = "计划数")
|
||||
private Double lenderOrigPlanNum;
|
||||
private Integer lenderOrigPlanNum;
|
||||
|
||||
/** 计划单价 */
|
||||
@Excel(name = "计划单价")
|
||||
@ApiModelProperty(value = "计划单价")
|
||||
private Double planPrice;
|
||||
private BigDecimal planPrice;
|
||||
|
||||
/** 计划总价 */
|
||||
@Excel(name = "计划总价")
|
||||
@ApiModelProperty(value = "计划总价")
|
||||
private Double planCost;
|
||||
private BigDecimal planCost;
|
||||
|
||||
/** 类型id */
|
||||
@ApiModelProperty(value = "类型id")
|
||||
|
|
@ -79,7 +80,7 @@ public class PlanVO {
|
|||
|
||||
/** 借出数 */
|
||||
@ApiModelProperty(value = "借出数")
|
||||
private Double borrowNum;
|
||||
private Integer borrowNum;
|
||||
|
||||
/** 备注 */
|
||||
@Excel(name = "备注")
|
||||
|
|
|
|||
|
|
@ -7,6 +7,7 @@ import io.swagger.annotations.ApiModelProperty;
|
|||
import lombok.Data;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
|
|
@ -101,33 +102,33 @@ public class ProjUsingRecord {
|
|||
*/
|
||||
@ApiModelProperty(value = "租赁数量")
|
||||
@Excel(name = "租赁数量",cellType = Excel.ColumnType.NUMERIC)
|
||||
private Double outNum;
|
||||
private Integer outNum;
|
||||
|
||||
/**
|
||||
* 归还数量
|
||||
*/
|
||||
@ApiModelProperty(value = "归还数量")
|
||||
@Excel(name = "归还数量",cellType = Excel.ColumnType.NUMERIC)
|
||||
private Double backNum;
|
||||
private Integer backNum;
|
||||
|
||||
/**
|
||||
* 在用数量
|
||||
*/
|
||||
@ApiModelProperty(value = "在用数量")
|
||||
@Excel(name = "在用数量",cellType = Excel.ColumnType.NUMERIC)
|
||||
private Double usNum;
|
||||
private Integer usNum;
|
||||
|
||||
/**
|
||||
* 在用总价值
|
||||
*/
|
||||
@ApiModelProperty(value = "在用总价值")
|
||||
private Double usPrice;
|
||||
private BigDecimal usPrice;
|
||||
|
||||
/**
|
||||
* 投入总价值
|
||||
*/
|
||||
@ApiModelProperty(value = "投入总价值")
|
||||
private Double totalPrice;
|
||||
private BigDecimal totalPrice;
|
||||
|
||||
/**
|
||||
* 退料人
|
||||
|
|
@ -207,6 +208,6 @@ public class ProjUsingRecord {
|
|||
* 实时库存
|
||||
*/
|
||||
@ApiModelProperty(value = "实时库存")
|
||||
private Double num;
|
||||
private Integer num;
|
||||
|
||||
}
|
||||
|
|
@ -37,7 +37,7 @@ public class PurchaseMacodeInfo extends BaseEntity
|
|||
* 库存数量
|
||||
*/
|
||||
@ApiModelProperty(value = "库存数量")
|
||||
private Double num;
|
||||
private Integer num;
|
||||
|
||||
/** 机具编号 */
|
||||
@ApiModelProperty(value = "机具编号")
|
||||
|
|
@ -190,11 +190,11 @@ public class PurchaseMacodeInfo extends BaseEntity
|
|||
return typeId;
|
||||
}
|
||||
|
||||
public Double getNum() {
|
||||
public Integer getNum() {
|
||||
return num;
|
||||
}
|
||||
|
||||
public void setNum(Double num) {
|
||||
public void setNum(Integer num) {
|
||||
this.num = num;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -46,7 +46,7 @@ public class RepairTestInputDetailVo {
|
|||
|
||||
/** 数量*/
|
||||
@Excel(name = "数量")
|
||||
private double repairNum;
|
||||
private Integer repairNum;
|
||||
|
||||
/** 编号*/
|
||||
@Excel(name = "编号")
|
||||
|
|
|
|||
|
|
@ -7,6 +7,7 @@ import io.swagger.annotations.ApiModelProperty;
|
|||
import lombok.Data;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
|
|
@ -62,42 +63,42 @@ public class StorageStatus {
|
|||
*/
|
||||
@ApiModelProperty(value = "在库数量")
|
||||
@Excel(name = "在库数量",cellType = Excel.ColumnType.NUMERIC)
|
||||
private Double num;
|
||||
private Integer num;
|
||||
|
||||
/**
|
||||
* 在用数量
|
||||
*/
|
||||
@ApiModelProperty(value = "在用数量")
|
||||
@Excel(name = "在用数量",cellType = Excel.ColumnType.NUMERIC)
|
||||
private Double usNum;
|
||||
private Integer usNum;
|
||||
|
||||
/**
|
||||
* 在修数量
|
||||
*/
|
||||
@ApiModelProperty(value = "在修数量")
|
||||
@Excel(name = "在修数量",cellType = Excel.ColumnType.NUMERIC)
|
||||
private Double repairNum;
|
||||
private Integer repairNum;
|
||||
|
||||
/**
|
||||
* 修试后待入库
|
||||
*/
|
||||
@ApiModelProperty(value = "修试后待入库")
|
||||
@Excel(name = "修试后待入库",cellType = Excel.ColumnType.NUMERIC)
|
||||
private Double repairInputNum;
|
||||
private Integer repairInputNum;
|
||||
|
||||
/**
|
||||
* 新购待入库
|
||||
*/
|
||||
@ApiModelProperty(value = "新购待入库")
|
||||
@Excel(name = "新购待入库",cellType = Excel.ColumnType.NUMERIC)
|
||||
private Double inputNum;
|
||||
private Integer inputNum;
|
||||
|
||||
/**
|
||||
* 总保有量
|
||||
*/
|
||||
@ApiModelProperty(value = "总保有量")
|
||||
@Excel(name = "总保有量",cellType = Excel.ColumnType.NUMERIC)
|
||||
private Double allNum;
|
||||
private Integer allNum;
|
||||
|
||||
/**
|
||||
* 是否计数
|
||||
|
|
@ -112,27 +113,27 @@ public class StorageStatus {
|
|||
*/
|
||||
@ApiModelProperty(value = "租赁数量")
|
||||
@Excel(name = "租赁数量",cellType = Excel.ColumnType.NUMERIC)
|
||||
private Double outNum;
|
||||
private Integer outNum;
|
||||
|
||||
/**
|
||||
* 归还数量
|
||||
*/
|
||||
@ApiModelProperty(value = "归还数量")
|
||||
@Excel(name = "归还数量",cellType = Excel.ColumnType.NUMERIC)
|
||||
private Double backNum;
|
||||
private Integer backNum;
|
||||
|
||||
|
||||
/**
|
||||
* 在用总价值
|
||||
*/
|
||||
@ApiModelProperty(value = "在用总价值")
|
||||
private Double usPrice;
|
||||
private BigDecimal usPrice;
|
||||
|
||||
/**
|
||||
* 投入总价值
|
||||
*/
|
||||
@ApiModelProperty(value = "投入总价值")
|
||||
private Double totalPrice;
|
||||
private BigDecimal totalPrice;
|
||||
|
||||
/**
|
||||
* 退料人
|
||||
|
|
|
|||
|
|
@ -14,6 +14,7 @@ import org.springframework.stereotype.Service;
|
|||
import org.springframework.transaction.annotation.Transactional;
|
||||
import org.springframework.transaction.interceptor.TransactionAspectSupport;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
|
|
@ -93,11 +94,11 @@ public class PlanManagementServiceImpl implements PlanManagementService {
|
|||
info.setCreateBy(dto.getCreateBy());
|
||||
info.setUpdateBy(dto.getUpdateBy());
|
||||
if (info.getPurchasePrice() != null && info.getPurchaseNum() != null) {
|
||||
Double total = info.getPurchasePrice() * info.getPurchaseNum();
|
||||
total = (double) Math.round(total * 100) / 100;
|
||||
BigDecimal total = info.getPurchasePrice().multiply(new BigDecimal(info.getPurchaseNum()));
|
||||
// total = (double) Math.round(total * 100) / 100;
|
||||
info.setTotalPrice(total);
|
||||
} else {
|
||||
info.setTotalPrice(0.00);
|
||||
info.setTotalPrice(new BigDecimal(0));
|
||||
}
|
||||
res += planManagementMapper.insertPlanNeedInfo(info);
|
||||
res += planManagementMapper.insertPlanNeedDetail(info);
|
||||
|
|
|
|||
Loading…
Reference in New Issue