|
@@ -16,7 +16,7 @@ import com.jkcredit.invoice.model.entity.manager.Param;
|
|
|
import com.jkcredit.invoice.model.entity.waybill.NoCarWayBill;
|
|
|
import com.jkcredit.invoice.service.customer.CustomerRecService;
|
|
|
import com.jkcredit.invoice.service.lowerservice.NoCarService;
|
|
|
-import com.jkcredit.invoice.service.lowerservice.vo.HCInvoiceQueryVo;
|
|
|
+import com.jkcredit.invoice.service.lowerservice.vo.HcInvoiceQueryVo;
|
|
|
import com.jkcredit.invoice.service.manager.ParamService;
|
|
|
import com.jkcredit.invoice.service.nocar.NoCarBillWayImportService;
|
|
|
import com.jkcredit.invoice.util.DateUtil;
|
|
@@ -81,7 +81,8 @@ public class NoCarInterServiceImpl implements NoCarInterService {
|
|
|
|
|
|
List<String> reduce1 = list1.stream().filter(item -> !list2.contains(item)).collect(toList());
|
|
|
System.out.println("---差集 reduce1 (list1 - list2)---");
|
|
|
- reduce1.parallelStream().forEach(System.out::println);
|
|
|
+
|
|
|
+ reduce1.parallelStream().forEach(System.out::println);
|
|
|
List<String> listAll = list1.parallelStream().collect(toList());
|
|
|
List<String> listAll2 = list2.parallelStream().collect(toList());
|
|
|
listAll.addAll(listAll2);
|
|
@@ -123,9 +124,12 @@ public class NoCarInterServiceImpl implements NoCarInterService {
|
|
|
try {
|
|
|
log.info("[-NoCarInterServiceImpl.customerCarRec-] request appKey=" + appKey + " ,api=" + api + " ,data=" + data + " ,requestid=" + requestid);
|
|
|
JSONObject jsonObject = JSONObject.parseObject(data);
|
|
|
- String companyName = jsonObject.getString("companyName");
|
|
|
- String plateNumber = jsonObject.getString("plateNumber");
|
|
|
- String plateColor = jsonObject.getString("plateColor");
|
|
|
+
|
|
|
+ String companyName = jsonObject.getString("companyName");
|
|
|
+
|
|
|
+ String plateNumber = jsonObject.getString("plateNumber");
|
|
|
+
|
|
|
+ String plateColor = jsonObject.getString("plateColor");
|
|
|
if (StringUtils.isEmpty(data) || null == jsonObject || StringUtils.isEmpty(plateNumber)
|
|
|
|| StringUtils.isEmpty(plateColor)
|
|
|
|
|
@@ -150,12 +154,14 @@ public class NoCarInterServiceImpl implements NoCarInterService {
|
|
|
}
|
|
|
customerCarRec.setCompanyName(customerRec1.getCompanyName());
|
|
|
customerCarRec.setCustomerName(customerRec1.getCustomerName());
|
|
|
- customerCarRec.setBusinessType("2");
|
|
|
+
|
|
|
+ customerCarRec.setBusinessType("2");
|
|
|
customerCarRec.setCarColor(plateColor);
|
|
|
customerCarRec.setCarNum(plateNumber);
|
|
|
customerCarRec.setInterType(0);
|
|
|
if (SELF_CAR.equals(customerCarRec.getCarColor())) {
|
|
|
- customerCarRec.setServiceOperation(1);
|
|
|
+
|
|
|
+ customerCarRec.setServiceOperation(1);
|
|
|
}
|
|
|
|
|
|
customerCarRecList.add(customerCarRec);
|
|
@@ -206,9 +212,12 @@ public class NoCarInterServiceImpl implements NoCarInterService {
|
|
|
try {
|
|
|
log.info("[-NoCarInterServiceImpl.customeRecUpperQuery-] request appKey=" + appKey + " ,api=" + api + " ,data=" + data + " ,requestid=" + requestid);
|
|
|
JSONObject jsonObject = JSONObject.parseObject(data);
|
|
|
- String waybillSource = jsonObject.getString("waybillSource");
|
|
|
- String plateNumber = jsonObject.getString("plateNumber");
|
|
|
- String plateColor = jsonObject.getString("plateColor");
|
|
|
+
|
|
|
+ String waybillSource = jsonObject.getString("waybillSource");
|
|
|
+
|
|
|
+ String plateNumber = jsonObject.getString("plateNumber");
|
|
|
+
|
|
|
+ String plateColor = jsonObject.getString("plateColor");
|
|
|
if (StringUtils.isEmpty(data) || null == jsonObject || StringUtils.isEmpty(plateNumber)
|
|
|
|| StringUtils.isEmpty(plateColor)
|
|
|
|
|
@@ -220,12 +229,15 @@ public class NoCarInterServiceImpl implements NoCarInterService {
|
|
|
|
|
|
CustomerCarRec customerCarRec = new CustomerCarRec();
|
|
|
Param param = paramService.getParamsByParamName("REQUEST_COMPANY_NUM");
|
|
|
- customerCarRec.setCompanyNum(param.getParamValue());
|
|
|
+
|
|
|
+ customerCarRec.setCompanyNum(param.getParamValue());
|
|
|
customerCarRec.setCarColor(plateColor);
|
|
|
customerCarRec.setCarNum(plateNumber);
|
|
|
customerCarRec.setCustomerName(appKey);
|
|
|
- customerCarRec.setBusinessType("2");
|
|
|
- customerCarRec.setInterType(8);
|
|
|
+
|
|
|
+ customerCarRec.setBusinessType("2");
|
|
|
+
|
|
|
+ customerCarRec.setInterType(8);
|
|
|
|
|
|
RespR rs = noCarService.customerCarRecQueryUpper(customerCarRec);
|
|
|
long costtimeend = System.currentTimeMillis();
|
|
@@ -276,16 +288,26 @@ public class NoCarInterServiceImpl implements NoCarInterService {
|
|
|
try {
|
|
|
log.info("[-NoCarInterServiceImpl.noCarBillStart-] request appKey=" + appKey + " ,api=" + api + " ,data=" + data + " ,requestid=" + requestid);
|
|
|
JSONObject jsonObject = JSONObject.parseObject(data);
|
|
|
- String num = jsonObject.getString("num");
|
|
|
- String plateNumber = jsonObject.getString("plateNumber");
|
|
|
- String plateColor = jsonObject.getString("plateColor");
|
|
|
- String startTime = jsonObject.getString("startTime");
|
|
|
- String sourceAddr = jsonObject.getString("sourceAddr");
|
|
|
- String destAddr = jsonObject.getString("destAddr");
|
|
|
- String predictEndTime = jsonObject.getString("predictEndTime");
|
|
|
- Integer fee = jsonObject.getInteger("fee");
|
|
|
- Integer titleType = jsonObject.getInteger("titleType");
|
|
|
- String taxplayerCode = jsonObject.getString("taxplayerCode");
|
|
|
+
|
|
|
+ String num = jsonObject.getString("num");
|
|
|
+
|
|
|
+ String plateNumber = jsonObject.getString("plateNumber");
|
|
|
+
|
|
|
+ String plateColor = jsonObject.getString("plateColor");
|
|
|
+
|
|
|
+ String startTime = jsonObject.getString("startTime");
|
|
|
+
|
|
|
+ String sourceAddr = jsonObject.getString("sourceAddr");
|
|
|
+
|
|
|
+ String destAddr = jsonObject.getString("destAddr");
|
|
|
+
|
|
|
+ String predictEndTime = jsonObject.getString("predictEndTime");
|
|
|
+
|
|
|
+ Integer fee = jsonObject.getInteger("fee");
|
|
|
+
|
|
|
+ Integer titleType = jsonObject.getInteger("titleType");
|
|
|
+
|
|
|
+ String taxplayerCode = jsonObject.getString("taxplayerCode");
|
|
|
if (StringUtils.isEmpty(data) || null == jsonObject
|
|
|
|| StringUtils.isEmpty(num)
|
|
|
|| StringUtils.isEmpty(plateNumber)
|
|
@@ -339,12 +361,15 @@ public class NoCarInterServiceImpl implements NoCarInterService {
|
|
|
customerCarRec.setCarNum(noCarWayBill.getPlateNum());
|
|
|
customerCarRec.setCarColor(noCarWayBill.getPlateColor());
|
|
|
customerCarRec.setCustomerName(appKey);
|
|
|
- customerCarRec.setInterType(0);
|
|
|
+
|
|
|
+ customerCarRec.setInterType(0);
|
|
|
customerCarRec.setCompanyNum(customerRec.getCompanyNum());
|
|
|
customerCarRec.setBusinessType("2");
|
|
|
- customerCarRec.setServiceOperation(1);
|
|
|
+
|
|
|
+ customerCarRec.setServiceOperation(1);
|
|
|
noCarWayBill.setTitleType(2);
|
|
|
- noCarWayBill.setInterType(0);
|
|
|
+
|
|
|
+ noCarWayBill.setInterType(0);
|
|
|
return getDataResult(data, costtimestart, result, noCarWayBill, customerCarRecs, customerCarRec);
|
|
|
} catch (Exception e) {
|
|
|
log.error("[-NoCarInterServiceImpl.noCarBillStart-] get httpclient exception is "
|
|
@@ -408,9 +433,12 @@ public class NoCarInterServiceImpl implements NoCarInterService {
|
|
|
try {
|
|
|
log.info("[-NoCarInterServiceImpl.noCarBillEnd-] request appKey=" + appKey + " ,api=" + api + " ,data=" + data + " ,requestid=" + requestid);
|
|
|
JSONObject jsonObject = JSONObject.parseObject(data);
|
|
|
- String num = jsonObject.getString("num");
|
|
|
- String realDestAddr = jsonObject.getString("realDestAddr");
|
|
|
- String endTime = jsonObject.getString("endTime");
|
|
|
+
|
|
|
+ String num = jsonObject.getString("num");
|
|
|
+
|
|
|
+ String realDestAddr = jsonObject.getString("realDestAddr");
|
|
|
+
|
|
|
+ String endTime = jsonObject.getString("endTime");
|
|
|
if (StringUtils.isEmpty(data) || null == jsonObject || StringUtils.isEmpty(num)
|
|
|
|| StringUtils.isEmpty(realDestAddr)
|
|
|
|| StringUtils.isEmpty(endTime)
|
|
@@ -432,7 +460,8 @@ public class NoCarInterServiceImpl implements NoCarInterService {
|
|
|
noCarWayBill.setDestAddr(realDestAddr);
|
|
|
noCarWayBill.setPredictEndTime(DateUtil.getDistanceHoursFormat(endTime));
|
|
|
noCarWayBill.setHisFlag(0);
|
|
|
- noCarWayBill.setInterType(0);
|
|
|
+
|
|
|
+ noCarWayBill.setInterType(0);
|
|
|
RespR rs = noCarService.noCarWaybillEnd(noCarWayBill);
|
|
|
long costtimeend = System.currentTimeMillis();
|
|
|
log.info("[-NoCarInterServiceImpl.noCarBillEnd-] result is "
|
|
@@ -475,16 +504,26 @@ public class NoCarInterServiceImpl implements NoCarInterService {
|
|
|
try {
|
|
|
log.info("[-NoCarInterServiceImpl.noCarHisWaybillStart-] request appKey=" + appKey + " ,api=" + api + " ,data=" + data + " ,requestid=" + requestid);
|
|
|
JSONObject jsonObject = JSONObject.parseObject(data);
|
|
|
- String num = jsonObject.getString("num");
|
|
|
- String plateNumber = jsonObject.getString("plateNumber");
|
|
|
- String plateColor = jsonObject.getString("plateColor");
|
|
|
- String startTime = jsonObject.getString("startTime");
|
|
|
- String sourceAddr = jsonObject.getString("sourceAddr");
|
|
|
- String destAddr = jsonObject.getString("destAddr");
|
|
|
- String predictEndTime = jsonObject.getString("predictEndTime");
|
|
|
- Integer fee = jsonObject.getInteger("fee");
|
|
|
- Integer titleType = jsonObject.getInteger("titleType");
|
|
|
- String taxplayerCode = jsonObject.getString("taxplayerCode");
|
|
|
+
|
|
|
+ String num = jsonObject.getString("num");
|
|
|
+
|
|
|
+ String plateNumber = jsonObject.getString("plateNumber");
|
|
|
+
|
|
|
+ String plateColor = jsonObject.getString("plateColor");
|
|
|
+
|
|
|
+ String startTime = jsonObject.getString("startTime");
|
|
|
+
|
|
|
+ String sourceAddr = jsonObject.getString("sourceAddr");
|
|
|
+
|
|
|
+ String destAddr = jsonObject.getString("destAddr");
|
|
|
+
|
|
|
+ String predictEndTime = jsonObject.getString("predictEndTime");
|
|
|
+
|
|
|
+ Integer fee = jsonObject.getInteger("fee");
|
|
|
+
|
|
|
+ Integer titleType = jsonObject.getInteger("titleType");
|
|
|
+
|
|
|
+ String taxplayerCode = jsonObject.getString("taxplayerCode");
|
|
|
if (StringUtils.isEmpty(data) || null == jsonObject
|
|
|
|| StringUtils.isEmpty(num)
|
|
|
|| StringUtils.isEmpty(plateNumber)
|
|
@@ -532,7 +571,8 @@ public class NoCarInterServiceImpl implements NoCarInterService {
|
|
|
noCarWayBill.setHisFlag(1);
|
|
|
noCarWayBill.setUpdateTime(DateUtil.getCurrentDateStr());
|
|
|
noCarWayBill.setIntfaceStartTime(DateUtil.getCurrentDateStr());
|
|
|
- noCarWayBill.setInterType(0);
|
|
|
+
|
|
|
+ noCarWayBill.setInterType(0);
|
|
|
List<CustomerCarRec> customerCarRecs = new ArrayList<>();
|
|
|
CustomerCarRec customerCarRec = new CustomerCarRec();
|
|
|
customerCarRec.setCompanyName(noCarWayBill.getCompanyName());
|
|
@@ -542,7 +582,8 @@ public class NoCarInterServiceImpl implements NoCarInterService {
|
|
|
customerCarRec.setInterType(0);
|
|
|
customerCarRec.setCompanyNum(customerRec.getCompanyNum());
|
|
|
customerCarRec.setBusinessType("2");
|
|
|
- customerCarRec.setServiceOperation(1);
|
|
|
+
|
|
|
+ customerCarRec.setServiceOperation(1);
|
|
|
noCarWayBill.setTitleType(2);
|
|
|
|
|
|
RespR<VehicleQueryResponse> respRquery = noCarService.customerCarRecQueryUpper(customerCarRec);
|
|
@@ -580,7 +621,10 @@ public class NoCarInterServiceImpl implements NoCarInterService {
|
|
|
return result;
|
|
|
}
|
|
|
|
|
|
-
|
|
|
+
|
|
|
+ * 插入或者更新运单
|
|
|
+ * @param noCarWayBill
|
|
|
+ */
|
|
|
public void insertOrUpdateBillStart(NoCarWayBill noCarWayBill) {
|
|
|
noCarWayBill.setIntfaceStartTime(DateUtil.getCurrentDateStr());
|
|
|
noCarWayBill.setUpdateTime(DateUtil.getCurrentDateStr());
|
|
@@ -617,9 +661,12 @@ public class NoCarInterServiceImpl implements NoCarInterService {
|
|
|
try {
|
|
|
log.info("[-NoCarInterServiceImpl.noCarHisWaybillEnd-] request appKey=" + appKey + " ,api=" + api + " ,data=" + data + " ,requestid=" + requestid);
|
|
|
JSONObject jsonObject = JSONObject.parseObject(data);
|
|
|
- String num = jsonObject.getString("num");
|
|
|
- String realDestAddr = jsonObject.getString("realDestAddr");
|
|
|
- String endTime = jsonObject.getString("endTime");
|
|
|
+
|
|
|
+ String num = jsonObject.getString("num");
|
|
|
+
|
|
|
+ String realDestAddr = jsonObject.getString("realDestAddr");
|
|
|
+
|
|
|
+ String endTime = jsonObject.getString("endTime");
|
|
|
if (StringUtils.isEmpty(data) || null == jsonObject || StringUtils.isEmpty(num)
|
|
|
|| StringUtils.isEmpty(realDestAddr)
|
|
|
|| StringUtils.isEmpty(endTime)
|
|
@@ -642,7 +689,8 @@ public class NoCarInterServiceImpl implements NoCarInterService {
|
|
|
noCarWayBill.setPredictEndTime(DateUtil.getDistanceHoursFormat(endTime));
|
|
|
noCarWayBill.setHisFlag(1);
|
|
|
noCarWayBill.setCustomerName(appKey);
|
|
|
- noCarWayBill.setInterType(0);
|
|
|
+
|
|
|
+ noCarWayBill.setInterType(0);
|
|
|
RespR rs = noCarService.noCarHisWaybillEnd(noCarWayBill);
|
|
|
long costtimeend = System.currentTimeMillis();
|
|
|
log.info("[-NoCarInterServiceImpl.noCarHisWaybillEnd-] result is "
|
|
@@ -689,7 +737,8 @@ public class NoCarInterServiceImpl implements NoCarInterService {
|
|
|
try {
|
|
|
log.info("[-NoCarInterServiceImpl.noCarVoiceQuery-] request appKey=" + appKey + " ,api=" + api + " ,data=" + data + " ,requestid=" + requestid);
|
|
|
JSONObject jsonObject = JSONObject.parseObject(data);
|
|
|
- String num = jsonObject.getString("num");
|
|
|
+
|
|
|
+ String num = jsonObject.getString("num");
|
|
|
if (StringUtils.isEmpty(data) || null == jsonObject || StringUtils.isEmpty(num)
|
|
|
|
|
|
) {
|
|
@@ -887,10 +936,14 @@ public class NoCarInterServiceImpl implements NoCarInterService {
|
|
|
try {
|
|
|
log.info("[-NoCarInterServiceImpl.redInkInvoiceQuery-] request appKey=" + appKey + " ,api=" + api + " ,data=" + data + " ,requestid=" + requestid);
|
|
|
JSONObject jsonObject = JSONObject.parseObject(data);
|
|
|
- String taxplayerCode = jsonObject.getString("taxplayerCode");
|
|
|
- String month = jsonObject.getString("month");
|
|
|
- Long pageNo = jsonObject.getLong("pageNo");
|
|
|
- Long pageSize = jsonObject.getLong("pageSize");
|
|
|
+
|
|
|
+ String taxplayerCode = jsonObject.getString("taxplayerCode");
|
|
|
+
|
|
|
+ String month = jsonObject.getString("month");
|
|
|
+
|
|
|
+ Long pageNo = jsonObject.getLong("pageNo");
|
|
|
+
|
|
|
+ Long pageSize = jsonObject.getLong("pageSize");
|
|
|
|
|
|
if (StringUtils.isEmpty(data) || null == jsonObject) {
|
|
|
return result;
|
|
@@ -904,7 +957,7 @@ public class NoCarInterServiceImpl implements NoCarInterService {
|
|
|
result.setMsg("日期格式不正确!");
|
|
|
return result;
|
|
|
}
|
|
|
- HCInvoiceQueryVo hcInvoiceQueryVo = new HCInvoiceQueryVo();
|
|
|
+ HcInvoiceQueryVo hcInvoiceQueryVo = new HcInvoiceQueryVo();
|
|
|
hcInvoiceQueryVo.setBuyerTaxpayerCode(taxplayerCode);
|
|
|
hcInvoiceQueryVo.setMonth(month);
|
|
|
hcInvoiceQueryVo.setPageSize(pageSize);
|
|
@@ -956,7 +1009,8 @@ public class NoCarInterServiceImpl implements NoCarInterService {
|
|
|
try {
|
|
|
log.info("[-NoCarInterServiceImpl.noCarVoiceOwnerQuery-] request appKey=" + appKey + " ,api=" + api + " ,data=" + data + " ,requestid=" + requestid);
|
|
|
JSONObject jsonObject = JSONObject.parseObject(data);
|
|
|
- String num = jsonObject.getString("num");
|
|
|
+
|
|
|
+ String num = jsonObject.getString("num");
|
|
|
if (StringUtils.isEmpty(data) || null == jsonObject || StringUtils.isEmpty(num)
|
|
|
|
|
|
) {
|