|
@@ -3,9 +3,15 @@ package com.jkcredit.invoice.controller.business;
|
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
|
import com.jkcredit.invoice.annotation.LoginRequired;
|
|
import com.jkcredit.invoice.annotation.LoginRequired;
|
|
import com.jkcredit.invoice.annotation.annotationdes.AuthenticationInterceptor;
|
|
import com.jkcredit.invoice.annotation.annotationdes.AuthenticationInterceptor;
|
|
|
|
+import com.jkcredit.invoice.mapper.customer.CustomerRecMapper;
|
|
|
|
+import com.jkcredit.invoice.model.entity.customer.CustomerRec;
|
|
import com.jkcredit.invoice.model.entity.user.User;
|
|
import com.jkcredit.invoice.model.entity.user.User;
|
|
import com.jkcredit.invoice.model.entity.waybill.NoCarCompanyManger;
|
|
import com.jkcredit.invoice.model.entity.waybill.NoCarCompanyManger;
|
|
|
|
+import com.jkcredit.invoice.model.vo.OperatorEditConfirmVo;
|
|
|
|
+import com.jkcredit.invoice.model.vo.OperatorEditVo;
|
|
|
|
+import com.jkcredit.invoice.model.vo.OperatorSendCodeVo;
|
|
import com.jkcredit.invoice.model.vo.UserVo;
|
|
import com.jkcredit.invoice.model.vo.UserVo;
|
|
|
|
+import com.jkcredit.invoice.service.customer.CustomerRecService;
|
|
import com.jkcredit.invoice.service.lowerservice.CheckHasAuthRole;
|
|
import com.jkcredit.invoice.service.lowerservice.CheckHasAuthRole;
|
|
import com.jkcredit.invoice.service.nocar.NoCarCompanyMangerOper;
|
|
import com.jkcredit.invoice.service.nocar.NoCarCompanyMangerOper;
|
|
import com.jkcredit.invoice.util.RespR;
|
|
import com.jkcredit.invoice.util.RespR;
|
|
@@ -18,6 +24,8 @@ import org.springframework.web.bind.annotation.RequestBody;
|
|
import org.springframework.web.bind.annotation.RequestMapping;
|
|
import org.springframework.web.bind.annotation.RequestMapping;
|
|
import org.springframework.web.bind.annotation.RestController;
|
|
import org.springframework.web.bind.annotation.RestController;
|
|
|
|
|
|
|
|
+import java.util.List;
|
|
|
|
+
|
|
/**
|
|
/**
|
|
* All rights Reserved, Designed By www.erayt.com
|
|
* All rights Reserved, Designed By www.erayt.com
|
|
*
|
|
*
|
|
@@ -41,7 +49,8 @@ public class CustomerCompanyManagerOperController {
|
|
|
|
|
|
@Autowired
|
|
@Autowired
|
|
private CheckHasAuthRole checkHasAuthRole;
|
|
private CheckHasAuthRole checkHasAuthRole;
|
|
-
|
|
|
|
|
|
+ @Autowired
|
|
|
|
+ CustomerRecMapper customerRecMapper;
|
|
/**
|
|
/**
|
|
* 新增上传企业开票经办人
|
|
* 新增上传企业开票经办人
|
|
*
|
|
*
|
|
@@ -75,13 +84,14 @@ public class CustomerCompanyManagerOperController {
|
|
* 分页查询企业开票经办人
|
|
* 分页查询企业开票经办人
|
|
*
|
|
*
|
|
* @param page 参数集
|
|
* @param page 参数集
|
|
- * @param userVo 查询参数列表
|
|
|
|
|
|
+ * @param user 查询参数列表
|
|
* @return 用户集合
|
|
* @return 用户集合
|
|
*/
|
|
*/
|
|
@PostMapping("/page")
|
|
@PostMapping("/page")
|
|
@ApiOperation(value = "分页查询企业开票经办人", notes = "分页查询企业开票经办人")
|
|
@ApiOperation(value = "分页查询企业开票经办人", notes = "分页查询企业开票经办人")
|
|
- @LoginRequired(role = AuthenticationInterceptor.AUTH_ADMIN)
|
|
|
|
- public RespR getCustomerCompanyManagerDetailPage(Page page, NoCarCompanyManger noCarCompanyManger, UserVo userVo) {
|
|
|
|
|
|
+ @LoginRequired
|
|
|
|
+ public RespR getCustomerCompanyManagerDetailPage(Page page, NoCarCompanyManger noCarCompanyManger, User user) {
|
|
|
|
+ checkHasAuthRole.checkCustomerRole(user, noCarCompanyManger.getCustId());
|
|
return new RespR<>(noCarCompanyMangerOper.getCustomerCompanyManagerDetailPage(page, noCarCompanyManger));
|
|
return new RespR<>(noCarCompanyMangerOper.getCustomerCompanyManagerDetailPage(page, noCarCompanyManger));
|
|
}
|
|
}
|
|
|
|
|
|
@@ -96,4 +106,54 @@ public class CustomerCompanyManagerOperController {
|
|
public RespR getCustomerCompanyManagerDetail(@RequestBody NoCarCompanyManger noCarCompanyManger, User user) {
|
|
public RespR getCustomerCompanyManagerDetail(@RequestBody NoCarCompanyManger noCarCompanyManger, User user) {
|
|
return noCarCompanyMangerOper.noCarCompanyMangerQuery(noCarCompanyManger);
|
|
return noCarCompanyMangerOper.noCarCompanyMangerQuery(noCarCompanyManger);
|
|
}
|
|
}
|
|
|
|
+
|
|
|
|
+ /**
|
|
|
|
+ * @param operatorEditVo
|
|
|
|
+ * @return
|
|
|
|
+ */
|
|
|
|
+ @PostMapping("/updateNoCarCompanyManger")
|
|
|
|
+ @ApiOperation(value = "修改企业开票经办人", notes = "修改企业开票经办人")
|
|
|
|
+ @LoginRequired
|
|
|
|
+ public RespR updateNoCarCompanyManger(@RequestBody OperatorEditVo operatorEditVo) {
|
|
|
|
+ return noCarCompanyMangerOper.operatorEdit(operatorEditVo);
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ /**
|
|
|
|
+ * @param operatorEditConfirmVo
|
|
|
|
+ * @return
|
|
|
|
+ */
|
|
|
|
+ @PostMapping("/updateNoCarCompanyMangerConfirm")
|
|
|
|
+ @ApiOperation(value = "确认修改企业开票经办人", notes = "确认修改企业开票经办人")
|
|
|
|
+ @LoginRequired
|
|
|
|
+ public RespR updateNoCarCompanyMangerConfirm(@RequestBody OperatorEditConfirmVo operatorEditConfirmVo) {
|
|
|
|
+ return noCarCompanyMangerOper.operatorEditConfirm(operatorEditConfirmVo);
|
|
|
|
+ }
|
|
|
|
+ /**
|
|
|
|
+ * @param operatorSendCodeVo
|
|
|
|
+ * @return
|
|
|
|
+ */
|
|
|
|
+ @PostMapping("/sendCode")
|
|
|
|
+ @ApiOperation(value = "发送验证码", notes = "发送验证码")
|
|
|
|
+ @LoginRequired
|
|
|
|
+ public RespR sendCode(@RequestBody OperatorSendCodeVo operatorSendCodeVo) {
|
|
|
|
+ CustomerRec customerRec = new CustomerRec();
|
|
|
|
+ customerRec.setCompanyNum(operatorSendCodeVo.getBuyerCode());
|
|
|
|
+ List<CustomerRec> customerRecList = customerRecMapper.selectByCompanyNum(customerRec);
|
|
|
|
+ operatorSendCodeVo.setBuyerCode(customerRecList.get(0).getCompanyReferencenum());
|
|
|
|
+ return noCarCompanyMangerOper.operatorSendCode(operatorSendCodeVo);
|
|
|
|
+ }
|
|
|
|
+ /**
|
|
|
|
+ * @param operatorSendCodeVo
|
|
|
|
+ * @return
|
|
|
|
+ */
|
|
|
|
+ @PostMapping("/confirmCode")
|
|
|
|
+ @ApiOperation(value = "确认验证码", notes = "确认验证码")
|
|
|
|
+ @LoginRequired
|
|
|
|
+ public RespR confirmCode(@RequestBody OperatorSendCodeVo operatorSendCodeVo) {
|
|
|
|
+ CustomerRec customerRec = new CustomerRec();
|
|
|
|
+ customerRec.setCompanyNum(operatorSendCodeVo.getBuyerCode());
|
|
|
|
+ List<CustomerRec> customerRecList = customerRecMapper.selectByCompanyNum(customerRec);
|
|
|
|
+ operatorSendCodeVo.setBuyerCode(customerRecList.get(0).getCompanyReferencenum());
|
|
|
|
+ return noCarCompanyMangerOper.operatorValidCode(operatorSendCodeVo);
|
|
|
|
+ }
|
|
}
|
|
}
|