|
@@ -1,5 +1,4 @@
|
|
package com.jkcredit.invoice.controller.business;
|
|
package com.jkcredit.invoice.controller.business;
|
|
-import com.jkcredit.invoice.service.nocar.WayBillFileService;
|
|
|
|
import cn.afterturn.easypoi.excel.ExcelImportUtil;
|
|
import cn.afterturn.easypoi.excel.ExcelImportUtil;
|
|
import cn.afterturn.easypoi.excel.entity.ImportParams;
|
|
import cn.afterturn.easypoi.excel.entity.ImportParams;
|
|
import com.alibaba.fastjson.JSON;
|
|
import com.alibaba.fastjson.JSON;
|
|
@@ -13,6 +12,7 @@ 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.user.User;
|
|
import com.jkcredit.invoice.model.entity.waybill.NoCarWayBill;
|
|
import com.jkcredit.invoice.model.entity.waybill.NoCarWayBill;
|
|
|
|
+import com.jkcredit.invoice.model.entity.waybill.NoCarWayBillFileInfo;
|
|
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;
|
|
@@ -22,6 +22,7 @@ import com.jkcredit.invoice.service.nocar.NoCarBillWayImportService;
|
|
import com.jkcredit.invoice.service.nocar.NoCarBillWayService;
|
|
import com.jkcredit.invoice.service.nocar.NoCarBillWayService;
|
|
import com.jkcredit.invoice.service.nocar.NoCarRecService;
|
|
import com.jkcredit.invoice.service.nocar.NoCarRecService;
|
|
import com.jkcredit.invoice.service.nocar.NocarInvoiceService;
|
|
import com.jkcredit.invoice.service.nocar.NocarInvoiceService;
|
|
|
|
+import com.jkcredit.invoice.service.nocar.WayBillFileService;
|
|
import com.jkcredit.invoice.util.Base64Utils;
|
|
import com.jkcredit.invoice.util.Base64Utils;
|
|
import com.jkcredit.invoice.util.DateUtil;
|
|
import com.jkcredit.invoice.util.DateUtil;
|
|
import com.jkcredit.invoice.util.RespR;
|
|
import com.jkcredit.invoice.util.RespR;
|
|
@@ -35,20 +36,42 @@ import org.apache.poi.util.IOUtils;
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
import org.springframework.beans.factory.annotation.Value;
|
|
import org.springframework.beans.factory.annotation.Value;
|
|
import org.springframework.util.StringUtils;
|
|
import org.springframework.util.StringUtils;
|
|
-import org.springframework.web.bind.annotation.*;
|
|
|
|
|
|
+import org.springframework.web.bind.annotation.GetMapping;
|
|
|
|
+import org.springframework.web.bind.annotation.PostMapping;
|
|
|
|
+import org.springframework.web.bind.annotation.RequestMapping;
|
|
|
|
+import org.springframework.web.bind.annotation.RequestParam;
|
|
|
|
+import org.springframework.web.bind.annotation.RestController;
|
|
import org.springframework.web.multipart.MultipartFile;
|
|
import org.springframework.web.multipart.MultipartFile;
|
|
|
|
|
|
import javax.servlet.http.HttpServletResponse;
|
|
import javax.servlet.http.HttpServletResponse;
|
|
import javax.validation.constraints.NotNull;
|
|
import javax.validation.constraints.NotNull;
|
|
-import java.io.*;
|
|
|
|
|
|
+import java.io.ByteArrayInputStream;
|
|
|
|
+import java.io.File;
|
|
|
|
+import java.io.FileInputStream;
|
|
|
|
+import java.io.FileOutputStream;
|
|
|
|
+import java.io.IOException;
|
|
|
|
+import java.io.InputStream;
|
|
|
|
+import java.io.OutputStream;
|
|
import java.net.URLEncoder;
|
|
import java.net.URLEncoder;
|
|
import java.text.DateFormat;
|
|
import java.text.DateFormat;
|
|
import java.text.SimpleDateFormat;
|
|
import java.text.SimpleDateFormat;
|
|
import java.util.ArrayList;
|
|
import java.util.ArrayList;
|
|
import java.util.Arrays;
|
|
import java.util.Arrays;
|
|
import java.util.List;
|
|
import java.util.List;
|
|
-import com.jkcredit.invoice.model.entity.waybill.NoCarWayBillFileInfo;
|
|
|
|
-import static com.jkcredit.invoice.common.CommonConst.*;
|
|
|
|
|
|
+
|
|
|
|
+import static com.jkcredit.invoice.common.CommonConst.COMMA;
|
|
|
|
+import static com.jkcredit.invoice.common.CommonConst.COMMAS;
|
|
|
|
+import static com.jkcredit.invoice.common.CommonConst.EIGHT;
|
|
|
|
+import static com.jkcredit.invoice.common.CommonConst.FIVE;
|
|
|
|
+import static com.jkcredit.invoice.common.CommonConst.FOR;
|
|
|
|
+import static com.jkcredit.invoice.common.CommonConst.NINE;
|
|
|
|
+import static com.jkcredit.invoice.common.CommonConst.NULL;
|
|
|
|
+import static com.jkcredit.invoice.common.CommonConst.ONE;
|
|
|
|
+import static com.jkcredit.invoice.common.CommonConst.SEVEN;
|
|
|
|
+import static com.jkcredit.invoice.common.CommonConst.SIX;
|
|
|
|
+import static com.jkcredit.invoice.common.CommonConst.TEN;
|
|
|
|
+import static com.jkcredit.invoice.common.CommonConst.THREE;
|
|
|
|
+import static com.jkcredit.invoice.common.CommonConst.TWO;
|
|
|
|
|
|
@Api(tags = "无车操作")
|
|
@Api(tags = "无车操作")
|
|
@RestController
|
|
@RestController
|
|
@@ -291,6 +314,30 @@ public class NoCarController {
|
|
|
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+
|
|
|
|
+ /**
|
|
|
|
+ * 注销企业进行批量更新运单为开票完成
|
|
|
|
+ *
|
|
|
|
+ * @return 用户集合
|
|
|
|
+ */
|
|
|
|
+ @PostMapping("/updateStatusByCompany")
|
|
|
|
+ @ApiOperation(value = "注销企业进行批量更新运单为开票完成", notes = "注销企业进行批量更新运单为开票完成")
|
|
|
|
+ @LoginRequired(role = AuthenticationInterceptor.AUTH_ADMIN)
|
|
|
|
+ public RespR updateStatusByCompany(@NotNull(message = "注销企业发票更新状态失败,不能为空") String noCarWayBillStr) {
|
|
|
|
+ List<NoCarWayBill> noCarWayBills = JSON.parseArray(noCarWayBillStr, NoCarWayBill.class);
|
|
|
|
+ if (noCarWayBills != null && noCarWayBills.size() > 0) {
|
|
|
|
+ noCarWayBills.stream().forEach(noCarWayBill -> {
|
|
|
|
+ try {
|
|
|
|
+ noCarWayBill.setBillwayStatus(3);//开票完成
|
|
|
|
+ noCarService.updateByBillNumEnd(noCarWayBill);
|
|
|
|
+ } catch (Exception e) {
|
|
|
|
+ log.info("注销企业进行批量更新运单为开票完成失败" + e.getMessage());
|
|
|
|
+ }
|
|
|
|
+ });
|
|
|
|
+ }
|
|
|
|
+ return new RespR("更新成功");
|
|
|
|
+ }
|
|
|
|
+
|
|
/**
|
|
/**
|
|
* 分页查询异常运单信息
|
|
* 分页查询异常运单信息
|
|
*
|
|
*
|