四算预算修改

master
OathK1per 2022-08-15 14:36:21 +08:00
parent 099271cad6
commit d06f4732d0
6 changed files with 180 additions and 4 deletions

View File

@ -15,6 +15,42 @@ public class BudgetBean extends IncomeCostBean{
*
*/
private BigDecimal costPurchaseTotalTaxInclude;
/**
*
*/
private BigDecimal incomeDeviceTax;
/**
*
*/
private BigDecimal incomeEngineerTax;
/**
*
*/
private BigDecimal incomeServiceTax;
/**
*
*/
private BigDecimal incomeTotalTax;
/**
*
*/
private BigDecimal costPurchaseDeviceTax;
/**
*
*/
private BigDecimal costPurchaseBuildTax;
/**
*
*/
private BigDecimal costPurchaseServiceTax;
/**
*
*/
private BigDecimal costPurchaseOtherTax;
/**
*
*/
private BigDecimal costOtherOtherTax;
/**
* null0
*/
@ -38,4 +74,77 @@ public class BudgetBean extends IncomeCostBean{
public void setCostPurchaseTotalTaxInclude(BigDecimal costPurchaseTotalTaxInclude) {
this.costPurchaseTotalTaxInclude = costPurchaseTotalTaxInclude;
}
public BigDecimal getIncomeDeviceTax() {
return incomeDeviceTax;
}
public void setIncomeDeviceTax(BigDecimal incomeDeviceTax) {
this.incomeDeviceTax = incomeDeviceTax;
}
public BigDecimal getIncomeEngineerTax() {
return incomeEngineerTax;
}
public void setIncomeEngineerTax(BigDecimal incomeEngineerTax) {
this.incomeEngineerTax = incomeEngineerTax;
}
public BigDecimal getIncomeServiceTax() {
return incomeServiceTax;
}
public void setIncomeServiceTax(BigDecimal incomeServiceTax) {
this.incomeServiceTax = incomeServiceTax;
}
@Override
public BigDecimal getIncomeTotalTax() {
return incomeTotalTax;
}
public void setIncomeTotalTax(BigDecimal incomeTotalTax) {
this.incomeTotalTax = incomeTotalTax;
}
public BigDecimal getCostPurchaseDeviceTax() {
return costPurchaseDeviceTax;
}
public void setCostPurchaseDeviceTax(BigDecimal costPurchaseDeviceTax) {
this.costPurchaseDeviceTax = costPurchaseDeviceTax;
}
public BigDecimal getCostPurchaseBuildTax() {
return costPurchaseBuildTax;
}
public void setCostPurchaseBuildTax(BigDecimal costPurchaseBuildTax) {
this.costPurchaseBuildTax = costPurchaseBuildTax;
}
public BigDecimal getCostPurchaseServiceTax() {
return costPurchaseServiceTax;
}
public void setCostPurchaseServiceTax(BigDecimal costPurchaseServiceTax) {
this.costPurchaseServiceTax = costPurchaseServiceTax;
}
public BigDecimal getCostPurchaseOtherTax() {
return costPurchaseOtherTax;
}
public void setCostPurchaseOtherTax(BigDecimal costPurchaseOtherTax) {
this.costPurchaseOtherTax = costPurchaseOtherTax;
}
public BigDecimal getCostOtherOtherTax() {
return costOtherOtherTax;
}
public void setCostOtherOtherTax(BigDecimal costOtherOtherTax) {
this.costOtherOtherTax = costOtherOtherTax;
}
}

View File

@ -406,6 +406,16 @@ public abstract class IncomeCostBean {
.add(incomeServiceTaxExclude);
}
/**
*
*/
public BigDecimal getIncomeTotalTax() {
if (getIncomeTotalTaxInclude() == null || getIncomeTotalTaxInclude() == null) {
return handleSpecial(null);
}
return getIncomeTotalTaxInclude().subtract(getIncomeTotalTaxInclude());
}
/**
*
*/
@ -458,6 +468,16 @@ public abstract class IncomeCostBean {
.add(costOtherOtherTaxExclude);
}
/**
*
*/
public BigDecimal getCostTotalTax() {
if (getCostTotalTaxExclude() == null || getCostTotalTaxInclude() == null) {
return handleSpecial(null);
}
return getCostTotalTaxInclude().subtract(getCostTotalTaxExclude());
}
/**
*
* --

View File

@ -30,6 +30,7 @@ import javax.servlet.ServletOutputStream;
import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpSession;
import java.io.IOException;
import java.math.BigDecimal;
import java.util.*;
import java.util.concurrent.ConcurrentHashMap;
import java.util.stream.Collectors;
@ -287,10 +288,36 @@ public class ProjectController extends BaseController {
model.put("budgetBean", budgetBean);
//收入明细
List<ProjectBudgetIncomeDetail> budgetIncomeDetail = projectBudgetService.getBudgetIncomeDetail(project);
Set<String> rates = new HashSet<>();
StringBuilder incomeTaxSb = new StringBuilder();
for (ProjectBudgetIncomeDetail projectBudgetIncomeDetail : budgetIncomeDetail) {
if (!rates.contains(projectBudgetIncomeDetail.getTaxRate().toPlainString())) {
incomeTaxSb.append(projectBudgetIncomeDetail.getTaxRate().toPlainString()).append(",");
rates.add(projectBudgetIncomeDetail.getTaxRate().toPlainString());
}
}
if (incomeTaxSb.lastIndexOf(",") == incomeTaxSb.length() - 1) {
model.put("incomeTaxRates", incomeTaxSb.substring(0, incomeTaxSb.length() - 2));
} else {
model.put("incomeTaxRates", incomeTaxSb.toString());
}
model.put("incomeDetails", budgetIncomeDetail);
model.put("incomeTotalAmount", projectBudgetService.getBudgetIncomeAmount(project));
//成本明细
List<ProjectBudgetCostDetail> budgetCostDetail = projectBudgetService.getBudgetCostDetail(project);
Set<String> rates2 = new HashSet<>();
StringBuilder costTaxSb = new StringBuilder();
for (ProjectBudgetCostDetail projectBudgetCostDetail : budgetCostDetail) {
if (!rates2.contains(projectBudgetCostDetail.getTaxRate().toPlainString())) {
costTaxSb.append(projectBudgetCostDetail.getTaxRate().toPlainString()).append(",");
rates2.add(projectBudgetCostDetail.getTaxRate().toPlainString());
}
}
if (costTaxSb.lastIndexOf(",") == costTaxSb.length() - 1) {
model.put("costTaxRates", costTaxSb.substring(0, costTaxSb.length() - 2));
} else {
model.put("costTaxRates", costTaxSb.toString());
}
model.put("costDetails", budgetCostDetail);
model.put("costTotalAmount", projectBudgetService.getBudgetCostAmount(project));
//项目管理成本明细

View File

@ -186,6 +186,7 @@ public class ProjectBudgetService {
List<ProjectBudgetIncomeDetail> collectDevice = incomeDetails.stream().filter(d -> d.getType() == ProjectBudgetIncomeDetail.TYPE_DEVICE).collect(Collectors.toList());
budgetBean.setIncomeDeviceTaxInclude(getIncomeTotalTaxInclude(collectDevice));
budgetBean.setIncomeDeviceTaxExclude(getIncomeTotalTaxExclude(collectDevice));
// budgetBean.setIncomeDeviceTax();
//工程类收入,含税和不含税
List<ProjectBudgetIncomeDetail> collectEngineer = incomeDetails.stream().filter(d -> d.getType() == ProjectBudgetIncomeDetail.TYPE_ENGINEER).collect(Collectors.toList());
budgetBean.setIncomeEngineerTaxInclude(getIncomeTotalTaxInclude(collectEngineer));

View File

@ -191,7 +191,6 @@ public class ProjectService {
//只有如下可以修改
projectInDb.setName(project.getName());
projectInDb.setProjectNo(project.getProjectNo());
projectInDb.setCustomer(project.getCustomer());
projectInDb.setTerminalCustomer(project.getTerminalCustomer());
projectInDb.setIndustryScenario(project.getIndustryScenario());
@ -199,13 +198,33 @@ public class ProjectService {
projectInDb.setTypeDesc(TypeEnum.parseType(project.getType()).getTypeDesc());
projectInDb.setUnderwrittenMode(project.getUnderwrittenMode());
projectInDb.setUnderwrittenModeStr(UnderwrittenModeEnum.parseUnderwrittenMode(project.getUnderwrittenMode()).getUnderwrittenModeStr());
projectInDb.setCertainty(project.getCertainty());
projectInDb.setCertaintyStr(CertaintyEnum.parseCertainty(project.getCertainty()).getCertaintyStr());
projectInDb.setIsSecond(project.getIsSecond());
projectInDb.setIsSecondStr(IsSecondEnum.parseIsSecond(project.getIsSecond()).getIsSecondStr());
projectInDb.setSignType(project.getSignType());
projectInDb.setSignTypeStr(SignTypeEnum.parseSignType(project.getSignType()).getSignTypeStr());
projectInDb.setResolvePlan(project.getResolvePlan());
projectInDb.setResolvePlanStr(ResolvePlanEnum.parseResolvePlan(project.getResolvePlan()).getResolvePlanStr());
projectInDb.setCollaborator(project.getCollaborator());
projectInDb.setGrossProfit(project.getGrossProfit());
projectInDb.setGrossProfitMargin(project.getGrossProfitMargin());
projectInDb.setStartDate(project.getStartDate());
projectInDb.setEndDate(project.getEndDate());
projectInDb.setContractAmount(project.getContractAmount());
projectInDb.setHuazhiProductAmount(project.getHuazhiProductAmount());
projectInDb.setHuizhiProductAmount(project.getHuizhiProductAmount());
projectInDb.setHuasanProductAmount(project.getHuasanProductAmount());
projectInDb.setZiguangOtherAmount(project.getZiguangOtherAmount());
projectInDb.setPrincipal(project.getPrincipal());
projectInDb.setContractTime(project.getContractTime());
projectInDb.setBidsTime(project.getBidsTime());
projectInDb.setAdvanceInterestAmount(project.getAdvanceInterestAmount());
projectInDb.setAdvancePeakAmount(project.getAdvancePeakAmount());
projectInDb.setMainContractCollectionTerms(project.getMainContractCollectionTerms());
projectInDb.setMainContractResolvePlan(project.getMainContractResolvePlan());
projectInDb.setCalculationCollection(project.getCalculationCollection());
projectInDb.setValueRisk(project.getValueRisk());
projectInDb.setOtherName(project.getOtherName());

View File

@ -986,7 +986,7 @@
<td><input type="text" class="number" name="incomeTotalTax" value="${Utils.format(budgetBean.incomeTotalTax,'0')}" required readonly title="此列累计"></td>
</tr>
</tbody>
备注:本表所用税率分别为:${Utils.format(budgetBean.incomeTaxRates,'0')}
(备注:本表所用税率分别为:${incomeTaxRates!})
</table>
<span>成本</span>
<#-- <span class="am-text-primary"><a style="cursor: pointer" id="cost-detail">采购成本明细表</a></span>
@ -1039,7 +1039,7 @@
<td>项目管理成本</td>
<td><input type="text" class="number" name="costProjectManageTaxInclude" value="${Utils.format(budgetBean.costProjectManageTaxInclude,'0')}" readonly required title="项目管理成本总额含税"></td>
<td><input type="text" class="number" name="costProjectManageTaxExclude" value="${Utils.format(budgetBean.costProjectManageTaxExclude,'0')}" readonly required title="项目管理成本总额不含税"></td>
<td><input type="text" class="number" name="costProjectManageTax" value="${Utils.format(budgetBean.costProjectManageTax,'0')}" readonly required title="项目管理成本税金"></td>
<td><input type="text" class="number" name="costProjectManageTax" value="财务计取以不含税方式核算" readonly required title="项目管理成本税金"></td>
</tr>
<tr>
<td>成本</td>
@ -1059,7 +1059,7 @@
<td><input type="text" class="number" name="costTotalTax" value="${Utils.format(budgetBean.costTotalTax,'0')}" readonly required title="此列累计"></td>
</tr>
</tbody>
备注:本表所用税率分别为:${Utils.format(budgetBean.costTaxRates,'0')}
(备注:本表所用税率分别为:${costTaxRates!})
</table>
<span>管理</span>
<#--<span class="am-text-primary budget-plan-detail"><a style="cursor: pointer">资金计划表</a></span>-->