package com.chinaztt.mes.production.controller;
|
|
import com.chinaztt.mes.production.dto.ShiftWageDTO;
|
import com.chinaztt.mes.production.service.ShiftWageService;
|
import com.chinaztt.ztt.common.core.util.R;
|
import com.chinaztt.ztt.common.log.annotation.SysLog;
|
import io.swagger.annotations.Api;
|
import io.swagger.annotations.ApiOperation;
|
import lombok.AllArgsConstructor;
|
import org.springframework.web.bind.annotation.*;
|
|
import java.util.List;
|
|
/**
|
* @Description : 班次工资
|
* @ClassName : ShiftWageController
|
* @Author : sll
|
* @Date: 2022-12-03 20:01
|
*/
|
@RestController
|
@AllArgsConstructor
|
@RequestMapping("/shiftWage")
|
@Api(value = "shiftWage", tags = "班次工资管理")
|
public class ShiftWageController{
|
private ShiftWageService shiftWageService;
|
|
@ApiOperation(value = "提交班次工资", notes = "提交班次工资")
|
@SysLog("提交班次工资")
|
@PostMapping
|
public R saveShiftWage(@RequestBody List<ShiftWageDTO> shiftWageDTOList){
|
return R.ok(shiftWageService.saveShiftWage(shiftWageDTOList));
|
}
|
|
@ApiOperation(value = "删除班次工资", notes = "删除班次工资")
|
@SysLog("删除班次工资")
|
@DeleteMapping
|
public R delShiftWage(@RequestBody List<Long> ids){
|
return R.ok(shiftWageService.removeByIds(ids));
|
}
|
|
@ApiOperation(value = "根据班次id查询班次工资", notes = "根据班次id查询班次工资")
|
@GetMapping("/{dutyRecordId}")
|
public R qryShiftWageByDutyRecordId(@PathVariable("dutyRecordId") Long dutyRecordId){
|
return R.ok(shiftWageService.qryShiftWageByDutyRecordId(dutyRecordId));
|
}
|
|
|
@ApiOperation(value = "根据班次idList查询班次工资", notes = "根据班次idList查询班次工资")
|
@GetMapping("/qryShiftWageByDutyRecordIdList")
|
public R qryShiftWageByDutyRecordIdList(@RequestParam("dutyRecordIdList") List<Long> dutyRecordIdList){
|
return R.ok(shiftWageService.qryShiftWageByDutyRecordIdList(dutyRecordIdList));
|
}
|
|
|
@ApiOperation(value = "实时计算", notes = "实时计算")
|
@SysLog("实时计算")
|
@PostMapping("/count")
|
public R getCountResult(@RequestBody ShiftWageDTO shiftWageDTO){
|
return R.ok(shiftWageService.getCountResult(shiftWageDTO));
|
}
|
|
@ApiOperation(value = "重新汇总班次工资", notes = "重新汇总班次工资")
|
@SysLog("重新汇总班次工资")
|
@GetMapping("/summary/{dutyRecordId}")
|
public R summaryAgain(@PathVariable("dutyRecordId") Long dutyRecordId){
|
return R.ok(shiftWageService.summaryAgain(dutyRecordId));
|
}
|
|
@ApiOperation(value = "重新汇总所有班次工资", notes = "重新汇总所有班次工资")
|
@SysLog("重新汇总所有班次工资")
|
@GetMapping("/summaryAll")
|
public R summaryAll(@RequestParam("dutyRecordIdList") List<Long> dutyRecordIdList){
|
return R.ok(shiftWageService.summaryAll(dutyRecordIdList));
|
}
|
|
}
|