From 564bf7ab6a639c2c4557d35b8fd9b51dca60a738 Mon Sep 17 00:00:00 2001 From: LSH Date: 星期二, 22 八月 2023 13:32:34 +0800 Subject: [PATCH] #规则完善 --- src/main/java/com/zy/crm/manager/entity/Plan.java | 147 +++++++++++++++--------------------------------- 1 files changed, 46 insertions(+), 101 deletions(-) diff --git a/src/main/java/com/zy/crm/manager/entity/Plan.java b/src/main/java/com/zy/crm/manager/entity/Plan.java index 409e3e9..5a0398d 100644 --- a/src/main/java/com/zy/crm/manager/entity/Plan.java +++ b/src/main/java/com/zy/crm/manager/entity/Plan.java @@ -104,7 +104,7 @@ */ @ApiModelProperty(value= "鏂规鎵�闇�") @TableField("plan_need") - private Long planNeed; + private String planNeed; /** * 绔嬮」 1: 鏄� 0: 鍚� @@ -123,7 +123,7 @@ * 瑙勫垝鍛� */ @ApiModelProperty(value= "瑙勫垝鍛�") - private String planner; + private Long planner; /** * 瀹屾垚鏃堕棿 @@ -174,9 +174,9 @@ private String files; /** - * 杩涘害 1: 寮�濮� 2: 缁勯暱寰呭 3: 缁勯暱瀹℃牳 4: 瑙勫垝寰呭 5: 瑙勫垝瀹℃牳 6: 瀹℃壒涓� 7: 瀹℃壒閫氳繃 + * 杩涘害 1: 寮�濮� 2: 缁勯暱瀹℃牳 3: 鍞墠缁勯暱瀹℃牳 4: 瑙勫垝鍛樺鏍� 5: 瀹℃壒閫氳繃 */ - @ApiModelProperty(value= "杩涘害 1: 寮�濮� 2: 缁勯暱寰呭 3: 缁勯暱瀹℃牳 4: 瑙勫垝寰呭 5: 瑙勫垝瀹℃牳 6: 瀹℃壒涓� 7: 瀹℃壒閫氳繃 ") + @ApiModelProperty(value= "杩涘害 1: 寮�濮� 2: 缁勯暱瀹℃牳 3: 鍞墠瀹℃牳 4: 瑙勫垝鍛樺鏍� 5: 瀹℃壒閫氳繃 ") private Integer settle; /** @@ -234,71 +234,13 @@ @ApiModelProperty(value= "娉ㄩ噴") private String memo; + /** + * 椤圭洰杩涘害娴佺▼{1锛氶」鐩垱寤猴紝2锛氭牳浠峰鐞嗭紝3锛氫骇鍝佽垂鐢ㄦ槑缁嗭紝4锛氭姤浠烽绠楀崟锛�5锛氭姤浠峰崟} + */ + @ApiModelProperty(value= "椤圭洰杩涘害娴佺▼{1锛氶」鐩垱寤猴紝2锛氭牳浠峰鐞嗭紝3锛氫骇鍝佽垂鐢ㄦ槑缁嗭紝4锛氭姤浠烽绠楀崟锛�5锛氭姤浠峰崟}") + private Integer step; + public Plan() {} - - public Plan(Long hostId,Long deptId,Long planType,Long userId,Long orderId,Long cstmrId,String uuid,String name,Date appleTime,Long planNeed,Integer beItem,String planner,Date finishTime,String form,Integer change,Integer changeTime,String changeReason,Double planBonus,Double planLeaderBonus,String files,Integer settle,String settleMsg,String comment,Integer status,Long createBy,Date createTime,Long updateBy,Date updateTime,String memo) { - this.hostId = hostId; - this.deptId = deptId; - this.planType = planType; - this.userId = userId; - this.orderId = orderId; - this.cstmrId = cstmrId; - this.uuid = uuid; - this.name = name; - this.appleTime = appleTime; - this.planNeed = planNeed; - this.beItem = beItem; - this.planner = planner; - this.finishTime = finishTime; - this.form = form; - this.change = change; - this.changeTime = changeTime; - this.changeReason = changeReason; - this.planBonus = planBonus; - this.planLeaderBonus = planLeaderBonus; - this.files = files; - this.settle = settle; - this.settleMsg = settleMsg; - this.comment = comment; - this.status = status; - this.createBy = createBy; - this.createTime = createTime; - this.updateBy = updateBy; - this.updateTime = updateTime; - this.memo = memo; - } - -// Plan plan = new Plan( -// null, // 鎵�灞炲晢鎴� -// null, // 鎵�灞為儴闂� -// null, // 涓氬姟绫诲瀷[闈炵┖] -// null, // 涓氬姟鍛� -// null, // 璺熻釜椤圭洰 -// null, // 鐢叉柟鍗曚綅 -// null, // 瑙勫垝鍗曚唬鍙穂闈炵┖] -// null, // 瑙勫垝鍗曞悕绉癧闈炵┖] -// null, // 鐢宠鏃ユ湡 -// null, // 鏂规鎵�闇� -// null, // 绔嬮」 -// null, // 瑙勫垝鍛� -// null, // 瀹屾垚鏃堕棿 -// null, // 琛ㄥ崟鍐呭 -// null, // 鏇存敼鏂规 -// null, // 鏇存敼娆℃暟 -// null, // 鏇存敼鏂规鍘熷洜 -// null, // 瑙勬牸濂栭噾 -// null, // 瑙勬牸缁勯暱濂栭噾 -// null, // 闄勪欢 -// null, // 杩涘害 -// null, // 瀹℃牳杩涘害 -// null, // 璇勮 -// null, // 鐘舵�� -// null, // 娣诲姞浜哄憳 -// null, // 娣诲姞鏃堕棿 -// null, // 淇敼浜哄憳 -// null, // 淇敼鏃堕棿 -// null // 娉ㄩ噴 -// ); public String getHostId$(){ HostService service = SpringUtils.getBean(HostService.class); @@ -362,12 +304,20 @@ } public String getPlanNeed$(){ - PlanNeedService service = SpringUtils.getBean(PlanNeedService.class); - PlanNeed planNeed = service.selectById(this.planNeed); - if (!Cools.isEmpty(planNeed)){ - return String.valueOf(planNeed.getName()); + if (Cools.isEmpty(this.planNeed)){ + return null; } - return null; + PlanNeedService service = SpringUtils.getBean(PlanNeedService.class); + String[] planNeeds = this.planNeed.split("-"); + String name=""; + for (String planNeeda : planNeeds){ + PlanNeed planNeed = service.selectById(Integer.parseInt(planNeeda)); + if (!Cools.isEmpty(planNeed)){ +// return String.valueOf(planNeed.getName()); + name = name+planNeed.getName()+";"; + } + } + return name; } public String getBeItem$(){ @@ -401,48 +351,43 @@ } } - public Integer getStepOfSettle(){ - if (null == this.settle){ return null; } - switch (this.settle){ - case 1: - return 1; - case 2: - case 3: - return 2; - case 4: - case 5: - return 3; - case 6: - return 4; - case 7: - return 4; - default: - return 0; - } - } - public String getSettle$(){ if (null == this.settle){ return null; } switch (this.settle){ case 1: - return "寮�濮�"; + return "绛夊緟缁勯暱瀹℃牳"; case 2: - return "缁勯暱寰呭"; + return "绛夊緟鍞墠鍒嗛厤瑙勫垝鍛�"; case 3: - return "缁勯暱瀹℃牳"; + return "绛夊緟瑙勫垝鍛樻彁浜�"; case 4: - return "瑙勫垝寰呭"; + return "瑙勫垝鍛樺凡鎻愪氦"; case 5: - return "瑙勫垝瀹℃牳"; - case 6: - return "瀹℃壒涓�"; - case 7: return "瀹℃壒閫氳繃"; default: return String.valueOf(this.settle); } } + public String getPlanner$(){ + UserService service = SpringUtils.getBean(UserService.class); + User user = service.selectById(this.planner); + if (!Cools.isEmpty(user)){ + return String.valueOf(user.getNickname()); + } + return ""; + } + + public String getNowHeadman$(){ + PlanTypeService planTypeService = SpringUtils.getBean(PlanTypeService.class); + PlanType planType = planTypeService.selectById(this.planType); + User user = planTypeService.findPlanLeader(planType); + if (!Cools.isEmpty(user)){ + return String.valueOf(user.getNickname()); + } + return null; + } + public String getStatus$(){ if (null == this.status){ return null; } switch (this.status){ -- Gitblit v1.9.1