Blame view

ProjectController.java 4.15 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
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));
    }

涂亚平 committed
42 43 44 45 46 47
    @PostMapping("sendNewSms")
    @ApiOperation("发送验证码  telephone ")
    public ResponseVO sendNewSms(@RequestBody MemberDO memberDO){
        return ResponseData.generateCreatedResponse(0,projectService.sendNewSms(memberDO));
    }

涂亚平 committed
48
    @PostMapping("login")
涂亚平 committed
49
    @ApiOperation("登录  telephone verifyCode openId")
涂亚平 committed
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
    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")
涂亚平 committed
91
    @ApiOperation("工资单--笔数+总计  memberId 人才id  projectMappingId 项目id  ")
涂亚平 committed
92 93 94 95 96
    public ResponseVO salaryListSum(@RequestBody SalaryListSumDTO salaryListSumDTO){
        return ResponseData.generateCreatedResponse(0,projectService.salaryListSum(salaryListSumDTO));
    }

    @PostMapping("salaryList")
涂亚平 committed
97
    @ApiOperation("工资单明细   memberId 人才id  projectMappingId 项目映射id pageSize pageNum  ")
涂亚平 committed
98 99 100 101
    public ResponseVO salaryList(@RequestBody SalaryListSumDTO salaryListSumDTO){
        return ResponseData.generateCreatedResponse(0,projectService.salaryList(salaryListSumDTO));
    }

涂亚平 committed
102 103 104 105 106 107
    @PostMapping("updateUserInfo")
    @ApiOperation("变更身份证/银行卡信息  id userName payrollAccount idCard  bank")
    public ResponseVO updateUserInfo(@RequestBody MemberDO memberDO){
        projectService.updateUserInfo(memberDO);
        return ResponseData.generateCreatedResponse(0);
    }
涂亚平 committed
108 109

}