Merge branch 'dev_2.0.1' of http://git.unissense.tech/mula/fourcal into dev_2.0.1

dev_2.0.2
‘wangjiuyun 2024-12-19 16:25:16 +08:00
commit 010e81c32f
4 changed files with 30 additions and 13 deletions

View File

@ -28,6 +28,7 @@ public class ActConstant {
public static final String PROCESS_TASKS_FINAL = "填报决算#工程管理部#产品系统集成部#财务人员#财务总监#总经理#执行董事";
public static final String KEY_PROJECT_TYPE = "projectType";
public static final String KEY_RESOLVE_PLAN_SYNERGY = "resolvePlanSynergy";
}

View File

@ -216,6 +216,16 @@ public class ProjectBudget {
@Column(name = "calculation_collection_budget")
private String calculationCollectionBudget;
public Boolean getResolvePlanSynergy() {
return resolvePlanSynergy;
}
public void setResolvePlanSynergy(Boolean resolvePlanSynergy) {
this.resolvePlanSynergy = resolvePlanSynergy;
}
@Column(name = "resolve_plan_synergy")
private Boolean resolvePlanSynergy;
@Transient
private String contractRoundBudget;

View File

@ -1209,13 +1209,13 @@ public class ProjectBudgetService {
}
}
projectBudgetIncomeDetailTempRepository.save(incomeDetailTempList);
for (ProjectBudgetIncomeDetailTemp projectBudgetIncomeDetailTemp : incomeDetailTempList) {
ProjectBudgetIncomeDetail projectBudgetIncomeDetail = projectBudgetIncomeDetailTemp.toProjectBudgetIncomeDetail();
incomeDetailList.add(projectBudgetIncomeDetail);
}
projectBudgetIncomeDetailRepository.save(incomeDetailList);
// for (ProjectBudgetIncomeDetailTemp projectBudgetIncomeDetailTemp : incomeDetailTempList) {
// ProjectBudgetIncomeDetail projectBudgetIncomeDetail = projectBudgetIncomeDetailTemp.toProjectBudgetIncomeDetail();
// incomeDetailList.add(projectBudgetIncomeDetail);
// }
// projectBudgetIncomeDetailRepository.save(incomeDetailList);
final ResponseMsg msg = ResponseMsg.buildSuccessMsg(String.format("成功:%d, 失败:%d", successCount, errorCount));
msg.setData(errorList);
msg.setData(new HashMap<String,List>(){{put("errorList",errorList);put("successList",incomeDetailTempList);}});
return msg;
}
@ -1276,13 +1276,13 @@ public class ProjectBudgetService {
}
}
projectBudgetCostDetailTempRepository.save(costDetailTempList);
for (ProjectBudgetCostDetailTemp projectBudgetCostDetailTemp : costDetailTempList) {
ProjectBudgetCostDetail projectBudgetCostDetail = projectBudgetCostDetailTemp.toProjectBudgetCostDetail();
CostDetailList.add(projectBudgetCostDetail);
}
projectBudgetCostDetailRepository.save(CostDetailList);
// for (ProjectBudgetCostDetailTemp projectBudgetCostDetailTemp : costDetailTempList) {
// ProjectBudgetCostDetail projectBudgetCostDetail = projectBudgetCostDetailTemp.toProjectBudgetCostDetail();
// CostDetailList.add(projectBudgetCostDetail);
// }
// projectBudgetCostDetailRepository.save(CostDetailList);
final ResponseMsg msg = ResponseMsg.buildSuccessMsg(String.format("成功:%d, 失败:%d", successCount, errorCount));
msg.setData(errorList);
msg.setData(new HashMap<String,List>(){{put("errorList",errorList);put("successList",costDetailTempList);}});
return msg;
}

View File

@ -31,6 +31,8 @@ public class ProjectInstanceService {
private ProjectInstanceRelationRepository projectInstanceRelationRepository;
@Autowired
private ActTaskDefService actTaskDefService;
@Autowired
private ProjectBudgetRepository projectBudgetRepository;
/**
@ -94,7 +96,7 @@ public class ProjectInstanceService {
/**
*
*
*solution_synergy
* @param project
* @param keyEnum
* @throws Exception
@ -102,6 +104,8 @@ public class ProjectInstanceService {
public void startFourcalProcess(Project project, ActProcessKeyEnum keyEnum) throws Exception {
HashMap<String, Object> variables = new HashMap<>();
variables.put(ActConstant.KEY_PROJECT_TYPE, project.getType());
ProjectBudget firstByProjectId = projectBudgetRepository.findFirstByProjectId(project.getId());
variables.put(ActConstant.KEY_RESOLVE_PLAN_SYNERGY, firstByProjectId.getResolvePlanSynergy());
String businessKey = String.valueOf(project.getId());
logger.info("startProcess processDefkey:{}, businessKey{}", keyEnum.getKey(), businessKey);
String processInstanceId = actProcInsService.startProcessInstance(keyEnum.getKey(), businessKey, variables);
@ -113,6 +117,8 @@ public class ProjectInstanceService {
public String startProcessBySystem(Project project, ActProcessKeyEnum keyEnum, ProjectTaskRecord taskRecord) throws Exception {
HashMap<String, Object> variables = new HashMap<>();
variables.put(ActConstant.KEY_PROJECT_TYPE, project.getType());
ProjectBudget firstByProjectId = projectBudgetRepository.findFirstByProjectId(project.getId());
variables.put(ActConstant.KEY_RESOLVE_PLAN_SYNERGY, firstByProjectId.getResolvePlanSynergy());
String businessKey = String.valueOf(project.getId());
logger.info("startProcessBySystem processDefkey:{}, businessKey{}", keyEnum.getKey(), businessKey);