package com.jkcredit.invoice.controller.business; import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.jkcredit.invoice.annotation.LoginRequired; import com.jkcredit.invoice.annotation.annotationdes.AuthenticationInterceptor; import com.jkcredit.invoice.model.entity.user.User; import com.jkcredit.invoice.model.entity.waybill.NoCarCompanyManger; import com.jkcredit.invoice.model.vo.UserVo; import com.jkcredit.invoice.service.lowerservice.CheckHasAuthRole; import com.jkcredit.invoice.service.nocar.NoCarCompanyMangerOper; import com.jkcredit.invoice.util.RespR; import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.validation.annotation.Validated; 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; /** * All rights Reserved, Designed By www.erayt.com * * @author mashengyi * @version V4.1 * @Title rcs41 * @Package com.jkcredit.invoice.controller.business * @Description 无车企业开票人管理 * @date 2024/4/4 下午1:11 * @Copyright: 2024 www.erayt.com Inc. All rights reserved. * 注意:本内容仅限于杭州时代银通软件股份有限公司内部传阅,禁止外泄以及用于其他的商业目的 **/ @Api(tags = "无车企业开票人管理") @RestController @RequestMapping(value = {"/customerCompany"}) public class CustomerCompanyManagerOperController { @Autowired NoCarCompanyMangerOper noCarCompanyMangerOper; @Autowired private CheckHasAuthRole checkHasAuthRole; /** * 新增上传企业开票经办人 * * @return 经办人集合 */ @PostMapping("/detailAdd") @ApiOperation(value = "新增上传企业开票经办人信息", notes = "新增上传企业开票经办人信息") @LoginRequired(role = AuthenticationInterceptor.AUTH_ADMIN) public RespR CustomerCompanyManagerDetailAdd(@RequestBody @Validated NoCarCompanyManger noCarCompanyManger) { return noCarCompanyMangerOper.companyDetailAdd(noCarCompanyManger); } /** * 新增上传证明文件 * * @return 经办人集合 */ @PostMapping("/operatorEvidenceAdd") @ApiOperation(value = "新增上传证明文件", notes = "新增上传证明文件") @LoginRequired(role = AuthenticationInterceptor.AUTH_ADMIN) public RespR CustomerCompanyManageroperatorEvidenceAdd(@RequestBody NoCarCompanyManger noCarCompanyManger) { if (!checkHasAuthRole.checkMessage(noCarCompanyManger.getOperatorEvidenceContractFileName(), noCarCompanyManger.getOperatorEvidenceBase64Str())) { return new RespR(false, "证明文件上传失败,请查看数据是否维护准确"); } return noCarCompanyMangerOper.operatorEvidenceAdd(noCarCompanyManger); } /** * 分页查询企业开票经办人 * * @param page 参数集 * @param userVo 查询参数列表 * @return 用户集合 */ @PostMapping("/page") @ApiOperation(value = "分页查询企业开票经办人", notes = "分页查询企业开票经办人") @LoginRequired(role = AuthenticationInterceptor.AUTH_ADMIN) public RespR getCustomerCompanyManagerDetailPage(Page page, NoCarCompanyManger noCarCompanyManger, UserVo userVo) { return new RespR<>(noCarCompanyMangerOper.getCustomerCompanyManagerDetailPage(page, noCarCompanyManger)); } /** * @param noCarCompanyManger * @return */ @PostMapping("/noCarCompanyMangerQuery") @ApiOperation(value = "企业开票经办人信息查询", notes = "企业开票经办人信息查询") @LoginRequired public RespR getCustomerCompanyManagerDetail(@RequestBody NoCarCompanyManger noCarCompanyManger, User user) { return noCarCompanyMangerOper.noCarCompanyMangerQuery(noCarCompanyManger); } }