|
@@ -142,6 +142,48 @@ public class ProvisionalPlanServiceImpl extends ServiceImpl<ProvisionalPlanMappe
|
|
|
}
|
|
|
ofProvisionalPlan.setProjectType(projectTypesMap.get(ofProvisionalPlan.getProjectType()));
|
|
|
ofProvisionalPlan.setProjectStatus(ProjectStatus.PLANWAITCOMMIT.getCode());
|
|
|
+
|
|
|
+ //机关业务指导处是多选字段
|
|
|
+ StringBuilder zBuilder = new StringBuilder();
|
|
|
+ if (ofProvisionalPlan.getOrganDivision().contains(",")) {
|
|
|
+ String[] split = ofProvisionalPlan.getOrganDivision().split(",");
|
|
|
+ for (String s : split) {
|
|
|
+ SysDept infoTow = deptMapper.checkDeptNameOnlyOne(ofProvisionalPlan.getOrganDivision());
|
|
|
+ //不是最后一位就加‘,’,是就直接结尾
|
|
|
+ if (!ofProvisionalPlan.getOrganDivision().endsWith(s)) {
|
|
|
+ if (!ObjectUtils.isEmpty(infoTow)) {
|
|
|
+ zBuilder.append(infoTow.getDeptId() + ",");
|
|
|
+ } else {
|
|
|
+ ++failureNum;
|
|
|
+ failureMsg.append(failureNum + "、机关业务指导处(科)“" + ofProvisionalPlan.getOrganDivision() + "”不存在");
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ if (!ObjectUtils.isEmpty(infoTow)) {
|
|
|
+ zBuilder.append(infoTow.getDeptId());
|
|
|
+ } else {
|
|
|
+ ++failureNum;
|
|
|
+ failureMsg.append(failureNum + "、机关业务指导处(科)“" + ofProvisionalPlan.getOrganDivision() + "”不存在");
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ String zs = zBuilder.toString();
|
|
|
+ if (zs.endsWith(",")) {
|
|
|
+ zBuilder = null;
|
|
|
+ zBuilder.append(zs.substring(0, zs.length() - 1));
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ //没有多选
|
|
|
+ SysDept infoTow = deptMapper.checkDeptNameOnlyOne(ofProvisionalPlan.getOrganDivision());
|
|
|
+ if (!ObjectUtils.isEmpty(infoTow)) {
|
|
|
+ zBuilder.append(infoTow.getDeptId());
|
|
|
+ } else {
|
|
|
+ ++failureNum;
|
|
|
+ failureMsg.append(failureNum + "、机关业务指导处(科)“" + ofProvisionalPlan.getOrganDivision() + "”不存在");
|
|
|
+ }
|
|
|
+ }
|
|
|
+ ofProvisionalPlan.setOrganDivision(zBuilder.toString());
|
|
|
+
|
|
|
+
|
|
|
//项目属性是多选字段
|
|
|
StringBuilder builder = new StringBuilder();
|
|
|
if (ofProvisionalPlan.getProjectAttr().contains(",")) {
|
|
@@ -157,7 +199,6 @@ public class ProvisionalPlanServiceImpl extends ServiceImpl<ProvisionalPlanMappe
|
|
|
builder.append(projectAttributes.get(ofProvisionalPlan.getProjectAttr()));
|
|
|
}
|
|
|
ofProvisionalPlan.setProjectAttr(builder.toString());
|
|
|
- // ofProvisionalPlan.setPurchaseServices(purchaseServices.get(ofProvisionalPlan.getPurchaseServicesStr()));
|
|
|
ofProvisionalPlan.setIsExcess(deptService.isExcessOrNo(ofProvisionalPlan.getProjectType(), ofProvisionalPlan.getEvaluation(), info.getDeptId()));
|
|
|
ofProvisionalPlan.setCreated(String.valueOf(loginUser.getUserId()));
|
|
|
ofProvisionalPlan.setCreateTime(new Date());
|