提交修改

This commit is contained in:
quyixiao 2020-11-06 09:58:18 +08:00
parent 58a4606a0d
commit c221ee5ff8
4 changed files with 12 additions and 10 deletions

View File

@ -261,7 +261,7 @@ public class TestController {
} }
} }
// http://localhost:8080/lz_management/test/resultrecord?resultRecordId=215 // http://localhost:8080/lz_management/test/resultrecord?resultRecordId=381
@RequestMapping("/test/resultrecord") @RequestMapping("/test/resultrecord")
public void resultRecorcd(Long resultRecordId) throws Exception{ public void resultRecorcd(Long resultRecordId) throws Exception{
R r = resultRecordService.initFlowRecord(resultRecordId); R r = resultRecordService.initFlowRecord(resultRecordId);

View File

@ -773,7 +773,6 @@ public class ResultRecordServiceImpl extends ServiceImpl<ResultRecordMapper, Res
} }
List<FlowApprovalRole> flowApprovalRoles =flowApprovalRoleService.selectFlowApprovalRoleList(flowIds); List<FlowApprovalRole> flowApprovalRoles =flowApprovalRoleService.selectFlowApprovalRoleList(flowIds);
int i = 0; int i = 0;
List<FlowRecord> flowRecords = new ArrayList<>();
for (FlowApprovalRole flowApprovalRole : flowApprovalRoles) { for (FlowApprovalRole flowApprovalRole : flowApprovalRoles) {
FlowRecord flowRecord = new FlowRecord(); FlowRecord flowRecord = new FlowRecord();
flowRecord.setRecordId(resultRecord.getId()); flowRecord.setRecordId(resultRecord.getId());
@ -814,9 +813,9 @@ public class ResultRecordServiceImpl extends ServiceImpl<ResultRecordMapper, Res
flowRecord.setFlowIndex(flowApprovalRole.getStepIndex()); flowRecord.setFlowIndex(flowApprovalRole.getStepIndex());
flowRecord.setType(flowApprovalRole.getStepType()); //步骤类型0依次1或签同时通知一人通过或拒绝即可2会签同时通知所有人同意才可 flowRecord.setType(flowApprovalRole.getStepType()); //步骤类型0依次1或签同时通知一人通过或拒绝即可2会签同时通知所有人同意才可
i++; i++;
flowRecords.add(flowRecord); flowRecordService.insertFlowRecord(flowRecord);
} }
flowRecordService.insertFlowRecords(flowRecords);
resultRecordService.updateResultRecordById(resultRecord); resultRecordService.updateResultRecordById(resultRecord);
return R.ok(); return R.ok();
} }

View File

@ -21,12 +21,13 @@
<result column="status_name" property="statusName"/> <result column="status_name" property="statusName"/>
<result column="type" property="type"/> <result column="type" property="type"/>
<result column="process_id" property="processId"/> <result column="process_id" property="processId"/>
<result column="flow_process" property="flowProcess"/>
</resultMap> </resultMap>
<!-- 通用查询结果列 --> <!-- 通用查询结果列 -->
<sql id="Base_Column_List"> <sql id="Base_Column_List">
id AS id, is_delete AS isDelete, gmt_create AS gmtCreate, gmt_modified AS gmtModified, department_level AS departmentLevel, record_id AS recordId, approval_staff_id AS approvalStaffId, approval_staff_name AS approvalStaffName, flow_name AS flowName, record_staff_id AS recordStaffId, flow_id AS flowId, flow_index AS flowIndex, status AS status, flow_staff_id_role AS flowStaffIdRole, status_name AS statusName, type AS type, process_id AS processId id AS id, is_delete AS isDelete, gmt_create AS gmtCreate, gmt_modified AS gmtModified, department_level AS departmentLevel, record_id AS recordId, approval_staff_id AS approvalStaffId, approval_staff_name AS approvalStaffName, flow_name AS flowName, record_staff_id AS recordStaffId, flow_id AS flowId, flow_index AS flowIndex, status AS status, flow_staff_id_role AS flowStaffIdRole, status_name AS statusName, type AS type, process_id AS processId, flow_process AS flowProcess
</sql> </sql>
@ -52,6 +53,7 @@
<if test="statusName != null">status_name, </if> <if test="statusName != null">status_name, </if>
<if test="type != null">type, </if> <if test="type != null">type, </if>
<if test="processId != null">process_id, </if> <if test="processId != null">process_id, </if>
<if test="flowProcess != null">flow_process, </if>
is_delete, is_delete,
gmt_create, gmt_create,
gmt_modified gmt_modified
@ -69,6 +71,7 @@
<if test="statusName != null">#{ statusName}, </if> <if test="statusName != null">#{ statusName}, </if>
<if test="type != null">#{ type}, </if> <if test="type != null">#{ type}, </if>
<if test="processId != null">#{ processId}, </if> <if test="processId != null">#{ processId}, </if>
<if test="flowProcess != null">#{ flowProcess}, </if>
0, 0,
now(), now(),
now() now()
@ -94,7 +97,8 @@
<if test="flowStaffIdRole != null">flow_staff_id_role = #{flowStaffIdRole},</if> <if test="flowStaffIdRole != null">flow_staff_id_role = #{flowStaffIdRole},</if>
<if test="statusName != null">status_name = #{statusName},</if> <if test="statusName != null">status_name = #{statusName},</if>
<if test="type != null">type = #{type},</if> <if test="type != null">type = #{type},</if>
<if test="processId != null">process_id = #{processId}</if> <if test="processId != null">process_id = #{processId},</if>
<if test="flowProcess != null">flow_process = #{flowProcess}</if>
</trim> </trim>
,gmt_modified = now() ,gmt_modified = now()
where id = #{id} where id = #{id}
@ -119,7 +123,8 @@
flow_staff_id_role = #{flowStaffIdRole}, flow_staff_id_role = #{flowStaffIdRole},
status_name = #{statusName}, status_name = #{statusName},
type = #{type}, type = #{type},
process_id = #{processId} process_id = #{processId},
flow_process = #{flowProcess}
,gmt_modified = now() ,gmt_modified = now()
where id = #{id} where id = #{id}
</update> </update>
@ -130,8 +135,6 @@
</update> </update>
<select id="selectLastFlowRecordByRecordId" resultType="com.lz.modules.flow.entity.FlowRecord"> <select id="selectLastFlowRecordByRecordId" resultType="com.lz.modules.flow.entity.FlowRecord">
select * from lz_flow_record where is_delete = 0 and record_id = #{recordId} and status = 0 order by id desc limit 1 select * from lz_flow_record where is_delete = 0 and record_id = #{recordId} and status = 0 order by id desc limit 1
</select> </select>

View File

@ -126,7 +126,7 @@ public class MysqlMain {
List<TablesBean> list = new ArrayList<TablesBean>(); List<TablesBean> list = new ArrayList<TablesBean>();
list.add(new TablesBean("lz_evaluation_group")); list.add(new TablesBean("lz_flow_record"));
List<TablesBean> list2 = new ArrayList<TablesBean>(); List<TablesBean> list2 = new ArrayList<TablesBean>();
Map<String, String> map = MysqlUtil2ShowCreateTable.getComments(); Map<String, String> map = MysqlUtil2ShowCreateTable.getComments();