tao.mo

Merge branches 'API-2023-07-30-bug' and 'master' of http://118.178.128.178//Fedex/iClear-api

 Conflicts:
	src/main/java/com/erry/iclear/dateInterface/service/ApiService.java
Showing 25 changed files with 688 additions and 84 deletions
......@@ -49,6 +49,26 @@ md5 小写 16位
IKNOWUiClearExportCTest
IKNOWUiClearExportCProd
RunaTong的Secret
md5 小写 16位
明文:
RunaTongiClearExportCDev
RunaTongiClearExportCTest
RunaTongiClearExportCProd
fsyingde的Secret
md5 小写 16位
明文:
fsyingdeiClearExportCDev
fsyingdeiClearExportCTest
fsyingdeiClearExportCProd
SCMHOME的Secret
md5 小写 16位
明文:
SCMHOMEiClearExportCDev
SCMHOMEiClearExportCTest
SCMHOMEiClearExportCProd
1、接口数据模型调研 2
2、设计数据接口 2
......
package com.erry.iclear.dateInterface.api;
import com.erry.iclear.dateInterface.enums.ErrorCodeEnum;
import com.erry.iclear.dateInterface.api.request.Mawb;
import com.erry.iclear.dateInterface.api.response.ResultRS;
import com.erry.iclear.dateInterface.entity.IClearApiLog;
import com.erry.iclear.dateInterface.enums.ErrorCodeEnum;
import com.erry.iclear.dateInterface.repository.MawbAdd;
import com.erry.iclear.dateInterface.service.*;
import com.erry.iclear.dateInterface.util.StringUtil;
......@@ -16,7 +16,9 @@ import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;
import javax.servlet.http.HttpServletRequest;
import java.util.*;
import java.util.Date;
import java.util.Map;
import java.util.Objects;
/**
* @author Administrator
......@@ -74,7 +76,12 @@ public class CustomsDataInterface {
String appKey=(String) request.getHeader("Appkey");
String timeStamp=(String) request.getHeader("TimeStamp");
IClearApiLog saveIClearApiLogResult = iClearApiLogService.saveIClearApiLog(iClearApiLogService.convertToIClearApiLog(mawb,appId,appKey,new Date(Long.valueOf(timeStamp))));
String checkUser = mawbService.checkUser(appId);
if (!StringUtil.isEmpty(checkUser)){
result.setCode(ErrorCodeEnum.ERROR_30003.getCode());
result.setMsg(checkUser);
return result;
}
mawb.setAppId(appId);
if(!Objects.equals(saveIClearApiLogResult,null)){
log.info("请求保存成功,msgId:"+saveIClearApiLogResult.getMsgId());
......@@ -108,13 +115,20 @@ public class CustomsDataInterface {
}
sw.stop();
//校验单据币制
result = mawbService.checkCurrency(mawb);
if(!result.getSuccess()){
return result;
}
//2、TODO 校验主单
sw.start("checkMawb");
result=mawbService.checkMawb(mawb);
result=mawbService.checkMawb(mawb,appId);
if(!result.getSuccess()){
return result;
}
sw.stop();
// //3、TODO 校验子单
......
......@@ -36,6 +36,9 @@ public class FedexDataInterface {
private FedexService fedexService;
@Autowired
private MawbService mawbService;
@Autowired
private ChmConsignmentService chmConsignmentService;
@Autowired
......@@ -98,10 +101,16 @@ public class FedexDataInterface {
sw.start("generate FedexMawb");
fedexc.setAppId(appId);
FedexMawb saveMawbFedexResult = fedexService.generateFedexMawb(fedexc);
//检验运单币制是否有效
ResultRS resultRS = mawbService.checkCurrency(saveMawbFedexResult);
if(!resultRS.getSuccess()){
return resultRS;
}
sw.stop();
sw.start("checkFedexMawb");
ResultRS iclearCheckRs = fedexService.checkFedexMawb(saveMawbFedexResult,appInfo);
ResultRS iclearCheckRs = fedexService.checkFedexMawb(saveMawbFedexResult,appInfo,appId);
//返回结果
ResultRS result = new ResultRS(Boolean.TRUE,ErrorCodeEnum.SUCCESS.getCode(),null,null);
if(nonEmptyCheck.getSuccess() && iclearCheckRs.getSuccess()){
......@@ -157,7 +166,12 @@ public class FedexDataInterface {
String appKey=(String) request.getHeader("Appkey");
String timeStamp=(String) request.getHeader("TimeStamp");
IClearApiLog saveIClearApiLogResult = iClearApiLogService.saveIClearApiLog(iClearApiLogService.convertToIClearApiLogC(fedexc,appId,appKey,new Date(Long.valueOf(timeStamp))));
String checkUser = mawbService.checkUser(appId);
if (!StringUtil.isEmpty(checkUser)){
result.setCode(ErrorCodeEnum.ERROR_30003.getCode());
result.setMsg(checkUser);
return result;
}
fedexc.setAppId(appId);
FedexMawb saveMawbFedexResult = null;
if(!Objects.equals(saveIClearApiLogResult,null)){
......@@ -177,10 +191,16 @@ public class FedexDataInterface {
}
sw.stop();
//检验运单币制是否有效
ResultRS resultRS = mawbService.checkCurrency(saveMawbFedexResult);
if(!resultRS.getSuccess()){
return resultRS;
}
//2、TODO 校验主单
sw.start("checkFedexMawb");
result=fedexService.checkFedexMawb(saveMawbFedexResult,null);
result=fedexService.checkFedexMawb(saveMawbFedexResult,null,appId);
if(!result.getSuccess()){
return result;
}
......@@ -201,6 +221,7 @@ public class FedexDataInterface {
return result;
}
sw.stop();
log.info("saveIClearApiLogResult.getCreateTime():"+saveIClearApiLogResult.getCreateTime());
ChmConsignment chmGetId = chmConsignmentRepository.findChmConsignmentByConsignmentCode(saveIClearApiLogResult.getBillNo(), saveIClearApiLogResult.getCreateTime());
//调用IClear接口进行运单推送EXP002
String objJson = JsonToJava.toJson(chmGetId.getId());
......@@ -359,4 +380,4 @@ public class FedexDataInterface {
result.setCode(ErrorCodeEnum.SUCCESS.getCode());
return result;
}
}
\ No newline at end of file
}
......
......@@ -23,7 +23,7 @@ import java.util.Date;
@Slf4j
public class VersionInterface {
//当前版本号
final String VERSION = "2.2";
final String VERSION = "2.6.1";
@ApiOperation(value = "获取当前API版本", httpMethod = "GET", notes = "ex: http://192.168.1.71:8080/version/version")
@GetMapping("/version")
......
......@@ -100,4 +100,21 @@ public class Constant {
* 监管条件
*/
public static final String supervise_condition = "superviseRestrict";
/**
* DM004接收取件信息
*/
public static final String FILE_TYPE_GET_PICK_INFORMATION = "fileType_5";
//OSPR状态
/**
* 未完成
*/
public static final String OSPR_STATUS_INCOMPLETED = "OSPRStatus_1";
//扫描代码
/**
* C类已取件
*/
public static final String SCAN_CODE_TAKEN_PART= "scanCode_1";
}
......
package com.erry.iclear.dateInterface.dto;
import com.erry.iclear.dateInterface.entity.HsCodeAndDescription;
import com.erry.iclear.dateInterface.entity.SysUser;
import lombok.Data;
import java.util.Date;
@Data
public class HsCodeAndDescriptionDto {
private Long id;
private String a;
private String b;
/***
* 类型
* 1表示hsCode清单
* 2表示品名品名清单
*/
private int type;
//用户
private SysUser sysUser;
private Date createTime;
private String errorMsg;
private String rowNum;
public HsCodeAndDescriptionDto() {
}
public HsCodeAndDescriptionDto(HsCodeAndDescription hsCodeAndDescription) {
this.setId(hsCodeAndDescription.getId());
this.setA(hsCodeAndDescription.getA());
this.setB(hsCodeAndDescription.getB());
this.setType(hsCodeAndDescription.getType());
this.setSysUser(hsCodeAndDescription.getSysUser());
this.setCreateTime(hsCodeAndDescription.getCreateTime());
}
}
\ No newline at end of file
......@@ -3,7 +3,6 @@ package com.erry.iclear.dateInterface.entity;
import com.fasterxml.jackson.annotation.JsonIgnore;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;
import javax.persistence.*;
import java.io.Serializable;
......@@ -413,6 +412,62 @@ public class ChmConsignment implements Serializable {
@Column(name = "EANNO")
private String eanNo;
/**
* 扫描代码ID
*/
@JsonIgnore
@ManyToOne(targetEntity = DictionaryEntries.class)
@JoinColumn(name = "SCAN_CODE_ID")
private DictionaryEntries scanCodeDic;
/**
* 扫描代码
*/
@Column(name = "SCAN_CODE")
private String scanCode;
/**
* 扫描状态日期
*/
@Column(name = "SCAN_STATUS_TIME")
private Date scanStatusTime;
/**
* 运单类型ID
*/
// @JsonIgnore
// @ManyToOne(targetEntity = DictionaryEntries.class)
// @JoinColumn(name = "CONS_TYPE_ID")
// private DictionaryEntries consTypeDic;
/**
* OSPR状态ID
*/
@JsonIgnore
@ManyToOne(targetEntity = DictionaryEntries.class)
@JoinColumn(name = "OSPR_STATUS_ID")
private DictionaryEntries osprStatusDic;
/**
* 站点
*/
@JsonIgnore
@ManyToOne(targetEntity = Organization.class)
@JoinColumn(name = "STATION_ID")
private Organization station;
/**
* 站点名称
*/
@Column(name = "STATION_NAME")
private String stationName;
/**
* 取件日期
*/
@Column(name = "PICK_UP_DATE")
private Date pickUpDate;
@OneToMany(mappedBy = "chmConsignment", cascade = CascadeType.ALL)
private List<ChmConsignmentDetail> chmConsignmentDetailList;
......
package com.erry.iclear.dateInterface.entity;
import com.fasterxml.jackson.annotation.JsonIgnore;
import lombok.Data;
import javax.persistence.*;
import java.util.Date;
@Entity
@Table(name = "T_AU_HSCODE_DESCRIPTION")
@Data
public class HsCodeAndDescription {
private static final long serialVersionUID = 1L;
@Id
@GeneratedValue
@Column(name = "ID")
private Long id;
@Column(name = "A")
private String a;
@Column(name = "B")
private String b;
/***
* 类型
* 1表示hsCode清单
* 2表示品名品名清单
*/
@Column(name = "TYPE")
private int type;
//用户
@JsonIgnore
@ManyToOne(targetEntity = SysUser.class)
@JoinColumn(name = "USER_ID")
private SysUser sysUser;
//创建时间
@Column(name = "CREATETIME")
private Date createTime;
}
......@@ -27,7 +27,8 @@ public enum ErrorCodeEnum {
ERROR_30102("30102","hscode编码字段长度超过2000字符"),
ERROR_30103("30103","skuCode与skuName必须传递一项"),
ERROR_30104("30104","skuCode或skuName长度超出限制"),
ERROR_30105("30105","skuCode编码最少输入4位字符,skuName最少输入2个字符");
ERROR_30105("30105","skuCode编码最少输入4位字符,skuName最少输入2个字符"),
ERROR_30106("30106","此申报{columnName}币制不在海关要求的范围内 请修改!");
ErrorCodeEnum(String code,String name){
......
......@@ -99,4 +99,5 @@ public class SignInterceptor extends HandlerInterceptorAdapter {
}
}
}
}
\ No newline at end of file
}
......
......@@ -4,7 +4,6 @@ import com.erry.iclear.dateInterface.entity.ChmConsignment;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.query.Param;
import org.springframework.stereotype.Repository;
import java.util.Date;
......@@ -33,6 +32,15 @@ public interface ChmConsignmentRepository extends JpaSpecificationExecutor<ChmCo
public ChmConsignment findChmConsignmentByConsignmentCode(String consignmentCode,Date startDate);
/**
* 根据运单号查找多条数据
* @param consignmentCode
* @param startDate
* @return
*/
@Query( nativeQuery = true,value ="select * from T_CHM_CONSIGNMENT where CONSIGNMENT_CODE = ?1 and CREATE_TIME>= ?2 and CREATOR = ?3" )
public List<ChmConsignment> findChmConsignmentByConsignmentCodes(String consignmentCode,Date startDate,String creator);
/**
* 根据运单ID查运单
* @param id
* @return
......
package com.erry.iclear.dateInterface.repository;
import com.erry.iclear.dateInterface.entity.HsCodeAndDescription;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.jpa.repository.Query;
import org.springframework.stereotype.Repository;
import java.util.List;
@Repository
public interface HsCodeAndDescriptionRepository extends JpaSpecificationExecutor<HsCodeAndDescription>, JpaRepository<HsCodeAndDescription, Long> {
@Query(nativeQuery = true,value = "select * from T_AU_HSCODE_DESCRIPTION where TYPE = ?1 ")
public List<HsCodeAndDescription> selectAndType(int type);
}
package com.erry.iclear.dateInterface.repository;
import com.erry.iclear.dateInterface.entity.Organization;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.query.Param;
import org.springframework.stereotype.Repository;
@Repository
public interface OrganizationRepository extends JpaSpecificationExecutor<Organization>, JpaRepository<Organization, Long> {
@Query(nativeQuery = true, value = "select top 1 * from T_AU_ORGANIZATION o where o.NAME = :name ")
public Organization findOrganizationByName(@Param("name") String name);
}
package com.erry.iclear.dateInterface.repository;
import com.erry.iclear.dateInterface.entity.TaskInfo;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.query.Param;
import org.springframework.stereotype.Repository;
@Repository
public interface TaskInfoRepository extends JpaSpecificationExecutor<TaskInfo>, JpaRepository<TaskInfo, Long> {
@Query(nativeQuery = true, value = "select top 1 * from T_TASK_INFO info where info.FILE_TYPE_ID = :fileTypeId and " +
"info.AWB_NUMBER = :consignmentCode order by CREATE_TIME DESC")
public TaskInfo findTaskInfoByConsignment(@Param("fileTypeId") Long taskStatusId,@Param("consignmentCode") String consignmentCode);
}
......@@ -212,7 +212,7 @@ public class ApiService {
});
this.sendMawb(token,mawbList);
}catch(Exception ex){
log.error("pushMawbAcc",ex);
log.error(ex.getMessage(),ex);
}
}
/**
......@@ -245,7 +245,7 @@ public class ApiService {
declearTask.setPushTime(new Date());
String objJson = JsonToJava.toJson(d);
//推送海关回执数据
String json = HttpUtils.doProxyPost(this.customsUrl,objJson,headerMap,this.proxyUrl,this.proxyPort);
String json = HttpUtils.doProxyPost(this.completeMsgUrl,objJson,headerMap,this.proxyUrl,this.proxyPort);
log.info("sendMawb:"+json);
//接口响应时间
declearTask.setResponseTime(new Date());
......
package com.erry.iclear.dateInterface.service;
//import cn.hutool.core.date.DateUtil;
import com.erry.iclear.dateInterface.enums.ErrorCodeEnum;
import com.erry.iclear.dateInterface.api.request.FedexMawb;
import com.erry.iclear.dateInterface.api.request.FedexReceipt;
import com.erry.iclear.dateInterface.api.request.Mawb;
import com.erry.iclear.dateInterface.api.response.ResultRS;
import com.erry.iclear.dateInterface.common.Constant;
import com.erry.iclear.dateInterface.entity.*;
import com.erry.iclear.dateInterface.repository.ChmConsignmentRepository;
import com.erry.iclear.dateInterface.repository.DictionaryEntriesRepository;
import com.erry.iclear.dateInterface.repository.SysUserRepository;
import com.erry.iclear.dateInterface.enums.ErrorCodeEnum;
import com.erry.iclear.dateInterface.repository.*;
import com.erry.iclear.dateInterface.util.DateUtils;
import com.erry.iclear.dateInterface.util.NumberUtils;
import com.erry.iclear.dateInterface.util.StringUtil;
......@@ -21,10 +20,8 @@ import org.springframework.stereotype.Service;
import javax.transaction.Transactional;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
import java.util.Objects;
import java.util.*;
import java.util.stream.Collectors;
/**
* @author Administrator
......@@ -49,6 +46,12 @@ public class ChmConsignmentService {
@Autowired
private SysUserRepository sysUserRepository;
@Autowired
private TaskInfoRepository taskInfoRepository;
@Autowired
private OrganizationRepository organizationRepository;
/**
* 转换主单
* @return
......@@ -230,8 +233,14 @@ public class ChmConsignmentService {
//推送时间作为创建时间,可以用来校验数据的有序性,如果新的推送时间小于已有的创建时间,就不更新数据
result.setCreateTime(new Date());
result.setUpdateTime(pushTime);
result.setCreator(creator);
result.setUpdateTime(new Date());
SysUser sysUser = sysUserRepository.findUserByLoginName(creator);
if (sysUser == null){
result.setCreator(creator);
}else {
result.setCreatorId(sysUser);
result.setCreator(sysUser.getUserName());
}
}catch (Exception e){
result=null;
......@@ -290,11 +299,12 @@ public class ChmConsignmentService {
//推送时间作为创建时间,可以用来校验数据的有序性,如果新的推送时间小于已有的创建时间,就不更新数据
result.setCreateTime(new Date());
result.setUpdateTime(pushTime);
if (!creator.equals("IDE-ICLEAR-API")){
SysUser sysUser = sysUserRepository.findUserByLoginName(creator);
SysUser sysUser = sysUserRepository.findUserByLoginName(creator);
if (sysUser == null){
result.setCreator(creator);
}else {
result.setCreatorId(sysUser);
result.setCreator(sysUser.getLoginName());
result.setCreator(sysUser.getUserName());
}
}catch (Exception e){
result=null;
......@@ -484,6 +494,20 @@ public class ChmConsignmentService {
}
/**
* 根据运单号查找多条数据
* @param consignmentCode
* @return
*/
public List<ChmConsignment> findChmConsignmentByConsignmentCodes(String consignmentCode, Date startDate,String creator){
try {
return chmConsignmentRepository.findChmConsignmentByConsignmentCodes(consignmentCode,startDate,creator);
}catch (Exception e){
log.error("findChmConsignmentByConsignmentCode() error:"+ e.getMessage());
}
return null;
}
/**
* 保存或更新 iclear中的运单信息
* @param mawb
* @param timeStamp
......@@ -505,19 +529,46 @@ public class ChmConsignmentService {
chmConsignment.setChmConsignmentDetailList(chmConsignmentDetailList);
//2、校验 7天+运单 ,如果有数据并且 还未报关就更新,如果数据就插入
ChmConsignment chmConsignmentDB=this.findChmConsignmentByConsignmentCode(chmConsignment.getConsignmentCode(), DateUtils.addDate(DateUtils.getCurrentDate(),-7));
ChmConsignment chmConsignmentDB = null;
// ChmConsignment chmConsignmentDB=this.findChmConsignmentByConsignmentCode(chmConsignment.getConsignmentCode(), DateUtils.addDate(DateUtils.getCurrentDate(),-7));
SysUser sysUser = sysUserRepository.findUserByLoginName(creator);
String username = null;
if (sysUser == null){
username = creator;
}else {
//设置当前运单创建人ID
chmConsignment.setCreatorId(sysUser);
username = sysUser.getUserName();
}
List<ChmConsignment> chmConsignmentDBs=this.findChmConsignmentByConsignmentCodes(chmConsignment.getConsignmentCode(), DateUtils.addDate(DateUtils.getCurrentDate(),-7),username);
List<ChmConsignment> newChmConsignments = new ArrayList<ChmConsignment>();
for (ChmConsignment chmConsignments : chmConsignmentDBs) {
//如果有该用户曾经提交过得,运单状态为预审不通过或者中心审核已通过并且没有dm004的优先覆盖
if (chmConsignments.getConsStatusDic().getCode().equals("transferWaybillStatus_3")){
chmConsignmentDB = chmConsignments;
break;
}else if ((chmConsignments.getConsStatusDic().getCode().equals("transferWaybillStatus_15")
|| chmConsignments.getConsStatusDic().getCode().equals("transferWaybillStatus_1") || chmConsignments.getConsStatusDic().getCode().equals("transferWaybillStatus_24"))){
//如果有新建、sep新建、草稿状态的,先存下来,按创建日期排序覆盖最后一个
newChmConsignments.add(chmConsignments);
}
}
if (chmConsignmentDB == null && !newChmConsignments.isEmpty()){
List<ChmConsignment> sortList = newChmConsignments.stream().sorted(Comparator.comparing(ChmConsignment::getCreateTime).reversed()).collect(Collectors.toList());
chmConsignmentDB = sortList.get(0);
}
//获取用户账号信息
SysUser sysUser = sysUserRepository.findUserByLoginName("CUSTOMS");
//设置当前运单创建人ID
chmConsignment.setCreatorId(sysUser);
//设置创建人名称
chmConsignment.setCreator(sysUser.getUserName());
chmConsignment.setCreator(username);
//3、新增或更新
//新增:如果没有就插入
if (Objects.equals(chmConsignmentDB,null)){
log.info("新增主单"+ mawb.getBillNo());
//如果有dm004把dm004更新上去
updateDM004(chmConsignment);
ChmConsignment chmConsignmentSaveResult = this.saveChmConsignment(chmConsignment);
if(!Objects.equals(chmConsignmentSaveResult,null)){
log.info("主单"+ mawb.getBillNo()+" 保存成功,chmConsignmentId:"+chmConsignmentSaveResult.getId());
......@@ -532,9 +583,9 @@ public class ChmConsignmentService {
//条件1、状态为 待申报海关
//条件2、本次推送时间 > 上次推送的时间
}else if(!Objects.equals(chmConsignmentDB,null)
&& Objects.equals(chmConsignmentDB.getConsStatusDic().getCode(),"transferWaybillStatus_5")
//&& Objects.equals(chmConsignmentDB.getConsStatusDic().getCode(),"transferWaybillStatus_5")
//TODO 提交时需要打开
&& pushTime.getTime()>chmConsignmentDB.getUpdateTime().getTime()
//&& pushTime.getTime()>chmConsignmentDB.getUpdateTime().getTime()
){
//更新数据
log.info("更新主单"+ mawb.getBillNo());
......@@ -547,11 +598,13 @@ public class ChmConsignmentService {
}
}
}
//如果有dm004把dm004更新上去
updateDM004(chmConsignment);
chmConsignment.setId(chmConsignmentDB.getId());
chmConsignment.setCreateTime(chmConsignmentDB.getCreateTime());
chmConsignment.setUpdateTime(pushTime);
chmConsignment.setUpdateTime(new Date());
ChmConsignment updateResult = this.saveChmConsignment(chmConsignment);
if(!Objects.equals(updateResult,null)){
log.info("主单"+ mawb.getBillNo()+" 更新成功,chmConsignmentId:"+updateResult.getId());
......@@ -563,13 +616,48 @@ public class ChmConsignmentService {
}
}
}catch (Exception e){
log.error(""+e.getMessage());
log.error(""+e.getMessage(),e);
}
result.setSuccess(Boolean.TRUE);
return result;
}
/**
* 如果dm004已经来了,但是运单未提交,则直接更新dm004的数据
*/
public ChmConsignment updateDM004(ChmConsignment chmConsignment){
TaskInfo taskInfo = new TaskInfo();
DictionaryEntries dictionaryEntries = dictionaryEntriesRepository.findDictionaryEntriesByCode(Constant.FILE_TYPE_GET_PICK_INFORMATION);
taskInfo = taskInfoRepository.findTaskInfoByConsignment(dictionaryEntries.getId(),chmConsignment.getConsignmentCode());
if (StringUtil.isEmpty(chmConsignment.getScanCode()) && taskInfo!= null){
chmConsignment.setScanCode(taskInfo.getScanCode());
chmConsignment.setScanCodeDic(taskInfo.getScanCodeDic());
chmConsignment.setScanStatusTime(taskInfo.getScanStatusTime());
//D类OSPR未完成可以修改站点
Organization organizationByName = organizationRepository.findOrganizationByName(taskInfo.getStationName());
if(organizationByName !=null){
DictionaryEntries dictionaryEntries3 = dictionaryEntriesRepository.findDictionaryEntriesByCode(Constant.consType_D);
if (chmConsignment.getConsType().equals(dictionaryEntries3.getChineseName())){
if (chmConsignment.getOsprStatusDic()!=null){
if(chmConsignment.getOsprStatusDic().getCode().equals(Constant.OSPR_STATUS_INCOMPLETED)){
chmConsignment.setStation(organizationByName);
chmConsignment.setStationName(organizationByName.getName());
}
}
}else{
chmConsignment.setStation(organizationByName);
chmConsignment.setStationName(organizationByName.getName());
}
}
if(taskInfo.getScanCode().equals(Constant.SCAN_CODE_TAKEN_PART)){
chmConsignment.setPickUpDate(taskInfo.getScanStatusTime());
}
}
return chmConsignment;
}
/**
* 保存或更新 iclear中的运单信息
* @param fedexMawb
* @param timeStamp
......@@ -590,14 +678,39 @@ public class ChmConsignmentService {
chmConsignmentDetailList.add(chmConsignmentDetailService.convertToChmConsignmentDetailFedex(detail, chmConsignment,Boolean.FALSE));
});
chmConsignment.setChmConsignmentDetailList(chmConsignmentDetailList);
ChmConsignment chmConsignmentDB = null;
//2、校验 7天+运单 ,如果有数据并且 还未报关就更新,如果数据就插入
ChmConsignment chmConsignmentDB=this.findChmConsignmentByConsignmentCode(chmConsignment.getConsignmentCode(), DateUtils.addDate(DateUtils.getCurrentDate(),-7));
SysUser sysUser = sysUserRepository.findUserByLoginName(creator);
String username = null;
if (sysUser == null){
username = creator;
}else {
username = sysUser.getUserName();
}
List<ChmConsignment> chmConsignments = this.findChmConsignmentByConsignmentCodes(chmConsignment.getConsignmentCode(), DateUtils.addDate(DateUtils.getCurrentDate(),-7),username);
//如果没有C类待申报,从list中拿时间最晚的一条去覆盖
List<ChmConsignment> newChmConsignments = new ArrayList<ChmConsignment>();
for (ChmConsignment consignment : chmConsignments) {
//如果是C类待申报的,覆盖
if (consignment.getConsStatusDic().getCode().equals("transferWaybillStatus_16")){
chmConsignmentDB = consignment;
break;
}else if ((consignment.getConsStatusDic().getCode().equals("transferWaybillStatus_15")
|| consignment.getConsStatusDic().getCode().equals("transferWaybillStatus_1") || consignment.getConsStatusDic().getCode().equals("transferWaybillStatus_24"))){
newChmConsignments.add(consignment);
}
}
if (chmConsignmentDB == null && !newChmConsignments.isEmpty()){
List<ChmConsignment> sortList = newChmConsignments.stream().sorted(Comparator.comparing(ChmConsignment::getCreateTime).reversed()).collect(Collectors.toList());
chmConsignmentDB = sortList.get(0);
}
//3、新增或更新
//新增:如果没有就插入,或者存在草稿、sep新建、新建的并且运单id不一样就新增一条
//新增:如果没有就插入
if (Objects.equals(chmConsignmentDB,null)){
log.info("新增主单"+ fedexMawb.getBillNo());
//如果有dm004把dm004更新上去
updateDM004(chmConsignment);
ChmConsignment chmConsignmentSaveResult = this.saveChmConsignment(chmConsignment);
if(!Objects.equals(chmConsignmentSaveResult,null)){
log.info("主单"+ fedexMawb.getBillNo()+" 保存成功,chmConsignmentId:"+chmConsignmentSaveResult.getId());
......@@ -612,9 +725,9 @@ public class ChmConsignmentService {
//条件1、状态为 C类待申报
//条件2、本次推送时间 > 上次推送的时间
}else if(!Objects.equals(chmConsignmentDB,null)
&& Objects.equals(chmConsignmentDB.getConsStatusDic().getCode(),"transferWaybillStatus_16")
//&& Objects.equals(chmConsignmentDB.getConsStatusDic().getCode(),"transferWaybillStatus_16")
//TODO 提交时需要打开
&& pushTime.getTime()>chmConsignmentDB.getUpdateTime().getTime()
//&& pushTime.getTime()>chmConsignmentDB.getUpdateTime().getTime()
){
//更新数据
log.info("更新主单"+ fedexMawb.getBillNo());
......@@ -627,9 +740,10 @@ public class ChmConsignmentService {
}
}
}
//如果有dm004把dm004更新上去
updateDM004(chmConsignment);
chmConsignment.setId(chmConsignmentDB.getId());
chmConsignment.setCreateTime(chmConsignmentDB.getCreateTime());
//chmConsignment.setCreateTime(chmConsignmentDB.getCreateTime());
chmConsignment.setUpdateTime(pushTime);
ChmConsignment updateResult = this.saveChmConsignment(chmConsignment);
if(!Objects.equals(updateResult,null)){
......@@ -640,6 +754,13 @@ public class ChmConsignmentService {
result.setMsg("主单"+ fedexMawb.getBillNo()+" 更新失败");
return result;
}
}else{
//条件1、状态为 C类待申报
//条件2、本次推送时间 > 上次推送的时间 条件不满足
log.info("主单"+ fedexMawb.getBillNo()+" 更新失败");
result.setCode(ErrorCodeEnum.ERROR_30003.getCode());
result.setMsg("主单"+ fedexMawb.getBillNo()+" 条件1、状态为 C类待申报,条件2、本次推送时间 > 上次推送的时间,条件不满足更新失败");
return result;
}
}catch (Exception e){
log.error(""+e.getMessage());
......
......@@ -113,13 +113,13 @@ public class FedexService {
* @param fedexMawb
* @return
*/
public ResultRS checkFedexMawb(FedexMawb fedexMawb,AppInfo appInfo){
public ResultRS checkFedexMawb(FedexMawb fedexMawb,AppInfo appInfo,String appId){
ResultRS result = new ResultRS(Boolean.FALSE,null,null,null);
try{
log.info("checkMawb start>>>>>>>>>> mawb:"+gson.toJson(fedexMawb));
//1、将请求转换为运单
ChmConsignment chmConsignment=consignmentService.convertToChmConsignmentFedex(fedexMawb,null,"IDE-ICLEAR-API",appInfo);
ChmConsignment chmConsignment=consignmentService.convertToChmConsignmentFedex(fedexMawb,null,appId,appInfo);
if(Objects.equals(chmConsignment,null)){
result.setCode(ErrorCodeEnum.ERROR_7.getCode());
result.setMsg(ErrorCodeEnum.ERROR_7.getName());
......
package com.erry.iclear.dateInterface.service;
import com.erry.iclear.dateInterface.enums.ErrorCodeEnum;
import com.erry.iclear.dateInterface.api.request.HsCodeParam;
import com.erry.iclear.dateInterface.api.response.ResultHsCode;
import com.erry.iclear.dateInterface.common.Constant;
import com.erry.iclear.dateInterface.dto.HsCodeAndDescriptionDto;
import com.erry.iclear.dateInterface.entity.HsCode;
import com.erry.iclear.dateInterface.entity.HsCodeAndDescription;
import com.erry.iclear.dateInterface.enums.ErrorCodeEnum;
import com.erry.iclear.dateInterface.repository.DictionaryEntriesRepository;
import com.erry.iclear.dateInterface.repository.HsCodeAndDescriptionRepository;
import com.erry.iclear.dateInterface.repository.HsCodeRepository;
import com.erry.iclear.dateInterface.util.StringUtil;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.*;
import java.math.BigDecimal;
import java.util.Arrays;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
/**
* hscode service
......@@ -27,6 +34,8 @@ public class HsCodeService {
HsCodeRepository hsCodeRepository;
@Autowired
DictionaryEntriesRepository dicEntriesRepository;
@Autowired
HsCodeAndDescriptionRepository hsCodeAndDescriptionRepository;
/**
* 根据hscode编码查询对应的hscode
......@@ -168,29 +177,73 @@ public class HsCodeService {
* 2023年2月24日17:29:49
*/
public void setHscodeSupervise(List<HsCode> hsCodeList){
List<Long> hsCodeIds = new ArrayList<>();
Map<String,Object> hscodeMap = this.getHscodeSupervise();
StringBuffer shsql = new StringBuffer("'");
if (hscodeMap !=null && hscodeMap.size()>0){
for (Map.Entry hscodeEntry :hscodeMap.entrySet()){
HsCode hsCode = (HsCode) hscodeEntry.getValue();
hsCodeIds.add(hsCode.getId());
Map hsCodeAndDescription1 = new HashMap();
List<HsCodeAndDescription> hsCodeAndDescriptionList = hsCodeAndDescriptionRepository.selectAndType(1);
if (hsCodeAndDescriptionList.size() > 0) {
for (HsCodeAndDescription hsCodeAndDescription : hsCodeAndDescriptionList) {
HsCodeAndDescriptionDto hsCodeAndDescriptionDto = new HsCodeAndDescriptionDto(hsCodeAndDescription);
hsCodeAndDescription1.put(hsCodeAndDescriptionDto.getB(), hsCodeAndDescriptionDto);
}
}
hsCodeList.forEach(hsCode->{
//判断该hscode是否只能申报D类
if(hsCodeIds.contains(hsCode.getId())){
//d类
hsCode.setRestrictedC(1);
}else{
//C类
hsCode.setRestrictedC(0);
}
//如果ID为空,则设置为空
if(hsCode.getId() == null){
hsCode.setRestrictedC(null);
}
});
List<String> dictionaryEntriesList = dicEntriesRepository.findDicEntByCodeList(Constant.supervise_condition,1);
for (HsCode hsCode : hsCodeList) {
Map<String,Object> hscodeMap = new HashMap<>();
hscodeMap.put("success",false);
Boolean isTrue = false;
if (hsCode !=null){
if(hsCodeAndDescription1.size()>0){
String fieldValue =getSubHscode(hsCode.getSkuCode());
if (hsCodeAndDescription1.size()>0 && !StringUtil.isEmptyWithTrim(fieldValue)){
//hsCodeAndDescription1.get(fieldValue);
if (hsCodeAndDescription1.get(fieldValue) != null){
isTrue = true;
}
}
}
if (dictionaryEntriesList != null && dictionaryEntriesList.size() >0){
for (String str : dictionaryEntriesList){
if (!StringUtil.isEmptyWithTrim(hsCode.getMonitorCondition()) || hsCode.getOutRate() != null){
if (hsCode.getMonitorCondition().indexOf(str) > -1 || hsCode.getOutRate().compareTo(BigDecimal.valueOf(0)) > 0){
isTrue = true;
}
}
}
}
if (isTrue){
hsCode.setRestrictedC(1);
}else {
hsCode.setRestrictedC(0);
}
if (hsCode.getId()==null){
hsCode.setRestrictedC(null);
}
}
}
// List<Long> hsCodeIds = new ArrayList<>();
// Map<String,Object> hscodeMap = this.getHscodeSupervise();
// StringBuffer shsql = new StringBuffer("'");
// if (hscodeMap !=null && hscodeMap.size()>0){
// for (Map.Entry hscodeEntry :hscodeMap.entrySet()){
// HsCode hsCode = (HsCode) hscodeEntry.getValue();
// hsCodeIds.add(hsCode.getId());
// }
// }
// hsCodeList.forEach(hsCode->{
// //判断该hscode是否只能申报D类
// if(hsCodeIds.contains(hsCode.getId())){
// //d类
// hsCode.setRestrictedC(1);
// }else{
// //C类
// hsCode.setRestrictedC(0);
// }
// //如果ID为空,则设置为空
// if(hsCode.getId() == null){
// hsCode.setRestrictedC(null);
// }
// });
}
/**
......
package com.erry.iclear.dateInterface.service;
import com.erry.iclear.dateInterface.enums.ErrorCodeEnum;
import com.erry.iclear.dateInterface.api.request.FedexMawb;
import com.erry.iclear.dateInterface.api.request.FedexMawbDetail;
import com.erry.iclear.dateInterface.api.request.Mawb;
import com.erry.iclear.dateInterface.api.request.MawbDetail;
import com.erry.iclear.dateInterface.api.response.IClearCheckResult;
import com.erry.iclear.dateInterface.api.response.ResultRS;
import com.erry.iclear.dateInterface.common.Constant;
import com.erry.iclear.dateInterface.entity.ChmConsignment;
import com.erry.iclear.dateInterface.entity.ChmConsignmentDetail;
import com.erry.iclear.dateInterface.entity.DictionaryEntries;
import com.erry.iclear.dateInterface.entity.SysUser;
import com.erry.iclear.dateInterface.enums.ErrorCodeEnum;
import com.erry.iclear.dateInterface.repository.DictionaryEntriesRepository;
import com.erry.iclear.dateInterface.repository.MawbRepository;
import com.erry.iclear.dateInterface.repository.SysUserRepository;
import com.erry.iclear.dateInterface.util.HttpUtils;
import com.erry.iclear.dateInterface.util.JsonToJava;
import com.erry.iclear.dateInterface.util.StringUtil;
import com.google.gson.Gson;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Service;
......@@ -40,6 +48,12 @@ public class MawbService {
@Autowired
private ChmConsignmentDetailService consignmentDetailService;
@Autowired
private DictionaryEntriesRepository dictionaryEntriesRepository;
@Autowired
private SysUserRepository sysUserRepository;
/**
* 保存主单Request
* @param mawb
......@@ -60,6 +74,16 @@ public class MawbService {
return map;
}
public String checkUser(String loginName){
String result = null;
SysUser sysUser = sysUserRepository.findUserByLoginName(loginName);
if (sysUser == null){
result = "该用户不存在";
return result;
}
return result;
}
public String checkMawbBaseInfo(Mawb mawb){
......@@ -165,18 +189,138 @@ public class MawbService {
}
return "";
}
/**
* 检查成交币制在系统中是否有效 Constant.CURRENCY_SYSTEM+ mawbDetail.getTradeCurr();
* 成交币制 TradeCurr
* 杂费币制 OtherCurr
* 运费币制 FeeCurr
* 保费币制 InsurCurr
*
*/
public ResultRS checkCurrency(Mawb mawb){
ResultRS result = new ResultRS(Boolean.TRUE,null,null,null);
String feeCurr = mawb.getFeeCurr();
DictionaryEntries feeCurrDict = Constant.dictionaryEntriesCache.get(Constant.CURRENCY_SYSTEM + feeCurr);
String otherCurr = mawb.getOtherCurr();
DictionaryEntries otherCurrDict = Constant.dictionaryEntriesCache.get(Constant.CURRENCY_SYSTEM + otherCurr);
String insurCurr = mawb.getInsurCurr();
DictionaryEntries insurCurrDict = Constant.dictionaryEntriesCache.get(Constant.CURRENCY_SYSTEM + insurCurr);
//运费币制检查
if (StringUtils.isNotEmpty(feeCurr) && Objects.isNull(feeCurrDict) ){
result.setSuccess(Boolean.FALSE);
result.setCode(ErrorCodeEnum.ERROR_30106.getCode());
result.setMsg(ErrorCodeEnum.ERROR_30106.getName().replace("{columnName}","运费"));
return result;
}
//杂费币制检查
if (StringUtils.isNotEmpty(otherCurr) && Objects.isNull(otherCurrDict) ){
result.setSuccess(Boolean.FALSE);
result.setCode(ErrorCodeEnum.ERROR_30106.getCode());
result.setMsg(ErrorCodeEnum.ERROR_30106.getName().replace("{columnName}","杂费"));
return result;
}
//保费币制检查
if (StringUtils.isNotEmpty(insurCurr) && Objects.isNull(insurCurrDict) ){
result.setSuccess(Boolean.FALSE);
result.setCode(ErrorCodeEnum.ERROR_30106.getCode());
result.setMsg(ErrorCodeEnum.ERROR_30106.getName().replace("{columnName}","保费"));
return result;
}
//申报币制检查
List<MawbDetail> mawbDetailList = mawb.getMawbDetailList();
for (int i = 0, maxi = mawbDetailList.size(); i < maxi; i++) {
MawbDetail mawbDetail = mawbDetailList.get(i);
String tradeCurr = mawbDetail.getTradeCurr();
DictionaryEntries tradeCurrDict = Constant.dictionaryEntriesCache.get(Constant.CURRENCY_SYSTEM + tradeCurr);
if((StringUtils.isNotEmpty(tradeCurr) && Objects.isNull(tradeCurrDict))){
result.setSuccess(Boolean.FALSE);
result.setCode(ErrorCodeEnum.ERROR_30106.getCode());
result.setMsg(ErrorCodeEnum.ERROR_30106.getName().replace("{columnName}",""));
break;
}
}
return result;
}
/**
* 检查成交币制在系统中是否有效 Constant.CURRENCY_SYSTEM+ mawbDetail.getTradeCurr();
* 成交币制 TradeCurr
* 杂费币制 OtherCurr
* 运费币制 FeeCurr
* 保费币制 InsurCurr
*
*/
public ResultRS checkCurrency(FedexMawb mawb){
ResultRS result = new ResultRS(Boolean.TRUE,null,null,null);
String feeCurr = mawb.getFeeCurr();
DictionaryEntries feeCurrDict = Constant.dictionaryEntriesCache.get(Constant.CURRENCY_SYSTEM + feeCurr);
String otherCurr = mawb.getOtherCurr();
DictionaryEntries otherCurrDict = Constant.dictionaryEntriesCache.get(Constant.CURRENCY_SYSTEM + otherCurr);
String insurCurr = mawb.getInsurCurr();
DictionaryEntries insurCurrDict = Constant.dictionaryEntriesCache.get(Constant.CURRENCY_SYSTEM + insurCurr);
//运费币制检查
if (StringUtils.isNotEmpty(feeCurr) && Objects.isNull(feeCurrDict) ){
result.setSuccess(Boolean.FALSE);
result.setCode(ErrorCodeEnum.ERROR_30106.getCode());
result.setMsg(ErrorCodeEnum.ERROR_30106.getName().replace("{columnName}","运费"));
return result;
}
//杂费币制检查
if (StringUtils.isNotEmpty(otherCurr) && Objects.isNull(otherCurrDict) ){
result.setSuccess(Boolean.FALSE);
result.setCode(ErrorCodeEnum.ERROR_30106.getCode());
result.setMsg(ErrorCodeEnum.ERROR_30106.getName().replace("{columnName}","杂费"));
return result;
}
//保费币制检查
if (StringUtils.isNotEmpty(insurCurr) && Objects.isNull(insurCurrDict) ){
result.setSuccess(Boolean.FALSE);
result.setCode(ErrorCodeEnum.ERROR_30106.getCode());
result.setMsg(ErrorCodeEnum.ERROR_30106.getName().replace("{columnName}","保费"));
return result;
}
//申报币制检查
List<FedexMawbDetail> mawbDetailList = mawb.getMawbDetailList();
for (int i = 0, maxi = mawbDetailList.size(); i < maxi; i++) {
FedexMawbDetail mawbDetail = mawbDetailList.get(i);
String tradeCurr = mawbDetail.getTradeCurr();
DictionaryEntries tradeCurrDict = Constant.dictionaryEntriesCache.get(Constant.CURRENCY_SYSTEM + tradeCurr);
if((StringUtils.isNotEmpty(tradeCurr) && Objects.isNull(tradeCurrDict))){
result.setSuccess(Boolean.FALSE);
result.setCode(ErrorCodeEnum.ERROR_30106.getCode());
result.setMsg(ErrorCodeEnum.ERROR_30106.getName().replace("{columnName}",""));
break;
}
}
return result;
}
/**
* 校验主单
* @param mawb
* @return
*/
public ResultRS checkMawb(Mawb mawb){
public ResultRS checkMawb(Mawb mawb,String appId){
ResultRS result = new ResultRS(Boolean.FALSE,null,null,null);
try{
log.info("checkMawb start>>>>>>>>>> mawb:"+gson.toJson(mawb));
//1、将请求转换为运单
ChmConsignment chmConsignment=consignmentService.convertToChmConsignment(mawb,null,"IDE-ICLEAR-API");
ChmConsignment chmConsignment=consignmentService.convertToChmConsignment(mawb,null,appId);
if(Objects.equals(chmConsignment,null)){
result.setCode(ErrorCodeEnum.ERROR_30001.getCode());
result.setMsg(ErrorCodeEnum.ERROR_30001.getName());
......
......@@ -91,8 +91,13 @@ public class FileUtils {
// convertBase64ToFile(sb.toString(),"C:\\Users\\erry-Fedex\\Documents\\WeChat Files\\hyssmt\\FileStorage\\File\\2023-07\\","6666666666666.PDF");
// String str = convertFileToBase64("C:\\Users\\erry-Fedex\\Documents\\WeChat Files\\hyssmt\\FileStorage\\File\\2023-07\\PEK00000008IM202307061516013911.PDF");
// convertBase64ToFile(str,"C:\\Users\\erry-Fedex\\Documents\\WeChat Files\\hyssmt\\FileStorage\\File\\2023-07\\","6666666666666.PDF");
String str = convertFileToBase64("C:\\Users\\erry-Fedex\\Documents\\WeChat Files\\hyssmt\\FileStorage\\File\\2023-07\\20220909134833_0159806202504.PDF");
convertBase64ToFile(str,"C:\\Users\\erry-Fedex\\Documents\\WeChat Files\\hyssmt\\FileStorage\\File\\2023-07\\","77777777777777.PDF");
String str = convertFileToBase64("C:\\Users\\erry-Fedex\\Desktop\\630315652909.pdf");
// convertBase64ToFile(str,"C:\\Users\\erry-Fedex\\Desktop\\","77777777777777.PDF");
System.out.println(str);
String filePath="C:\\Users\\erry-Fedex\\Desktop\\33333.txt";
FileOutputStream fos = new FileOutputStream(filePath);
fos.write(str.getBytes());
fos.close();
}
}
......
......@@ -44,4 +44,8 @@ stamp_path=D:/workspace/prjIClear/src/main/webapp/upload/attachment/slipType_chm
stamp_file_name=stamp.png
#\u4EE3\u7406\u5730\u5740\uFF08\u5237\u65B0token\u3001\u4F20\u8F93\u6D77\u5173\u56DE\u6267\u5730\u5740\u3001\u63A8\u9001\u5B8C\u6574\u62A5\u6587\u5730\u5740\uFF09
api.address.proxy-url=cn2-proxy.apac.fedex.com
api.address.proxy-port=3128
\ No newline at end of file
api.address.proxy-port=3128
#return_message job email
send_email_msg=zhouling.zhang@erry.com;
send_email_cc=ICE-IClear-Support@erry.com
\ No newline at end of file
......
......@@ -38,3 +38,7 @@ stamp_file_name=stamp.png
#\u4EE3\u7406\u5730\u5740\uFF08\u5237\u65B0token\u3001\u4F20\u8F93\u6D77\u5173\u56DE\u6267\u5730\u5740\u3001\u63A8\u9001\u5B8C\u6574\u62A5\u6587\u5730\u5740\uFF09
api.address.proxy-url=cn2-proxy.apac.fedex.com
api.address.proxy-port=3128
#return_message job email
send_email_msg=hyssmt@vip.qq.com,li.chang@erry.com,yi.zhou@erry.com,peterhuang@fedex.com
send_email_cc=ICE-IClear-Support@erry.com
\ No newline at end of file
......
......@@ -37,4 +37,8 @@ stamp_path=/var/share/iclear/resources/upload/attachment/slipType_chm/
stamp_file_name=stamp.png
#\u4EE3\u7406\u5730\u5740\uFF08\u5237\u65B0token\u3001\u4F20\u8F93\u6D77\u5173\u56DE\u6267\u5730\u5740\u3001\u63A8\u9001\u5B8C\u6574\u62A5\u6587\u5730\u5740\uFF09
api.address.proxy-url=cn2-proxy.apac.fedex.com
api.address.proxy-port=3128
\ No newline at end of file
api.address.proxy-port=3128
#return_message job email
send_email_msg=zhouling.zhang@erry.com;
send_email_cc=ICE-IClear-Support@erry.com
\ No newline at end of file
......
......@@ -26,9 +26,4 @@ smtp_pwd=
#bcc
email_bcc=donotreply@fedex.com
#email link
#email_link=http://localhost:8080/Exp
#user email
send_email=hyssmt@vip.qq.com,li.chang@erry.com
#return_message job email
send_email_msg=hyssmt@vip.qq.com,li.chang@erry.com,yi.zhou@erry.com
send_email_cc=ICE-IClear-Support@erry.com
#email_link=http://localhost:8080/Exp
\ No newline at end of file
......
......@@ -33,7 +33,7 @@ public class ApiTest {
public static void main(String[] args) throws Exception{
// BASF,iClearExportC,6db193cb4165a71b
System.out.println(new Date(Long.valueOf(timeStamp)));
String token = SHA256Util.getSHA256String("IMPORT" + "iClearExportIMPORT" + "2486378add08d872" + ApiTest.timeStamp);
String token = SHA256Util.getSHA256String("SCMHOME" + "iClearExportSCMHOME" + "e9b55bcf692eb698" + ApiTest.timeStamp);
System.out.println(token);
//D类申报的数据落地接口
......