Blame view

LaborServiceDictController.java 4.14 KB
涂亚平 committed
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 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102
package com.subsidy.controller;


import com.subsidy.common.ResponseData;
import com.subsidy.common.ResponseVO;
import com.subsidy.dto.academy.AddAcademyAccountDTO;
import com.subsidy.dto.labor.*;
import com.subsidy.model.AdministerDO;
import com.subsidy.model.LaborServiceDictDO;
import com.subsidy.model.ProjectMemberMappingDO;
import com.subsidy.service.LaborServiceDictService;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RestController;
import io.swagger.annotations.Api;

/**
 * <p>
 * 劳务公司字典表 前端控制器
 * </p>
 *
 * @author Tuyp
 * @since 2024-07-25
 */
@RestController
@Api(tags = "劳务公司字典表")
@RequestMapping("/laborServiceDict")
public class LaborServiceDictController {

    @Autowired
    private LaborServiceDictService laborServiceDictService;

    @PostMapping("labors")
    @ApiOperation("伙伴管理  laborServiceName pageSize pageNum")
    public ResponseVO labors(@RequestBody LaborsDTO laborsDTO){
        return ResponseData.generateCreatedResponse(0,laborServiceDictService.labors(laborsDTO));
    }

    @PostMapping("addLabor")
    @ApiOperation("添加劳务  shortName location  laborServiceName  serviceCode accountName ")
    public ResponseVO addLabor(@RequestBody AddLaborDTO addLaborDTO){
        laborServiceDictService.addLabor(addLaborDTO);
        return ResponseData.generateCreatedResponse(0);
    }

    @PostMapping("deleteLabor")
    @ApiOperation("删除劳务  id 劳务id")
    public ResponseVO deleteLabor(@RequestBody LaborServiceDictDO laborServiceDictDO){
        laborServiceDictService.deleteLabor(laborServiceDictDO);
        return ResponseData.generateCreatedResponse(0);
    }

    @PostMapping("updateLabor")
    @ApiOperation("编辑劳务  id 劳务id   shortName location  laborServiceName  serviceCode accountName password")
    public ResponseVO updateLabor(@RequestBody AddLaborDTO addLaborDTO){
        laborServiceDictService.updateLabor(addLaborDTO);
        return ResponseData.generateCreatedResponse(0);
    }

    @PostMapping("laborAccount")
    @ApiOperation("伙伴账户 pageSize pageNum laborServiceName")
    public ResponseVO laborAccount(@RequestBody LaborAccountDTO laborAccountDTO){
        return ResponseData.generateCreatedResponse(0,laborServiceDictService.laborAccount(laborAccountDTO));
    }

    @PostMapping("addLaborAccount")
    @ApiOperation("添加劳务账户  laborIds[]  telephone  accountName  userName password  remark ")
    public ResponseVO addLaborAccount(@RequestBody AddLaborAccountDTO addLaborAccountDTO){
        return ResponseData.generateCreatedResponse(0,laborServiceDictService.addLaborAccount(addLaborAccountDTO));
    }

    @PostMapping("deleteLaborAccount")
    @ApiOperation("删除劳务账户  id ")
    public ResponseVO deleteLaborAccount(@RequestBody AdministerDO administerDO){
        return ResponseData.generateCreatedResponse(0,laborServiceDictService.deleteLaborAccount(administerDO));
    }

    @PostMapping("updateLaborAccount")
    @ApiOperation("编辑劳务账户  id laborIds[]  telephone  accountName  userName password ")
    public ResponseVO updateLaborAccount(@RequestBody AddLaborAccountDTO addLaborAccountDTO){
        return ResponseData.generateCreatedResponse(0,laborServiceDictService.updateLaborAccount (addLaborAccountDTO));
    }

    @PostMapping("talentManagement")
    @ApiOperation("用户管理--人才管理  laborId  userName  pageSize pageNum")
    public ResponseVO talentManagement(@RequestBody TalentManagementDTO talentManagementDTO){
        return ResponseData.generateCreatedResponse(0,laborServiceDictService.talentManagement(talentManagementDTO));
    }

    @PostMapping("detail")
    @ApiOperation("花名册--详情  memberId 人才id")
    public ResponseVO detail(@RequestBody ProjectMemberMappingDO projectMemberMappingDO){
        return ResponseData.generateCreatedResponse(0, laborServiceDictService.detail(projectMemberMappingDO));
    }



}