use of com.netsteadfast.greenstep.bsc.vo.SwotIssuesVO in project bamboobsc by billchen198318.
the class SwotDataProvideCommand method initIssues.
private void initIssues(SwotDataVO swotData, String visId, String orgId) throws Exception {
String sep = BscConstants.SWOT_TEXT_INPUT_ID_SEPARATE;
for (BbPerspective perspective : swotData.getPerspectives()) {
SwotIssuesVO issues = new SwotIssuesVO();
BbSwot sMain = null;
BbSwot wMain = null;
BbSwot oMain = null;
BbSwot tMain = null;
String sStr = "";
String wStr = "";
String oStr = "";
String tStr = "";
String sId = "BSC_PROG002D0008Q";
String wId = "BSC_PROG002D0008Q";
String oId = "BSC_PROG002D0008Q";
String tId = "BSC_PROG002D0008Q";
for (String type : BscSwotCode.CODES) {
if (BscSwotCode.STRENGTHS_CODE.equals(type)) {
sMain = this.getIssuesMain(perspective.getPerId(), type, swotData.getContents());
if (sMain != null) {
sStr = StringUtils.defaultString(sMain.getIssues());
}
sId += sep + type + sep + visId + sep + perspective.getPerId() + sep + orgId;
}
if (BscSwotCode.WEAKNESSES_CODE.equals(type)) {
wMain = this.getIssuesMain(perspective.getPerId(), type, swotData.getContents());
if (wMain != null) {
wStr = StringUtils.defaultString(wMain.getIssues());
}
wId += sep + type + sep + visId + sep + perspective.getPerId() + sep + orgId;
}
if (BscSwotCode.OPPORTUNITIES_CODE.equals(type)) {
oMain = this.getIssuesMain(perspective.getPerId(), type, swotData.getContents());
if (oMain != null) {
oStr = StringUtils.defaultString(oMain.getIssues());
}
oId += sep + type + sep + visId + sep + perspective.getPerId() + sep + orgId;
}
if (BscSwotCode.THREATS_CODE.equals(type)) {
tMain = this.getIssuesMain(perspective.getPerId(), type, swotData.getContents());
if (tMain != null) {
tStr = StringUtils.defaultString(tMain.getIssues());
}
tId += sep + type + sep + visId + sep + perspective.getPerId() + sep + orgId;
}
}
issues.setPerspectiveName(perspective.getName());
issues.setStrengthsMain(sMain);
issues.setStrengths(sStr);
issues.setWeaknessesMain(wMain);
issues.setWeaknesses(wStr);
issues.setOpportunitiesMain(oMain);
issues.setOpportunities(oStr);
issues.setThreatsMain(tMain);
issues.setThreats(tStr);
issues.setStrengthsTextId(sId);
issues.setWeaknessesTextId(wId);
issues.setOpportunitiesTextId(oId);
issues.setThreatsTextId(tId);
swotData.getIssues().add(issues);
}
}
use of com.netsteadfast.greenstep.bsc.vo.SwotIssuesVO in project bamboobsc by billchen198318.
the class SwotReportPdfDataCommand method createReportData.
private String createReportData(SwotDataVO swotData) throws Exception {
if (swotData.getIssues() == null || swotData.getIssues().size() < 1) {
return "";
}
String reportId = SimpleUtils.getUUIDStr();
SwotReportMstVO reportMst = new SwotReportMstVO();
reportMst.setReportId(reportId);
reportMst.setVisionTitle(swotData.getVision().getTitle());
reportMst.setOrgName(swotData.getOrganization().getName());
this.swotReportMstService.saveIgnoreUK(reportMst);
for (int i = 0; i < swotData.getIssues().size(); i++) {
SwotIssuesVO issuesData = swotData.getIssues().get(i);
SwotReportDtlVO reportDtl = new SwotReportDtlVO();
reportDtl.setReportId(reportId);
reportDtl.setSeq(i);
reportDtl.setLabel(issuesData.getPerspectiveName());
reportDtl.setIssues1(issuesData.getStrengths());
reportDtl.setIssues2(issuesData.getWeaknesses());
reportDtl.setIssues3(issuesData.getOpportunities());
reportDtl.setIssues4(issuesData.getThreats());
this.swotReportDtlService.saveIgnoreUK(reportDtl);
}
return reportId;
}
Aggregations