Commit e58bf2ee by xiaoyj

轨迹修改返回

git-svn-id: svn://192.168.3.233/frms/code/car-service/trunk/car-service@21830 aeb6102e-e053-11e5-9fec-f9ebc45caf4b
1 parent 20319dd9
......@@ -4,8 +4,9 @@ import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;
import com.glsx.common.constants.ResultObject;
import com.glsx.ordercenter.constants.ResultCodeEnum;
import com.glsx.ordercenter.dto.Traces;
import com.glsx.ordercenter.dto.TracesVo;
import com.glsx.ordercenter.pojo.SysLogistics;
import com.glsx.ordercenter.pojo.Test;
import com.glsx.ordercenter.service.LogisticsService;
import com.glsx.ordercenter.utils.KdApiUtil;
import org.springframework.beans.factory.annotation.Autowired;
......@@ -43,7 +44,14 @@ public class LogisticsController extends BaseController{
object=traces.get(i);
objects.add(object);
}
return new ResultObject(ResultCodeEnum.SUCCESS.getCode(),ResultCodeEnum.SUCCESS.getMsg(),objects);
List<Traces> list=objects.toJavaList(Traces.class);
TracesVo tracesVo=new TracesVo();
tracesVo.setTraces(list);
tracesVo.setExNo(expNo);
//通过物流单号查询物流公司
String expressCompany=logisticsService.selectByExpNo(expNo);
tracesVo.setExpressCompany(expressCompany);
return new ResultObject(ResultCodeEnum.SUCCESS.getCode(),ResultCodeEnum.SUCCESS.getMsg(),tracesVo);
} catch (Exception e) {
logger.info("物流信息查询异常");
}
......
......@@ -30,4 +30,6 @@ public interface SysLogisticsMapper {
int updateByPrimaryKey(SysLogistics record);
List<SysLogistics> listSysLogistics();
String selectByExpNo(String expNo);
}
\ No newline at end of file
......@@ -6,5 +6,5 @@ import java.util.List;
public interface LogisticsService {
List<SysLogistics> listSysLogistics();
String selectByExpNo(String expNo);
}
......@@ -19,4 +19,9 @@ public class LogisticsServiceImpl implements LogisticsService{
public List<SysLogistics> listSysLogistics() {
return sysLogisticsMapper.listSysLogistics();
}
@Override
public String selectByExpNo(String expNo) {
return sysLogisticsMapper.selectByExpNo(expNo);
}
}
......@@ -203,4 +203,10 @@
uniCODE ASC;
</select>
<select id="selectByExpNo" resultType="java.lang.String">
SELECT sl.express_company AS expressCompany from sys_indent_logistics sil
LEFT JOIN sys_logistics sl ON sil.logistics_unicode=sl.unicode
WHERE sil.logistics_no=#{expNo}
</select>
</mapper>
\ No newline at end of file
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!