Browse Source

添加节点类型、标签等

master
陈裕财 4 years ago
parent
commit
09fba19d1f
  1. 1
      xm-core/src/main/java/com/xm/core/ctrl/XmTaskExecuserController.java
  2. 47
      xm-core/src/main/resources/mybatis/mapper/xm/core/dao/XmEnvListMapper.xml
  3. 49
      xm-core/src/main/resources/mybatis/mapper/xm/core/dao/XmFileMapper.xml
  4. 49
      xm-core/src/main/resources/mybatis/mapper/xm/core/dao/XmProjectEnvListMapper.xml
  5. 45
      xm-core/src/main/resources/mybatis/mapper/xm/core/dao/XmProjectMBudgetCostNouserMapper.xml
  6. 46
      xm-core/src/main/resources/mybatis/mapper/xm/core/dao/XmProjectMBudgetCostUserMapper.xml
  7. 45
      xm-core/src/main/resources/mybatis/mapper/xm/core/dao/XmProjectMCostNouserMapper.xml
  8. 45
      xm-core/src/main/resources/mybatis/mapper/xm/core/dao/XmProjectMCostUserMapper.xml
  9. 42
      xm-core/src/main/resources/mybatis/mapper/xm/core/dao/XmProjectMapper.xml
  10. 43
      xm-core/src/main/resources/mybatis/mapper/xm/core/dao/XmQuestionMapper.xml
  11. 43
      xm-core/src/main/resources/mybatis/mapper/xm/core/dao/XmTaskMapper.xml

1
xm-core/src/main/java/com/xm/core/ctrl/XmTaskExecuserController.java

@ -183,6 +183,7 @@ public class XmTaskExecuserController {
} }
if(user.getUserid().equals(xmTaskExecuser.getUserid())){//自己作为候选人 if(user.getUserid().equals(xmTaskExecuser.getUserid())){//自己作为候选人
xmTaskExecuserService.addExecuser(xmTaskExecuser); xmTaskExecuserService.addExecuser(xmTaskExecuser);
mkClient.pushBidsAfterBidSuccess(xmTaskExecuser.getUserid(),xmTask.getBudgetAt(),xmTask.getBudgetWorkload(),1);
m.put("data",xmTaskExecuser); m.put("data",xmTaskExecuser);
}else { }else {
boolean isPm=groupService.checkUserIsProjectAdm(xmTask.getProjectId(),user.getUserid()); boolean isPm=groupService.checkUserIsProjectAdm(xmTask.getProjectId(),user.getUserid());

47
xm-core/src/main/resources/mybatis/mapper/xm/core/dao/XmEnvListMapper.xml

@ -5,52 +5,7 @@
<!--开始 自定sql函数区域 --> <!--开始 自定sql函数区域 -->
<!--请在此区域添加自定义函数--> <!--请在此区域添加自定义函数-->
<!-- 插入流程审批表数据 -->
<insert id="insertProcessApprova"
parameterType="HashMap"
useGeneratedKeys="false" keyProperty="id">
insert into xm_env_list_process_approva (
id,env_id,flow_branch_id,agree,act_id,task_name,proc_inst_id,main_title,comment_msg,flow_last_time,event_name,biz_key,model_key,assignee,start_userid,proc_def_id
) values (
#{id},#{envId},#{flowBranchId},#{agree},#{actId},#{taskName},#{procInstId},#{mainTitle},#{commentMsg},#{flowLastTime},#{eventName},#{bizKey},#{modelKey},#{assignee},#{startUserid},#{procDefId}
)
</insert>
<!-- 同时修改业务表及流程审批表数据状态 -->
<update id="updateProcessApprova"
parameterType="HashMap">
update xm_env_list b ,XM.xm_env_list_process_approva pa
<set>
<if test=' agree != null and agree !="" '> pa.agree = #{agree},</if>
<if test=' actId != null and actId !="" '> pa.act_id = #{actId},</if>
<if test=' assignee != null and assignee !="" '> pa.assignee = #{assignee},</if>
<if test=' assigneeName != null and assigneeName !="" '> pa.assignee_name = #{assigneeName},</if>
<if test=' taskName != null and taskName !="" '> pa.task_name = #{taskName},</if>
<if test=' commentMsg != null and commentMsg !="" '> pa.comment_msg = #{commentMsg},</if>
pa.flow_last_time = now(),
<if test=' eventName != null and eventName !="" '> pa.event_name = #{eventName},</if>
<if test=' flowState != null and flowState !="" '> pa.flow_state=#{flowState},</if>
<if test=' bizFlowState != null and bizFlowState !="" '> b.biz_flow_state=#{bizFlowState},</if>
<if test=' bizProcInstId != null and bizProcInstId !="" '> b.biz_proc_inst_id=#{bizProcInstId},</if>
</set>
where pa.proc_inst_id = #{procInstId} and pa.flow_branch_id=#{flowBranchId}
and b.id=pa.env_id
</update>
<update id="updateFlowStateByProcInstForDeleteSuccess"
parameterType="HashMap">
update xm_env_list_process_approva pa set pa.flow_state='2'
where pa.proc_inst_id = #{procInstId} and pa.flow_branch_id=#{flowBranchId}
</update>
<!-- 按条件删除若干条记录-->
<delete id="deleteByProcInstId" parameterType="HashMap">
delete from xm_env_list
where biz_proc_inst_id=#{procInstId}
</delete>
<!--结束 自定义sql函数区域--> <!--结束 自定义sql函数区域-->
@ -59,7 +14,7 @@
<!-- 通过条件查询获取数据列表 返回list<map> --> <!-- 通过条件查询获取数据列表 返回list<map> -->
<select id="selectListMapByWhere" parameterType="HashMap" resultType="HashMap"> <select id="selectListMapByWhere" parameterType="HashMap" resultType="HashMap">
select res.*,pa.proc_inst_id,pa.assignee,pa.assignee_name,pa.main_title,pa.flow_branch_id,pa.task_name,pa.agree,pa.flow_last_time,pa.comment_msg,pa.proc_def_id,pa.flow_state from xm_env_list res left join xm_env_list_process_approva pa on res.id=pa.env_id and res.biz_proc_inst_id=pa.proc_inst_id and res.branch_id=pa.branch_id
select res.* from xm_env_list res
<where> <where>
<if test="ids != null"> and <if test="ids != null"> and

49
xm-core/src/main/resources/mybatis/mapper/xm/core/dao/XmFileMapper.xml

@ -5,53 +5,7 @@
<!--开始 自定sql函数区域 --> <!--开始 自定sql函数区域 -->
<!--请在此区域添加自定义函数--> <!--请在此区域添加自定义函数-->
<!-- 插入流程审批表数据 -->
<insert id="insertProcessApprova"
parameterType="HashMap"
useGeneratedKeys="false" keyProperty="id">
insert into xm_file_process_approva (
id,file_id,project_id,flow_branch_id,agree,act_id,task_name,proc_inst_id,main_title,comment_msg,flow_last_time,event_name,biz_key,model_key,assignee,start_userid,proc_def_id
) values (
#{id},#{fileId},#{projectId},#{flowBranchId},#{agree},#{actId},#{taskName},#{procInstId},#{mainTitle},#{commentMsg},#{flowLastTime},#{eventName},#{bizKey},#{modelKey},#{assignee},#{startUserid},#{procDefId}
)
</insert>
<!-- 同时修改业务表及流程审批表数据状态 -->
<update id="updateProcessApprova"
parameterType="HashMap">
update xm_file b ,XM.xm_file_process_approva pa
<set>
<if test=' agree != null and agree !="" '> pa.agree = #{agree},</if>
<if test=' actId != null and actId !="" '> pa.act_id = #{actId},</if>
<if test=' assignee != null and assignee !="" '> pa.assignee = #{assignee},</if>
<if test=' assigneeName != null and assigneeName !="" '> pa.assignee_name = #{assigneeName},</if>
<if test=' taskName != null and taskName !="" '> pa.task_name = #{taskName},</if>
<if test=' commentMsg != null and commentMsg !="" '> pa.comment_msg = #{commentMsg},</if>
pa.flow_last_time = now(),
<if test=' eventName != null and eventName !="" '> pa.event_name = #{eventName},</if>
<if test=' flowState != null and flowState !="" '> pa.flow_state=#{flowState},</if>
<if test=' bizFlowState != null and bizFlowState !="" '> b.biz_flow_state=#{bizFlowState},</if>
<if test=' bizProcInstId != null and bizProcInstId !="" '> b.biz_proc_inst_id=#{bizProcInstId},</if>
</set>
where pa.proc_inst_id = #{procInstId} and pa.flow_branch_id=#{flowBranchId}
and b.id=pa.file_id
</update>
<update id="updateFlowStateByProcInstForDeleteSuccess"
parameterType="HashMap">
update xm_file_process_approva pa set pa.flow_state='2'
where pa.proc_inst_id = #{procInstId} and pa.flow_branch_id=#{flowBranchId}
</update>
<!-- 按条件删除若干条记录-->
<delete id="deleteByProcInstId" parameterType="HashMap">
delete from xm_file
where biz_proc_inst_id=#{procInstId}
</delete>
<!--结束 自定义sql函数区域--> <!--结束 自定义sql函数区域-->
@ -59,8 +13,7 @@
<!-- 通过条件查询获取数据列表 返回list<map> --> <!-- 通过条件查询获取数据列表 返回list<map> -->
<select id="selectListMapByWhere" parameterType="HashMap" resultType="HashMap"> <select id="selectListMapByWhere" parameterType="HashMap" resultType="HashMap">
select res.*,pa.proc_inst_id,pa.assignee,pa.assignee_name,pa.main_title,pa.flow_branch_id,pa.task_name,pa.agree,pa.flow_last_time,pa.comment_msg,pa.proc_def_id,pa.flow_state from xm_file res left join xm_file_process_approva pa on res.id=pa.file_id and res.biz_proc_inst_id=pa.proc_inst_id
select res.* from xm_file res
<where> <where>
<if test="ids != null"> and <if test="ids != null"> and
id in id in

49
xm-core/src/main/resources/mybatis/mapper/xm/core/dao/XmProjectEnvListMapper.xml

@ -4,53 +4,6 @@
<!--开始 自定sql函数区域 --> <!--开始 自定sql函数区域 -->
<!--请在此区域添加自定义函数-->
<!-- 插入流程审批表数据 -->
<insert id="insertProcessApprova"
parameterType="HashMap"
useGeneratedKeys="false" keyProperty="id">
insert into xm_project_env_list_process_approva (
id,env_id,project_id,flow_branch_id,agree,act_id,task_name,proc_inst_id,main_title,comment_msg,flow_last_time,event_name,biz_key,model_key,assignee,start_userid,proc_def_id
) values (
#{id},#{envId},#{projectId},#{flowBranchId},#{agree},#{actId},#{taskName},#{procInstId},#{mainTitle},#{commentMsg},#{flowLastTime},#{eventName},#{bizKey},#{modelKey},#{assignee},#{startUserid},#{procDefId}
)
</insert>
<!-- 同时修改业务表及流程审批表数据状态 -->
<update id="updateProcessApprova"
parameterType="HashMap">
update xm_project_env_list b ,XM.xm_project_env_list_process_approva pa
<set>
<if test=' agree != null and agree !="" '> pa.agree = #{agree},</if>
<if test=' actId != null and actId !="" '> pa.act_id = #{actId},</if>
<if test=' assignee != null and assignee !="" '> pa.assignee = #{assignee},</if>
<if test=' assigneeName != null and assigneeName !="" '> pa.assignee_name = #{assigneeName},</if>
<if test=' taskName != null and taskName !="" '> pa.task_name = #{taskName},</if>
<if test=' commentMsg != null and commentMsg !="" '> pa.comment_msg = #{commentMsg},</if>
pa.flow_last_time = now(),
<if test=' eventName != null and eventName !="" '> pa.event_name = #{eventName},</if>
<if test=' flowState != null and flowState !="" '> pa.flow_state=#{flowState},</if>
<if test=' bizFlowState != null and bizFlowState !="" '> b.biz_flow_state=#{bizFlowState},</if>
<if test=' bizProcInstId != null and bizProcInstId !="" '> b.biz_proc_inst_id=#{bizProcInstId},</if>
</set>
where pa.proc_inst_id = #{procInstId} and pa.flow_branch_id=#{flowBranchId}
and b.id=pa.env_id
</update>
<update id="updateFlowStateByProcInstForDeleteSuccess"
parameterType="HashMap">
update xm_project_env_list_process_approva pa set pa.flow_state='2'
where pa.proc_inst_id = #{procInstId} and pa.flow_branch_id=#{flowBranchId}
</update>
<!-- 按条件删除若干条记录-->
<delete id="deleteByProcInstId" parameterType="HashMap">
delete from xm_project_env_list
where biz_proc_inst_id=#{procInstId}
</delete>
<!--结束 自定义sql函数区域--> <!--结束 自定义sql函数区域-->
@ -58,7 +11,7 @@
<!-- 通过条件查询获取数据列表 返回list<map> --> <!-- 通过条件查询获取数据列表 返回list<map> -->
<select id="selectListMapByWhere" parameterType="HashMap" resultType="HashMap"> <select id="selectListMapByWhere" parameterType="HashMap" resultType="HashMap">
select res.*,pa.proc_inst_id,pa.assignee,pa.assignee_name,pa.main_title,pa.flow_branch_id,pa.task_name,pa.agree,pa.flow_last_time,pa.comment_msg,pa.proc_def_id,pa.flow_state from xm_project_env_list res left join xm_project_env_list_process_approva pa on res.id=pa.env_id and res.biz_proc_inst_id=pa.proc_inst_id
select res.* from xm_project_env_list res
<where> <where>
<if test="ids != null"> and <if test="ids != null"> and

45
xm-core/src/main/resources/mybatis/mapper/xm/core/dao/XmProjectMBudgetCostNouserMapper.xml

@ -13,48 +13,6 @@
</if> </if>
<if test="key != null and key !='' "> </if> <if test="key != null and key !='' "> </if>
</sql> </sql>
<insert id="insertProcessApprova"
parameterType="HashMap"
useGeneratedKeys="false" keyProperty="id">
insert into xm_project_m_budget_cost_nouser_process_approva (
id,budget_id,project_id,flow_branch_id,agree,act_id,task_name,proc_inst_id,main_title,comment_msg,flow_last_time,event_name,biz_key,model_key,assignee,start_userid,proc_def_id
) values (
#{id},#{budgetId},#{projectId},#{flowBranchId},#{agree},#{actId},#{taskName},#{procInstId},#{mainTitle},#{commentMsg},#{flowLastTime},#{eventName},#{bizKey},#{modelKey},#{assignee},#{startUserid},#{procDefId}
)
</insert>
<!-- 同时修改业务表及流程审批表数据状态 -->
<update id="updateProcessApprova"
parameterType="HashMap">
update xm_project_m_budget_cost_nouser b ,XM.xm_project_m_budget_cost_nouser_process_approva pa
<set>
<if test=' agree != null and agree !="" '> pa.agree = #{agree},</if>
<if test=' actId != null and actId !="" '> pa.act_id = #{actId},</if>
<if test=' assignee != null and assignee !="" '> pa.assignee = #{assignee},</if>
<if test=' assigneeName != null and assigneeName !="" '> pa.assignee_name = #{assigneeName},</if>
<if test=' taskName != null and taskName !="" '> pa.task_name = #{taskName},</if>
<if test=' commentMsg != null and commentMsg !="" '> pa.comment_msg = #{commentMsg},</if>
pa.flow_last_time = now(),
<if test=' eventName != null and eventName !="" '> pa.event_name = #{eventName},</if>
<if test=' flowState != null and flowState !="" '> pa.flow_state=#{flowState},</if>
<if test=' bizFlowState != null and bizFlowState !="" '> b.biz_flow_state=#{bizFlowState},</if>
<if test=' bizProcInstId != null and bizProcInstId !="" '> b.biz_proc_inst_id=#{bizProcInstId},</if>
</set>
where pa.proc_inst_id = #{procInstId} and pa.flow_branch_id=#{flowBranchId}
and b.id=pa.budget_id
</update>
<update id="updateFlowStateByProcInstForDeleteSuccess"
parameterType="HashMap">
update xm_project_m_budget_cost_nouser_process_approva pa set pa.flow_state='2'
where pa.proc_inst_id = #{procInstId} and pa.flow_branch_id=#{flowBranchId}
</update>
<!-- 按条件删除若干条记录-->
<delete id="deleteByProcInstId" parameterType="HashMap">
delete from xm_project_m_budget_cost_nouser
where biz_proc_inst_id=#{procInstId}
</delete>
<!-- 通过条件查询获取数据列表 返回list<map> --> <!-- 通过条件查询获取数据列表 返回list<map> -->
<select id="listSum" parameterType="HashMap" resultType="HashMap"> <select id="listSum" parameterType="HashMap" resultType="HashMap">
select res.project_id,res.subject_id,res.subject_name,bizz_month,sum(res.budget_cost) as budget_cost from xm_project_m_budget_cost_nouser res select res.project_id,res.subject_id,res.subject_name,bizz_month,sum(res.budget_cost) as budget_cost from xm_project_m_budget_cost_nouser res
@ -101,8 +59,7 @@
<!-- 通过条件查询获取数据列表 返回list<map> --> <!-- 通过条件查询获取数据列表 返回list<map> -->
<select id="selectListMapByWhere" parameterType="HashMap" resultType="HashMap"> <select id="selectListMapByWhere" parameterType="HashMap" resultType="HashMap">
select res.*,pa.proc_inst_id,pa.assignee,pa.assignee_name,pa.main_title,pa.flow_branch_id,pa.task_name,pa.agree,pa.flow_last_time,pa.comment_msg,pa.proc_def_id,pa.flow_state from xm_project_m_budget_cost_nouser res left join xm_project_m_budget_cost_nouser_process_approva pa on res.id=pa.budget_id and res.biz_proc_inst_id=pa.proc_inst_id
select res.* from xm_project_m_budget_cost_nouser res
<where> <where>
<include refid="whereForMap"></include> <include refid="whereForMap"></include>
<include refid="where"/> <include refid="where"/>

46
xm-core/src/main/resources/mybatis/mapper/xm/core/dao/XmProjectMBudgetCostUserMapper.xml

@ -14,49 +14,6 @@
<if test="key != null and key !='' "> </if> <if test="key != null and key !='' "> </if>
</sql> </sql>
<insert id="insertProcessApprova"
parameterType="HashMap"
useGeneratedKeys="false" keyProperty="id">
insert into xm_project_m_budget_cost_user_process_approva (
id,budget_id,project_id,flow_branch_id,agree,act_id,task_name,proc_inst_id,main_title,comment_msg,flow_last_time,event_name,biz_key,model_key,assignee,start_userid,proc_def_id
) values (
#{id},#{budgetId},#{projectId},#{flowBranchId},#{agree},#{actId},#{taskName},#{procInstId},#{mainTitle},#{commentMsg},#{flowLastTime},#{eventName},#{bizKey},#{modelKey},#{assignee},#{startUserid},#{procDefId}
)
</insert>
<!-- 同时修改业务表及流程审批表数据状态 -->
<update id="updateProcessApprova"
parameterType="HashMap">
update xm_project_m_budget_cost_user b ,XM.xm_project_m_budget_cost_user_process_approva pa
<set>
<if test=' agree != null and agree !="" '> pa.agree = #{agree},</if>
<if test=' actId != null and actId !="" '> pa.act_id = #{actId},</if>
<if test=' assignee != null and assignee !="" '> pa.assignee = #{assignee},</if>
<if test=' assigneeName != null and assigneeName !="" '> pa.assignee_name = #{assigneeName},</if>
<if test=' taskName != null and taskName !="" '> pa.task_name = #{taskName},</if>
<if test=' commentMsg != null and commentMsg !="" '> pa.comment_msg = #{commentMsg},</if>
pa.flow_last_time = now(),
<if test=' eventName != null and eventName !="" '> pa.event_name = #{eventName},</if>
<if test=' flowState != null and flowState !="" '> pa.flow_state=#{flowState},</if>
<if test=' bizFlowState != null and bizFlowState !="" '> b.biz_flow_state=#{bizFlowState},</if>
<if test=' bizProcInstId != null and bizProcInstId !="" '> b.biz_proc_inst_id=#{bizProcInstId},</if>
</set>
where pa.proc_inst_id = #{procInstId} and pa.flow_branch_id=#{flowBranchId}
and b.id=pa.budget_id
</update>
<update id="updateFlowStateByProcInstForDeleteSuccess"
parameterType="HashMap">
update xm_project_m_budget_cost_user_process_approva pa set pa.flow_state='2'
where pa.proc_inst_id = #{procInstId} and pa.flow_branch_id=#{flowBranchId}
</update>
<!-- 按条件删除若干条记录-->
<delete id="deleteByProcInstId" parameterType="HashMap">
delete from xm_project_m_budget_cost_user
where biz_proc_inst_id=#{procInstId}
</delete>
<!-- 通过条件查询获取数据列表 返回list<map> --> <!-- 通过条件查询获取数据列表 返回list<map> -->
<select id="listSum" parameterType="HashMap" resultType="HashMap"> <select id="listSum" parameterType="HashMap" resultType="HashMap">
select res.project_id,res.userid,res.username,subject_id,subject_name,bizz_month,sum(res.budget_cost) as budget_cost from xm_project_m_budget_cost_user res select res.project_id,res.userid,res.username,subject_id,subject_name,bizz_month,sum(res.budget_cost) as budget_cost from xm_project_m_budget_cost_user res
@ -105,8 +62,7 @@
<!-- 通过条件查询获取数据列表 返回list<map> --> <!-- 通过条件查询获取数据列表 返回list<map> -->
<select id="selectListMapByWhere" parameterType="HashMap" resultType="HashMap"> <select id="selectListMapByWhere" parameterType="HashMap" resultType="HashMap">
select res.*,pa.proc_inst_id,pa.assignee,pa.assignee_name,pa.main_title,pa.flow_branch_id,pa.task_name,pa.agree,pa.flow_last_time,pa.comment_msg,pa.proc_def_id,pa.flow_state from xm_project_m_budget_cost_user res left join xm_project_m_budget_cost_user_process_approva pa on res.id=pa.budget_id and res.biz_proc_inst_id=pa.proc_inst_id
select res.* from xm_project_m_budget_cost_user res
<where> <where>
<include refid="whereForMap"></include> <include refid="whereForMap"></include>
<include refid="where"/> <include refid="where"/>

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

@ -13,49 +13,6 @@
</if> </if>
<if test="key != null and key !='' "> </if> <if test="key != null and key !='' "> </if>
</sql> </sql>
<insert id="insertProcessApprova"
parameterType="HashMap"
useGeneratedKeys="false" keyProperty="id">
insert into xm_project_m_cost_nouser_process_approva (
id,cost_id,project_id,flow_branch_id,agree,act_id,task_name,proc_inst_id,main_title,comment_msg,flow_last_time,event_name,biz_key,model_key,assignee,start_userid,proc_def_id
) values (
#{id},#{costId},#{projectId},#{flowBranchId},#{agree},#{actId},#{taskName},#{procInstId},#{mainTitle},#{commentMsg},#{flowLastTime},#{eventName},#{bizKey},#{modelKey},#{assignee},#{startUserid},#{procDefId}
)
</insert>
<!-- 同时修改业务表及流程审批表数据状态 -->
<update id="updateProcessApprova"
parameterType="HashMap">
update xm_project_m_cost_nouser b ,XM.xm_project_m_cost_nouser_process_approva pa
<set>
<if test=' agree != null and agree !="" '> pa.agree = #{agree},</if>
<if test=' actId != null and actId !="" '> pa.act_id = #{actId},</if>
<if test=' assignee != null and assignee !="" '> pa.assignee = #{assignee},</if>
<if test=' assigneeName != null and assigneeName !="" '> pa.assignee_name = #{assigneeName},</if>
<if test=' taskName != null and taskName !="" '> pa.task_name = #{taskName},</if>
<if test=' commentMsg != null and commentMsg !="" '> pa.comment_msg = #{commentMsg},</if>
pa.flow_last_time = now(),
<if test=' eventName != null and eventName !="" '> pa.event_name = #{eventName},</if>
<if test=' flowState != null and flowState !="" '> pa.flow_state=#{flowState},</if>
<if test=' bizFlowState != null and bizFlowState !="" '> b.biz_flow_state=#{bizFlowState},</if>
<if test=' bizProcInstId != null and bizProcInstId !="" '> b.biz_proc_inst_id=#{bizProcInstId},</if>
</set>
where pa.proc_inst_id = #{procInstId} and pa.flow_branch_id=#{flowBranchId}
and b.id=pa.cost_id
</update>
<update id="updateFlowStateByProcInstForDeleteSuccess"
parameterType="HashMap">
update xm_project_m_cost_nouser_process_approva pa set pa.flow_state='2'
where pa.proc_inst_id = #{procInstId} and pa.flow_branch_id=#{flowBranchId}
</update>
<!-- 按条件删除若干条记录-->
<delete id="deleteByProcInstId" parameterType="HashMap">
delete from xm_project_m_cost_nouser
where biz_proc_inst_id=#{procInstId}
</delete>
<!-- 查询非人力的支出及对应的项目的预算,非人力支出不能大于项目非人力总预算 --> <!-- 查询非人力的支出及对应的项目的预算,非人力支出不能大于项目非人力总预算 -->
<select id="selectTotalProjectAndNouserActCost" parameterType="HashMap" resultType="HashMap"> <select id="selectTotalProjectAndNouserActCost" parameterType="HashMap" resultType="HashMap">
SELECT SELECT
@ -101,7 +58,7 @@
<!-- 通过条件查询获取数据列表 返回list<map> --> <!-- 通过条件查询获取数据列表 返回list<map> -->
<select id="selectListMapByWhere" parameterType="HashMap" resultType="HashMap"> <select id="selectListMapByWhere" parameterType="HashMap" resultType="HashMap">
select res.*,pa.proc_inst_id,pa.assignee,pa.assignee_name,pa.main_title,pa.flow_branch_id,pa.task_name,pa.agree,pa.flow_last_time,pa.comment_msg,pa.proc_def_id,pa.flow_state from xm_project_m_cost_nouser res left join xm_project_m_cost_nouser_process_approva pa on res.id=pa.cost_id and res.biz_proc_inst_id=pa.proc_inst_id
select res.* from xm_project_m_cost_nouser res
<where> <where>
<include refid="whereForMap"/> <include refid="whereForMap"/>
<include refid="where"/> <include refid="where"/>

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

@ -14,49 +14,6 @@
<if test="key != null and key !='' "> </if> <if test="key != null and key !='' "> </if>
</sql> </sql>
<insert id="insertProcessApprova"
parameterType="HashMap"
useGeneratedKeys="false" keyProperty="id">
insert into xm_project_m_cost_user_process_approva (
id,cost_id,project_id,flow_branch_id,agree,act_id,task_name,proc_inst_id,main_title,comment_msg,flow_last_time,event_name,biz_key,model_key,assignee,start_userid,proc_def_id
) values (
#{id},#{costId},#{projectId},#{flowBranchId},#{agree},#{actId},#{taskName},#{procInstId},#{mainTitle},#{commentMsg},#{flowLastTime},#{eventName},#{bizKey},#{modelKey},#{assignee},#{startUserid},#{procDefId}
)
</insert>
<!-- 同时修改业务表及流程审批表数据状态 -->
<update id="updateProcessApprova"
parameterType="HashMap">
update xm_project_m_cost_user b ,XM.xm_project_m_cost_user_process_approva pa
<set>
<if test=' agree != null and agree !="" '> pa.agree = #{agree},</if>
<if test=' actId != null and actId !="" '> pa.act_id = #{actId},</if>
<if test=' assignee != null and assignee !="" '> pa.assignee = #{assignee},</if>
<if test=' assigneeName != null and assigneeName !="" '> pa.assignee_name = #{assigneeName},</if>
<if test=' taskName != null and taskName !="" '> pa.task_name = #{taskName},</if>
<if test=' commentMsg != null and commentMsg !="" '> pa.comment_msg = #{commentMsg},</if>
pa.flow_last_time = now(),
<if test=' eventName != null and eventName !="" '> pa.event_name = #{eventName},</if>
<if test=' flowState != null and flowState !="" '> pa.flow_state=#{flowState},</if>
<if test=' bizFlowState != null and bizFlowState !="" '> b.biz_flow_state=#{bizFlowState},</if>
<if test=' bizProcInstId != null and bizProcInstId !="" '> b.biz_proc_inst_id=#{bizProcInstId},</if>
</set>
where pa.proc_inst_id = #{procInstId} and pa.flow_branch_id=#{flowBranchId}
and b.id=pa.cost_id
</update>
<update id="updateFlowStateByProcInstForDeleteSuccess"
parameterType="HashMap">
update xm_project_m_cost_user_process_approva pa set pa.flow_state='2'
where pa.proc_inst_id = #{procInstId} and pa.flow_branch_id=#{flowBranchId}
</update>
<!-- 按条件删除若干条记录-->
<delete id="deleteByProcInstId" parameterType="HashMap">
delete from xm_project_m_cost_user
where biz_proc_inst_id=#{procInstId}
</delete>
<update id="updateExecuserStatusByExecuserProcInstId" <update id="updateExecuserStatusByExecuserProcInstId"
parameterType="HashMap"> parameterType="HashMap">
update xm_project_m_cost_user pa set pa.execuser_status=#{execuserStatus} update xm_project_m_cost_user pa set pa.execuser_status=#{execuserStatus}
@ -140,7 +97,7 @@
<!-- 通过条件查询获取数据列表 返回list<map> --> <!-- 通过条件查询获取数据列表 返回list<map> -->
<select id="selectListMapByWhere" parameterType="HashMap" resultType="HashMap"> <select id="selectListMapByWhere" parameterType="HashMap" resultType="HashMap">
select res.*,pa.proc_inst_id,pa.assignee,pa.assignee_name,pa.main_title,pa.flow_branch_id,pa.task_name,pa.agree,pa.flow_last_time,pa.comment_msg,pa.proc_def_id,pa.flow_state from xm_project_m_cost_user res left join xm_project_m_cost_user_process_approva pa on res.id=pa.cost_id and res.biz_proc_inst_id=pa.proc_inst_id
select res.* from xm_project_m_cost_user res
<where> <where>
<include refid="whereForMap"/> <include refid="whereForMap"/>
<include refid="where"/> <include refid="where"/>

42
xm-core/src/main/resources/mybatis/mapper/xm/core/dao/XmProjectMapper.xml

@ -61,48 +61,6 @@
and res.del!="1" and res.del!="1"
</if> </if>
</sql> </sql>
<insert id="insertProcessApprova"
parameterType="HashMap"
useGeneratedKeys="false" keyProperty="id">
insert into xm_project_process_approva (
id,project_id,flow_branch_id,agree,act_id,task_name,proc_inst_id,main_title,comment_msg,flow_last_time,event_name,biz_key,model_key,assignee,start_userid,proc_def_id
) values (
#{id},#{projectId},#{flowBranchId},#{agree},#{actId},#{taskName},#{procInstId},#{mainTitle},#{commentMsg},#{flowLastTime},#{eventName},#{bizKey},#{modelKey},#{assignee},#{startUserid},#{procDefId}
)
</insert>
<!-- 同时修改业务表及流程审批表数据状态 -->
<update id="updateProcessApprova"
parameterType="HashMap">
update xm_project b ,XM.xm_project_process_approva pa
<set>
<if test=' agree != null and agree !="" '> pa.agree = #{agree},</if>
<if test=' actId != null and actId !="" '> pa.act_id = #{actId},</if>
<if test=' assignee != null and assignee !="" '> pa.assignee = #{assignee},</if>
<if test=' assigneeName != null and assigneeName !="" '> pa.assignee_name = #{assigneeName},</if>
<if test=' taskName != null and taskName !="" '> pa.task_name = #{taskName},</if>
<if test=' commentMsg != null and commentMsg !="" '> pa.comment_msg = #{commentMsg},</if>
pa.flow_last_time = now(),
<if test=' eventName != null and eventName !="" '> pa.event_name = #{eventName},</if>
<if test=' flowState != null and flowState !="" '> pa.flow_state=#{flowState},</if>
<if test=' bizFlowState != null and bizFlowState !="" '> b.biz_flow_state=#{bizFlowState},</if>
<if test=' bizProcInstId != null and bizProcInstId !="" '> b.biz_proc_inst_id=#{bizProcInstId},</if>
</set>
where pa.proc_inst_id = #{procInstId} and pa.flow_branch_id=#{flowBranchId}
and b.id=pa.project_id
</update>
<update id="updateFlowStateByProcInstForDeleteSuccess"
parameterType="HashMap">
update xm_project_process_approva pa set pa.flow_state='2'
where pa.proc_inst_id = #{procInstId} and pa.flow_branch_id=#{flowBranchId}
</update>
<!-- 按条件删除若干条记录-->
<delete id="deleteByProcInstId" parameterType="HashMap">
delete from xm_project
where biz_proc_inst_id=#{procInstId}
</delete>
<!--结束 自定义sql函数区域--> <!--结束 自定义sql函数区域-->

43
xm-core/src/main/resources/mybatis/mapper/xm/core/dao/XmQuestionMapper.xml

@ -34,49 +34,6 @@
<if test="linkIterationId != null and linkIterationId != ''"> and exists (select 1 from xm_menu m where m.iteration_id=#{linkIterationId} and m.menu_id=res.menu_id) </if> <if test="linkIterationId != null and linkIterationId != ''"> and exists (select 1 from xm_menu m where m.iteration_id=#{linkIterationId} and m.menu_id=res.menu_id) </if>
</sql> </sql>
<!-- 插入流程审批表数据 -->
<insert id="insertProcessApprova"
parameterType="HashMap"
useGeneratedKeys="false" keyProperty="id">
insert into xm_question_process_approva (
id,question_id,project_id,flow_branch_id,agree,act_id,task_name,proc_inst_id,main_title,comment_msg,flow_last_time,event_name,biz_key,model_key,assignee,start_userid,proc_def_id
) values (
#{id},#{questionId},#{projectId},#{flowBranchId},#{agree},#{actId},#{taskName},#{procInstId},#{mainTitle},#{commentMsg},#{flowLastTime},#{eventName},#{bizKey},#{modelKey},#{assignee},#{startUserid},#{procDefId}
)
</insert>
<!-- 同时修改业务表及流程审批表数据状态 -->
<update id="updateProcessApprova"
parameterType="HashMap">
update xm_question b ,XM.xm_question_process_approva pa
<set>
<if test=' agree != null and agree !="" '> pa.agree = #{agree},</if>
<if test=' actId != null and actId !="" '> pa.act_id = #{actId},</if>
<if test=' assignee != null and assignee !="" '> pa.assignee = #{assignee},</if>
<if test=' assigneeName != null and assigneeName !="" '> pa.assignee_name = #{assigneeName},</if>
<if test=' taskName != null and taskName !="" '> pa.task_name = #{taskName},</if>
<if test=' commentMsg != null and commentMsg !="" '> pa.comment_msg = #{commentMsg},</if>
pa.flow_last_time = now(),
<if test=' eventName != null and eventName !="" '> pa.event_name = #{eventName},</if>
<if test=' flowState != null and flowState !="" '> pa.flow_state=#{flowState},</if>
<if test=' bizFlowState != null and bizFlowState !="" '> b.biz_flow_state=#{bizFlowState},</if>
<if test=' bizProcInstId != null and bizProcInstId !="" '> b.biz_proc_inst_id=#{bizProcInstId},</if>
</set>
where pa.proc_inst_id = #{procInstId} and pa.flow_branch_id=#{flowBranchId}
and b.id=pa.question_id
</update>
<update id="updateFlowStateByProcInstForDeleteSuccess"
parameterType="HashMap">
update xm_question_process_approva pa set pa.flow_state='2'
where pa.proc_inst_id = #{procInstId} and pa.flow_branch_id=#{flowBranchId}
</update>
<!-- 按条件删除若干条记录-->
<delete id="deleteByProcInstId" parameterType="HashMap">
delete from xm_question
where biz_proc_inst_id=#{procInstId}
</delete>
<update id="editSomeFields" parameterType="HashMap"> <update id="editSomeFields" parameterType="HashMap">
update xm_question update xm_question

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

@ -123,49 +123,6 @@
</foreach> </foreach>
and res.ntype='0' and res.ntype='0'
</update> </update>
<!-- 插入流程审批表数据 -->
<insert id="insertProcessApprova"
parameterType="HashMap"
useGeneratedKeys="false" keyProperty="id">
insert into xm_task_process_approva (
id,xm_task_id,project_id,flow_branch_id,agree,act_id,task_name,proc_inst_id,main_title,comment_msg,flow_last_time,event_name,biz_key,model_key,assignee,start_userid,proc_def_id
) values (
#{id},#{xmTaskId},#{projectId},#{flowBranchId},#{agree},#{actId},#{taskName},#{procInstId},#{mainTitle},#{commentMsg},#{flowLastTime},#{eventName},#{bizKey},#{modelKey},#{assignee},#{startUserid},#{procDefId}
)
</insert>
<!-- 同时修改业务表及流程审批表数据状态 -->
<update id="updateProcessApprova"
parameterType="HashMap">
update xm_task b ,XM.xm_task_process_approva pa
<set>
<if test=' agree != null and agree !="" '> pa.agree = #{agree},</if>
<if test=' actId != null and actId !="" '> pa.act_id = #{actId},</if>
<if test=' assignee != null and assignee !="" '> pa.assignee = #{assignee},</if>
<if test=' assigneeName != null and assigneeName !="" '> pa.assignee_name = #{assigneeName},</if>
<if test=' taskName != null and taskName !="" '> pa.task_name = #{taskName},</if>
<if test=' commentMsg != null and commentMsg !="" '> pa.comment_msg = #{commentMsg},</if>
pa.flow_last_time = now(),
<if test=' eventName != null and eventName !="" '> pa.event_name = #{eventName},</if>
<if test=' flowState != null and flowState !="" '> pa.flow_state=#{flowState},</if>
<if test=' bizFlowState != null and bizFlowState !="" '> b.biz_flow_state=#{bizFlowState},</if>
<if test=' bizProcInstId != null and bizProcInstId !="" '> b.biz_proc_inst_id=#{bizProcInstId},</if>
</set>
where pa.proc_inst_id = #{procInstId} and pa.flow_branch_id=#{flowBranchId}
and b.id=pa.xm_task_id
</update>
<update id="updateFlowStateByProcInstForDeleteSuccess"
parameterType="HashMap">
update xm_task_process_approva pa set pa.flow_state='2'
where pa.proc_inst_id = #{procInstId} and pa.flow_branch_id=#{flowBranchId}
</update>
<!-- 按条件删除若干条记录-->
<delete id="deleteByProcInstId" parameterType="HashMap">
delete from xm_task
where biz_proc_inst_id=#{procInstId}
</delete>
<!-- 查询任务总的预算及对应的计划的预算,任务总预算不能大于计划总预算 --> <!-- 查询任务总的预算及对应的计划的预算,任务总预算不能大于计划总预算 -->
<select id="selectTotalTaskBudgetCost" parameterType="HashMap" resultType="HashMap"> <select id="selectTotalTaskBudgetCost" parameterType="HashMap" resultType="HashMap">

Loading…
Cancel
Save