提交修改

This commit is contained in:
quyixiao 2020-10-10 15:54:44 +08:00
parent af1486b48e
commit 2a61ea0781
6 changed files with 50 additions and 4 deletions

View File

@ -48,4 +48,6 @@ public interface FlowRecordMapper extends BaseMapper<FlowRecord> {
List<FlowRecord> selectFlowRecordByResultRecordIdType(@Param("resultRecordId") Long resultRecordId, @Param("type") Integer type); List<FlowRecord> selectFlowRecordByResultRecordIdType(@Param("resultRecordId") Long resultRecordId, @Param("type") Integer type);
List<FlowRecord> selectFlowRecordByResultRecordIdTypeStatus(@Param("recordResultId") Long recordResultId, @Param("type") Integer type, @Param("status") int status); List<FlowRecord> selectFlowRecordByResultRecordIdTypeStatus(@Param("recordResultId") Long recordResultId, @Param("type") Integer type, @Param("status") int status);
Long copyFlowRecord(FlowRecord flowRecord);
} }

View File

@ -50,4 +50,6 @@ public interface FlowRecordService extends IService<FlowRecord> {
List<FlowRecord> selectFlowRecordByResultRecordIdType(Long recordResultId, Integer type); List<FlowRecord> selectFlowRecordByResultRecordIdType(Long recordResultId, Integer type);
List<FlowRecord> selectFlowRecordByResultRecordIdTypeStatus(Long recordResultId, Integer type, int status); List<FlowRecord> selectFlowRecordByResultRecordIdTypeStatus(Long recordResultId, Integer type, int status);
Long copyFlowRecord(FlowRecord flowRecord);
} }

View File

@ -133,5 +133,10 @@ public class FlowRecordServiceImpl extends ServiceImpl<FlowRecordMapper, FlowRec
return flowRecordMapper.selectFlowRecordByResultRecordIdTypeStatus(recordResultId,type,status); return flowRecordMapper.selectFlowRecordByResultRecordIdTypeStatus(recordResultId,type,status);
} }
@Override
public Long copyFlowRecord(FlowRecord flowRecord) {
return flowRecordMapper.copyFlowRecord(flowRecord);
}
} }

View File

@ -374,13 +374,15 @@ public class ResultRecordServiceImpl extends ServiceImpl<ResultRecordMapper, Res
//删除月初目标 //删除月初目标
resultRecordService.deleteResultRecordById2(oldResultRecordId); resultRecordService.deleteResultRecordById2(oldResultRecordId);
List<FlowRecord> flowRecords = flowRecordService.selectFlowRecordByResultRecordIdFlowId(oldResultRecordId); List<FlowRecord> flowRecords = flowRecordService.selectFlowRecordByResultRecordIdFlowId(oldResultRecordId);
for(FlowRecord flowRecord : flowRecords){ for(FlowRecord flowRecord : flowRecords){
flowRecord.setRecordId(resultRecordOld.getId()); flowRecord.setRecordId(resultRecordOld.getId());
flowRecord.setId(null); flowRecord.setId(null);
flowRecord.setType(Constant.ONE); flowRecord.setType(Constant.ONE);
//新增record //新增record
flowRecordService.insertFlowRecord(flowRecord); flowRecordService.copyFlowRecord(flowRecord);
} }
flowRecordService.initFlowRecord(resultRecordOld, roleId, recordType, "月未总结"); flowRecordService.initFlowRecord(resultRecordOld, roleId, recordType, "月未总结");
resultRecordNew = resultRecordOld; resultRecordNew = resultRecordOld;
List<ResultDetail> resultDetails = resultDetailService.selectByRecordId(recordId); List<ResultDetail> resultDetails = resultDetailService.selectByRecordId(recordId);

View File

@ -3,9 +3,9 @@ spring:
type: com.alibaba.druid.pool.DruidDataSource type: com.alibaba.druid.pool.DruidDataSource
druid: druid:
driver-class-name: com.mysql.cj.jdbc.Driver driver-class-name: com.mysql.cj.jdbc.Driver
url: jdbc:mysql://172.16.157.238:3306/lz_management?allowMultiQueries=true&useUnicode=true&characterEncoding=UTF-8&serverTimezone=Asia/Shanghai url: jdbc:mysql://rm-bp1xhc66ruz72t68p.mysql.rds.aliyuncs.com:3306/lz_manger?allowMultiQueries=true&useUnicode=true&characterEncoding=UTF-8&serverTimezone=Asia/Shanghai
username: ldd_biz username: lz_manger
password: Hello1234 password: N8zfBwhOC
initial-size: 10 initial-size: 10
max-active: 100 max-active: 100
min-idle: 10 min-idle: 10

View File

@ -72,6 +72,41 @@
) )
</insert> </insert>
<insert id="copyFlowRecord" parameterType="FlowRecord" useGeneratedKeys="true" keyProperty="id" >
insert into lz_flow_record(
<if test="departmentLevel != null">department_level, </if>
<if test="recordId != null">record_id, </if>
<if test="approvalStaffId != null">approval_staff_id, </if>
<if test="approvalStaffName != null">approval_staff_name, </if>
<if test="flowName != null">flow_name, </if>
<if test="recordStaffId != null">record_staff_id, </if>
<if test="flowId != null">flow_id, </if>
<if test="flowIndex != null">flow_index, </if>
<if test="status != null">status, </if>
<if test="flowStaffIdRole != null">flow_staff_id_role, </if>
<if test="statusName != null">status_name, </if>
<if test="type != null">type, </if>
is_delete,
gmt_create,
gmt_modified
)values(
<if test="departmentLevel != null">#{ departmentLevel}, </if>
<if test="recordId != null">#{ recordId}, </if>
<if test="approvalStaffId != null">#{ approvalStaffId}, </if>
<if test="approvalStaffName != null">#{ approvalStaffName}, </if>
<if test="flowName != null">#{ flowName}, </if>
<if test="recordStaffId != null">#{ recordStaffId}, </if>
<if test="flowId != null">#{ flowId}, </if>
<if test="flowIndex != null">#{ flowIndex}, </if>
<if test="status != null">#{ status}, </if>
<if test="flowStaffIdRole != null">#{ flowStaffIdRole}, </if>
<if test="statusName != null">#{ statusName}, </if>
<if test="type != null">#{ type}, </if>
0,
#{ gmtCreate},
#{ gmtModified}
)
</insert>
<update id="updateFlowRecordById" parameterType="FlowRecord" > <update id="updateFlowRecordById" parameterType="FlowRecord" >
update update