This commit is contained in:
linfso 2024-08-20 15:00:16 +08:00
parent 82530afe39
commit b09b1ae304
6 changed files with 65 additions and 39 deletions

View File

@ -35,7 +35,6 @@ public class EmisSettleInvoiceRecord extends BaseEntity
{
private static final long serialVersionUID = 1L;
/* id */
private Long id;
/* 申请序号 */
@ -55,10 +54,12 @@ public class EmisSettleInvoiceRecord extends BaseEntity
private String settleBillNo;
/* 账单名称 */
private String settleBillName;
/* 申请开票金额 */
/* 申请开票金额=增加的税点金额和额外的附件费用 */
private BigDecimal applyMoney;
/* 开票类型 1-增值电子 */
private String invoiceType;
/* 开票范围 1-全部 0-部分 */
private String openbillScope;
/* 开票名称 */
private String companyName;
/* 开票税号 */
@ -67,6 +68,8 @@ public class EmisSettleInvoiceRecord extends BaseEntity
private String companyTel;
/* 开票地址 */
private String companyAddress;
/* 开票备注 */
private String invioceRemark;
/* 开户行 */
private String bankName;
/* 开户账号 */
@ -77,13 +80,19 @@ public class EmisSettleInvoiceRecord extends BaseEntity
private String phone;
/* 税类型 1-免税 2-增值税 */
private String realTaxType;
/* 原始开票金额 */
private BigDecimal origOpenMoney;
/* 额外增加的税点 0.0/0.06/0.09 */
private BigDecimal addTaxRate;
/* 额外增加的开票金额 */
private BigDecimal addOpenMoney;
/* 开票上限 */
private BigDecimal openMoneyMax;
/* 开票金额 */
private BigDecimal openMoney;
/* 发票号 */
private String invoiceNo;
/* 开票状态 0-待开票 1-开票中 2-开票成功 */
/* 开票状态 0-待开票 1-已开票 2-拒绝开票 */
private String invoiceStatus;
/* 开票状态描述 */
private String invoiceStatusDesc;
@ -93,7 +102,7 @@ public class EmisSettleInvoiceRecord extends BaseEntity
private String email;
/* 发票下载路径 */
private String filePath;
/* 审核状态 0-未审核 1-已审核 2-审核不通过 */
/* 审核状态 0-未审核 1-已审核 */
private String blAudit;
/* 审核日期 */
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")

View File

@ -877,8 +877,18 @@ public class EmisBaseService {
phone=emisWaybill.getReceiveMobile();
String billCode=emisWaybill.getBillCode();
String from=emisWaybill.getSendCountryName()+"-"+emisWaybill.getSendProvinceName();
String to=emisWaybill.getReceiveCountryName()+"-"+emisWaybill.getReceiveProvinceName();
// 订阅单号
Kd100Helper.pollTraceByMainNoAndCom(billCode,from,to,phone);
log.error("===>Start 三方物流跟踪单号:"+dt.getBillCode()+","+dt.getTransferExpress()+" "+dt.getTransferBillCode());
EmisTmsTransferTrace rstUpd=Kd100Helper.queryTmsTransferTraceByKd100(dt,phone);
// 如果已签收,需要做签收扫描
if(WaybillStatus.SIGNED.statusCode.equals(rstUpd.getLastWaybillStatus())){

File diff suppressed because one or more lines are too long

View File

@ -61,12 +61,12 @@ public class Kd100Helper {
String allResult=HTTPHelperV3.post(POLL_QUERY_URL,postDataMap,"application/x-www-form-urlencoded");
// log.debug("===KD100==REST==>{}",allResult);
try {
// 订阅轨迹
pollTraceByMainNoAndCom(mainNo, com, phone);
}catch (Exception ex){
ex.printStackTrace();
}
// try {
// // 订阅轨迹
// pollTraceByMainNoAndCom(mainNo, com, phone);
// }catch (Exception ex){
// ex.printStackTrace();
// }
return allResult;
}
@ -80,13 +80,13 @@ public class Kd100Helper {
* @return
* @throws Exception
*/
public static String pollTraceByMainNoAndCom(String mainNo, String com,String phone) {
public static String pollTraceByMainNoAndCom(String mainNo, String com,String from,String to,String phone) {
JSONObject param = new JSONObject();
param.put("company", com);//快递公司编码
param.put("number", mainNo);//快递单号
param.put("from", "VN");
param.put("to", "CN");
param.put("from", from);
param.put("to", to);
param.put("key", KEY);
JSONObject parameters = new JSONObject();
parameters.put("callbackurl", "http://api.emis.tanex56.com/api/bizsvr/emis/common/notifyTraceByKD100");
@ -191,11 +191,11 @@ public class Kd100Helper {
// String str=queryTraceByMainNoAndCom("T7080300002588","探路速运");
// String str=queryTraceByMainNoAndCom("SF080300002588","shunfeng","1234");
String str=pollTraceByMainNoAndCom("SF080300002588","shunfeng","1234");
// String str=queryTraceByMainNoAndCom("T7080398716","探路速运");
System.out.println(str);
List<EmisTmsScanRecord> list=cvtTraceToScanRecord("12321",str);
System.out.println(JSON.toJSONString(list));
// String str=pollTraceByMainNoAndCom("SF080300002588","shunfeng","1234");
// String str=queryTraceByMainNoAndCom("T7080398716","","");
// System.out.println(str);
// List<EmisTmsScanRecord> list=cvtTraceToScanRecord("12321",str);
// System.out.println(JSON.toJSONString(list));
} catch (Exception e) {
e.printStackTrace();
}

View File

@ -76,9 +76,13 @@ public class WaybillHelper {
* @return
*/
public static String genApplySeqNo(){
String billId = formatter.format(new Date());
billId += (int)((Math.random() * 9 + 1) * 1000);
return billId;
Snowflake snowflake = IdUtil.getSnowflake(0, 0);
Long billId = snowflake.nextId();
return billId.toString();
// String billId = formatter.format(new Date());
// billId += (int)((Math.random() * 9 + 1) * 1000);
// return billId;
}
/**

View File

@ -16,23 +16,28 @@
<result property="settleBillName" column="settle_bill_name" />
<result property="applyMoney" column="apply_money" />
<result property="invoiceType" column="invoice_type" />
<result property="openbillScope" column="openbill_scope" />
<result property="companyName" column="company_name" />
<result property="companyTaxNo" column="company_tax_no" />
<result property="companyTel" column="company_tel" />
<result property="companyAddress" column="company_address" />
<result property="invioceRemark" column="invioce_remark" />
<result property="bankName" column="bank_name" />
<result property="bankAccNo" column="bank_acc_no" />
<result property="contact" column="contact" />
<result property="phone" column="phone" />
<result property="realTaxType" column="real_tax_type" />
<result property="origOpenMoney" column="orig_open_money" />
<result property="addTaxRate" column="add_tax_rate" />
<result property="addOpenMoney" column="add_open_money" />
<result property="openMoneyMax" column="open_money_max" />
<result property="openMoney" column="open_money" />
<result property="invoiceNo" column="invoice_no" />
<result property="invoiceStatus" column="invoice_status" />
<result property="invoiceStatusDesc" column="invoice_status_desc" />
<result property="recieveAddress" column="recieve_address" />
<result property="email" column="email" />
<result property="filePath" column="file_path" />
<result property="blAudit" column="bl_audit" />
<result property="auditDate" column="audit_date" />
<result property="auditManCode" column="audit_man_code" />
@ -46,10 +51,6 @@
<result property="openChStatusDesc" column="open_ch_status_desc" />
<result property="openComCode" column="open_com_code" />
<result property="filePath" column="file_path" />
<result property="invoiceNo" column="invoice_no" />
<association property="applyManName" column="apply_man_code" select="com.xdadan.erp.emis.mapper.EmisBaseMapper.selectEmpNameByCode"/>
<association property="applySiteName" column="apply_site_code" select="com.xdadan.erp.emis.mapper.EmisBaseMapper.selectSiteNameByCode"/>