| | |
| | | import com.ruoyi.approve.mapper.WorkingHoursSettingMapper; |
| | | import com.ruoyi.approve.pojo.*; |
| | | import com.ruoyi.approve.service.HolidaySettingsService; |
| | | import com.ruoyi.framework.aspectj.lang.annotation.Log; |
| | | import com.ruoyi.framework.aspectj.lang.enums.BusinessType; |
| | | import com.ruoyi.framework.web.domain.AjaxResult; |
| | | import lombok.AllArgsConstructor; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | |
| | | * 增添 |
| | | * @return |
| | | */ |
| | | @Log(title = "增添假期设置", businessType = BusinessType.INSERT) |
| | | @PostMapping("/add") |
| | | public AjaxResult add(@RequestBody HolidaySettings holidaySettings){ |
| | | return AjaxResult.success(holidaySettingsService.save(holidaySettings)); |
| | |
| | | * 更新 |
| | | * @return |
| | | */ |
| | | @Log(title = "更新假期设置", businessType = BusinessType.UPDATE) |
| | | @PostMapping("/update") |
| | | public AjaxResult update(@RequestBody HolidaySettings holidaySettings){ |
| | | return AjaxResult.success(holidaySettingsService.updateById(holidaySettings)); |
| | |
| | | * 删除 |
| | | * @return |
| | | */ |
| | | @Log(title = "删除假期设置", businessType = BusinessType.DELETE) |
| | | @DeleteMapping("/delete") |
| | | public AjaxResult delete(@RequestBody List<Long> ids){ |
| | | if(CollectionUtils.isEmpty(ids)) return AjaxResult.error("请传入要删除的ID"); |
| | |
| | | * 增添年假规则 |
| | | * @return |
| | | */ |
| | | @Log(title = "增添年假规则", businessType = BusinessType.INSERT) |
| | | @PostMapping("/addAnnualLeaveSetting") |
| | | public AjaxResult addAnnualLeaveSetting(@RequestBody AnnualLeaveSetting annualLeaveSetting){ |
| | | return AjaxResult.success(annualLeaveSettingMapper.insert(annualLeaveSetting)); |
| | |
| | | * 更新年假规则 |
| | | * @return |
| | | */ |
| | | @Log(title = "更新年假规则", businessType = BusinessType.UPDATE) |
| | | @PostMapping("/updateAnnualLeaveSetting") |
| | | public AjaxResult updateAnnualLeaveSetting(@RequestBody AnnualLeaveSetting annualLeaveSetting){ |
| | | return AjaxResult.success(annualLeaveSettingMapper.updateById(annualLeaveSetting)); |
| | |
| | | * 删除年假规则 |
| | | * @return |
| | | */ |
| | | @Log(title = "删除年假规则", businessType = BusinessType.DELETE) |
| | | @DeleteMapping("/deleteAnnualLeaveSetting") |
| | | public AjaxResult deleteAnnualLeaveSetting(@RequestBody List<Long> ids){ |
| | | if(CollectionUtils.isEmpty(ids)) return AjaxResult.error("请传入要删除的ID"); |
| | |
| | | * 增添加班规则 |
| | | * @return |
| | | */ |
| | | @Log(title = "增添加班规则", businessType = BusinessType.INSERT) |
| | | @PostMapping("/addOvertimeSetting") |
| | | public AjaxResult addOvertimeSetting(@RequestBody OvertimeSetting overtimeSetting){ |
| | | return AjaxResult.success(overtimeSettingMapper.insert(overtimeSetting)); |
| | |
| | | * 更新加班规则 |
| | | * @return |
| | | */ |
| | | @Log(title = "更新加班规则", businessType = BusinessType.UPDATE) |
| | | @PostMapping("/updateOvertimeSetting") |
| | | public AjaxResult updateOvertimeSetting(@RequestBody OvertimeSetting overtimeSetting){ |
| | | return AjaxResult.success(overtimeSettingMapper.updateById(overtimeSetting)); |
| | |
| | | * 删除加班规则 |
| | | * @return |
| | | */ |
| | | @Log(title = "删除加班规则", businessType = BusinessType.DELETE) |
| | | @DeleteMapping("/deleteOvertimeSetting") |
| | | public AjaxResult deleteOvertimeSetting(@RequestBody List<Long> ids){ |
| | | if(CollectionUtils.isEmpty(ids)) return AjaxResult.error("请传入要删除的ID"); |
| | |
| | | * 增添班制规则 |
| | | * @return |
| | | */ |
| | | @Log(title = "增添班制规则", businessType = BusinessType.INSERT) |
| | | @PostMapping("/addWorkingHoursSetting") |
| | | public AjaxResult addWorkingHoursSetting(@RequestBody WorkingHoursSetting workingHoursSetting){ |
| | | return AjaxResult.success(workingHoursSettingMapper.insert(workingHoursSetting)); |
| | |
| | | * 更新班制规则 |
| | | * @return |
| | | */ |
| | | @Log(title = "更新班制规则", businessType = BusinessType.UPDATE) |
| | | @PostMapping("/updateWorkingHoursSetting") |
| | | public AjaxResult updateWorkingHoursSetting(@RequestBody WorkingHoursSetting workingHoursSetting){ |
| | | return AjaxResult.success(workingHoursSettingMapper.updateById(workingHoursSetting)); |
| | |
| | | * 删除班制规则 |
| | | * @return |
| | | */ |
| | | @Log(title = "删除班制规则", businessType = BusinessType.DELETE) |
| | | @DeleteMapping("/deleteWorkingHoursSetting") |
| | | public AjaxResult deleteWorkingHoursSetting(@RequestBody List<Long> ids){ |
| | | if(CollectionUtils.isEmpty(ids)) return AjaxResult.error("请传入要删除的ID"); |