From 56d076d347250b00f45662ab848d744fc50c52f3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=99=88=E8=A3=95=E8=B4=A2?= Date: Thu, 10 Mar 2022 17:04:36 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E8=8A=82=E7=82=B9=E7=B1=BB?= =?UTF-8?q?=E5=9E=8B=E3=80=81=E6=A0=87=E7=AD=BE=E7=AD=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/xm/core/ctrl/XmPhaseController.java | 60 ++++---- .../com/xm/core/ctrl/XmTaskController.java | 6 +- .../xm/core/entity/XmProjectMCostNouser.java | 12 +- .../xm/core/entity/XmProjectMCostUser.java | 12 +- .../main/java/com/xm/core/entity/XmTask.java | 12 +- .../com/xm/core/entity/XmTaskExecuser.java | 12 +- .../com/xm/core/service/XmPhaseService.java | 130 +++++++++--------- .../com/xm/core/service/XmProductService.java | 4 +- .../com/xm/core/service/XmProjectService.java | 4 +- .../core/service/XmTaskExecuserService.java | 4 +- .../core/dao/XmProjectMCostNouserMapper.xml | 10 +- .../xm/core/dao/XmProjectMCostUserMapper.xml | 10 +- .../xm/core/dao/XmTaskExecuserMapper.xml | 10 +- .../mapper/xm/core/dao/XmTaskMapper.xml | 10 +- 14 files changed, 148 insertions(+), 148 deletions(-) diff --git a/xm-core/src/main/java/com/xm/core/ctrl/XmPhaseController.java b/xm-core/src/main/java/com/xm/core/ctrl/XmPhaseController.java index 64e01fda..524ecae1 100644 --- a/xm-core/src/main/java/com/xm/core/ctrl/XmPhaseController.java +++ b/xm-core/src/main/java/com/xm/core/ctrl/XmPhaseController.java @@ -249,25 +249,25 @@ public class XmPhaseController { xmPhaseService.parentIdPathsCalcBeforeSave(xmProjectPhase); if(xmProjectPhase.getLvl()==1){ if("1".equals(xmProduct.getBudgetCtrl())){ - tips= xmPhaseService.judgetProductBudget(xmProduct.getId(),xmProjectPhase.getPhaseBudgetAt(),null,null,null,excludePhaseIds); + tips= xmPhaseService.judgetProductBudget(xmProduct.getId(),xmProjectPhase.getBudgetAt(),null,null,null,excludePhaseIds); } }else { if("1".equals(xmProduct.getPhaseBudgetCtrl())) { - tips = xmPhaseService.judgetPhaseBudget(xmProjectPhase.getParentPhaseId(), xmProjectPhase.getPhaseBudgetAt(), null, null, null, excludePhaseIds); + tips = xmPhaseService.judgetPhaseBudget(xmProjectPhase.getParentId(), xmProjectPhase.getBudgetAt(), null, null, null, excludePhaseIds); } } if(!tips.isOk()){ return ResponseHelper.failed(tips); } - XmPhase parentDb= xmPhaseService.selectOneObject(new XmPhase(xmProjectPhase.getParentPhaseId())); + XmPhase parentDb= xmPhaseService.selectOneObject(new XmPhase(xmProjectPhase.getParentId())); if(parentDb==null){ return ResponseHelper.failed("p-no-exists","上级计划不存在"); } if(!"1".equals(parentDb.getNtype())){ - return ResponseHelper.failed("p-ntype-no-1","上级【"+parentDb.getPhaseName()+"】不是计划集,不能在其之下建立子计划"); + return ResponseHelper.failed("p-ntype-no-1","上级【"+parentDb.getName()+"】不是计划集,不能在其之下建立子计划"); } xmPhaseService.insert(xmProjectPhase); - xmRecordService.addProductPhaseRecord(xmProduct.getId(), xmProjectPhase.getId(), "产品-计划-新增计划", "新增计划"+xmProjectPhase.getPhaseName(),JSON.toJSONString(xmProjectPhase),null); + xmRecordService.addProductPhaseRecord(xmProduct.getId(), xmProjectPhase.getId(), "产品-计划-新增计划", "新增计划"+xmProjectPhase.getName(),JSON.toJSONString(xmProjectPhase),null); m.put("data",xmProjectPhase); }catch (BizException e) { tips=e.getTips(); @@ -323,7 +323,7 @@ public class XmPhaseController { tips.setFailureMsg("存在"+xmProjectPhaseDb.getChildrenCnt()+"条子计划,不允许删除"); } else { xmPhaseService.deleteByPk(xmProjectPhaseDb); - xmRecordService.addProductPhaseRecord(xmProjectPhaseDb.getProductId(), xmProjectPhaseDb.getId(), "产品-计划-删除计划", "删除计划"+xmProjectPhaseDb.getPhaseName(),"",JSON.toJSONString(xmProjectPhaseDb)); + xmRecordService.addProductPhaseRecord(xmProjectPhaseDb.getProductId(), xmProjectPhaseDb.getId(), "产品-计划-删除计划", "删除计划"+xmProjectPhaseDb.getName(),"",JSON.toJSONString(xmProjectPhaseDb)); } } @@ -384,14 +384,14 @@ public class XmPhaseController { excludePhaseIds.add(xmProjectPhase.getId()); //如果修改了预算数据,才进行预算判断 - if(xmProjectPhaseDb.getPhaseBudgetAt()!=null && xmProjectPhaseDb.getPhaseBudgetAt().compareTo(xmProjectPhase.getPhaseBudgetAt())!=0){ + if(xmProjectPhaseDb.getBudgetAt()!=null && xmProjectPhaseDb.getBudgetAt().compareTo(xmProjectPhase.getBudgetAt())!=0){ if(xmProjectPhase.getLvl()==1){ if("1".equals(xmProduct.getBudgetCtrl())){ - tips=this.xmPhaseService.judgetProductBudget(xmProduct.getId(),xmProjectPhase.getPhaseBudgetAt(),null,null,null,excludePhaseIds); + tips=this.xmPhaseService.judgetProductBudget(xmProduct.getId(),xmProjectPhase.getBudgetAt(),null,null,null,excludePhaseIds); } }else{ if("1".equals(xmProduct.getPhaseBudgetCtrl())) { - tips = this.xmPhaseService.judgetPhaseBudget(xmProjectPhase.getParentPhaseId(), xmProjectPhase.getPhaseBudgetAt(), null, null, null, excludePhaseIds); + tips = this.xmPhaseService.judgetPhaseBudget(xmProjectPhase.getParentId(), xmProjectPhase.getBudgetAt(), null, null, null, excludePhaseIds); } } @@ -400,7 +400,7 @@ public class XmPhaseController { return ResponseHelper.failed(tips); } xmPhaseService.editByPk(xmProjectPhase); - xmRecordService.addProductPhaseRecord(xmProjectPhase.getProductId(), xmProjectPhase.getId(), "产品-计划-修改计划", "修改计划"+xmProjectPhase.getPhaseName(),JSON.toJSONString(xmProjectPhase),null); + xmRecordService.addProductPhaseRecord(xmProjectPhase.getProductId(), xmProjectPhase.getId(), "产品-计划-修改计划", "修改计划"+xmProjectPhase.getName(),JSON.toJSONString(xmProjectPhase),null); m.put("data",xmProjectPhase); }catch (BizException e) { @@ -462,7 +462,7 @@ public class XmPhaseController { //检查是否由关联的任务,有则不允许删除 Long exists=this.xmPhaseService.checkExistsTask(phase.getId()); if(exists>0) { - existsTaskList.add(phase.getPhaseName()); + existsTaskList.add(phase.getName()); }else { delPhases.add(phase); } @@ -472,14 +472,14 @@ public class XmPhaseController { boolean canDelAllChild = xmPhaseService.checkCanDelAllChild(phase,delPhases); if(!canDelAllChild) { - hasChildList.add(phase.getPhaseName()); + hasChildList.add(phase.getName()); }else { canDelNodes.add(phase); } } if(canDelNodes.size()>0){ this.xmPhaseService.doBatchDelete(canDelNodes); - xmRecordService.addProductPhaseRecord(xmProjectPhase.getProductId(), "", "产品-计划-批量删除计划", "批量删除计划"+canDelNodes.stream().map(i->i.getPhaseName()).collect(Collectors.joining(",")),"",JSON.toJSONString(canDelNodes)); + xmRecordService.addProductPhaseRecord(xmProjectPhase.getProductId(), "", "产品-计划-批量删除计划", "批量删除计划"+canDelNodes.stream().map(i->i.getName()).collect(Collectors.joining(",")),"",JSON.toJSONString(canDelNodes)); } List msgs=new ArrayList<>(); @@ -556,14 +556,14 @@ public class XmPhaseController { List l1Phases=xmProjectPhases.stream().filter(i->1==i.getLvl()).collect(Collectors.toList()); if(l1Phases==null ||l1Phases.size()==0){//如果是导入到某个计划之下, //找到导入的树中最上面的节点 - List noExists=xmProjectPhases.stream().filter(i->!xmProjectPhases.stream().filter(k->k.getId().equals(i.getParentPhaseId())).findAny().isPresent()).collect(Collectors.toList()); + List noExists=xmProjectPhases.stream().filter(i->!xmProjectPhases.stream().filter(k->k.getId().equals(i.getParentId())).findAny().isPresent()).collect(Collectors.toList()); //根据同一个父亲归类 Map> map=new HashMap<>(); for (XmPhase noExist : noExists) { - List phases=map.get(noExist.getParentPhaseId()); + List phases=map.get(noExist.getParentId()); if(phases==null){ phases=new ArrayList<>(); - map.put(noExist.getParentPhaseId(),phases); + map.put(noExist.getParentId(),phases); } phases.add(noExist); } @@ -573,12 +573,12 @@ public class XmPhaseController { BigDecimal phaseTotalBudgetAt=BigDecimal.ZERO; List excludeIds=children.stream().map(i->i.getId()).collect(Collectors.toList()); for (XmPhase child : children) { - phaseTotalBudgetAt=phaseTotalBudgetAt.add(child.getPhaseBudgetAt()); + phaseTotalBudgetAt=phaseTotalBudgetAt.add(child.getBudgetAt()); } if("1".equals(xmProduct.getPhaseBudgetCtrl())){ Tips tips2= xmPhaseService.judgetPhaseBudget(parentId,phaseTotalBudgetAt,null,null,null,excludeIds); if(!tips2.isOk()){ - tips2.setFailureMsg(tips2.getMsg()+" 相关计划为【"+children.stream().map(i->i.getPhaseName()).collect(Collectors.joining(","))+"】"); + tips2.setFailureMsg(tips2.getMsg()+" 相关计划为【"+children.stream().map(i->i.getName()).collect(Collectors.joining(","))+"】"); return ResponseHelper.failed(tips2); } } @@ -587,8 +587,8 @@ public class XmPhaseController { BigDecimal phaseTotalBudgetWorkload=BigDecimal.ZERO; BigDecimal phaseTotalBudgetAt=BigDecimal.ZERO; for (XmPhase l1Phase : l1Phases) { - phaseTotalBudgetWorkload=phaseTotalBudgetWorkload.add(l1Phase.getPhaseBudgetWorkload()); - phaseTotalBudgetAt=phaseTotalBudgetAt.add(l1Phase.getPhaseBudgetAt()); + phaseTotalBudgetWorkload=phaseTotalBudgetWorkload.add(l1Phase.getBudgetWorkload()); + phaseTotalBudgetAt=phaseTotalBudgetAt.add(l1Phase.getBudgetAt()); } if("1".equals(xmProduct.getBudgetCtrl())) { tips = xmPhaseService.judgetProductBudget(productId, phaseTotalBudgetAt, null, null, null, l1Phases.stream().map(i -> i.getId()).collect(Collectors.toList())); @@ -607,7 +607,7 @@ public class XmPhaseController { xmPhaseService.doBatchInsert(xmProjectPhases); for (XmPhase phase : xmProjectPhases) { - xmRecordService.addProductPhaseRecord(phase.getProductId(), phase.getId(), "产品-计划-新增计划", "新增计划"+phase.getPhaseName(),JSON.toJSONString(phase),null); + xmRecordService.addProductPhaseRecord(phase.getProductId(), phase.getId(), "产品-计划-新增计划", "新增计划"+phase.getName(),JSON.toJSONString(phase),null); } } @@ -665,8 +665,8 @@ public class XmPhaseController { BigDecimal phaseTotalBudgetWorkload=BigDecimal.ZERO; BigDecimal phaseTotalBudgetAt=BigDecimal.ZERO; for (XmPhase l1Phase : l1Phases) { - phaseTotalBudgetWorkload=phaseTotalBudgetWorkload.add(l1Phase.getPhaseBudgetWorkload()); - phaseTotalBudgetAt=phaseTotalBudgetAt.add(l1Phase.getPhaseBudgetAt()); + phaseTotalBudgetWorkload=phaseTotalBudgetWorkload.add(l1Phase.getBudgetWorkload()); + phaseTotalBudgetAt=phaseTotalBudgetAt.add(l1Phase.getBudgetAt()); } if("1".equals(xmProduct.getBudgetCtrl())){ tips= xmPhaseService.judgetProductBudget(productId,phaseTotalBudgetAt,null,null,null,l1Phases.stream().map(i->i.getId()).collect(Collectors.toList())); @@ -676,14 +676,14 @@ public class XmPhaseController { } } //找到导入的树中最上面的节点 - List parentNoNulls= xmProjectPhases.stream().filter(i->StringUtils.hasText(i.getParentPhaseId())&&!"0".equals(i.getParentPhaseId())).collect(Collectors.toList()); + List parentNoNulls= xmProjectPhases.stream().filter(i->StringUtils.hasText(i.getParentId())&&!"0".equals(i.getParentId())).collect(Collectors.toList()); //根据同一个父亲归类 Map> map=new HashMap<>(); for (XmPhase phase : parentNoNulls) { - List phases=map.get(phase.getParentPhaseId()); + List phases=map.get(phase.getParentId()); if(phases==null){ phases=new ArrayList<>(); - map.put(phase.getParentPhaseId(),phases); + map.put(phase.getParentId(),phases); } phases.add(phase); } @@ -693,12 +693,12 @@ public class XmPhaseController { BigDecimal phaseTotalBudgetAt=BigDecimal.ZERO; List excludeIds=children.stream().map(i->i.getId()).collect(Collectors.toList()); for (XmPhase child : children) { - phaseTotalBudgetAt=phaseTotalBudgetAt.add(child.getPhaseBudgetAt()); + phaseTotalBudgetAt=phaseTotalBudgetAt.add(child.getBudgetAt()); } if("1".equals(xmProduct.getPhaseBudgetCtrl())) { Tips tips2 = xmPhaseService.judgetPhaseBudget(parentId, phaseTotalBudgetAt, null, null, null, excludeIds); if (!tips2.isOk()) { - tips2.setFailureMsg(tips2.getMsg() + " 相关计划为【" + children.stream().map(i -> i.getPhaseName()).collect(Collectors.joining(",")) + "】"); + tips2.setFailureMsg(tips2.getMsg() + " 相关计划为【" + children.stream().map(i -> i.getName()).collect(Collectors.joining(",")) + "】"); return ResponseHelper.failed(tips2); } } @@ -706,7 +706,7 @@ public class XmPhaseController { for (XmPhase projectPhase : xmProjectPhases) { - int childrenCnt=Integer.valueOf(xmProjectPhases.stream().filter(i->projectPhase.getId().equals(i.getParentPhaseId())).count()+""); + int childrenCnt=Integer.valueOf(xmProjectPhases.stream().filter(i->projectPhase.getId().equals(i.getParentId())).count()+""); if(childrenCnt>0){ projectPhase.setChildrenCnt(childrenCnt); projectPhase.setNtype("1"); @@ -718,7 +718,7 @@ public class XmPhaseController { List updates=xmProjectPhases.stream().filter(i->xmProjectPhaseListDb.stream().filter(k->k.getId().equals(i.getId())).findAny().isPresent()).collect(Collectors.toList()); xmPhaseService.batchInsertOrUpdate(inserts,updates); for (XmPhase phase : xmProjectPhases) { - xmRecordService.addProductPhaseRecord(phase.getProductId(), phase.getId(), "产品-计划-修改计划预算", "修改计划"+phase.getPhaseName(),JSON.toJSONString(phase),null); + xmRecordService.addProductPhaseRecord(phase.getProductId(), phase.getId(), "产品-计划-修改计划预算", "修改计划"+phase.getName(),JSON.toJSONString(phase),null); } diff --git a/xm-core/src/main/java/com/xm/core/ctrl/XmTaskController.java b/xm-core/src/main/java/com/xm/core/ctrl/XmTaskController.java index c719c50a..cc132660 100644 --- a/xm-core/src/main/java/com/xm/core/ctrl/XmTaskController.java +++ b/xm-core/src/main/java/com/xm/core/ctrl/XmTaskController.java @@ -901,10 +901,10 @@ public class XmTaskController { if(xmProjectPhaseDb==null){ - return ResponseHelper.failed("phase-0","计划【"+xmProjectPhaseDb.getPhaseName()+"】已不存在"); + return ResponseHelper.failed("phase-0","计划【"+xmProjectPhaseDb.getName()+"】已不存在"); } if("1".equals(xmProjectPhaseDb.getNtype())){ - return ResponseHelper.failed("phase-ntype-1","【"+xmProjectPhaseDb.getPhaseName()+"】属于计划集,无需关联任务。"); + return ResponseHelper.failed("phase-ntype-1","【"+xmProjectPhaseDb.getName()+"】属于计划集,无需关联任务。"); } XmProject xmProjectDb=this.xmProjectService.getProjectFromCache(xmProjectPhaseDb.getProjectId()); if(xmProjectDb==null){ @@ -951,7 +951,7 @@ public class XmTaskController { } msgs.add("成功将"+allowTasks.size()+"个任务与计划关联。"); for (XmTask t : allowTasks) { - xmRecordService.addXmTaskRecord(t.getProjectId(), t.getId(), "项目-任务-批量更新任务", "将任务"+t.getName()+"与计划【"+xmProjectPhaseDb.getId()+"-"+xmProjectPhaseDb.getPhaseName()+"】关联",null,null); + xmRecordService.addXmTaskRecord(t.getProjectId(), t.getId(), "项目-任务-批量更新任务", "将任务"+t.getName()+"与计划【"+xmProjectPhaseDb.getId()+"-"+xmProjectPhaseDb.getName()+"】关联",null,null); } if(ntype1Tasks.size()>0){ msgs.add("以下"+ntype1Tasks.size()+"个任务属于计划项,无需关联计划。【"+ntype1Tasks.stream().map(i->i.getName()).collect(Collectors.joining(","))+"】"); diff --git a/xm-core/src/main/java/com/xm/core/entity/XmProjectMCostNouser.java b/xm-core/src/main/java/com/xm/core/entity/XmProjectMCostNouser.java index 21fbfb75..786205af 100644 --- a/xm-core/src/main/java/com/xm/core/entity/XmProjectMCostNouser.java +++ b/xm-core/src/main/java/com/xm/core/entity/XmProjectMCostNouser.java @@ -9,7 +9,7 @@ import java.util.Date; /** * 组织 com.qqkj 顶级模块 oa 大模块 xm 小模块
* 实体 XmProjectMCostNouser所有属性名:
- * projectId,userid,createTime,sendCostTime,username,projectName,remark,id,taskId,taskName,subjectId,bizzStartDate,bizzEndDate,bizProcInstId,bizFlowState,projectPhaseId,actCostAmount,costType,bizMonth,bizDate,subjectName,projectPhaseName;
+ * projectId,userid,createTime,sendCostTime,username,projectName,remark,id,taskId,taskName,subjectId,bizzStartDate,bizzEndDate,bizProcInstId,bizFlowState,projectPhaseId,actCostAmount,costType,bizMonth,bizDate,subjectName,projectName;
* 表 XM.xm_project_m_cost_nouser xm_project_m_cost_nouser的所有字段名:
* project_id,userid,create_time,send_cost_time,username,project_name,remark,id,task_id,task_name,subject_id,bizz_start_date,bizz_end_date,biz_proc_inst_id,biz_flow_state,project_phase_id,act_cost_amount,cost_type,biz_month,biz_date,subject_name,project_phase_name;
* 当前主键(包括多主键):
@@ -85,7 +85,7 @@ public class XmProjectMCostNouser implements java.io.Serializable { String subjectName; @ApiModelProperty(notes="计划名称",allowEmptyValue=true,example="",allowableValues="") - String projectPhaseName; + String projectName; /**主键**/ public XmProjectMCostNouser(String id) { @@ -225,8 +225,8 @@ public class XmProjectMCostNouser implements java.io.Serializable { /** * 计划名称 **/ - public void setProjectPhaseName(String projectPhaseName) { - this.projectPhaseName = projectPhaseName; + public void setProjectName(String projectName) { + this.projectName = projectName; } /** @@ -358,8 +358,8 @@ public class XmProjectMCostNouser implements java.io.Serializable { /** * 计划名称 **/ - public String getProjectPhaseName() { - return this.projectPhaseName; + public String getProjectName() { + return this.projectName; } } \ No newline at end of file diff --git a/xm-core/src/main/java/com/xm/core/entity/XmProjectMCostUser.java b/xm-core/src/main/java/com/xm/core/entity/XmProjectMCostUser.java index 670e684d..11c1fc02 100644 --- a/xm-core/src/main/java/com/xm/core/entity/XmProjectMCostUser.java +++ b/xm-core/src/main/java/com/xm/core/entity/XmProjectMCostUser.java @@ -9,7 +9,7 @@ import java.util.Date; /** * 组织 com.qqkj 顶级模块 oa 大模块 xm 小模块
* 实体 XmProjectMCostUser所有属性名:
- * subjectId,projectId,userid,createTime,sendCostTime,username,projectName,remark,id,taskId,taskName,actWorkload,bizzStartDate,bizzEndDate,bizProcInstId,bizFlowState,projectPhaseId,actCostAmount,costType,bizMonth,bizDate,subjectName,projectPhaseName,execuserProcInstId,execuserStatus,payStatus,payOpUserid,payOpUsername;
+ * subjectId,projectId,userid,createTime,sendCostTime,username,projectName,remark,id,taskId,taskName,actWorkload,bizzStartDate,bizzEndDate,bizProcInstId,bizFlowState,projectPhaseId,actCostAmount,costType,bizMonth,bizDate,subjectName,projectName,execuserProcInstId,execuserStatus,payStatus,payOpUserid,payOpUsername;
* 表 XM.xm_project_m_cost_user 项目实际人工成本费用的所有字段名:
* subject_id,project_id,userid,create_time,send_cost_time,username,project_name,remark,id,task_id,task_name,act_workload,bizz_start_date,bizz_end_date,biz_proc_inst_id,biz_flow_state,project_phase_id,act_cost_amount,cost_type,biz_month,biz_date,subject_name,project_phase_name,execuser_proc_inst_id,execuser_status,pay_status,pay_op_userid,pay_op_username;
* 当前主键(包括多主键):
@@ -88,7 +88,7 @@ public class XmProjectMCostUser implements java.io.Serializable { String subjectName; @ApiModelProperty(notes="计划名称",allowEmptyValue=true,example="",allowableValues="") - String projectPhaseName; + String projectName; @ApiModelProperty(notes="执行人申请结算时的流程编号",allowEmptyValue=true,example="",allowableValues="") String execuserProcInstId; @@ -249,8 +249,8 @@ public class XmProjectMCostUser implements java.io.Serializable { /** * 计划名称 **/ - public void setProjectPhaseName(String projectPhaseName) { - this.projectPhaseName = projectPhaseName; + public void setProjectName(String projectName) { + this.projectName = projectName; } /** * 执行人申请结算时的流程编号 @@ -418,8 +418,8 @@ public class XmProjectMCostUser implements java.io.Serializable { /** * 计划名称 **/ - public String getProjectPhaseName() { - return this.projectPhaseName; + public String getProjectName() { + return this.projectName; } /** * 执行人申请结算时的流程编号 diff --git a/xm-core/src/main/java/com/xm/core/entity/XmTask.java b/xm-core/src/main/java/com/xm/core/entity/XmTask.java index b089f9c9..84630d80 100644 --- a/xm-core/src/main/java/com/xm/core/entity/XmTask.java +++ b/xm-core/src/main/java/com/xm/core/entity/XmTask.java @@ -8,7 +8,7 @@ import java.math.BigDecimal; /** * 组织 com 顶级模块 xm 大模块 core 小模块
* 实体 XmTask所有属性名:
- * id,name,parentTaskid,parentTaskname,projectId,projectName,level,sortLevel,executorUserid,executorUsername,preTaskid,preTaskname,startTime,endTime,milestone,description,remarks,createUserid,createUsername,createTime,rate,budgetCost,budgetWorkload,actCost,actWorkload,taskState,taskType,taskClass,toTaskCenter,actStartTime,actEndTime,bizProcInstId,bizFlowState,projectPhaseId,projectPhaseName,taskSkillNames,exeUsernames,taskSkillIds,exeUserids,taskOut,planType,settleSchemel,menuId,menuName,productId,productName,cbranchId,cdeptid,tagIds,tagNames,ntype,childrenCnt,ltime,pidPaths,lvl,isTpl,keyPath,uniInnerPrice,uniOutPrice,calcType,ptype;
+ * id,name,parentTaskid,parentTaskname,projectId,projectName,level,sortLevel,executorUserid,executorUsername,preTaskid,preTaskname,startTime,endTime,milestone,description,remarks,createUserid,createUsername,createTime,rate,budgetCost,budgetWorkload,actCost,actWorkload,taskState,taskType,taskClass,toTaskCenter,actStartTime,actEndTime,bizProcInstId,bizFlowState,projectPhaseId,projectName,taskSkillNames,exeUsernames,taskSkillIds,exeUserids,taskOut,planType,settleSchemel,menuId,menuName,productId,productName,cbranchId,cdeptid,tagIds,tagNames,ntype,childrenCnt,ltime,pidPaths,lvl,isTpl,keyPath,uniInnerPrice,uniOutPrice,calcType,ptype;
* 表 xm_task xm_task的所有字段名:
* id,name,parent_taskid,parent_taskname,project_id,project_name,level,sort_level,executor_userid,executor_username,pre_taskid,pre_taskname,start_time,end_time,milestone,description,remarks,create_userid,create_username,create_time,rate,budget_cost,budget_workload,act_cost,act_workload,task_state,task_type,task_class,to_task_center,act_start_time,act_end_time,biz_proc_inst_id,biz_flow_state,project_phase_id,project_phase_name,task_skill_names,exe_usernames,task_skill_ids,exe_userids,task_out,plan_type,settle_schemel,menu_id,menu_name,product_id,product_name,cbranch_id,cdeptid,tag_ids,tag_names,ntype,children_cnt,ltime,pid_paths,lvl,is_tpl,key_path,uni_inner_price,uni_out_price,calc_type,ptype;
* 当前主键(包括多主键):
@@ -123,7 +123,7 @@ public class XmTask implements java.io.Serializable { String projectPhaseId; @ApiModelProperty(notes="项目阶段名称(作废)",allowEmptyValue=true,example="",allowableValues="") - String projectPhaseName; + String projectName; @ApiModelProperty(notes="技能列表,逗号分隔",allowEmptyValue=true,example="",allowableValues="") String taskSkillNames; @@ -419,8 +419,8 @@ public class XmTask implements java.io.Serializable { /** * 项目阶段名称(作废) **/ - public void setProjectPhaseName(String projectPhaseName) { - this.projectPhaseName = projectPhaseName; + public void setProjectName(String projectName) { + this.projectName = projectName; } /** * 技能列表,逗号分隔 @@ -786,8 +786,8 @@ public class XmTask implements java.io.Serializable { /** * 项目阶段名称(作废) **/ - public String getProjectPhaseName() { - return this.projectPhaseName; + public String getProjectName() { + return this.projectName; } /** * 技能列表,逗号分隔 diff --git a/xm-core/src/main/java/com/xm/core/entity/XmTaskExecuser.java b/xm-core/src/main/java/com/xm/core/entity/XmTaskExecuser.java index 9723c08a..a0a4d6f8 100644 --- a/xm-core/src/main/java/com/xm/core/entity/XmTaskExecuser.java +++ b/xm-core/src/main/java/com/xm/core/entity/XmTaskExecuser.java @@ -8,7 +8,7 @@ import java.math.BigDecimal; /** * 组织 com 顶级模块 xm 大模块 core 小模块
* 实体 XmTaskExecuser所有属性名:
- * createTime,id,taskId,userid,startTime,endTime,status,remarks,settleAmount,settleWorkload,settleStatus,settleTime,createUserid,createUsername,username,matchScore,quoteWeekday,quoteAmount,quoteTime,bizProcInstId,bizFlowState,projectId,projectPhaseId,skillRemark,quoteWorkload,quoteStartTime,quoteEndTime,branchId,projectPhaseName,taskName,isLeader,distUserid,distUsername;
+ * createTime,id,taskId,userid,startTime,endTime,status,remarks,settleAmount,settleWorkload,settleStatus,settleTime,createUserid,createUsername,username,matchScore,quoteWeekday,quoteAmount,quoteTime,bizProcInstId,bizFlowState,projectId,projectPhaseId,skillRemark,quoteWorkload,quoteStartTime,quoteEndTime,branchId,projectName,taskName,isLeader,distUserid,distUsername;
* 表 XM.xm_task_execuser xm_task_execuser的所有字段名:
* create_time,id,task_id,userid,start_time,end_time,status,remarks,settle_amount,settle_workload,settle_status,settle_time,create_userid,create_username,username,match_score,quote_weekday,quote_amount,quote_time,biz_proc_inst_id,biz_flow_state,project_id,project_phase_id,skill_remark,quote_workload,quote_start_time,quote_end_time,branch_id,project_phase_name,task_name,is_leader,dist_userid,dist_username;
* 当前主键(包括多主键):
@@ -105,7 +105,7 @@ public class XmTaskExecuser implements java.io.Serializable { String branchId; @ApiModelProperty(notes="计划名称",allowEmptyValue=true,example="",allowableValues="") - String projectPhaseName; + String projectName; @ApiModelProperty(notes="任务名称",allowEmptyValue=true,example="",allowableValues="") String taskName; @@ -299,8 +299,8 @@ public class XmTaskExecuser implements java.io.Serializable { /** * 计划名称 **/ - public void setProjectPhaseName(String projectPhaseName) { - this.projectPhaseName = projectPhaseName; + public void setProjectName(String projectName) { + this.projectName = projectName; } /** * 任务名称 @@ -498,8 +498,8 @@ public class XmTaskExecuser implements java.io.Serializable { /** * 计划名称 **/ - public String getProjectPhaseName() { - return this.projectPhaseName; + public String getProjectName() { + return this.projectName; } /** * 任务名称 diff --git a/xm-core/src/main/java/com/xm/core/service/XmPhaseService.java b/xm-core/src/main/java/com/xm/core/service/XmPhaseService.java index bf744ab7..a349b603 100644 --- a/xm-core/src/main/java/com/xm/core/service/XmPhaseService.java +++ b/xm-core/src/main/java/com/xm/core/service/XmPhaseService.java @@ -60,7 +60,7 @@ public class XmPhaseService extends BaseService { @Transactional public int insert(XmPhase parameter) { int i= super.insert(parameter); - if(StringUtils.hasText(parameter.getParentPhaseId())){ + if(StringUtils.hasText(parameter.getParentId())){ sumParents(parameter); } @@ -71,7 +71,7 @@ public class XmPhaseService extends BaseService { @Transactional public int deleteByPk(XmPhase parameter) { int i= super.deleteByPk(parameter); - if(StringUtils.hasText(parameter.getParentPhaseId())){ + if(StringUtils.hasText(parameter.getParentId())){ sumParents(parameter); } return i; @@ -81,13 +81,13 @@ public class XmPhaseService extends BaseService { * 判断新增预算是否超出项目总预算 * @param projectId * @param addPhaseBudgetCost - * @param addPhaseBudgetInnerUserAt - * @param addPhaseBudgetOutUserAt - * @param addPhaseBudgetNouserAt + * @param addBudgetIuserAt + * @param addBudgetOuserAt + * @param addBudgetNouserAt * @param excludePhaseIds * @return */ - public Tips judgetProjectBudget(String projectId, BigDecimal addPhaseBudgetCost, BigDecimal addPhaseBudgetInnerUserAt, BigDecimal addPhaseBudgetOutUserAt, BigDecimal addPhaseBudgetNouserAt, List excludePhaseIds){ + public Tips judgetProjectBudget(String projectId, BigDecimal addPhaseBudgetCost, BigDecimal addBudgetIuserAt, BigDecimal addBudgetOuserAt, BigDecimal addBudgetNouserAt, List excludePhaseIds){ Tips tips=new Tips("检查预算成功"); Map g=this.selectTotalProjectAndPhaseBudgetCost(projectId,excludePhaseIds); BigDecimal phaseBudgetCost=BigDecimal.ZERO; @@ -96,14 +96,14 @@ public class XmPhaseService extends BaseService { if(addPhaseBudgetCost==null) { addPhaseBudgetCost=BigDecimal.ZERO; } - if(addPhaseBudgetInnerUserAt==null) { - addPhaseBudgetInnerUserAt=BigDecimal.ZERO; + if(addBudgetIuserAt==null) { + addBudgetIuserAt=BigDecimal.ZERO; } - if(addPhaseBudgetOutUserAt==null) { - addPhaseBudgetOutUserAt=BigDecimal.ZERO; + if(addBudgetOuserAt==null) { + addBudgetOuserAt=BigDecimal.ZERO; } - if(addPhaseBudgetNouserAt==null) { - addPhaseBudgetNouserAt=BigDecimal.ZERO; + if(addBudgetNouserAt==null) { + addBudgetNouserAt=BigDecimal.ZERO; } if(g==null || g.isEmpty()){ @@ -117,16 +117,16 @@ public class XmPhaseService extends BaseService { BigDecimal planNouserAt=NumberUtil.getBigDecimal(g.get("planNouserAt"),zero); BigDecimal planTotalCost=NumberUtil.getBigDecimal(g.get("planTotalCost"),zero); - if(addPhaseBudgetInnerUserAt.add(phaseBudgetInnerUserAt).compareTo(planInnerUserAt)>0) { - tips.setFailureMsg("内部人力预算超出项目内部人力预算"+addPhaseBudgetInnerUserAt.add(phaseBudgetInnerUserAt).subtract(planInnerUserAt)+"元"); + if(addBudgetIuserAt.add(phaseBudgetInnerUserAt).compareTo(planInnerUserAt)>0) { + tips.setFailureMsg("内部人力预算超出项目内部人力预算"+addBudgetIuserAt.add(phaseBudgetInnerUserAt).subtract(planInnerUserAt)+"元"); return tips; } - if(addPhaseBudgetOutUserAt.add(phaseBudgetOutUserAt).compareTo(planOutUserAt)>0) { - tips.setFailureMsg("外部人力预算超出项目外部人力预算"+addPhaseBudgetOutUserAt.add(phaseBudgetOutUserAt).subtract(planOutUserAt)+"元"); + if(addBudgetOuserAt.add(phaseBudgetOutUserAt).compareTo(planOutUserAt)>0) { + tips.setFailureMsg("外部人力预算超出项目外部人力预算"+addBudgetOuserAt.add(phaseBudgetOutUserAt).subtract(planOutUserAt)+"元"); return tips; } - if(addPhaseBudgetNouserAt.add(phaseBudgetNouserAt).compareTo(planNouserAt)>0) { - tips.setFailureMsg("非人力预算超出项目非人力预算"+addPhaseBudgetNouserAt.add(phaseBudgetNouserAt).subtract(planNouserAt)+"元"); + if(addBudgetNouserAt.add(phaseBudgetNouserAt).compareTo(planNouserAt)>0) { + tips.setFailureMsg("非人力预算超出项目非人力预算"+addBudgetNouserAt.add(phaseBudgetNouserAt).subtract(planNouserAt)+"元"); return tips; } @@ -148,12 +148,12 @@ public class XmPhaseService extends BaseService { } public XmPhase autoCalcWorkload(XmPhase phase) { - BigDecimal phaseBudgetHours=NumberUtil.getBigDecimal(phase.getPhaseBudgetHours(),BigDecimal.ZERO); - BigDecimal phaseBudgetInnerUserCnt=NumberUtil.getBigDecimal(phase.getPhaseBudgetInnerUserCnt(),BigDecimal.ZERO); - BigDecimal phaseBudgetOutUserCnt=NumberUtil.getBigDecimal(phase.getPhaseBudgetOutUserCnt(),BigDecimal.ZERO); - phase.setPhaseBudgetInnerUserWorkload(phaseBudgetInnerUserCnt.multiply(phaseBudgetHours)); - phase.setPhaseBudgetOutUserWorkload(phaseBudgetOutUserCnt.multiply(phaseBudgetHours)); - phase.setPhaseBudgetWorkload(phase.getPhaseBudgetInnerUserWorkload().add(phase.getPhaseBudgetOutUserWorkload())); + BigDecimal phaseBudgetHours=NumberUtil.getBigDecimal(phase.getBudgetHours(),BigDecimal.ZERO); + BigDecimal phaseBudgetInnerUserCnt=NumberUtil.getBigDecimal(phase.getBudgetIuserCnt(),BigDecimal.ZERO); + BigDecimal phaseBudgetOutUserCnt=NumberUtil.getBigDecimal(phase.getBudgetOuserCnt(),BigDecimal.ZERO); + phase.setBudgetIuserWorkload(phaseBudgetInnerUserCnt.multiply(phaseBudgetHours)); + phase.setBudgetOuserWorkload(phaseBudgetOutUserCnt.multiply(phaseBudgetHours)); + phase.setBudgetWorkload(phase.getBudgetIuserWorkload().add(phase.getBudgetOuserWorkload())); return phase; } @@ -206,7 +206,7 @@ public class XmPhaseService extends BaseService { if(delNode.getChildrenCnt()==null||delNode.getChildrenCnt()<=0){ return true; } - List childList=delNodes.stream().filter(i->delNode.getId().equals(i.getParentPhaseId())).collect(Collectors.toList()); + List childList=delNodes.stream().filter(i->delNode.getId().equals(i.getParentId())).collect(Collectors.toList()); if(childList==null||childList.size() xmProjectPhases) { for (XmPhase xmProjectPhase : xmProjectPhases) { - long childrenCnt=xmProjectPhases.stream().filter(i->xmProjectPhase.getId().equals(i.getParentPhaseId())).count(); + long childrenCnt=xmProjectPhases.stream().filter(i->xmProjectPhase.getId().equals(i.getParentId())).count(); xmProjectPhase.setChildrenCnt(Integer.valueOf(childrenCnt+"")); if(childrenCnt>0){ xmProjectPhase.setNtype("1"); @@ -254,38 +254,38 @@ public class XmPhaseService extends BaseService { public List parentIdPathsCalcBeforeSave(List nodes) { - List noExistsList=nodes.stream().filter(i->!nodes.stream().filter(k->k.getId().equals(i.getParentPhaseId())).findAny().isPresent()).collect(Collectors.toList()); - noExistsList=noExistsList.stream().filter(i->StringUtils.hasText(i.getParentPhaseId())).collect(Collectors.toList()); + List noExistsList=nodes.stream().filter(i->!nodes.stream().filter(k->k.getId().equals(i.getParentId())).findAny().isPresent()).collect(Collectors.toList()); + noExistsList=noExistsList.stream().filter(i->StringUtils.hasText(i.getParentId())).collect(Collectors.toList()); Map hadCalcMap=new HashMap<>(); for (XmPhase node : noExistsList) { - if(hadCalcMap.containsKey(node.getParentPhaseId())){ - String idPaths=hadCalcMap.get(node.getParentPhaseId()); + if(hadCalcMap.containsKey(node.getParentId())){ + String idPaths=hadCalcMap.get(node.getParentId()); node.setPidPaths(idPaths+node.getId()+","); }else{ this.parentIdPathsCalcBeforeSave(node); String idPaths=node.getPidPaths(); idPaths=idPaths.substring(0,idPaths.length()-node.getId().length()-1); - hadCalcMap.put(node.getParentPhaseId(),idPaths); + hadCalcMap.put(node.getParentId(),idPaths); } } for (XmPhase node : nodes) { - if(!StringUtils.hasText(node.getParentPhaseId())){ + if(!StringUtils.hasText(node.getParentId())){ node.setPidPaths("0,"+node.getId()+","); continue; } - if(hadCalcMap.containsKey(node.getParentPhaseId())){ - String idPaths=hadCalcMap.get(node.getParentPhaseId()); + if(hadCalcMap.containsKey(node.getParentId())){ + String idPaths=hadCalcMap.get(node.getParentId()); node.setPidPaths(idPaths+node.getId()+","); }else{ List pnodeList=this.getParentList(node,nodes); if(pnodeList==null ||pnodeList.size()==0){ - node.setPidPaths("0,"+node.getParentPhaseId()+","+node.getId()+","); + node.setPidPaths("0,"+node.getParentId()+","+node.getId()+","); continue; } XmPhase topParent=pnodeList.get(pnodeList.size()-1); String idPath="0,"; - if(hadCalcMap.containsKey(topParent.getParentPhaseId())){ - idPath=hadCalcMap.get(topParent.getParentPhaseId()); + if(hadCalcMap.containsKey(topParent.getParentId())){ + idPath=hadCalcMap.get(topParent.getParentId()); } for (int i = pnodeList.size() - 1; i >= 0; i--) { idPath=idPath+pnodeList.get(i).getId()+","; @@ -310,14 +310,14 @@ public class XmPhaseService extends BaseService { public Tips parentIdPathsCalcBeforeSave(XmPhase currNode) { Tips tips = new Tips("成功"); - if (!StringUtils.hasText(currNode.getParentPhaseId()) || "0".equals(currNode.getParentPhaseId())) { + if (!StringUtils.hasText(currNode.getParentId()) || "0".equals(currNode.getParentId())) { currNode.setPidPaths("0," + currNode.getId() + ","); currNode.setLvl(1); return tips; } else { List parentList=this.getParentList(currNode); if(parentList==null ||parentList.size()==0){ - currNode.setPidPaths("0,"+currNode.getParentPhaseId()+","+currNode.getId()+","); + currNode.setPidPaths("0,"+currNode.getParentId()+","+currNode.getId()+","); currNode.setLvl(2); return tips; } @@ -338,11 +338,11 @@ public class XmPhaseService extends BaseService { List parentList=new ArrayList<>(); XmPhase current=currNode; while (true){ - if(!StringUtils.hasText(current.getParentPhaseId()) || "0".equals(current.getParentPhaseId())){ + if(!StringUtils.hasText(current.getParentId()) || "0".equals(current.getParentId())){ return parentList; } XmPhase query=new XmPhase(); - query.setId(current.getParentPhaseId()); + query.setId(current.getParentId()); current=this.selectOneObject(query); if(current==null){ return parentList; @@ -355,11 +355,11 @@ public class XmPhaseService extends BaseService { List parentList=new ArrayList<>(); XmPhase current=currNode; while (true){ - if(!StringUtils.hasText(current.getParentPhaseId()) || "0".equals(current.getParentPhaseId())){ + if(!StringUtils.hasText(current.getParentId()) || "0".equals(current.getParentId())){ return parentList; } XmPhase query=new XmPhase(); - query.setId(current.getParentPhaseId()); + query.setId(current.getParentId()); Optional optional=nodes.stream().filter(i->i.getId().equals(query.getId())).findFirst(); if(!optional.isPresent()){ current=optional.get(); @@ -462,13 +462,13 @@ public class XmPhaseService extends BaseService { * 判断新增预算是否超出产品总预算 * @param productId * @param addPhaseBudgetCost - * @param addPhaseBudgetInnerUserAt - * @param addPhaseBudgetOutUserAt - * @param addPhaseBudgetNouserAt + * @param addBudgetIuserAt + * @param addBudgetOuserAt + * @param addBudgetNouserAt * @param excludePhaseIds * @return */ - public Tips judgetProductBudget(String productId,BigDecimal addPhaseBudgetCost,BigDecimal addPhaseBudgetInnerUserAt,BigDecimal addPhaseBudgetOutUserAt,BigDecimal addPhaseBudgetNouserAt,List excludePhaseIds){ + public Tips judgetProductBudget(String productId,BigDecimal addPhaseBudgetCost,BigDecimal addBudgetIuserAt,BigDecimal addBudgetOuserAt,BigDecimal addBudgetNouserAt,List excludePhaseIds){ Tips tips=new Tips("检查预算成功"); Map g=this.selectTotalProductAndPhaseBudgetCost(productId,excludePhaseIds); BigDecimal phaseBudgetCost=BigDecimal.ZERO; @@ -477,14 +477,14 @@ public class XmPhaseService extends BaseService { if(addPhaseBudgetCost==null) { addPhaseBudgetCost=BigDecimal.ZERO; } - if(addPhaseBudgetInnerUserAt==null) { - addPhaseBudgetInnerUserAt=BigDecimal.ZERO; + if(addBudgetIuserAt==null) { + addBudgetIuserAt=BigDecimal.ZERO; } - if(addPhaseBudgetOutUserAt==null) { - addPhaseBudgetOutUserAt=BigDecimal.ZERO; + if(addBudgetOuserAt==null) { + addBudgetOuserAt=BigDecimal.ZERO; } - if(addPhaseBudgetNouserAt==null) { - addPhaseBudgetNouserAt=BigDecimal.ZERO; + if(addBudgetNouserAt==null) { + addBudgetNouserAt=BigDecimal.ZERO; } BigDecimal phaseBudgetInnerUserAt=NumberUtil.getBigDecimal(g.get("phaseBudgetInnerUserAt"),zero); BigDecimal phaseBudgetOutUserAt=NumberUtil.getBigDecimal(g.get("phaseBudgetOutUserAt"),zero); @@ -529,19 +529,19 @@ public class XmPhaseService extends BaseService { } public void calcPhaseBudgetAmount(XmPhase phase){ - if(phase.getPhaseBudgetInnerUserAt()==null){ - phase.setPhaseBudgetInnerUserAt(BigDecimal.ZERO); + if(phase.getBudgetIuserAt()==null){ + phase.setBudgetIuserAt(BigDecimal.ZERO); } - if(phase.getPhaseBudgetNouserAt()==null){ - phase.setPhaseBudgetNouserAt(BigDecimal.ZERO); + if(phase.getBudgetNouserAt()==null){ + phase.setBudgetNouserAt(BigDecimal.ZERO); } - if(phase.getPhaseBudgetOutUserAt()==null){ - phase.setPhaseBudgetOutUserAt(BigDecimal.ZERO); + if(phase.getBudgetOuserAt()==null){ + phase.setBudgetOuserAt(BigDecimal.ZERO); } - if(phase.getPhaseBudgetAt()==null){ - phase.setPhaseBudgetAt(BigDecimal.ZERO); + if(phase.getBudgetAt()==null){ + phase.setBudgetAt(BigDecimal.ZERO); } - phase.setPhaseBudgetAt(phase.getPhaseBudgetInnerUserAt().add(phase.getPhaseBudgetNouserAt()).add(phase.getPhaseBudgetOutUserAt())); + phase.setBudgetAt(phase.getBudgetIuserAt().add(phase.getBudgetNouserAt()).add(phase.getBudgetOuserAt())); } /** @@ -570,12 +570,12 @@ public class XmPhaseService extends BaseService { if(phaseBudget==null || phaseBudget.isEmpty()){ tips.setFailureMsg("计划不存在"); }else{ - BigDecimal childPhaseBudgetAt=NumberUtil.getBigDecimal(phaseBudget.get("childPhaseBudgetAt"),BigDecimal.ZERO); + BigDecimal childBudgetAt=NumberUtil.getBigDecimal(phaseBudget.get("childBudgetAt"),BigDecimal.ZERO); BigDecimal phaseBudgetAt=NumberUtil.getBigDecimal(phaseBudget.get("phaseBudgetAt"),BigDecimal.ZERO); - if(childPhaseBudgetAt.add(phaseBudgetCost).compareTo(phaseBudgetAt)>0){ - tips.setFailureMsg("预算金额超出剩余预算金额"+childPhaseBudgetAt.add(phaseBudgetCost).subtract(phaseBudgetAt)+"元"); + if(childBudgetAt.add(phaseBudgetCost).compareTo(phaseBudgetAt)>0){ + tips.setFailureMsg("预算金额超出剩余预算金额"+childBudgetAt.add(phaseBudgetCost).subtract(phaseBudgetAt)+"元"); } } return tips; diff --git a/xm-core/src/main/java/com/xm/core/service/XmProductService.java b/xm-core/src/main/java/com/xm/core/service/XmProductService.java index 3975c2c4..cdc9d0c8 100644 --- a/xm-core/src/main/java/com/xm/core/service/XmProductService.java +++ b/xm-core/src/main/java/com/xm/core/service/XmProductService.java @@ -154,8 +154,8 @@ public class XmProductService extends BaseService { node.setProjectId(null); node.setProductId(xmProductTo.getId()); node.setId(newId); - if(StringUtils.hasText(node.getParentPhaseId())){ - node.setParentPhaseId(newPhaseIdMap.get(node.getParentPhaseId())); + if(StringUtils.hasText(node.getParentId())){ + node.setParentId(newPhaseIdMap.get(node.getParentId())); } node.setCtime(new Date()); diff --git a/xm-core/src/main/java/com/xm/core/service/XmProjectService.java b/xm-core/src/main/java/com/xm/core/service/XmProjectService.java index d6522dac..2790699a 100644 --- a/xm-core/src/main/java/com/xm/core/service/XmProjectService.java +++ b/xm-core/src/main/java/com/xm/core/service/XmProjectService.java @@ -131,8 +131,8 @@ public class XmProjectService extends BaseService { String newId=newPhaseIdMap.get(oldId); node.setProjectId(xmProjectTo.getId()); node.setId(newId); - if(StringUtils.hasText(node.getParentPhaseId())){ - node.setParentPhaseId(newPhaseIdMap.get(node.getParentPhaseId())); + if(StringUtils.hasText(node.getParentId())){ + node.setParentId(newPhaseIdMap.get(node.getParentId())); } node.setCtime(new Date()); diff --git a/xm-core/src/main/java/com/xm/core/service/XmTaskExecuserService.java b/xm-core/src/main/java/com/xm/core/service/XmTaskExecuserService.java index 5f3283e6..dd8fb387 100644 --- a/xm-core/src/main/java/com/xm/core/service/XmTaskExecuserService.java +++ b/xm-core/src/main/java/com/xm/core/service/XmTaskExecuserService.java @@ -335,8 +335,8 @@ public class XmTaskExecuserService extends BaseService { costUser.setCreateTime(new Date()); costUser.setProjectId(xmTaskExecuser.getProjectId()); costUser.setProjectName(projectName); - costUser.setProjectPhaseName(task.getProjectPhaseName()); - costUser.setProjectPhaseId(task.getProjectPhaseName()); + costUser.setProjectName(task.getProjectName()); + costUser.setProjectPhaseId(task.getProjectName()); costUser.setId(this.xmProjectMCostUserService.createKey("id")); costUser.setExecuserProcInstId(execuserProcInstId); costUser.setExecuserStatus("0"); diff --git a/xm-core/src/main/resources/mybatis/mapper/xm/core/dao/XmProjectMCostNouserMapper.xml b/xm-core/src/main/resources/mybatis/mapper/xm/core/dao/XmProjectMCostNouserMapper.xml index 32caa221..2db1af75 100644 --- a/xm-core/src/main/resources/mybatis/mapper/xm/core/dao/XmProjectMCostNouserMapper.xml +++ b/xm-core/src/main/resources/mybatis/mapper/xm/core/dao/XmProjectMCostNouserMapper.xml @@ -142,7 +142,7 @@ insert into xm_project_m_cost_nouser( ) values ( - #{projectId},#{userid},#{createTime},#{sendCostTime},#{username},#{projectName},#{remark},#{id},#{taskId},#{taskName},#{subjectId},#{bizzStartDate},#{bizzEndDate},#{bizProcInstId},#{bizFlowState},#{projectPhaseId},#{actCostAmount},#{costType},#{bizMonth},#{bizDate},#{subjectName},#{projectPhaseName} + #{projectId},#{userid},#{createTime},#{sendCostTime},#{username},#{projectName},#{remark},#{id},#{taskId},#{taskName},#{subjectId},#{bizzStartDate},#{bizzEndDate},#{bizProcInstId},#{bizFlowState},#{projectPhaseId},#{actCostAmount},#{costType},#{bizMonth},#{bizDate},#{subjectName},#{projectName} ) @@ -230,7 +230,7 @@ and res.biz_month = #{bizMonth} and res.biz_date = #{bizDate} and res.subject_name = #{subjectName} - and res.project_phase_name = #{projectPhaseName} + and res.project_phase_name = #{projectName} @@ -254,7 +254,7 @@ biz_month = #{bizMonth}, biz_date = #{bizDate}, subject_name = #{subjectName}, - project_phase_name = #{projectPhaseName} + project_phase_name = #{projectName} project_id = #{projectId}, @@ -277,7 +277,7 @@ biz_month = #{bizMonth}, biz_date = #{bizDate}, subject_name = #{subjectName}, - project_phase_name = #{projectPhaseName}, + project_phase_name = #{projectName}, @@ -301,6 +301,6 @@ biz_month = #{item.bizMonth}, biz_date = #{item.bizDate}, subject_name = #{item.subjectName}, - project_phase_name = #{item.projectPhaseName} + project_phase_name = #{item.projectName} \ No newline at end of file diff --git a/xm-core/src/main/resources/mybatis/mapper/xm/core/dao/XmProjectMCostUserMapper.xml b/xm-core/src/main/resources/mybatis/mapper/xm/core/dao/XmProjectMCostUserMapper.xml index c07f28ab..1e65d75d 100644 --- a/xm-core/src/main/resources/mybatis/mapper/xm/core/dao/XmProjectMCostUserMapper.xml +++ b/xm-core/src/main/resources/mybatis/mapper/xm/core/dao/XmProjectMCostUserMapper.xml @@ -181,7 +181,7 @@ insert into xm_project_m_cost_user( ) values ( - #{subjectId},#{projectId},#{userid},#{createTime},#{sendCostTime},#{username},#{projectName},#{remark},#{id},#{taskId},#{taskName},#{actWorkload},#{bizzStartDate},#{bizzEndDate},#{bizProcInstId},#{bizFlowState},#{projectPhaseId},#{actCostAmount},#{costType},#{bizMonth},#{bizDate},#{subjectName},#{projectPhaseName},#{execuserProcInstId},#{execuserStatus},#{payStatus},#{payOpUserid},#{payOpUsername} + #{subjectId},#{projectId},#{userid},#{createTime},#{sendCostTime},#{username},#{projectName},#{remark},#{id},#{taskId},#{taskName},#{actWorkload},#{bizzStartDate},#{bizzEndDate},#{bizProcInstId},#{bizFlowState},#{projectPhaseId},#{actCostAmount},#{costType},#{bizMonth},#{bizDate},#{subjectName},#{projectName},#{execuserProcInstId},#{execuserStatus},#{payStatus},#{payOpUserid},#{payOpUsername} ) @@ -270,7 +270,7 @@ and res.biz_month = #{bizMonth} and res.biz_date = #{bizDate} and res.subject_name = #{subjectName} - and res.project_phase_name = #{projectPhaseName} + and res.project_phase_name = #{projectName} and res.execuser_proc_inst_id = #{execuserProcInstId} and res.execuser_status = #{execuserStatus} and res.pay_status = #{payStatus} @@ -300,7 +300,7 @@ biz_month = #{bizMonth}, biz_date = #{bizDate}, subject_name = #{subjectName}, - project_phase_name = #{projectPhaseName}, + project_phase_name = #{projectName}, execuser_proc_inst_id = #{execuserProcInstId}, execuser_status = #{execuserStatus}, pay_status = #{payStatus}, @@ -329,7 +329,7 @@ biz_month = #{bizMonth}, biz_date = #{bizDate}, subject_name = #{subjectName}, - project_phase_name = #{projectPhaseName}, + project_phase_name = #{projectName}, execuser_proc_inst_id = #{execuserProcInstId}, execuser_status = #{execuserStatus}, pay_status = #{payStatus}, @@ -359,7 +359,7 @@ biz_month = #{item.bizMonth}, biz_date = #{item.bizDate}, subject_name = #{item.subjectName}, - project_phase_name = #{item.projectPhaseName}, + project_phase_name = #{item.projectName}, execuser_proc_inst_id = #{item.execuserProcInstId}, execuser_status = #{item.execuserStatus}, pay_status = #{item.payStatus}, diff --git a/xm-core/src/main/resources/mybatis/mapper/xm/core/dao/XmTaskExecuserMapper.xml b/xm-core/src/main/resources/mybatis/mapper/xm/core/dao/XmTaskExecuserMapper.xml index 922d0f1e..1a7e71e0 100644 --- a/xm-core/src/main/resources/mybatis/mapper/xm/core/dao/XmTaskExecuserMapper.xml +++ b/xm-core/src/main/resources/mybatis/mapper/xm/core/dao/XmTaskExecuserMapper.xml @@ -172,7 +172,7 @@ insert into xm_task_execuser( ) values ( - #{createTime},#{id},#{taskId},#{userid},#{startTime},#{endTime},#{status},#{remarks},#{settleAmount},#{settleWorkload},#{settleStatus},#{settleTime},#{createUserid},#{createUsername},#{username},#{matchScore},#{quoteWeekday},#{quoteAmount},#{quoteTime},#{bizProcInstId},#{bizFlowState},#{projectId},#{projectPhaseId},#{skillRemark},#{quoteWorkload},#{quoteStartTime},#{quoteEndTime},#{branchId},#{projectPhaseName},#{taskName},#{isLeader},#{distUserid},#{distUsername} + #{createTime},#{id},#{taskId},#{userid},#{startTime},#{endTime},#{status},#{remarks},#{settleAmount},#{settleWorkload},#{settleStatus},#{settleTime},#{createUserid},#{createUsername},#{username},#{matchScore},#{quoteWeekday},#{quoteAmount},#{quoteTime},#{bizProcInstId},#{bizFlowState},#{projectId},#{projectPhaseId},#{skillRemark},#{quoteWorkload},#{quoteStartTime},#{quoteEndTime},#{branchId},#{projectName},#{taskName},#{isLeader},#{distUserid},#{distUsername} ) @@ -270,7 +270,7 @@ and date_format(res.quote_start_time,'%Y-%m-%d') = date_format(#{quoteStartTime},'%Y-%m-%d') and date_format(res.quote_end_time,'%Y-%m-%d') = date_format(#{quoteEndTime},'%Y-%m-%d') and res.branch_id = #{branchId} - and res.project_phase_name = #{projectPhaseName} + and res.project_phase_name = #{projectName} and res.task_name = #{taskName} and res.is_leader = #{isLeader} and res.dist_userid = #{distUserid} @@ -305,7 +305,7 @@ quote_start_time = #{quoteStartTime}, quote_end_time = #{quoteEndTime}, branch_id = #{branchId}, - project_phase_name = #{projectPhaseName}, + project_phase_name = #{projectName}, task_name = #{taskName}, is_leader = #{isLeader}, dist_userid = #{distUserid}, @@ -339,7 +339,7 @@ quote_start_time = #{quoteStartTime}, quote_end_time = #{quoteEndTime}, branch_id = #{branchId}, - project_phase_name = #{projectPhaseName}, + project_phase_name = #{projectName}, task_name = #{taskName}, is_leader = #{isLeader}, dist_userid = #{distUserid}, @@ -374,7 +374,7 @@ quote_start_time = #{item.quoteStartTime}, quote_end_time = #{item.quoteEndTime}, branch_id = #{item.branchId}, - project_phase_name = #{item.projectPhaseName}, + project_phase_name = #{item.projectName}, task_name = #{item.taskName}, is_leader = #{item.isLeader}, dist_userid = #{item.distUserid}, diff --git a/xm-core/src/main/resources/mybatis/mapper/xm/core/dao/XmTaskMapper.xml b/xm-core/src/main/resources/mybatis/mapper/xm/core/dao/XmTaskMapper.xml index ae17187e..58760153 100644 --- a/xm-core/src/main/resources/mybatis/mapper/xm/core/dao/XmTaskMapper.xml +++ b/xm-core/src/main/resources/mybatis/mapper/xm/core/dao/XmTaskMapper.xml @@ -362,7 +362,7 @@ insert into xm_task( ) values ( - #{id},#{name},#{parentTaskid},#{parentTaskname},#{projectId},#{projectName},#{level},#{sortLevel},#{executorUserid},#{executorUsername},#{preTaskid},#{preTaskname},#{startTime},#{endTime},#{milestone},#{description},#{remarks},#{createUserid},#{createUsername},#{createTime},#{rate},#{budgetCost},#{budgetWorkload},#{actCost},#{actWorkload},#{taskState},#{taskType},#{taskClass},#{toTaskCenter},#{actStartTime},#{actEndTime},#{bizProcInstId},#{bizFlowState},#{projectPhaseId},#{projectPhaseName},#{taskSkillNames},#{exeUsernames},#{taskSkillIds},#{exeUserids},#{taskOut},#{planType},#{settleSchemel},#{menuId},#{menuName},#{productId},#{productName},#{cbranchId},#{cdeptid},#{tagIds},#{tagNames},#{ntype},#{childrenCnt},#{ltime},#{pidPaths},#{lvl},#{isTpl},#{keyPath},#{uniInnerPrice},#{uniOutPrice},#{calcType},#{ptype} + #{id},#{name},#{parentTaskid},#{parentTaskname},#{projectId},#{projectName},#{level},#{sortLevel},#{executorUserid},#{executorUsername},#{preTaskid},#{preTaskname},#{startTime},#{endTime},#{milestone},#{description},#{remarks},#{createUserid},#{createUsername},#{createTime},#{rate},#{budgetCost},#{budgetWorkload},#{actCost},#{actWorkload},#{taskState},#{taskType},#{taskClass},#{toTaskCenter},#{actStartTime},#{actEndTime},#{bizProcInstId},#{bizFlowState},#{projectPhaseId},#{projectName},#{taskSkillNames},#{exeUsernames},#{taskSkillIds},#{exeUserids},#{taskOut},#{planType},#{settleSchemel},#{menuId},#{menuName},#{productId},#{productName},#{cbranchId},#{cdeptid},#{tagIds},#{tagNames},#{ntype},#{childrenCnt},#{ltime},#{pidPaths},#{lvl},#{isTpl},#{keyPath},#{uniInnerPrice},#{uniOutPrice},#{calcType},#{ptype} ) @@ -464,7 +464,7 @@ and res.biz_proc_inst_id = #{bizProcInstId} and res.biz_flow_state = #{bizFlowState} and res.project_phase_id = #{projectPhaseId} - and res.project_phase_name = #{projectPhaseName} + and res.project_phase_name = #{projectName} and res.task_skill_names = #{taskSkillNames} and res.exe_usernames = #{exeUsernames} and res.task_skill_ids = #{taskSkillIds} @@ -527,7 +527,7 @@ biz_proc_inst_id = #{bizProcInstId}, biz_flow_state = #{bizFlowState}, project_phase_id = #{projectPhaseId}, - project_phase_name = #{projectPhaseName}, + project_phase_name = #{projectName}, task_skill_names = #{taskSkillNames}, exe_usernames = #{exeUsernames}, task_skill_ids = #{taskSkillIds}, @@ -589,7 +589,7 @@ biz_proc_inst_id = #{bizProcInstId}, biz_flow_state = #{bizFlowState}, project_phase_id = #{projectPhaseId}, - project_phase_name = #{projectPhaseName}, + project_phase_name = #{projectName}, task_skill_names = #{taskSkillNames}, exe_usernames = #{exeUsernames}, task_skill_ids = #{taskSkillIds}, @@ -652,7 +652,7 @@ biz_proc_inst_id = #{item.bizProcInstId}, biz_flow_state = #{item.bizFlowState}, project_phase_id = #{item.projectPhaseId}, - project_phase_name = #{item.projectPhaseName}, + project_phase_name = #{item.projectName}, task_skill_names = #{item.taskSkillNames}, exe_usernames = #{item.exeUsernames}, task_skill_ids = #{item.taskSkillIds},