ProjectController.java 3.58 KB
package com.subsidy.controller;


import com.subsidy.common.ResponseData;
import com.subsidy.common.ResponseVO;
import com.subsidy.dto.administer.VerifyCodeDTO;
import com.subsidy.dto.labor.SalaryListSumDTO;
import com.subsidy.dto.labor.UpdateTelephoneDTO;
import com.subsidy.model.MemberDO;
import com.subsidy.service.ProjectService;
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-18
 */
@RestController
@Api(tags = "项目表")
@RequestMapping("/project")
public class ProjectController {

    @Autowired
    private ProjectService projectService;

    @PostMapping("sendSms")
    @ApiOperation("发送验证码  telephone ")
    public ResponseVO sendSms(@RequestBody MemberDO memberDO){
        return ResponseData.generateCreatedResponse(0,projectService.sendSms(memberDO));
    }

    @PostMapping("login")
    @ApiOperation("登录  telephone verifyCode")
    public ResponseVO login(@RequestBody VerifyCodeDTO verifyCodeDTO){
        return ResponseData.generateCreatedResponse(0,projectService.login(verifyCodeDTO));
    }

    @PostMapping("currentProject")
    @ApiOperation("当前所在项目   id  人才id")
    public ResponseVO currentProject(@RequestBody MemberDO memberDO){
        return ResponseData.generateCreatedResponse(0,projectService.currentProject(memberDO));
    }

    @PostMapping("historyProjects")
    @ApiOperation("历史所有职位  id 人才id")
    public ResponseVO historyProjects(@RequestBody MemberDO memberDO){
        return ResponseData.generateCreatedResponse(0,projectService.historyProjects(memberDO));
    }

    @PostMapping("verify")
    @ApiOperation("变更绑定手机--验证验证码  verifyCode")
    public ResponseVO verify(@RequestBody   VerifyCodeDTO verifyCodeDTO){
        return ResponseData.generateCreatedResponse(0,projectService.verify(verifyCodeDTO));
    }

    @PostMapping("updateTelephone")
    @ApiOperation("更新手机号   id telephone  verifyCode ")
    public ResponseVO updateTelephone(@RequestBody UpdateTelephoneDTO updateTelephoneDTO){
        return ResponseData.generateCreatedResponse(0,projectService.updateTelephone(updateTelephoneDTO));
    }

    @PostMapping("idCardInfo")
    @ApiOperation("身份证信息 id")
    public ResponseVO idCardInfo(@RequestBody MemberDO memberDO){
        return ResponseData.generateCreatedResponse(0,projectService.idCardInfo(memberDO));
    }

    @PostMapping("bankInfo")
    @ApiOperation("银行卡信息 id")
    public ResponseVO bankInfo(@RequestBody MemberDO memberDO){
        return ResponseData.generateCreatedResponse(0,projectService.bankInfo(memberDO));
    }

    @PostMapping("salaryListSum")
    @ApiOperation("工资单--笔数+总计  memberId 人才id  projectId 项目id  ")
    public ResponseVO salaryListSum(@RequestBody SalaryListSumDTO salaryListSumDTO){
        return ResponseData.generateCreatedResponse(0,projectService.salaryListSum(salaryListSumDTO));
    }

    @PostMapping("salaryList")
    @ApiOperation("工资单明细   memberId 人才id  projectId 项目id pageSize pageNum  ")
    public ResponseVO salaryList(@RequestBody SalaryListSumDTO salaryListSumDTO){
        return ResponseData.generateCreatedResponse(0,projectService.salaryList(salaryListSumDTO));
    }


}