完成鲜丰金额保留2位
This commit is contained in:
@@ -3,6 +3,7 @@ package com.cool.store.dto.decoration;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
@@ -10,7 +11,7 @@ import java.util.List;
|
||||
* @Date 2024/4/28 15:17
|
||||
* @Version 1.0
|
||||
*/
|
||||
@Data
|
||||
|
||||
public class BudgetDTO {
|
||||
@ApiModelProperty("预算主键")
|
||||
private Long id;
|
||||
@@ -19,15 +20,87 @@ public class BudgetDTO {
|
||||
@ApiModelProperty("计价类型")
|
||||
private String type;
|
||||
@ApiModelProperty("合计")
|
||||
private String vzHj;
|
||||
private BigDecimal vzHj;
|
||||
@ApiModelProperty("取费合计")
|
||||
private String totalAmount;
|
||||
private BigDecimal totalAmount;
|
||||
@ApiModelProperty("成本合计")
|
||||
private String totalCost;
|
||||
private BigDecimal totalCost;
|
||||
@ApiModelProperty("创建时间")
|
||||
private String createDate;
|
||||
@ApiModelProperty("创建人")
|
||||
private String createBy;
|
||||
@ApiModelProperty("预算详情")
|
||||
private List<BudgetDetailDTO> details;
|
||||
|
||||
public Long getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(Long id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
public void setName(String name) {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
public String getType() {
|
||||
return type;
|
||||
}
|
||||
|
||||
public void setType(String type) {
|
||||
this.type = type;
|
||||
}
|
||||
|
||||
public BigDecimal getVzHj() {
|
||||
return vzHj;
|
||||
}
|
||||
|
||||
public void setVzHj(BigDecimal vzHj) {
|
||||
this.vzHj = vzHj.setScale(2, BigDecimal.ROUND_HALF_UP);
|
||||
}
|
||||
|
||||
public BigDecimal getTotalAmount() {
|
||||
return totalAmount;
|
||||
}
|
||||
|
||||
public void setTotalAmount(BigDecimal totalAmount) {
|
||||
this.totalAmount = totalAmount.setScale(2, BigDecimal.ROUND_HALF_UP);
|
||||
}
|
||||
|
||||
public BigDecimal getTotalCost() {
|
||||
return totalCost;
|
||||
}
|
||||
|
||||
public void setTotalCost(BigDecimal totalCost) {
|
||||
this.totalCost = totalCost.setScale(2, BigDecimal.ROUND_HALF_UP);
|
||||
}
|
||||
|
||||
public String getCreateDate() {
|
||||
return createDate;
|
||||
}
|
||||
|
||||
public void setCreateDate(String createDate) {
|
||||
this.createDate = createDate;
|
||||
}
|
||||
|
||||
public String getCreateBy() {
|
||||
return createBy;
|
||||
}
|
||||
|
||||
public void setCreateBy(String createBy) {
|
||||
this.createBy = createBy;
|
||||
}
|
||||
|
||||
public List<BudgetDetailDTO> getDetails() {
|
||||
return details;
|
||||
}
|
||||
|
||||
public void setDetails(List<BudgetDetailDTO> details) {
|
||||
this.details = details;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -25,19 +25,19 @@ public class BudgetDetailDTO {
|
||||
@ApiModelProperty("预算工程量")
|
||||
private String amount;
|
||||
@ApiModelProperty("单价")
|
||||
private String unitPrice;
|
||||
private BigDecimal unitPrice;
|
||||
@ApiModelProperty("预算合计")
|
||||
private String totalPrice;
|
||||
private BigDecimal totalPrice;
|
||||
@ApiModelProperty("人工单价")
|
||||
private String labour;
|
||||
private BigDecimal labour;
|
||||
@ApiModelProperty("材料单价")
|
||||
private String material;
|
||||
private BigDecimal material;
|
||||
@ApiModelProperty("主材成本")
|
||||
private String mainMaterialCostPrice;
|
||||
private BigDecimal mainMaterialCostPrice;
|
||||
@ApiModelProperty("辅材成本")
|
||||
private String auxiliaryMaterialCostPrice;
|
||||
private BigDecimal auxiliaryMaterialCostPrice;
|
||||
@ApiModelProperty("人工成本")
|
||||
private String labourCostPrice;
|
||||
private BigDecimal labourCostPrice;
|
||||
@ApiModelProperty("结算工程量")
|
||||
private String remark;
|
||||
@ApiModelProperty("结算合计")
|
||||
@@ -49,9 +49,177 @@ public class BudgetDetailDTO {
|
||||
@ApiModelProperty("损耗单价")
|
||||
private BigDecimal lossPrice;
|
||||
@ApiModelProperty("计划利润")
|
||||
private String planProfit;
|
||||
private BigDecimal planProfit;
|
||||
@ApiModelProperty("利润率")
|
||||
private BigDecimal profitRate;
|
||||
@ApiModelProperty("唯一供应商")
|
||||
private String supplierName;
|
||||
|
||||
public Long getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(Long id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public String getNodeType() {
|
||||
return nodeType;
|
||||
}
|
||||
|
||||
public void setNodeType(String nodeType) {
|
||||
this.nodeType = nodeType;
|
||||
}
|
||||
|
||||
public String getNumber() {
|
||||
return number;
|
||||
}
|
||||
|
||||
public void setNumber(String number) {
|
||||
this.number = number;
|
||||
}
|
||||
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
public void setName(String name) {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
public String getUnitName() {
|
||||
return unitName;
|
||||
}
|
||||
|
||||
public void setUnitName(String unitName) {
|
||||
this.unitName = unitName;
|
||||
}
|
||||
|
||||
public String getAmount() {
|
||||
return amount;
|
||||
}
|
||||
|
||||
public void setAmount(String amount) {
|
||||
this.amount = amount;
|
||||
}
|
||||
|
||||
public BigDecimal getUnitPrice() {
|
||||
return unitPrice;
|
||||
}
|
||||
|
||||
public void setUnitPrice(BigDecimal unitPrice) {
|
||||
this.unitPrice = unitPrice.setScale(2, BigDecimal.ROUND_HALF_UP);
|
||||
}
|
||||
|
||||
public BigDecimal getTotalPrice() {
|
||||
return totalPrice;
|
||||
}
|
||||
|
||||
public void setTotalPrice(BigDecimal totalPrice) {
|
||||
this.totalPrice = totalPrice.setScale(2, BigDecimal.ROUND_HALF_UP);
|
||||
}
|
||||
|
||||
public BigDecimal getLabour() {
|
||||
return labour;
|
||||
}
|
||||
|
||||
public void setLabour(BigDecimal labour) {
|
||||
this.labour = labour.setScale(2, BigDecimal.ROUND_HALF_UP);
|
||||
}
|
||||
|
||||
public BigDecimal getMaterial() {
|
||||
return material;
|
||||
}
|
||||
|
||||
public void setMaterial(BigDecimal material) {
|
||||
this.material = material.setScale(2, BigDecimal.ROUND_HALF_UP);
|
||||
}
|
||||
|
||||
public BigDecimal getMainMaterialCostPrice() {
|
||||
return mainMaterialCostPrice;
|
||||
}
|
||||
|
||||
public void setMainMaterialCostPrice(BigDecimal mainMaterialCostPrice) {
|
||||
this.mainMaterialCostPrice = mainMaterialCostPrice.setScale(2, BigDecimal.ROUND_HALF_UP);
|
||||
}
|
||||
|
||||
public BigDecimal getAuxiliaryMaterialCostPrice() {
|
||||
return auxiliaryMaterialCostPrice;
|
||||
}
|
||||
|
||||
public void setAuxiliaryMaterialCostPrice(BigDecimal auxiliaryMaterialCostPrice) {
|
||||
this.auxiliaryMaterialCostPrice = auxiliaryMaterialCostPrice.setScale(2, BigDecimal.ROUND_HALF_UP);
|
||||
}
|
||||
|
||||
public BigDecimal getLabourCostPrice() {
|
||||
return labourCostPrice;
|
||||
}
|
||||
|
||||
public void setLabourCostPrice(BigDecimal labourCostPrice) {
|
||||
this.labourCostPrice = labourCostPrice.setScale(2, BigDecimal.ROUND_HALF_UP);
|
||||
}
|
||||
|
||||
public String getRemark() {
|
||||
return remark;
|
||||
}
|
||||
|
||||
public void setRemark(String remark) {
|
||||
this.remark = remark;
|
||||
}
|
||||
|
||||
public BigDecimal getLoss() {
|
||||
return loss;
|
||||
}
|
||||
|
||||
public void setLoss(BigDecimal loss) {
|
||||
this.loss = loss.setScale(2, BigDecimal.ROUND_HALF_UP);
|
||||
}
|
||||
|
||||
public BigDecimal getTotalCost() {
|
||||
return totalCost;
|
||||
}
|
||||
|
||||
public void setTotalCost(BigDecimal totalCost) {
|
||||
this.totalCost = totalCost.setScale(2, BigDecimal.ROUND_HALF_UP);
|
||||
}
|
||||
|
||||
public BigDecimal getCost() {
|
||||
return cost;
|
||||
}
|
||||
|
||||
public void setCost(BigDecimal cost) {
|
||||
this.cost = cost.setScale(2, BigDecimal.ROUND_HALF_UP);
|
||||
}
|
||||
|
||||
public BigDecimal getLossPrice() {
|
||||
return lossPrice;
|
||||
}
|
||||
|
||||
public void setLossPrice(BigDecimal lossPrice) {
|
||||
this.lossPrice = lossPrice.setScale(2, BigDecimal.ROUND_HALF_UP);
|
||||
}
|
||||
|
||||
public BigDecimal getPlanProfit() {
|
||||
return planProfit;
|
||||
}
|
||||
|
||||
public void setPlanProfit(BigDecimal planProfit) {
|
||||
this.planProfit = planProfit.setScale(2, BigDecimal.ROUND_HALF_UP);
|
||||
}
|
||||
|
||||
public BigDecimal getProfitRate() {
|
||||
return profitRate;
|
||||
}
|
||||
|
||||
public void setProfitRate(BigDecimal profitRate) {
|
||||
this.profitRate = profitRate.setScale(2, BigDecimal.ROUND_HALF_UP);
|
||||
}
|
||||
|
||||
public String getSupplierName() {
|
||||
return supplierName;
|
||||
}
|
||||
|
||||
public void setSupplierName(String supplierName) {
|
||||
this.supplierName = supplierName;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -176,14 +176,13 @@ public class DecorationServiceImpl implements DecorationService {
|
||||
//预算
|
||||
BudgetDTO proposedBookBudget = getBudgetDTOS(decoration);
|
||||
if (proposedBookBudget == null) return null;
|
||||
String vzHj = proposedBookBudget.getVzHj();
|
||||
BigDecimal vzHj = proposedBookBudget.getVzHj();
|
||||
//支付二维码url
|
||||
Long regionId = shopInfoDAO.getRegionIdByid(shopId);
|
||||
String payPic = regionQrcodeConfigDao.getPayPicByRegionId(regionId);
|
||||
DecorationModelDTO decorationModelDTO = new DecorationModelDTO();
|
||||
decorationModelDTO.setPayUrl(payPic);
|
||||
BigDecimal totalAmount = new BigDecimal(vzHj);
|
||||
decorationModelDTO.setTotalAmount(totalAmount.setScale(2, RoundingMode.HALF_UP));
|
||||
decorationModelDTO.setTotalAmount(vzHj);
|
||||
return decorationModelDTO;
|
||||
}
|
||||
|
||||
|
||||
@@ -5,6 +5,7 @@ import com.cool.store.dao.*;
|
||||
import com.cool.store.entity.*;
|
||||
import com.cool.store.enums.MessageEnum;
|
||||
import com.cool.store.enums.SMSMsgEnum;
|
||||
import com.cool.store.mq.util.HttpRestTemplateService;
|
||||
import com.cool.store.response.ResponseResult;
|
||||
import com.cool.store.service.ShopService;
|
||||
import com.cool.store.service.impl.CommonService;
|
||||
@@ -29,7 +30,10 @@ public class PCTestController {
|
||||
private ShopService shopService;
|
||||
@Resource
|
||||
private LineInterviewDAO lineInterviewDAO;
|
||||
static String url = "https://hzly.cloudcubic.net/ajaxHandle/synchronization/JCallBackSynchronizationHandler.ashx?action=app&controller=GetProjectDetails&projectid=";
|
||||
|
||||
@Resource
|
||||
private HttpRestTemplateService httpRestTemplateService;
|
||||
|
||||
@GetMapping("/sendMessage")
|
||||
public ResponseResult<Boolean> sendMessage(@RequestParam("lineId")Long lineId, @RequestParam("pointId")Long pointId, @RequestParam MessageEnum messageEnum){
|
||||
@@ -71,4 +75,5 @@ public class PCTestController {
|
||||
shopService.initShop(lineInfo);
|
||||
return ResponseResult.success(Boolean.FALSE);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user