提交修改
This commit is contained in:
parent
b9c99c3ffe
commit
cb19e6a52f
@ -604,6 +604,22 @@ public class ResultRecordController extends AbstractController {
|
||||
return R.ok();
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 删除
|
||||
*/
|
||||
@RequestMapping("/addRecordAjudex")
|
||||
public R addRecordAjudex(String type) {
|
||||
ResultRecord resultRecord = resultRecordService.selectCurrentMonthResultRecordByStaffIdType(getUserId(),NumberUtil.objToIntDefault(type,2));
|
||||
if(resultRecord !=null){
|
||||
return R.error("当月己经存在绩效,请编辑。");
|
||||
}
|
||||
return R.ok();
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 删除
|
||||
*/
|
||||
|
||||
@ -65,4 +65,6 @@ public interface ResultRecordMapper extends BaseMapper<ResultRecord> {
|
||||
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);
|
||||
|
||||
ResultRecord selectCurrentMonthResultRecordByStaffIdType(@Param("staffId") Long staffId, @Param("type") int type);
|
||||
}
|
||||
@ -96,4 +96,6 @@ public interface ResultRecordService extends IService<ResultRecord> {
|
||||
DepartmentsStaffRelateEntity getLeaderDepartmentsStaffRelateEntity(Long staffId);
|
||||
|
||||
ResultRecord selectLastResultRecordByStaffIdType(Long staffId, int type);
|
||||
|
||||
ResultRecord selectCurrentMonthResultRecordByStaffIdType(Long staffId, int type);
|
||||
}
|
||||
@ -329,6 +329,11 @@ public class ResultRecordServiceImpl extends ServiceImpl<ResultRecordMapper, Res
|
||||
return resultRecordMapper.selectLastResultRecordByStaffIdType(staffId,type);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ResultRecord selectCurrentMonthResultRecordByStaffIdType(Long staffId, int type) {
|
||||
return resultRecordMapper.selectCurrentMonthResultRecordByStaffIdType(staffId,type);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public ResultRecord createResultRecord(Long staffId, int type, Long roleId) {
|
||||
|
||||
@ -331,6 +331,10 @@
|
||||
select * from lz_result_record where is_delete = 0 and staff_id = #{staffId} and type = #{type} order by id desc limit 1
|
||||
</select>
|
||||
|
||||
<select id="selectCurrentMonthResultRecordByStaffIdType" resultType="com.lz.modules.sys.entity.app.ResultRecord">
|
||||
select * from lz_result_record where is_delete = 0 and staff_id = #{staffId} and type = #{type} and DATE_FORMAT(month_time,'%Y-%m') = DATE_FORMAT(now(),'%Y-%m') order by id desc limit 1
|
||||
</select>
|
||||
|
||||
|
||||
</mapper>
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user