提交修改
This commit is contained in:
parent
de8fa66bb3
commit
a08797fee4
@ -263,12 +263,14 @@ public class ResultRecordController extends AbstractController {
|
|||||||
String superStaff = recordAuthService.selectByStaffId(resultRecord.getStaffId());
|
String superStaff = recordAuthService.selectByStaffId(resultRecord.getStaffId());
|
||||||
int fileCount = recordFileService.selectRecordFileCountByRecordId(resultRecord.getId());
|
int fileCount = recordFileService.selectRecordFileCountByRecordId(resultRecord.getId());
|
||||||
|
|
||||||
if(resultRecord.getStaffId().equals(getUserId()) && StringUtil.in(resultRecord.getStatus() ,1,2,3,5)){
|
if(resultRecord.getStaffId().equals(getUserId())){
|
||||||
auth.setSubmited(1);
|
List<FlowRecord> flowRecords = flowRecordService.selectFlowRecordByResultRecordIdTypeStatus(req.getRecordResultId(),resultRecord.getType(),0);
|
||||||
List<FlowRecord> flowRecords = flowRecordService.selectFlowRecordByResultRecordIdType(req.getRecordResultId(),resultRecord.getType());
|
|
||||||
if(flowRecords!=null && flowRecords.size() == 2) { // 表示可以撤回
|
if(flowRecords!=null && flowRecords.size() == 2) { // 表示可以撤回
|
||||||
auth.setCancel(1);
|
auth.setCancel(1);
|
||||||
}
|
}
|
||||||
|
if(flowRecords!=null && flowRecords.size() >= 2){
|
||||||
|
auth.setSubmited(1);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return R.ok()
|
return R.ok()
|
||||||
|
|||||||
@ -46,4 +46,6 @@ public interface FlowRecordMapper extends BaseMapper<FlowRecord> {
|
|||||||
FlowRecord selectLastFlowNoStatusRecordByRecordId(@Param("recordId") Long recordId);
|
FlowRecord selectLastFlowNoStatusRecordByRecordId(@Param("recordId") Long recordId);
|
||||||
|
|
||||||
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);
|
||||||
}
|
}
|
||||||
@ -48,4 +48,6 @@ public interface FlowRecordService extends IService<FlowRecord> {
|
|||||||
FlowRecord selectLastFlowNoStatusRecordByRecordId(Long resultRecordId);
|
FlowRecord selectLastFlowNoStatusRecordByRecordId(Long resultRecordId);
|
||||||
|
|
||||||
List<FlowRecord> selectFlowRecordByResultRecordIdType(Long recordResultId, Integer type);
|
List<FlowRecord> selectFlowRecordByResultRecordIdType(Long recordResultId, Integer type);
|
||||||
|
|
||||||
|
List<FlowRecord> selectFlowRecordByResultRecordIdTypeStatus(Long recordResultId, Integer type, int status);
|
||||||
}
|
}
|
||||||
@ -128,5 +128,10 @@ public class FlowRecordServiceImpl extends ServiceImpl<FlowRecordMapper, FlowRec
|
|||||||
return flowRecordMapper.selectFlowRecordByResultRecordIdType(resultRecordId,type);
|
return flowRecordMapper.selectFlowRecordByResultRecordIdType(resultRecordId,type);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<FlowRecord> selectFlowRecordByResultRecordIdTypeStatus(Long recordResultId, Integer type, int status) {
|
||||||
|
return flowRecordMapper.selectFlowRecordByResultRecordIdTypeStatus(recordResultId,type,status);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -63,4 +63,6 @@ public interface ResultRecordMapper extends BaseMapper<ResultRecord> {
|
|||||||
ResultRecord selectResultRecordByStaffIdStatus(@Param("staffId") Long staffId, @Param("status") int status);
|
ResultRecord selectResultRecordByStaffIdStatus(@Param("staffId") Long staffId, @Param("status") int status);
|
||||||
|
|
||||||
List<ReportProgressListDto> targetReportList(@Param("req")ReportListReq req, @Param("staffIds") List<String> staffIds, @Param("page") IPage page);
|
List<ReportProgressListDto> targetReportList(@Param("req")ReportListReq req, @Param("staffIds") List<String> staffIds, @Param("page") IPage page);
|
||||||
|
|
||||||
|
ResultRecord selectLastResultRecordByStaffIdType(@Param("staffId") Long staffId, @Param("type") int type);
|
||||||
}
|
}
|
||||||
@ -93,4 +93,6 @@ public interface ResultRecordService extends IService<ResultRecord> {
|
|||||||
StaffEntity getApprovalStaff(ResultRecord resultRecord, String departmentLevel, List<StaffRoleDto> staffRoleDtos, Long roleId);
|
StaffEntity getApprovalStaff(ResultRecord resultRecord, String departmentLevel, List<StaffRoleDto> staffRoleDtos, Long roleId);
|
||||||
|
|
||||||
DepartmentsStaffRelateEntity getLeaderDepartmentsStaffRelateEntity(Long staffId);
|
DepartmentsStaffRelateEntity getLeaderDepartmentsStaffRelateEntity(Long staffId);
|
||||||
|
|
||||||
|
ResultRecord selectLastResultRecordByStaffIdType(Long staffId, int type);
|
||||||
}
|
}
|
||||||
@ -324,6 +324,11 @@ public class ResultRecordServiceImpl extends ServiceImpl<ResultRecordMapper, Res
|
|||||||
return leader;
|
return leader;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public ResultRecord selectLastResultRecordByStaffIdType(Long staffId, int type) {
|
||||||
|
return resultRecordMapper.selectLastResultRecordByStaffIdType(staffId,type);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public ResultRecord createResultRecord(Long staffId, int type, Long roleId) {
|
public ResultRecord createResultRecord(Long staffId, int type, Long roleId) {
|
||||||
@ -347,7 +352,7 @@ public class ResultRecordServiceImpl extends ServiceImpl<ResultRecordMapper, Res
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public ResultRecord initResult(Long staffId, Integer recordType, Long roleId) {
|
public ResultRecord initResult(Long staffId, Integer recordType, Long roleId) {
|
||||||
ResultRecord resultRecordOld = resultRecordService.selectResultRecordByStaffIdStatus(staffId,4);
|
ResultRecord resultRecordOld = resultRecordService.selectLastResultRecordByStaffIdType(staffId,1);
|
||||||
ResultRecord resultRecordNew = null;
|
ResultRecord resultRecordNew = null;
|
||||||
if (resultRecordOld != null) {
|
if (resultRecordOld != null) {
|
||||||
Long oldResultRecordId = resultRecordOld.getId();
|
Long oldResultRecordId = resultRecordOld.getId();
|
||||||
@ -355,6 +360,10 @@ public class ResultRecordServiceImpl extends ServiceImpl<ResultRecordMapper, Res
|
|||||||
resultRecordOld.setId(null);
|
resultRecordOld.setId(null);
|
||||||
resultRecordOld.setType(Constant.TWO); // 1 表示是目标,2 表示是业绩
|
resultRecordOld.setType(Constant.TWO); // 1 表示是目标,2 表示是业绩
|
||||||
resultRecordOld.setStatus(0);
|
resultRecordOld.setStatus(0);
|
||||||
|
resultRecordOld.setCurrentApprovalStaffId(staffId);
|
||||||
|
resultRecordOld.setScoreLevel("0");
|
||||||
|
StaffEntity staffEntity = staffService.selectStaffById(staffId);
|
||||||
|
resultRecordOld.setCurrentApprovalStaffName(staffEntity.getName());
|
||||||
resultRecordOld.setFlowStaffIdRole(resultDetailService.initRole(resultRecordOld.getStaffId(), roleId));
|
resultRecordOld.setFlowStaffIdRole(resultDetailService.initRole(resultRecordOld.getStaffId(), roleId));
|
||||||
resultRecordService.insertResultRecord(resultRecordOld);
|
resultRecordService.insertResultRecord(resultRecordOld);
|
||||||
//删除月初目标
|
//删除月初目标
|
||||||
|
|||||||
@ -322,6 +322,9 @@
|
|||||||
GROUP BY r.staff_id
|
GROUP BY r.staff_id
|
||||||
|
|
||||||
</select>
|
</select>
|
||||||
|
<select id="selectLastResultRecordByStaffIdType" resultType="com.lz.modules.sys.entity.app.ResultRecord">
|
||||||
|
select * from lz_result_record where is_delete = 0 and staff_id = #{staffId} and type = #{type} order by id desc limit 1
|
||||||
|
</select>
|
||||||
|
|
||||||
|
|
||||||
</mapper>
|
</mapper>
|
||||||
|
|||||||
@ -158,6 +158,9 @@
|
|||||||
<select id="selectFlowRecordByResultRecordIdType" resultType="com.lz.modules.flow.entity.FlowRecord">
|
<select id="selectFlowRecordByResultRecordIdType" resultType="com.lz.modules.flow.entity.FlowRecord">
|
||||||
select * from lz_flow_record where is_delete = 0 and record_id = #{resultRecordId} and type = #{type} and status = 0
|
select * from lz_flow_record where is_delete = 0 and record_id = #{resultRecordId} and type = #{type} and status = 0
|
||||||
</select>
|
</select>
|
||||||
|
<select id="selectFlowRecordByResultRecordIdTypeStatus" resultType="com.lz.modules.flow.entity.FlowRecord">
|
||||||
|
select * from lz_flow_record where is_delete = 0 and record_id = #{resultRecordId} and type = #{type} and status = #{status}
|
||||||
|
</select>
|
||||||
|
|
||||||
|
|
||||||
</mapper>
|
</mapper>
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user