提交修改

This commit is contained in:
quyixiao 2020-09-29 17:23:17 +08:00
parent b9c99c3ffe
commit cb19e6a52f
5 changed files with 29 additions and 0 deletions

View File

@ -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();
}
/**
* 删除
*/

View File

@ -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);
}

View File

@ -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);
}

View File

@ -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) {

View File

@ -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>