员工添加修改每日应出勤小时数

master
hshansha 7 months ago
parent d4506283a5
commit 9d225da14f

@ -137,9 +137,6 @@ public class PayButieEmplyeeController extends BaseController {
return iPayButieEmplyeeService.checkDataExist(object.get("month", String.class)); return iPayButieEmplyeeService.checkDataExist(object.get("month", String.class));
} }
/** /**
* *
* *

@ -106,6 +106,17 @@ public class PayEmployeeInfoController extends BaseController {
return toAjax(iPayEmployeeInfoService.updateByBo(bo)); return toAjax(iPayEmployeeInfoService.updateByBo(bo));
} }
/**
*
*/
@SaCheckPermission("pay:empinfo:edithour")
@Log(title = "员工信息", businessType = BusinessType.UPDATE)
@PutMapping("/edithour")
public R<Void> edit(@RequestParam("oldHour") String oldHour, @RequestParam("newHour") String newHour)
{
return toAjax(iPayEmployeeInfoService.updateSgrEmployeeHour(oldHour,newHour));
}
/** /**
* *
* *

@ -3,6 +3,7 @@ package com.ruoyi.pay.mapper;
import com.ruoyi.pay.domain.PayEmployeeInfo; import com.ruoyi.pay.domain.PayEmployeeInfo;
import com.ruoyi.pay.domain.vo.PayEmployeeInfoVo; import com.ruoyi.pay.domain.vo.PayEmployeeInfoVo;
import com.ruoyi.common.core.mapper.BaseMapperPlus; import com.ruoyi.common.core.mapper.BaseMapperPlus;
import org.apache.ibatis.annotations.Update;
/** /**
* Mapper * Mapper
@ -11,5 +12,6 @@ import com.ruoyi.common.core.mapper.BaseMapperPlus;
* @date 2025-05-12 * @date 2025-05-12
*/ */
public interface PayEmployeeInfoMapper extends BaseMapperPlus<PayEmployeeInfoMapper, PayEmployeeInfo, PayEmployeeInfoVo> { public interface PayEmployeeInfoMapper extends BaseMapperPlus<PayEmployeeInfoMapper, PayEmployeeInfo, PayEmployeeInfoVo> {
@Update("update pay_employee_info e set e.hours_per_day = #{newHour} where e.hours_per_day = #{oldHour}")
int updateSgrEmployeeHour(String oldHour, String newHour);
} }

@ -46,4 +46,6 @@ public interface IPayEmployeeInfoService {
* *
*/ */
Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid); Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid);
int updateSgrEmployeeHour(String oldHour, String newHour);
} }

@ -131,4 +131,9 @@ public class PayEmployeeInfoServiceImpl implements IPayEmployeeInfoService {
} }
return baseMapper.deleteBatchIds(ids) > 0; return baseMapper.deleteBatchIds(ids) > 0;
} }
@Override
public int updateSgrEmployeeHour(String oldHour, String newHour) {
return baseMapper.updateSgrEmployeeHour(oldHour,newHour);
}
} }

Loading…
Cancel
Save