|  |  |  | 
|---|
|  |  |  | @Service | 
|---|
|  |  |  | @Slf4j | 
|---|
|  |  |  | public class TmsServiceImpl implements TmsService { | 
|---|
|  |  |  |  | 
|---|
|  |  |  | @Autowired | 
|---|
|  |  |  | private SystemDictDataBiz systemDictDataBiz; | 
|---|
|  |  |  | @Autowired | 
|---|
|  |  |  | 
|---|
|  |  |  | public TmsBaseResponse<List<TmsLockStatusQueryResponse>> lockStatusQuery(TmsLockStatusQueryRequest param){ | 
|---|
|  |  |  | String url = systemDictDataBiz.queryByCode(Constants.TSM_PARAM,Constants.TMS_INTERFACE_URL_PREFIX).getCode() | 
|---|
|  |  |  | + TMSContants.InterfacePath.getElecByContractNumberList[0]; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | TmsBaseResponse<List<TmsLockStatusQueryResponse>> response = sendHttpRequest(url,TMSContants.InterfacePath.getElecByContractNumberList[1],JSONObject.toJSONString(param) | 
|---|
|  |  |  | ,new TypeReference< TmsBaseResponse<List<TmsLockStatusQueryResponse>>>(){}); | 
|---|
|  |  |  | return  response; | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | /** | 
|---|
|  |  |  | * 运输单gis轨迹 | 
|---|
|  |  |  | * 根据区域ID集合+筛选条件(合同号、制单开始日期、制单结束日期、发货地、到货地、省份,非需要),返回合同列表信息,按照时间倒序展示; | 
|---|
|  |  |  | 
|---|
|  |  |  | public   TmsEmployeeListResponse getEmployeeList(TmsEmployeeListRequest param){ | 
|---|
|  |  |  | String url = systemDictDataBiz.queryByCode(Constants.TSM_PARAM,Constants.TMS_INTERFACE_URL_PREFIX).getCode() | 
|---|
|  |  |  | +TMSContants.InterfacePath.getEmployeeList[0]; | 
|---|
|  |  |  | TmsBaseResponse<TmsEmployeeListResponse > response = sendHttpRequest(url,TMSContants.InterfacePath.getEmployeeList[1],JSONObject.toJSONString(param) | 
|---|
|  |  |  | ,new TypeReference< TmsBaseResponse<TmsEmployeeListResponse>>(){}); | 
|---|
|  |  |  | if(response ==null || response.getData() == null){ | 
|---|
|  |  |  | TmsBaseResponse<List<TmsEmployeeListResponse>> response = sendHttpRequest(url,TMSContants.InterfacePath.getEmployeeList[1],JSONObject.toJSONString(param) | 
|---|
|  |  |  | ,new TypeReference< TmsBaseResponse<List<TmsEmployeeListResponse>>>(){}); | 
|---|
|  |  |  | if(response ==null || response.getData() == null || response.getData().size() ==0){ | 
|---|
|  |  |  | return  new TmsEmployeeListResponse(); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | return  response.getData(); | 
|---|
|  |  |  | return  response.getData().get(0); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | /** | 
|---|
|  |  |  | * 出库能力统计 | 
|---|
|  |  |  | 
|---|
|  |  |  | ,new TypeReference< TmsBaseResponse<TmsOutboundCapabilityResponse>>(){}); | 
|---|
|  |  |  | if(response ==null || response.getData() == null){ | 
|---|
|  |  |  | return  new TmsOutboundCapabilityResponse(); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | return  response.getData(); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | /** | 
|---|
|  |  |  | * 出库能力汇总接口 | 
|---|
|  |  |  | * @param param 参数 | 
|---|
|  |  |  | * @return TmsBaseResponse | 
|---|
|  |  |  | */ | 
|---|
|  |  |  | @Override | 
|---|
|  |  |  | public TmsGetOutCapabilityResponse getOutCapacity(TmsFacrotyCodeListRequest param){ | 
|---|
|  |  |  | String url = systemDictDataBiz.queryByCode(Constants.TSM_PARAM,Constants.TMS_INTERFACE_URL_PREFIX).getCode() | 
|---|
|  |  |  | +TMSContants.InterfacePath.getOutCapacity[0]; | 
|---|
|  |  |  | TmsBaseResponse<TmsGetOutCapabilityResponse > response = sendHttpRequest(url,TMSContants.InterfacePath.getOutboundCapability[1],JSONObject.toJSONString(param) | 
|---|
|  |  |  | ,new TypeReference< TmsBaseResponse<TmsGetOutCapabilityResponse>>(){}); | 
|---|
|  |  |  | if(response ==null || response.getData() == null){ | 
|---|
|  |  |  | return  new TmsGetOutCapabilityResponse(); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | return  response.getData(); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | 
|---|
|  |  |  | TmsCircleStatusListRequest p1 = new TmsCircleStatusListRequest(); | 
|---|
|  |  |  | p1.setContractNumber(param.getContractNumber()); | 
|---|
|  |  |  | result.setCicleStatusList(getCicleStatusList(p1)); | 
|---|
|  |  |  | result.setStartTransportDate(getStartTransportDateByList(result.getCicleStatusList())); | 
|---|
|  |  |  | return result; | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | private String getStartTransportDateByList(List<TmsCircleStatusResultListResponse> cicleStatusList) { | 
|---|
|  |  |  | if(cicleStatusList!=null){ | 
|---|
|  |  |  | for(TmsCircleStatusResultListResponse m :cicleStatusList){ | 
|---|
|  |  |  | if(Constants.equalsInteger(m.getKey(),TMSContants.TopStatusLevel.clysz.getKey())){ | 
|---|
|  |  |  | if(m.getSecondList()!=null){ | 
|---|
|  |  |  | for(TmsCircleStatusListResponse c :m.getSecondList()){ | 
|---|
|  |  |  | if(Constants.equalsInteger(c.getOrderStatus(),TMSContants.ChildStatusLevel.clqdapp.getOrderStatus())){ | 
|---|
|  |  |  | return  c.getRecordDate(); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | } | 
|---|
|  |  |  | } | 
|---|
|  |  |  | } | 
|---|
|  |  |  | } | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | return null; | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | /** | 
|---|
|  |  |  | * 全国到货地分布查询查询 | 
|---|
|  |  |  | * @param param 参数 | 
|---|