提交 2886290c authored 作者: malei's avatar malei

feat(school-sysUser): 征订流程管理

1. 修改征订流程名称 References: N/A
上级 8ec02440
......@@ -32,4 +32,28 @@ public class SchoolRequestPath extends BaseRequestPath {
/**推荐*/
public static final String RECOMMEND = "/recommend";
/**初始*/
public static final String INITIAL = "/initial";
/**中间*/
public static final String MID = "/mid";
/**最后*/
public static final String LAST = "/last";
/**驳回*/
public static final String OVERRULE = "/overrule";
/**审核*/
public static final String APPROVED = "/approved";
/**教材*/
public static final String BOOK_RECOMMEND = "/book-recommend";
/**教材*/
public static final String EDIT = "/edit";
}
package com.zrqx.core.form.school.sysuser.fg.biddingflow;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
@Data
@ApiModel(value = "EditFlowNameForm", description = "修改征订流程名称")
public class EditFlowNameForm {
@ApiModelProperty("征订流程ID")
private Integer flowId;
@ApiModelProperty("征订流程名称")
private String flowName;
}
......@@ -3,6 +3,7 @@ package com.zrqx.school.sysuser.controller.biddingflow;
import com.zrqx.core.constant.school.sysuser.SchoolRequestPath;
import com.zrqx.core.form.school.sysuser.fg.biddingflow.CreateFlowAndUserRelationForm;
import com.zrqx.core.form.school.sysuser.fg.biddingflow.CreateFlowForm;
import com.zrqx.core.form.school.sysuser.fg.biddingflow.EditFlowNameForm;
import com.zrqx.core.util.response.CallBack;
import com.zrqx.core.vo.member.fg.member.FgMemberVo;
import com.zrqx.core.vo.schoolsysuser.fg.biddingflow.FlowDeptVo;
......@@ -72,4 +73,10 @@ public class BiddingFlowController {
return biddingFlowService.addUser(form) ? CallBack.success() : CallBack.fail();
}
@ApiOperation(value = "修改征订流程名称", notes = "修改征订流程名称")
@PostMapping(SchoolRequestPath.EDIT)
public CallBack<Boolean> editFlowName(@RequestBody EditFlowNameForm form) {
return biddingFlowService.updateFlowName(form) ? CallBack.success() : CallBack.fail();
}
}
......@@ -59,4 +59,12 @@ public interface BiddingFlowMapper extends BaseMapper<BiddingFlow> {
+ " </script> ")
String getMaxCode(@Param("query")QueryCondition query);
@Select(" <script> "
+ " SELECT code "
+ " FROM me_bidding_flow f "
+ " LEFT JOIN me_flow_relation r ON f.id = r.flowId "
+ " WHERE r.memberId = #{memberId} "
+ " </script> ")
String getFlowCodeByMemberId(@Param("memberId") Integer memberId);
}
......@@ -2,6 +2,7 @@ package com.zrqx.school.sysuser.service.biddingflow;
import com.zrqx.core.form.school.sysuser.fg.biddingflow.CreateFlowAndUserRelationForm;
import com.zrqx.core.form.school.sysuser.fg.biddingflow.CreateFlowForm;
import com.zrqx.core.form.school.sysuser.fg.biddingflow.EditFlowNameForm;
import com.zrqx.core.model.school.biddingflow.BiddingFlow;
import com.zrqx.core.service.BaseService;
import com.zrqx.core.vo.member.fg.member.FgMemberVo;
......@@ -97,4 +98,22 @@ public interface BiddingFlowService extends BaseService<BiddingFlow, Integer> {
*/
boolean addUser(CreateFlowAndUserRelationForm form);
/**
* 根据会员ID获取会员所属流程环节Code
*@param memberId
*@return: java.lang.String
*@author: ml
*@date: 2019/7/26 16:28
*/
String getFlowCodeByMemberId(Integer memberId);
/**
* 修改征订流程名称
*@param form
*@return: boolean
*@author: ml
*@date: 2019/7/30 17:01
*/
boolean updateFlowName(EditFlowNameForm form);
}
......@@ -6,6 +6,7 @@ import com.zrqx.core.enums.school.sysuser.FlowStepEnum;
import com.zrqx.core.exception.BaseException;
import com.zrqx.core.form.school.sysuser.fg.biddingflow.CreateFlowAndUserRelationForm;
import com.zrqx.core.form.school.sysuser.fg.biddingflow.CreateFlowForm;
import com.zrqx.core.form.school.sysuser.fg.biddingflow.EditFlowNameForm;
import com.zrqx.core.form.school.sysuser.fg.common.QueryCondition;
import com.zrqx.core.mapper.BaseMapper;
import com.zrqx.core.model.school.biddingflow.BiddingFlow;
......@@ -368,13 +369,15 @@ public class BiddingFlowServiceImpl extends BaseModelServiceImpl<BiddingFlow, In
* 所以分支数由选择的部门数量决定,深度有步骤数量决定
* 终审,初审,推荐各有一个;中审步骤可以为多个,
* final:终审 mid:中审 first:初审 rec:推荐
* final
* / | \
* final
* / | \
* mid mid mid
* | | |
* first first first
* | | |
* rec rec rec
* | | |
* mid mid mid mid可以为[0,n]
* | | |
* first first first
* | | |
* rec rec rec
*@param count
*@param ids
*@return: void
......@@ -615,4 +618,30 @@ public class BiddingFlowServiceImpl extends BaseModelServiceImpl<BiddingFlow, In
return flowDepts;
}
@Override
public String getFlowCodeByMemberId(Integer memberId) {
return biddingFlowMapper.getFlowCodeByMemberId(memberId);
}
@Override
public boolean updateFlowName(EditFlowNameForm form) {
//查询征订流程
Example example = super.createExample();
example.createCriteria()
.andEqualTo("id", form.getFlowId());
BiddingFlow flow = this.selectOneByExample(example);
if (flow == null) {
logger.debug("未根据ID:" + form.getFlowId() + "查询征订步骤");
throw new BaseException("征订流程不存在");
}
flow.setStepName(form.getFlowName());
this.updateByPrimaryKey(flow);
return true;
}
}
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论