|
@@ -5,15 +5,18 @@ import cn.afterturn.easypoi.excel.entity.ImportParams;
|
|
import com.alibaba.fastjson.JSON;
|
|
import com.alibaba.fastjson.JSON;
|
|
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.mapper.waybill.NoCarWaybillMapper;
|
|
import com.jkcredit.invoice.mapper.waybill.NoCarWaybillMapper;
|
|
import com.jkcredit.invoice.model.entity.calculate.NoCarCalculateInfor;
|
|
import com.jkcredit.invoice.model.entity.calculate.NoCarCalculateInfor;
|
|
import com.jkcredit.invoice.model.entity.customer.CustomerCarRec;
|
|
import com.jkcredit.invoice.model.entity.customer.CustomerCarRec;
|
|
import com.jkcredit.invoice.model.entity.customer.CustomerOper;
|
|
import com.jkcredit.invoice.model.entity.customer.CustomerOper;
|
|
import com.jkcredit.invoice.model.entity.invoice.BillInvoice;
|
|
import com.jkcredit.invoice.model.entity.invoice.BillInvoice;
|
|
|
|
+import com.jkcredit.invoice.model.entity.user.User;
|
|
import com.jkcredit.invoice.model.entity.waybill.NoCarWayBill;
|
|
import com.jkcredit.invoice.model.entity.waybill.NoCarWayBill;
|
|
import com.jkcredit.invoice.model.vo.CodeAndNumVo;
|
|
import com.jkcredit.invoice.model.vo.CodeAndNumVo;
|
|
import com.jkcredit.invoice.service.calculateinfor.NoCarCalculateInfoService;
|
|
import com.jkcredit.invoice.service.calculateinfor.NoCarCalculateInfoService;
|
|
import com.jkcredit.invoice.service.customer.CustomerOperService;
|
|
import com.jkcredit.invoice.service.customer.CustomerOperService;
|
|
|
|
+import com.jkcredit.invoice.service.lowerservice.CheckHasAuthRole;
|
|
import com.jkcredit.invoice.service.lowerservice.NoCarService;
|
|
import com.jkcredit.invoice.service.lowerservice.NoCarService;
|
|
import com.jkcredit.invoice.service.nocar.NoCarBillWayImportService;
|
|
import com.jkcredit.invoice.service.nocar.NoCarBillWayImportService;
|
|
import com.jkcredit.invoice.service.nocar.NoCarBillWayService;
|
|
import com.jkcredit.invoice.service.nocar.NoCarBillWayService;
|
|
@@ -76,6 +79,8 @@ public class NoCarController {
|
|
|
|
|
|
@Autowired
|
|
@Autowired
|
|
CustomerOperService customerOperService;
|
|
CustomerOperService customerOperService;
|
|
|
|
+ @Autowired
|
|
|
|
+ private CheckHasAuthRole checkHasAuthRole;
|
|
/**
|
|
/**
|
|
* 分页查询无车备案信息
|
|
* 分页查询无车备案信息
|
|
*
|
|
*
|
|
@@ -85,8 +90,9 @@ public class NoCarController {
|
|
@PostMapping("/findCarRec")
|
|
@PostMapping("/findCarRec")
|
|
@ApiOperation(value="分页查询无车/自有车备案信息", notes="分页查询无车/自有车备案信息")
|
|
@ApiOperation(value="分页查询无车/自有车备案信息", notes="分页查询无车/自有车备案信息")
|
|
@LoginRequired
|
|
@LoginRequired
|
|
- public RespR getCustomersByPage(Page page, CustomerCarRec customerCarRec) {
|
|
|
|
|
|
+ public RespR getCustomersByPage(Page page, CustomerCarRec customerCarRec,User user) {
|
|
try {
|
|
try {
|
|
|
|
+ checkHasAuthRole.checkCustomerRole(user,customerCarRec.getCompanyName());
|
|
if(!StringUtils.isEmpty(customerCarRec.getStartTime()) && !"null".equals(customerCarRec.getStartTime())){
|
|
if(!StringUtils.isEmpty(customerCarRec.getStartTime()) && !"null".equals(customerCarRec.getStartTime())){
|
|
String [] res = customerCarRec.getStartTime().split(",");
|
|
String [] res = customerCarRec.getStartTime().split(",");
|
|
customerCarRec.setStartTime(res[0]);
|
|
customerCarRec.setStartTime(res[0]);
|
|
@@ -142,9 +148,9 @@ public class NoCarController {
|
|
@PostMapping("/findBillWay")
|
|
@PostMapping("/findBillWay")
|
|
@ApiOperation(value="分页查询无车运单信息", notes="分页查询无车运单信息")
|
|
@ApiOperation(value="分页查询无车运单信息", notes="分页查询无车运单信息")
|
|
@LoginRequired
|
|
@LoginRequired
|
|
- public RespR findBillWay(Page page, NoCarWayBill noCarWayBill) {
|
|
|
|
|
|
+ public RespR findBillWay(Page page, NoCarWayBill noCarWayBill,User user) {
|
|
try {
|
|
try {
|
|
-
|
|
|
|
|
|
+ checkHasAuthRole.checkCustomerRole(user,noCarWayBill.getCustomerName());
|
|
setTimeDue(noCarWayBill);
|
|
setTimeDue(noCarWayBill);
|
|
setBillNums(noCarWayBill);
|
|
setBillNums(noCarWayBill);
|
|
RespR respR = new RespR(noCarBillWayService.findByPageAndWayBill(page, noCarWayBill));
|
|
RespR respR = new RespR(noCarBillWayService.findByPageAndWayBill(page, noCarWayBill));
|
|
@@ -171,8 +177,9 @@ public class NoCarController {
|
|
@PostMapping("/findBillWayCust")
|
|
@PostMapping("/findBillWayCust")
|
|
@ApiOperation(value="分页查询无车运单信息", notes="分页查询无车运单信息")
|
|
@ApiOperation(value="分页查询无车运单信息", notes="分页查询无车运单信息")
|
|
@LoginRequired
|
|
@LoginRequired
|
|
- public RespR findBillWayCust(Page page, NoCarWayBill noCarWayBill) {
|
|
|
|
|
|
+ public RespR findBillWayCust(Page page, NoCarWayBill noCarWayBill,User user) {
|
|
try {
|
|
try {
|
|
|
|
+ checkHasAuthRole.checkCustomerRole(user,noCarWayBill.getCustomerName());
|
|
setTimeDue2(noCarWayBill);
|
|
setTimeDue2(noCarWayBill);
|
|
setBillNums(noCarWayBill);
|
|
setBillNums(noCarWayBill);
|
|
noCarWayBill.setBatchNum("1");
|
|
noCarWayBill.setBatchNum("1");
|
|
@@ -192,8 +199,9 @@ public class NoCarController {
|
|
@PostMapping("/findImportBillWay")
|
|
@PostMapping("/findImportBillWay")
|
|
@ApiOperation(value="分页查询无车运单信息", notes="分页查询无车运单信息")
|
|
@ApiOperation(value="分页查询无车运单信息", notes="分页查询无车运单信息")
|
|
@LoginRequired
|
|
@LoginRequired
|
|
- public RespR findImportBillWay(Page page, NoCarWayBill noCarWayBill) {
|
|
|
|
|
|
+ public RespR findImportBillWay(Page page, NoCarWayBill noCarWayBill,User user) {
|
|
try {
|
|
try {
|
|
|
|
+ checkHasAuthRole.checkCustomerRole(user,noCarWayBill.getCustomerName());
|
|
setTimeDue(noCarWayBill);
|
|
setTimeDue(noCarWayBill);
|
|
RespR respR = new RespR(noCarBillWayImportService.findByPageAndWayBill(page, noCarWayBill));
|
|
RespR respR = new RespR(noCarBillWayImportService.findByPageAndWayBill(page, noCarWayBill));
|
|
return respR;
|
|
return respR;
|
|
@@ -209,7 +217,7 @@ public class NoCarController {
|
|
*/
|
|
*/
|
|
@PostMapping("/updateStatus")
|
|
@PostMapping("/updateStatus")
|
|
@ApiOperation(value="重新获取发票并更新状态", notes="重新获取发票并更新状态")
|
|
@ApiOperation(value="重新获取发票并更新状态", notes="重新获取发票并更新状态")
|
|
- @LoginRequired
|
|
|
|
|
|
+ @LoginRequired(role = AuthenticationInterceptor.AUTH_ADMIN)
|
|
public RespR updateStatus(String noCarWayBillStr) {
|
|
public RespR updateStatus(String noCarWayBillStr) {
|
|
List<NoCarWayBill> noCarWayBills = JSON.parseArray(noCarWayBillStr,NoCarWayBill.class);
|
|
List<NoCarWayBill> noCarWayBills = JSON.parseArray(noCarWayBillStr,NoCarWayBill.class);
|
|
|
|
|
|
@@ -234,7 +242,7 @@ public class NoCarController {
|
|
*/
|
|
*/
|
|
@PostMapping("/findBillWayException")
|
|
@PostMapping("/findBillWayException")
|
|
@ApiOperation(value="分页查询异常运单信息", notes="分页查询异常运单信息")
|
|
@ApiOperation(value="分页查询异常运单信息", notes="分页查询异常运单信息")
|
|
- @LoginRequired
|
|
|
|
|
|
+ @LoginRequired(role = AuthenticationInterceptor.AUTH_ADMIN)
|
|
public RespR findBillWayException(Page page, NoCarWayBill noCarWayBill) {
|
|
public RespR findBillWayException(Page page, NoCarWayBill noCarWayBill) {
|
|
try {
|
|
try {
|
|
setTimeDue(noCarWayBill);
|
|
setTimeDue(noCarWayBill);
|
|
@@ -254,8 +262,9 @@ public class NoCarController {
|
|
@PostMapping("/findNocarInvoices")
|
|
@PostMapping("/findNocarInvoices")
|
|
@ApiOperation(value="分页查询无车发票信息", notes="分页查询无车发票信息")
|
|
@ApiOperation(value="分页查询无车发票信息", notes="分页查询无车发票信息")
|
|
@LoginRequired
|
|
@LoginRequired
|
|
- public RespR findNocarInvoices(Page page, BillInvoice billInvoice) {
|
|
|
|
|
|
+ public RespR findNocarInvoices(Page page, BillInvoice billInvoice,User user) {
|
|
try {
|
|
try {
|
|
|
|
+ checkHasAuthRole.checkCustomerRole(user,billInvoice.getCustomerName());
|
|
setParams(billInvoice);
|
|
setParams(billInvoice);
|
|
RespR respR = new RespR(nocarInvoiceService.findByPageAndInvoice(page, billInvoice));
|
|
RespR respR = new RespR(nocarInvoiceService.findByPageAndInvoice(page, billInvoice));
|
|
return respR;
|
|
return respR;
|
|
@@ -309,7 +318,7 @@ public class NoCarController {
|
|
*/
|
|
*/
|
|
@PostMapping("/batchImportNocarInvoices")
|
|
@PostMapping("/batchImportNocarInvoices")
|
|
@ApiOperation(value="批量查询无车发票信息", notes="批量查询无车发票信息")
|
|
@ApiOperation(value="批量查询无车发票信息", notes="批量查询无车发票信息")
|
|
- @LoginRequired
|
|
|
|
|
|
+ @LoginRequired(role = AuthenticationInterceptor.AUTH_ADMIN)
|
|
public RespR batchImportNocarInvoices(@RequestParam("file") MultipartFile file) {
|
|
public RespR batchImportNocarInvoices(@RequestParam("file") MultipartFile file) {
|
|
try {
|
|
try {
|
|
ImportParams params = new ImportParams();
|
|
ImportParams params = new ImportParams();
|
|
@@ -333,7 +342,7 @@ public class NoCarController {
|
|
*/
|
|
*/
|
|
@PostMapping("/batchImportNocarBillWay")
|
|
@PostMapping("/batchImportNocarBillWay")
|
|
@ApiOperation(value="批量查询无车运单信息", notes="批量查询无车运单信息")
|
|
@ApiOperation(value="批量查询无车运单信息", notes="批量查询无车运单信息")
|
|
- @LoginRequired
|
|
|
|
|
|
+ @LoginRequired(role = AuthenticationInterceptor.AUTH_ADMIN)
|
|
public RespR batchImportNocarBillWay(@RequestParam("file") MultipartFile file) {
|
|
public RespR batchImportNocarBillWay(@RequestParam("file") MultipartFile file) {
|
|
try {
|
|
try {
|
|
ImportParams params = new ImportParams();
|
|
ImportParams params = new ImportParams();
|
|
@@ -360,7 +369,8 @@ public class NoCarController {
|
|
@PostMapping("/findNocarInvoicesStatic")
|
|
@PostMapping("/findNocarInvoicesStatic")
|
|
@ApiOperation(value="分页查询无车发票统计信息", notes="分页查询无车发票统计信息")
|
|
@ApiOperation(value="分页查询无车发票统计信息", notes="分页查询无车发票统计信息")
|
|
@LoginRequired
|
|
@LoginRequired
|
|
- public RespR findNocarInvoicesStatic(BillInvoice billInvoice) {
|
|
|
|
|
|
+ public RespR findNocarInvoicesStatic(BillInvoice billInvoice,User user) {
|
|
|
|
+ checkHasAuthRole.checkCustomerRole(user,billInvoice.getCustomerName());
|
|
try {
|
|
try {
|
|
if(!StringUtils.isEmpty(billInvoice.getInvoiceMakeTime()) && !"null".equals(billInvoice.getInvoiceMakeTime())){
|
|
if(!StringUtils.isEmpty(billInvoice.getInvoiceMakeTime()) && !"null".equals(billInvoice.getInvoiceMakeTime())){
|
|
String [] res =billInvoice.getInvoiceMakeTime().split(",");
|
|
String [] res =billInvoice.getInvoiceMakeTime().split(",");
|
|
@@ -389,8 +399,9 @@ public class NoCarController {
|
|
@PostMapping("/batchImprotBillWay")
|
|
@PostMapping("/batchImprotBillWay")
|
|
@ApiOperation(value="批量运单导入", notes="批量运单导入")
|
|
@ApiOperation(value="批量运单导入", notes="批量运单导入")
|
|
@LoginRequired
|
|
@LoginRequired
|
|
- public RespR batchImprotBillWay(@RequestParam("file") MultipartFile file,String customerName) {
|
|
|
|
|
|
+ public RespR batchImprotBillWay(@RequestParam("file") MultipartFile file,String customerName,User user) {
|
|
try {
|
|
try {
|
|
|
|
+ checkHasAuthRole.checkCustomerRole(user,customerName);
|
|
ImportParams params = new ImportParams();
|
|
ImportParams params = new ImportParams();
|
|
params.setTitleRows(1);
|
|
params.setTitleRows(1);
|
|
params.setHeadRows(1);
|
|
params.setHeadRows(1);
|
|
@@ -414,8 +425,9 @@ public class NoCarController {
|
|
@PostMapping("/batchImprotHistoryBillWay")
|
|
@PostMapping("/batchImprotHistoryBillWay")
|
|
@ApiOperation(value="批量历史运单导入", notes="批量历史运单导入")
|
|
@ApiOperation(value="批量历史运单导入", notes="批量历史运单导入")
|
|
@LoginRequired
|
|
@LoginRequired
|
|
- public RespR batchImprotHistoryBillWay(@RequestParam("file") MultipartFile file,String customerName) {
|
|
|
|
|
|
+ public RespR batchImprotHistoryBillWay(@RequestParam("file") MultipartFile file,String customerName,User user) {
|
|
try {
|
|
try {
|
|
|
|
+ checkHasAuthRole.checkCustomerRole(user,customerName);
|
|
ImportParams params = new ImportParams();
|
|
ImportParams params = new ImportParams();
|
|
params.setTitleRows(1);
|
|
params.setTitleRows(1);
|
|
params.setHeadRows(1);
|
|
params.setHeadRows(1);
|
|
@@ -439,7 +451,8 @@ public class NoCarController {
|
|
@PostMapping("/batchImprotEndBillWay")
|
|
@PostMapping("/batchImprotEndBillWay")
|
|
@ApiOperation(value="批量运单结束", notes="批量运单结束")
|
|
@ApiOperation(value="批量运单结束", notes="批量运单结束")
|
|
@LoginRequired
|
|
@LoginRequired
|
|
- public RespR batchImprotEndBillWay(@RequestParam("file") MultipartFile file,String customerName) {
|
|
|
|
|
|
+ public RespR batchImprotEndBillWay(@RequestParam("file") MultipartFile file,String customerName,User user) {
|
|
|
|
+ checkHasAuthRole.checkCustomerRole(user,customerName);
|
|
try {
|
|
try {
|
|
ImportParams params = new ImportParams();
|
|
ImportParams params = new ImportParams();
|
|
params.setTitleRows(1);
|
|
params.setTitleRows(1);
|
|
@@ -593,9 +606,9 @@ public class NoCarController {
|
|
@PostMapping("/findBatchList")
|
|
@PostMapping("/findBatchList")
|
|
@ApiOperation(value="运单批次号查询", notes="运单批次号查询")
|
|
@ApiOperation(value="运单批次号查询", notes="运单批次号查询")
|
|
@LoginRequired
|
|
@LoginRequired
|
|
- public RespR findBatchList(Page page, CustomerOper customerOper) {
|
|
|
|
|
|
+ public RespR findBatchList(Page page, CustomerOper customerOper,User user) {
|
|
try {
|
|
try {
|
|
-
|
|
|
|
|
|
+ checkHasAuthRole.checkCustomerRole(user,customerOper.getCustomerName());
|
|
RespR respR = new RespR(customerOperService.findAllCustomerOper(page, customerOper));
|
|
RespR respR = new RespR(customerOperService.findAllCustomerOper(page, customerOper));
|
|
return respR;
|
|
return respR;
|
|
}catch (Exception e){
|
|
}catch (Exception e){
|
|
@@ -613,8 +626,9 @@ public class NoCarController {
|
|
@PostMapping("/findNocarCalculateInfo")
|
|
@PostMapping("/findNocarCalculateInfo")
|
|
@ApiOperation(value="分页查询无车计费信息", notes="分页查询无车计费信息")
|
|
@ApiOperation(value="分页查询无车计费信息", notes="分页查询无车计费信息")
|
|
@LoginRequired
|
|
@LoginRequired
|
|
- public RespR findNocarCalculateInfo(Page page, NoCarCalculateInfor carCalculateInfor) {
|
|
|
|
|
|
+ public RespR findNocarCalculateInfo(Page page, NoCarCalculateInfor carCalculateInfor,User user) {
|
|
try {
|
|
try {
|
|
|
|
+ checkHasAuthRole.checkCustomerRole(user,carCalculateInfor.getCustomId());
|
|
setTimeDue1(carCalculateInfor);
|
|
setTimeDue1(carCalculateInfor);
|
|
RespR respR = new RespR(noCarCalculateInfoService.findByPageAndCalculateInfor(page, carCalculateInfor));
|
|
RespR respR = new RespR(noCarCalculateInfoService.findByPageAndCalculateInfor(page, carCalculateInfor));
|
|
return respR;
|
|
return respR;
|
|
@@ -633,8 +647,9 @@ public class NoCarController {
|
|
@PostMapping("/findNocarCalculateInfoStatis")
|
|
@PostMapping("/findNocarCalculateInfoStatis")
|
|
@ApiOperation(value="分页查询无车计费统计信息", notes="分页查询无车计费统计信息")
|
|
@ApiOperation(value="分页查询无车计费统计信息", notes="分页查询无车计费统计信息")
|
|
@LoginRequired
|
|
@LoginRequired
|
|
- public RespR findNocarCalculateInfoStatis(NoCarCalculateInfor carCalculateInfor) {
|
|
|
|
|
|
+ public RespR findNocarCalculateInfoStatis(NoCarCalculateInfor carCalculateInfor,User user) {
|
|
try {
|
|
try {
|
|
|
|
+ checkHasAuthRole.checkCustomerRole(user,carCalculateInfor.getCustomId());
|
|
setTimeDue1(carCalculateInfor);
|
|
setTimeDue1(carCalculateInfor);
|
|
RespR respR = new RespR(noCarCalculateInfoService.findNocarCalculateInfoStatis(carCalculateInfor));
|
|
RespR respR = new RespR(noCarCalculateInfoService.findNocarCalculateInfoStatis(carCalculateInfor));
|
|
return respR;
|
|
return respR;
|