|
@@ -10,9 +10,7 @@ import com.jkcredit.invoice.mapper.customer.CustomerRecMapper;
|
|
|
import com.jkcredit.invoice.model.entity.Calculate.SelfCarCalculateInfor;
|
|
|
import com.jkcredit.invoice.model.entity.customer.CustomerCarRec;
|
|
|
import com.jkcredit.invoice.model.entity.customer.CustomerRec;
|
|
|
-import com.jkcredit.invoice.model.entity.invoice.BillInvoice;
|
|
|
import com.jkcredit.invoice.model.entity.invoice.SelfCarInvoice;
|
|
|
-import com.jkcredit.invoice.model.entity.waybill.NoCarWayBill;
|
|
|
import com.jkcredit.invoice.model.entity.waybill.SelfCarTrade;
|
|
|
import com.jkcredit.invoice.service.CalculateInfor.SelfCarCalculateInfoService;
|
|
|
import com.jkcredit.invoice.service.customer.CustomerService;
|
|
@@ -36,6 +34,15 @@ import java.util.*;
|
|
|
@Api(tags = "自有车操作")
|
|
|
@RestController
|
|
|
@RequestMapping(value = {"/selfCar"})
|
|
|
+
|
|
|
+* @Description 自有车操作
|
|
|
+* @Author mashengyi
|
|
|
+* @Date 2022/2/8 18:18
|
|
|
+* @Param
|
|
|
+* @Return
|
|
|
+* @Exception
|
|
|
+*
|
|
|
+*/
|
|
|
public class SelfCarController {
|
|
|
@Autowired
|
|
|
SelfCarService selfCarService;
|
|
@@ -248,11 +255,6 @@ public class SelfCarController {
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
-
|
|
|
-
|
|
|
- if(customerCarRecs == null || customerCarRecs.size()<=0){
|
|
|
- return new RespR(false,"请输入有绑定ETC卡号的车牌");
|
|
|
- }*/
|
|
|
StringBuffer stringBuffer = new StringBuffer();
|
|
|
for(Map.Entry<String,InvoiceApplVo> elm:map.entrySet()){
|
|
|
InvoiceApplVo invoiceApplVo = elm.getValue();
|
|
@@ -261,37 +263,6 @@ public class SelfCarController {
|
|
|
stringBuffer.append(invoiceApplVo.getCardId()+"开票申请失败原因:"+respR.getMsg()+"#");
|
|
|
}
|
|
|
}
|
|
|
-
|
|
|
- TradeRequestVo tradeRequestVo = new TradeRequestVo();
|
|
|
- tradeRequestVo.setCompanyName(tradeRequestCarNumVo.getCompanyName());
|
|
|
- tradeRequestVo.setCustomerName(tradeRequestCarNumVo.getCustomerName());
|
|
|
- DateFormat format = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
|
|
|
- tradeRequestVo.setStartTime(format.format(new Date(Long.parseLong(tradeRequestCarNumVo.getStartTime()))));
|
|
|
- tradeRequestVo.setEndTime(format.format(new Date(Long.parseLong(tradeRequestCarNumVo.getEndTime()))));
|
|
|
- tradeRequestVo.setTradeStatus(1);
|
|
|
- tradeRequestVo.setEtcId(customerCarRec.getEtcNum());
|
|
|
- RespR<List<CardTradeModel>> respRbefore = selfCarServicel.getTradeList(tradeRequestVo);
|
|
|
- if(respRbefore.getCode() == 0){
|
|
|
- if(respRbefore.getData()!=null && respRbefore.getData().size()>0){
|
|
|
-
|
|
|
- InvoiceApplVo invoiceApplVo = new InvoiceApplVo();
|
|
|
- invoiceApplVo.setCompanyName(tradeRequestCarNumVo.getCompanyName());
|
|
|
- invoiceApplVo.setCustomerName(tradeRequestCarNumVo.getCustomerName());
|
|
|
- invoiceApplVo.setCardId(customerCarRec.getEtcNum());
|
|
|
- invoiceApplVo.setTradeIds(new ArrayList<String>());
|
|
|
- respRbefore.getData().forEach(cardTradeModel -> {
|
|
|
- invoiceApplVo.getTradeIds().add(cardTradeModel.getTradeId());
|
|
|
- });
|
|
|
- RespR respR = selfCarServicel.applInvoice(invoiceApplVo);
|
|
|
- if(respR.getCode() == 1){
|
|
|
- stringBuffer.append(customerCarRec.getEtcNum()+"开票申请失败原因:"+respRbefore.getMsg()+"#");
|
|
|
- }
|
|
|
-
|
|
|
- }
|
|
|
- }else {
|
|
|
- stringBuffer.append(customerCarRec.getEtcNum()+"开票申请失败原因:"+respRbefore.getMsg()+"#");
|
|
|
- }
|
|
|
- });*/
|
|
|
if(StringUtils.isEmpty(stringBuffer.toString())){
|
|
|
return new RespR(true);
|
|
|
}else{
|
|
@@ -364,7 +335,6 @@ public class SelfCarController {
|
|
|
ImportParams params = new ImportParams();
|
|
|
params.setTitleRows(1);
|
|
|
params.setHeadRows(1);
|
|
|
-
|
|
|
List<SelfCarTrade> list = ExcelImportUtil.importExcel(file.getInputStream(), SelfCarTrade.class,params) ;
|
|
|
RespR respR = selfCarTradeService.batchImportSelfcarTrades(list);
|
|
|
return respR;
|
|
@@ -390,7 +360,6 @@ public class SelfCarController {
|
|
|
ImportParams params = new ImportParams();
|
|
|
params.setTitleRows(1);
|
|
|
params.setHeadRows(1);
|
|
|
-
|
|
|
List<SelfCarInvoice> list = ExcelImportUtil.importExcel(file.getInputStream(), SelfCarInvoice.class,params) ;
|
|
|
RespR respR = selfCarInvoiceService.findImportSelfcarInvoices(list);
|
|
|
return respR;
|