修改项目列表
parent
dadf794e32
commit
da544f160f
|
@ -123,9 +123,8 @@ public class ProjectController extends BaseController {
|
||||||
}
|
}
|
||||||
|
|
||||||
int offset = (pageNumber - 1) * pageSize;
|
int offset = (pageNumber - 1) * pageSize;
|
||||||
for (int i = 0 , size = list.size(); i < size; i++) {
|
List<Project> projects = list.stream().peek(a -> a.setTempId(list.indexOf(a) + 1 + offset)).collect(Collectors.toList());
|
||||||
list.get(i).setTempId(i+1 + offset);
|
page.setList(projects);
|
||||||
}
|
|
||||||
}
|
}
|
||||||
model.put("pager", page);
|
model.put("pager", page);
|
||||||
model.put("Utils", FreeMarkerUtil.fromStaticPackage("cn.palmte.work.utils.Utils"));
|
model.put("Utils", FreeMarkerUtil.fromStaticPackage("cn.palmte.work.utils.Utils"));
|
||||||
|
|
|
@ -284,6 +284,36 @@ public class Project {
|
||||||
@Transient
|
@Transient
|
||||||
private String advancePeakAmountRound;
|
private String advancePeakAmountRound;
|
||||||
|
|
||||||
|
@Transient
|
||||||
|
private String contractRound2;
|
||||||
|
|
||||||
|
@Transient
|
||||||
|
private String huazhiRound2;
|
||||||
|
|
||||||
|
@Transient
|
||||||
|
private String ziguangRound2;
|
||||||
|
|
||||||
|
@Transient
|
||||||
|
private String huizhiRound2;
|
||||||
|
|
||||||
|
@Transient
|
||||||
|
private String huasanRound2;
|
||||||
|
|
||||||
|
@Transient
|
||||||
|
private String grossProfitRound2;
|
||||||
|
|
||||||
|
@Transient
|
||||||
|
private String grossProfitMarginRound2;
|
||||||
|
|
||||||
|
@Transient
|
||||||
|
private String advanceInterestAmountRound2;
|
||||||
|
|
||||||
|
@Transient
|
||||||
|
private String advancePeakAmountRound2;
|
||||||
|
|
||||||
|
@Transient
|
||||||
|
private int isBudget;
|
||||||
|
|
||||||
@Transient
|
@Transient
|
||||||
private String remark;
|
private String remark;
|
||||||
|
|
||||||
|
@ -878,6 +908,86 @@ public class Project {
|
||||||
this.advancePeakAmountRound = advancePeakAmountRound;
|
this.advancePeakAmountRound = advancePeakAmountRound;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public String getContractRound2() {
|
||||||
|
return contractRound2;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setContractRound2(String contractRound2) {
|
||||||
|
this.contractRound2 = contractRound2;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getHuazhiRound2() {
|
||||||
|
return huazhiRound2;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setHuazhiRound2(String huazhiRound2) {
|
||||||
|
this.huazhiRound2 = huazhiRound2;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getZiguangRound2() {
|
||||||
|
return ziguangRound2;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setZiguangRound2(String ziguangRound2) {
|
||||||
|
this.ziguangRound2 = ziguangRound2;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getHuizhiRound2() {
|
||||||
|
return huizhiRound2;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setHuizhiRound2(String huizhiRound2) {
|
||||||
|
this.huizhiRound2 = huizhiRound2;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getHuasanRound2() {
|
||||||
|
return huasanRound2;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setHuasanRound2(String huasanRound2) {
|
||||||
|
this.huasanRound2 = huasanRound2;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getGrossProfitRound2() {
|
||||||
|
return grossProfitRound2;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setGrossProfitRound2(String grossProfitRound2) {
|
||||||
|
this.grossProfitRound2 = grossProfitRound2;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getGrossProfitMarginRound2() {
|
||||||
|
return grossProfitMarginRound2;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setGrossProfitMarginRound2(String grossProfitMarginRound2) {
|
||||||
|
this.grossProfitMarginRound2 = grossProfitMarginRound2;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getAdvanceInterestAmountRound2() {
|
||||||
|
return advanceInterestAmountRound2;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setAdvanceInterestAmountRound2(String advanceInterestAmountRound2) {
|
||||||
|
this.advanceInterestAmountRound2 = advanceInterestAmountRound2;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getAdvancePeakAmountRound2() {
|
||||||
|
return advancePeakAmountRound2;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setAdvancePeakAmountRound2(String advancePeakAmountRound2) {
|
||||||
|
this.advancePeakAmountRound2 = advancePeakAmountRound2;
|
||||||
|
}
|
||||||
|
|
||||||
|
public int getIsBudget() {
|
||||||
|
return isBudget;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setIsBudget(int isBudget) {
|
||||||
|
this.isBudget = isBudget;
|
||||||
|
}
|
||||||
|
|
||||||
public String getActTaskName() {
|
public String getActTaskName() {
|
||||||
return actTaskName;
|
return actTaskName;
|
||||||
}
|
}
|
||||||
|
|
|
@ -5,6 +5,7 @@ import cn.palmte.work.model.*;
|
||||||
import cn.palmte.work.utils.InterfaceUtil;
|
import cn.palmte.work.utils.InterfaceUtil;
|
||||||
import com.alibaba.fastjson.JSON;
|
import com.alibaba.fastjson.JSON;
|
||||||
import com.alibaba.fastjson.JSONObject;
|
import com.alibaba.fastjson.JSONObject;
|
||||||
|
import org.activiti.engine.task.Task;
|
||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
import org.slf4j.LoggerFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
@ -63,7 +64,9 @@ public class ProjectService {
|
||||||
"CASE p.approve_status WHEN 0 THEN '待审核' WHEN 1 THEN '审核通过' WHEN 2 THEN '审核不通过' ELSE '未知' AS approveStatusDesc," +
|
"CASE p.approve_status WHEN 0 THEN '待审核' WHEN 1 THEN '审核通过' WHEN 2 THEN '审核不通过' ELSE '未知' AS approveStatusDesc," +
|
||||||
*/
|
*/
|
||||||
QueryHelper queryHelper = new QueryHelper("SELECT p.*, FORMAT(p.contract_amount,2) as contractRound, FORMAT(p.huazhi_product_amount,2) as huazhiRound, FORMAT(p.huizhi_product_amount,2) as huizhiRound, FORMAT(p.huasan_product_amount,2) as huasanRound, FORMAT(p.ziguang_other_amount,2) as ziguangRound" +
|
QueryHelper queryHelper = new QueryHelper("SELECT p.*, FORMAT(p.contract_amount,2) as contractRound, FORMAT(p.huazhi_product_amount,2) as huazhiRound, FORMAT(p.huizhi_product_amount,2) as huizhiRound, FORMAT(p.huasan_product_amount,2) as huasanRound, FORMAT(p.ziguang_other_amount,2) as ziguangRound" +
|
||||||
", FORMAT(p.gross_profit,2) as grossProfitRound, FORMAT(p.gross_profit_margin,2) as grossProfitMarginRound, FORMAT(p.advance_interest_amount,2) as advanceInterestAmountRound, FORMAT(p.advance_peak_amount,2) as advancePeakAmountRound","project","p");
|
", FORMAT(p.gross_profit,2) as grossProfitRound, FORMAT(p.gross_profit_margin,2) as grossProfitMarginRound, FORMAT(p.advance_interest_amount,2) as advanceInterestAmountRound, FORMAT(p.advance_peak_amount,2) as advancePeakAmountRound, pe.is_budget as isBudget" +
|
||||||
|
", FORMAT(pe.contract_amount,2) as contractRound2, FORMAT(pe.huazhi_product_amount,2) as huazhiRound2, FORMAT(pe.huizhi_product_amount,2) as huizhiRound2, FORMAT(pe.huasan_product_amount,2) as huasanRound2, FORMAT(pe.ziguang_other_amount,2) as ziguangRound2" +
|
||||||
|
", FORMAT(pe.gross_profit,2) as grossProfitRound2, FORMAT(pe.gross_profit_margin,2) as grossProfitMarginRound2, FORMAT(pe.advance_interest_amount,2) as advanceInterestAmountRound2, FORMAT(pe.advance_peak_amount,2) as advancePeakAmountRound2","project","p");
|
||||||
queryHelper.leftJoin("project_extend pe", "p.id = pe.project_id and pe.is_budget = 1");
|
queryHelper.leftJoin("project_extend pe", "p.id = pe.project_id and pe.is_budget = 1");
|
||||||
if(StrUtil.isNotEmpty(searchInfo.get("status")) && !"-1".equals(searchInfo.get("status"))){
|
if(StrUtil.isNotEmpty(searchInfo.get("status")) && !"-1".equals(searchInfo.get("status"))){
|
||||||
queryHelper.addCondition("p.status=?", Integer.parseInt(searchInfo.get("status")));
|
queryHelper.addCondition("p.status=?", Integer.parseInt(searchInfo.get("status")));
|
||||||
|
@ -261,7 +264,26 @@ public class ProjectService {
|
||||||
|
|
||||||
public Page<Project> list(Map<String, String> searchInfo, int pageNumber, int pageSize){
|
public Page<Project> list(Map<String, String> searchInfo, int pageNumber, int pageSize){
|
||||||
QueryHelper queryHelper = getQueryHelper(searchInfo);
|
QueryHelper queryHelper = getQueryHelper(searchInfo);
|
||||||
return pagination.paginate(queryHelper.getSql(), Project.class,pageNumber,pageSize);
|
|
||||||
|
Page<Project> page = pagination.paginate(queryHelper.getSql(), Project.class, pageNumber, pageSize);
|
||||||
|
List<Project> list = page.getList();
|
||||||
|
if(CollectionUtil.isNotEmpty(list)) {
|
||||||
|
//查询项目当前审批任务节点
|
||||||
|
for (Project project : list) {
|
||||||
|
if (project.getApproveStatusBudget() > -1 && project.getIsBudget() == 1) {
|
||||||
|
project.setContractRound(project.getContractRound2());
|
||||||
|
project.setHuizhiRound(project.getHuizhiRound2());
|
||||||
|
project.setHuazhiRound(project.getHuazhiRound2());
|
||||||
|
project.setHuasanRound(project.getHuasanRound2());
|
||||||
|
project.setZiguangRound(project.getZiguangRound2());
|
||||||
|
project.setGrossProfitRound(project.getGrossProfitRound2());
|
||||||
|
project.setGrossProfitMarginRound(project.getGrossProfitMarginRound2());
|
||||||
|
project.setAdvancePeakAmountRound(project.getAdvancePeakAmountRound2());
|
||||||
|
project.setAdvanceInterestAmountRound(project.getAdvanceInterestAmountRound2());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return page;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -819,16 +819,27 @@
|
||||||
<td class="huanhang" width="480px"><a style="cursor: pointer;text-decoration:none" onclick="approve(${list.id})">${list.name!}</a></td>
|
<td class="huanhang" width="480px"><a style="cursor: pointer;text-decoration:none" onclick="approve(${list.id})">${list.name!}</a></td>
|
||||||
<td>${list.typeDesc!}</td>
|
<td>${list.typeDesc!}</td>
|
||||||
<td>${list.underwrittenModeStr!}</td>
|
<td>${list.underwrittenModeStr!}</td>
|
||||||
<td>${Utils.format(list.advanceInterestAmount, "0.00")}</td>
|
<td>${list.advanceInterestAmountRound!}</td>
|
||||||
<td>${Utils.format(list.advancePeakAmount, "0.00")}</td>
|
<td>${list.advancePeakAmountRound!}</td>
|
||||||
<td>${Utils.format(list.contractAmount, "0.00")}</td>
|
<td>${list.contractRound!}</td>
|
||||||
<td>${Utils.format(list.grossProfit, "0.00")}</td>
|
<td>${list.grossProfitRound!}</td>
|
||||||
<td>${Utils.format(list.grossProfitMargin, "0.00")}</td>
|
<td>${list.grossProfitMarginRound!}</td>
|
||||||
|
|
||||||
|
<#-- <td>${Utils.format(list.advanceInterestAmount, "0.00")}</td>-->
|
||||||
|
<#-- <td>${Utils.format(list.advancePeakAmount, "0.00")}</td>-->
|
||||||
|
<#-- <td>${Utils.format(list.contractAmount, "0.00")}</td>-->
|
||||||
|
<#-- <td>${Utils.format(list.grossProfit, "0.00")}</td>-->
|
||||||
|
<#-- <td>${Utils.format(list.grossProfitMargin, "0.00")}</td>-->
|
||||||
<td>${list.certaintyStr!}</td>
|
<td>${list.certaintyStr!}</td>
|
||||||
<td>${Utils.format(list.huizhiProductAmount, "0.00")}</td>
|
<td>${list.huizhiRound!}</td>
|
||||||
<td>${Utils.format(list.huazhiProductAmount, "0.00")}</td>
|
<td>${list.huazhiRound!}</td>
|
||||||
<td>${Utils.format(list.huasanProductAmount, "0.00")}</td>
|
<td>${list.huasanRound!}</td>
|
||||||
<td>${Utils.format(list.ziguangOtherAmount, "0.00")}</td>
|
<td>${list.ziguangRound!}</td>
|
||||||
|
|
||||||
|
<#-- <td>${Utils.format(list.huizhiProductAmount, "0.00")}</td>-->
|
||||||
|
<#-- <td>${Utils.format(list.huazhiProductAmount, "0.00")}</td>-->
|
||||||
|
<#-- <td>${Utils.format(list.huasanProductAmount, "0.00")}</td>-->
|
||||||
|
<#-- <td>${Utils.format(list.ziguangOtherAmount, "0.00")}</td>-->
|
||||||
<td>${list.statusDesc!}</td>
|
<td>${list.statusDesc!}</td>
|
||||||
<td>${list.industryScenario!}</td>
|
<td>${list.industryScenario!}</td>
|
||||||
<td>${list.resolvePlanStr!}</td>
|
<td>${list.resolvePlanStr!}</td>
|
||||||
|
|
Loading…
Reference in New Issue