Browse Source

添加节点类型、标签等

master
陈裕财 4 years ago
parent
commit
56d076d347
  1. 60
      xm-core/src/main/java/com/xm/core/ctrl/XmPhaseController.java
  2. 6
      xm-core/src/main/java/com/xm/core/ctrl/XmTaskController.java
  3. 12
      xm-core/src/main/java/com/xm/core/entity/XmProjectMCostNouser.java
  4. 12
      xm-core/src/main/java/com/xm/core/entity/XmProjectMCostUser.java
  5. 12
      xm-core/src/main/java/com/xm/core/entity/XmTask.java
  6. 12
      xm-core/src/main/java/com/xm/core/entity/XmTaskExecuser.java
  7. 130
      xm-core/src/main/java/com/xm/core/service/XmPhaseService.java
  8. 4
      xm-core/src/main/java/com/xm/core/service/XmProductService.java
  9. 4
      xm-core/src/main/java/com/xm/core/service/XmProjectService.java
  10. 4
      xm-core/src/main/java/com/xm/core/service/XmTaskExecuserService.java
  11. 10
      xm-core/src/main/resources/mybatis/mapper/xm/core/dao/XmProjectMCostNouserMapper.xml
  12. 10
      xm-core/src/main/resources/mybatis/mapper/xm/core/dao/XmProjectMCostUserMapper.xml
  13. 10
      xm-core/src/main/resources/mybatis/mapper/xm/core/dao/XmTaskExecuserMapper.xml
  14. 10
      xm-core/src/main/resources/mybatis/mapper/xm/core/dao/XmTaskMapper.xml

60
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<String> msgs=new ArrayList<>();
@ -556,14 +556,14 @@ public class XmPhaseController {
List<XmPhase> l1Phases=xmProjectPhases.stream().filter(i->1==i.getLvl()).collect(Collectors.toList());
if(l1Phases==null ||l1Phases.size()==0){//如果是导入到某个计划之下
//找到导入的树中最上面的节点
List<XmPhase> noExists=xmProjectPhases.stream().filter(i->!xmProjectPhases.stream().filter(k->k.getId().equals(i.getParentPhaseId())).findAny().isPresent()).collect(Collectors.toList());
List<XmPhase> noExists=xmProjectPhases.stream().filter(i->!xmProjectPhases.stream().filter(k->k.getId().equals(i.getParentId())).findAny().isPresent()).collect(Collectors.toList());
//根据同一个父亲归类
Map<String,List<XmPhase>> map=new HashMap<>();
for (XmPhase noExist : noExists) {
List<XmPhase> phases=map.get(noExist.getParentPhaseId());
List<XmPhase> 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<String> 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<XmPhase> parentNoNulls= xmProjectPhases.stream().filter(i->StringUtils.hasText(i.getParentPhaseId())&&!"0".equals(i.getParentPhaseId())).collect(Collectors.toList());
List<XmPhase> parentNoNulls= xmProjectPhases.stream().filter(i->StringUtils.hasText(i.getParentId())&&!"0".equals(i.getParentId())).collect(Collectors.toList());
//根据同一个父亲归类
Map<String,List<XmPhase>> map=new HashMap<>();
for (XmPhase phase : parentNoNulls) {
List<XmPhase> phases=map.get(phase.getParentPhaseId());
List<XmPhase> 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<String> 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<XmPhase> 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);
}

6
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(","))+"】");

12
xm-core/src/main/java/com/xm/core/entity/XmProjectMCostNouser.java

@ -9,7 +9,7 @@ import java.util.Date;
/**
* 组织 com.qqkj 顶级模块 oa 大模块 xm 小模块 <br>
* 实体 XmProjectMCostNouser所有属性名: <br>
* projectId,userid,createTime,sendCostTime,username,projectName,remark,id,taskId,taskName,subjectId,bizzStartDate,bizzEndDate,bizProcInstId,bizFlowState,projectPhaseId,actCostAmount,costType,bizMonth,bizDate,subjectName,projectPhaseName;<br>
* projectId,userid,createTime,sendCostTime,username,projectName,remark,id,taskId,taskName,subjectId,bizzStartDate,bizzEndDate,bizProcInstId,bizFlowState,projectPhaseId,actCostAmount,costType,bizMonth,bizDate,subjectName,projectName;<br>
* XM.xm_project_m_cost_nouser xm_project_m_cost_nouser的所有字段名: <br>
* 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;<br>
* 当前主键(包括多主键):<br>
@ -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;
}
}

12
xm-core/src/main/java/com/xm/core/entity/XmProjectMCostUser.java

@ -9,7 +9,7 @@ import java.util.Date;
/**
* 组织 com.qqkj 顶级模块 oa 大模块 xm 小模块 <br>
* 实体 XmProjectMCostUser所有属性名: <br>
* 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;<br>
* 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;<br>
* XM.xm_project_m_cost_user 项目实际人工成本费用的所有字段名: <br>
* 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;<br>
* 当前主键(包括多主键):<br>
@ -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;
}
/**
* 执行人申请结算时的流程编号

12
xm-core/src/main/java/com/xm/core/entity/XmTask.java

@ -8,7 +8,7 @@ import java.math.BigDecimal;
/**
* 组织 com 顶级模块 xm 大模块 core 小模块 <br>
* 实体 XmTask所有属性名: <br>
* 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;<br>
* 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;<br>
* xm_task xm_task的所有字段名: <br>
* 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;<br>
* 当前主键(包括多主键):<br>
@ -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;
}
/**
* 技能列表,逗号分隔

12
xm-core/src/main/java/com/xm/core/entity/XmTaskExecuser.java

@ -8,7 +8,7 @@ import java.math.BigDecimal;
/**
* 组织 com 顶级模块 xm 大模块 core 小模块 <br>
* 实体 XmTaskExecuser所有属性名: <br>
* 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;<br>
* 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;<br>
* XM.xm_task_execuser xm_task_execuser的所有字段名: <br>
* 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;<br>
* 当前主键(包括多主键):<br>
@ -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;
}
/**
* 任务名称

130
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<String> excludePhaseIds){
public Tips judgetProjectBudget(String projectId, BigDecimal addPhaseBudgetCost, BigDecimal addBudgetIuserAt, BigDecimal addBudgetOuserAt, BigDecimal addBudgetNouserAt, List<String> excludePhaseIds){
Tips tips=new Tips("检查预算成功");
Map<String,Object> 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<XmPhase> childList=delNodes.stream().filter(i->delNode.getId().equals(i.getParentPhaseId())).collect(Collectors.toList());
List<XmPhase> childList=delNodes.stream().filter(i->delNode.getId().equals(i.getParentId())).collect(Collectors.toList());
if(childList==null||childList.size()<delNode.getChildrenCnt()){
return false;
}
@ -242,7 +242,7 @@ public class XmPhaseService extends BaseService {
@Transactional
public void doBatchInsert(List<XmPhase> 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<XmPhase> parentIdPathsCalcBeforeSave(List<XmPhase> nodes) {
List<XmPhase> 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<XmPhase> 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<String,String> 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<XmPhase> 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<XmPhase> 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<XmPhase> 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<XmPhase> 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<XmPhase> 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<String> excludePhaseIds){
public Tips judgetProductBudget(String productId,BigDecimal addPhaseBudgetCost,BigDecimal addBudgetIuserAt,BigDecimal addBudgetOuserAt,BigDecimal addBudgetNouserAt,List<String> excludePhaseIds){
Tips tips=new Tips("检查预算成功");
Map<String,Object> 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;

4
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());

4
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());

4
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");

10
xm-core/src/main/resources/mybatis/mapper/xm/core/dao/XmProjectMCostNouserMapper.xml

@ -142,7 +142,7 @@
insert into xm_project_m_cost_nouser(
<include refid="columns"/>
) 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}
)
</insert>
@ -230,7 +230,7 @@
<if test="bizMonth != null and bizMonth != ''"> and res.biz_month = #{bizMonth} </if>
<if test="bizDate != null and bizDate != ''"> and res.biz_date = #{bizDate} </if>
<if test="subjectName != null and subjectName != ''"> and res.subject_name = #{subjectName} </if>
<if test="projectPhaseName != null and projectPhaseName != ''"> and res.project_phase_name = #{projectPhaseName} </if>
<if test="projectName != null and projectName != ''"> and res.project_phase_name = #{projectName} </if>
</sql>
<!--sql片段 更新字段 -->
<sql id="set">
@ -254,7 +254,7 @@
biz_month = #{bizMonth},
biz_date = #{bizDate},
subject_name = #{subjectName},
project_phase_name = #{projectPhaseName}
project_phase_name = #{projectName}
</sql>
<sql id="someFieldSet">
<if test="projectId != null and projectId != ''"> project_id = #{projectId}, </if>
@ -277,7 +277,7 @@
<if test="bizMonth != null and bizMonth != ''"> biz_month = #{bizMonth}, </if>
<if test="bizDate != null and bizDate != ''"> biz_date = #{bizDate}, </if>
<if test="subjectName != null and subjectName != ''"> subject_name = #{subjectName}, </if>
<if test="projectPhaseName != null and projectPhaseName != ''"> project_phase_name = #{projectPhaseName}, </if>
<if test="projectName != null and projectName != ''"> project_phase_name = #{projectName}, </if>
</sql>
<!--sql片段 批量更新 -->
<sql id="batchSet">
@ -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}
</sql>
</mapper>

10
xm-core/src/main/resources/mybatis/mapper/xm/core/dao/XmProjectMCostUserMapper.xml

@ -181,7 +181,7 @@
insert into xm_project_m_cost_user(
<include refid="columns"/>
) 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}
)
</insert>
@ -270,7 +270,7 @@
<if test="bizMonth != null and bizMonth != ''"> and res.biz_month = #{bizMonth} </if>
<if test="bizDate != null and bizDate != ''"> and res.biz_date = #{bizDate} </if>
<if test="subjectName != null and subjectName != ''"> and res.subject_name = #{subjectName} </if>
<if test="projectPhaseName != null and projectPhaseName != ''"> and res.project_phase_name = #{projectPhaseName} </if>
<if test="projectName != null and projectName != ''"> and res.project_phase_name = #{projectName} </if>
<if test="execuserProcInstId != null and execuserProcInstId != ''"> and res.execuser_proc_inst_id = #{execuserProcInstId} </if>
<if test="execuserStatus != null and execuserStatus != ''"> and res.execuser_status = #{execuserStatus} </if>
<if test="payStatus != null and payStatus != ''"> and res.pay_status = #{payStatus} </if>
@ -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 @@
<if test="bizMonth != null and bizMonth != ''"> biz_month = #{bizMonth}, </if>
<if test="bizDate != null and bizDate != ''"> biz_date = #{bizDate}, </if>
<if test="subjectName != null and subjectName != ''"> subject_name = #{subjectName}, </if>
<if test="projectPhaseName != null and projectPhaseName != ''"> project_phase_name = #{projectPhaseName}, </if>
<if test="projectName != null and projectName != ''"> project_phase_name = #{projectName}, </if>
<if test="execuserProcInstId != null and execuserProcInstId != ''"> execuser_proc_inst_id = #{execuserProcInstId}, </if>
<if test="execuserStatus != null and execuserStatus != ''"> execuser_status = #{execuserStatus}, </if>
<if test="payStatus != null and payStatus != ''"> pay_status = #{payStatus}, </if>
@ -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},

10
xm-core/src/main/resources/mybatis/mapper/xm/core/dao/XmTaskExecuserMapper.xml

@ -172,7 +172,7 @@
insert into xm_task_execuser(
<include refid="columns"/>
) 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}
)
</insert>
@ -270,7 +270,7 @@
<if test="quoteStartTime != null"> and date_format(res.quote_start_time,'%Y-%m-%d') = date_format(#{quoteStartTime},'%Y-%m-%d') </if>
<if test="quoteEndTime != null"> and date_format(res.quote_end_time,'%Y-%m-%d') = date_format(#{quoteEndTime},'%Y-%m-%d') </if>
<if test="branchId != null and branchId != ''"> and res.branch_id = #{branchId} </if>
<if test="projectPhaseName != null and projectPhaseName != ''"> and res.project_phase_name = #{projectPhaseName} </if>
<if test="projectName != null and projectName != ''"> and res.project_phase_name = #{projectName} </if>
<if test="taskName != null and taskName != ''"> and res.task_name = #{taskName} </if>
<if test="isLeader != null and isLeader != ''"> and res.is_leader = #{isLeader} </if>
<if test="distUserid != null and distUserid != ''"> and res.dist_userid = #{distUserid} </if>
@ -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 @@
<if test="quoteStartTime != null"> quote_start_time = #{quoteStartTime}, </if>
<if test="quoteEndTime != null"> quote_end_time = #{quoteEndTime}, </if>
<if test="branchId != null and branchId != ''"> branch_id = #{branchId}, </if>
<if test="projectPhaseName != null and projectPhaseName != ''"> project_phase_name = #{projectPhaseName}, </if>
<if test="projectName != null and projectName != ''"> project_phase_name = #{projectName}, </if>
<if test="taskName != null and taskName != ''"> task_name = #{taskName}, </if>
<if test="isLeader != null and isLeader != ''"> is_leader = #{isLeader}, </if>
<if test="distUserid != null and distUserid != ''"> dist_userid = #{distUserid}, </if>
@ -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},

10
xm-core/src/main/resources/mybatis/mapper/xm/core/dao/XmTaskMapper.xml

@ -362,7 +362,7 @@
insert into xm_task(
<include refid="columns"/>
) 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}
)
</insert>
@ -464,7 +464,7 @@
<if test="bizProcInstId != null and bizProcInstId != ''"> and res.biz_proc_inst_id = #{bizProcInstId} </if>
<if test="bizFlowState != null and bizFlowState != ''"> and res.biz_flow_state = #{bizFlowState} </if>
<if test="projectPhaseId != null and projectPhaseId != ''"> and res.project_phase_id = #{projectPhaseId} </if>
<if test="projectPhaseName != null and projectPhaseName != ''"> and res.project_phase_name = #{projectPhaseName} </if>
<if test="projectName != null and projectName != ''"> and res.project_phase_name = #{projectName} </if>
<if test="taskSkillNames != null and taskSkillNames != ''"> and res.task_skill_names = #{taskSkillNames} </if>
<if test="exeUsernames != null and exeUsernames != ''"> and res.exe_usernames = #{exeUsernames} </if>
<if test="taskSkillIds != null and taskSkillIds != ''"> and res.task_skill_ids = #{taskSkillIds} </if>
@ -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 @@
<if test="bizProcInstId != null and bizProcInstId != ''"> biz_proc_inst_id = #{bizProcInstId}, </if>
<if test="bizFlowState != null and bizFlowState != ''"> biz_flow_state = #{bizFlowState}, </if>
<if test="projectPhaseId != null and projectPhaseId != ''"> project_phase_id = #{projectPhaseId}, </if>
<if test="projectPhaseName != null and projectPhaseName != ''"> project_phase_name = #{projectPhaseName}, </if>
<if test="projectName != null and projectName != ''"> project_phase_name = #{projectName}, </if>
<if test="taskSkillNames != null and taskSkillNames != ''"> task_skill_names = #{taskSkillNames}, </if>
<if test="exeUsernames != null and exeUsernames != ''"> exe_usernames = #{exeUsernames}, </if>
<if test="taskSkillIds != null and taskSkillIds != ''"> task_skill_ids = #{taskSkillIds}, </if>
@ -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},

Loading…
Cancel
Save