|
@@ -10,6 +10,7 @@ import org.jeecg.common.api.vo.Result;
|
|
|
import org.jeecg.common.aspect.annotation.AutoLog;
|
|
|
import org.jeecg.common.system.base.controller.JeecgController;
|
|
|
import org.jeecg.common.system.query.QueryGenerator;
|
|
|
+import org.jeecg.modules.projectChbSwf.entity.ProjectChbSwf;
|
|
|
import org.jeecg.modules.projectCost.entity.ProjectCost;
|
|
|
import org.jeecg.modules.projectCost.service.IProjectCostService;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
@@ -18,8 +19,11 @@ import org.springframework.web.servlet.ModelAndView;
|
|
|
|
|
|
import javax.servlet.http.HttpServletRequest;
|
|
|
import javax.servlet.http.HttpServletResponse;
|
|
|
+import java.math.BigDecimal;
|
|
|
+import java.util.ArrayList;
|
|
|
import java.util.Arrays;
|
|
|
import java.util.List;
|
|
|
+import java.util.Objects;
|
|
|
|
|
|
/**
|
|
|
* @Description: 项目成本
|
|
@@ -36,6 +40,48 @@ public class ProjectCostController extends JeecgController<ProjectCost, IProject
|
|
|
@SuppressWarnings("all")
|
|
|
private IProjectCostService projectCostService;
|
|
|
|
|
|
+ /**项目成本——批产任务的各种费用详情——根据批产任务号查询*/
|
|
|
+ @ApiOperation("项目成本——批产任务的各种费用详情")
|
|
|
+ @GetMapping("/getPCCostDetailList")
|
|
|
+ public List<ProjectCost> getPCCostDetailList(String pccode, BigDecimal proportion){
|
|
|
+ List<ProjectCost> list = new ArrayList<>();
|
|
|
+ if(!Objects.equals(pccode,"") && !Objects.equals(proportion,"")){
|
|
|
+ list = projectCostService.getPCRWList(pccode);
|
|
|
+ for (ProjectCost cost : list){
|
|
|
+ cost = jisuan(cost,proportion);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ return list;
|
|
|
+ }
|
|
|
+
|
|
|
+ public ProjectCost jisuan(ProjectCost cost,BigDecimal proportion){
|
|
|
+ if(cost.getOneIncome()!=null) cost.setOneIncome(cost.getOneIncome().multiply(proportion));
|
|
|
+ if(cost.getOneIncome()!=null) cost.setOneCost(cost.getOneCost().multiply(proportion));
|
|
|
+ if(cost.getOneProfit()!=null) cost.setOneProfit(cost.getOneProfit().multiply(proportion));
|
|
|
+ if(cost.getLre()!=null) cost.setLre(cost.getLre().multiply(proportion));
|
|
|
+ if(cost.getLrl()!=null) cost.setLrl(cost.getLrl().multiply(proportion));
|
|
|
+ if(cost.getEstimationcoat()!=null) cost.setEstimationcoat(cost.getEstimationcoat().multiply(proportion));
|
|
|
+ if(cost.getContractfpe()!=null) cost.setContractfpe(cost.getContractfpe().multiply(proportion));
|
|
|
+ if(cost.getTaskmoney()!=null) cost.setTaskmoney(cost.getTaskmoney().multiply(proportion));
|
|
|
+ if(cost.getZcb()!=null) cost.setZcb(cost.getZcb().multiply(proportion));
|
|
|
+ if(cost.getClf()!=null) cost.setClf(cost.getClf().multiply(proportion));
|
|
|
+ if(cost.getZyf()!=null) cost.setZyf(cost.getZyf().multiply(proportion));
|
|
|
+ if(cost.getSwf()!=null) cost.setSwf(cost.getSwf().multiply(proportion));
|
|
|
+ if(cost.getWxf()!=null) cost.setWxf(cost.getWxf().multiply(proportion));
|
|
|
+ if(cost.getRldlf()!=null) cost.setRldlf(cost.getRldlf().multiply(proportion));
|
|
|
+ if(cost.getGdzczj()!=null) cost.setGdzczj(cost.getGdzczj().multiply(proportion));
|
|
|
+ if(cost.getGzjlwf()!=null) cost.setGzjlwf(cost.getGzjlwf().multiply(proportion));
|
|
|
+ if(cost.getGlf()!=null) cost.setGlf(cost.getGlf().multiply(proportion));
|
|
|
+ if(cost.getZjcb()!=null) cost.setZjcb(cost.getZjcb().multiply(proportion));
|
|
|
+ if(cost.getLbsy()!=null) cost.setLbsy(cost.getLbsy().multiply(proportion));
|
|
|
+ if(cost.getWorkhour()!=null) cost.setWorkhour(cost.getWorkhour().multiply(proportion));
|
|
|
+ if(cost.getSjgs()!=null) cost.setSjgs(cost.getSjgs().multiply(proportion));
|
|
|
+ if(cost.getScgs()!=null) cost.setScgs(cost.getScgs().multiply(proportion));
|
|
|
+ if(cost.getClys()!=null) cost.setClys(cost.getClys().multiply(proportion));
|
|
|
+ if(cost.getWxys()!=null) cost.setWxys(cost.getWxys().multiply(proportion));
|
|
|
+ return cost;
|
|
|
+ }
|
|
|
+
|
|
|
/**
|
|
|
* 对比
|
|
|
*/
|