LaborServiceDictController.java 4.14 KB
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));
    }



}