李林
2023-10-07 658d4927d468c47208fd012d9128b09249c07eff
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
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));
    }
 
}