Explorar el Código

机关指导处

buzhanyi hace 1 año
padre
commit
64458cb626

+ 2 - 0
purchase-system/src/main/java/com/ozs/plan/doman/vo/requestVo/ProvisionalPlanVo.java

@@ -76,10 +76,12 @@ public class ProvisionalPlanVo extends PageVo {
      * 机关业务指导处(科)
      */
     private String organDivision;
+    private String organDivisionStr;
     /**
      * 预算科目
      */
     private String budgetAccount;
+    private String budgetAccountStr;
 
     @JsonFormat(pattern = "yyyy-MM-dd")
     @ApiModelProperty(value = "计划提报需求时间--->需求单位成功提报采购需求的日期(具体到月)")

+ 25 - 0
purchase-system/src/main/java/com/ozs/plan/service/impl/PlanQuarterServiceImpl.java

@@ -266,6 +266,31 @@ public class PlanQuarterServiceImpl extends ServiceImpl<PlanQuarterMapper, PlanQ
             }
             responseVo.setFileInfos(fileInfos);
         }
+        String organDivision = byId.getOrganDivision();
+        if (!ObjectUtils.isEmpty(organDivision)) {
+            int length = organDivision.split(",").length;
+            SysDeptOrgan organ = new SysDeptOrgan();
+            if (length > 1) {
+                StringBuilder builder = new StringBuilder();
+                String[] split = organDivision.split(",");
+                for (String s : split) {
+                    organ = sysDeptOrganMapper.selectById(s);
+                    if (!ObjectUtils.isEmpty(organ)) {
+                        if (!organDivision.endsWith(s)) {
+                            builder.append(organ.getOrganName() + ",");
+                        } else {
+                            builder.append(organ.getOrganName());
+                        }
+                    }
+                }
+                responseVo.setOrganDivisionStr(builder.toString());
+            } else if (length == 1) {
+                organ = sysDeptOrganMapper.selectById(organDivision);
+                if (!ObjectUtils.isEmpty(organ)) {
+                    responseVo.setOrganDivisionStr(organ.getOrganName());
+                }
+            }
+        }
         return AjaxResult.success(responseVo);
     }
 

+ 25 - 0
purchase-system/src/main/java/com/ozs/plan/service/impl/PlanYearsServiceImpl.java

@@ -237,6 +237,31 @@ public class PlanYearsServiceImpl extends ServiceImpl<PlanYearsMapper, PlanYears
             }
             responseVo.setFileInfos(fileInfos);
         }
+        String organDivision = byId.getOrganDivision();
+        if (!ObjectUtils.isEmpty(organDivision)) {
+            int length = organDivision.split(",").length;
+            SysDeptOrgan organ = new SysDeptOrgan();
+            if (length > 1) {
+                StringBuilder builder = new StringBuilder();
+                String[] split = organDivision.split(",");
+                for (String s : split) {
+                    organ = sysDeptOrganMapper.selectById(s);
+                    if (!ObjectUtils.isEmpty(organ)) {
+                        if (!organDivision.endsWith(s)) {
+                            builder.append(organ.getOrganName() + ",");
+                        } else {
+                            builder.append(organ.getOrganName());
+                        }
+                    }
+                }
+                responseVo.setOrganDivisionStr(builder.toString());
+            } else if (length == 1) {
+                organ = sysDeptOrganMapper.selectById(organDivision);
+                if (!ObjectUtils.isEmpty(organ)) {
+                    responseVo.setOrganDivisionStr(organ.getOrganName());
+                }
+            }
+        }
         return AjaxResult.success(responseVo);
     }
 

+ 25 - 0
purchase-system/src/main/java/com/ozs/plan/service/impl/ProvisionalPlanServiceImpl.java

@@ -316,6 +316,31 @@ public class ProvisionalPlanServiceImpl extends ServiceImpl<ProvisionalPlanMappe
             }
             provisionalPlanVo.setFileInfos(fileInfos);
         }
+        String organDivision = provisionalPlan.getOrganDivision();
+        if (!ObjectUtils.isEmpty(organDivision)) {
+            int length = organDivision.split(",").length;
+            SysDeptOrgan organ = new SysDeptOrgan();
+            if (length > 1) {
+                StringBuilder builder = new StringBuilder();
+                String[] split = organDivision.split(",");
+                for (String s : split) {
+                    organ = sysDeptOrganMapper.selectById(s);
+                    if (!ObjectUtils.isEmpty(organ)) {
+                        if (!organDivision.endsWith(s)) {
+                            builder.append(organ.getOrganName() + ",");
+                        } else {
+                            builder.append(organ.getOrganName());
+                        }
+                    }
+                }
+                provisionalPlanVo.setOrganDivisionStr(builder.toString());
+            } else if (length == 1) {
+                organ = sysDeptOrganMapper.selectById(organDivision);
+                if (!ObjectUtils.isEmpty(organ)) {
+                    provisionalPlanVo.setOrganDivisionStr(organ.getOrganName());
+                }
+            }
+        }
         return AjaxResult.success(provisionalPlanVo);
     }