提交 81f3b9cd authored 作者: aiqingguo's avatar aiqingguo

司机上报

上级 80265945
......@@ -8,7 +8,6 @@ import com.msl.common.model.HasKey;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;
import lombok.ToString;
import java.math.BigDecimal;
import java.time.LocalDateTime;
......@@ -38,6 +37,7 @@ public class CollectTruckLocation implements HasKey<Integer> {
private String town; //乡镇
private String street; //街道
private String address; //详细地址
private String locationRemark; //司机手填地址
private String fullAddress; //全地址
private BigDecimal longitude; //经度
private BigDecimal latitude; //纬度
......
......@@ -51,14 +51,20 @@ public class CollectTruckLocationServiceImpl implements CollectTruckLocationServ
collectTruckLocation.setTown(param.getTown());
collectTruckLocation.setStreet(param.getStreet());
collectTruckLocation.setAddress(param.getAddress());
collectTruckLocation.setLocationRemark(param.getLocationRemark());
collectTruckLocation.setFullAddress("");
if (!StringUtils.isEmpty(param.getProvince())){collectTruckLocation.setFullAddress(collectTruckLocation.getFullAddress()+param.getProvince());}
if (!StringUtils.isEmpty(param.getCity())){collectTruckLocation.setFullAddress(collectTruckLocation.getFullAddress()+param.getCity());}
if (!StringUtils.isEmpty(param.getCounty())){collectTruckLocation.setFullAddress(collectTruckLocation.getFullAddress()+param.getCounty());}
if (!StringUtils.isEmpty(param.getTown())){collectTruckLocation.setFullAddress(collectTruckLocation.getFullAddress()+param.getTown());}
if (!StringUtils.isEmpty(param.getStreet())){collectTruckLocation.setFullAddress(collectTruckLocation.getFullAddress()+param.getStreet());}
if (!StringUtils.isEmpty(param.getAddress())){collectTruckLocation.setFullAddress(collectTruckLocation.getFullAddress()+param.getAddress());}
if (!StringUtils.isEmpty(param.getLocationRemark())){
collectTruckLocation.setFullAddress(param.getLocationRemark());
}
else {
if (!StringUtils.isEmpty(param.getProvince())){collectTruckLocation.setFullAddress(collectTruckLocation.getFullAddress()+param.getProvince());}
if (!StringUtils.isEmpty(param.getCity())){collectTruckLocation.setFullAddress(collectTruckLocation.getFullAddress()+param.getCity());}
if (!StringUtils.isEmpty(param.getCounty())){collectTruckLocation.setFullAddress(collectTruckLocation.getFullAddress()+param.getCounty());}
if (!StringUtils.isEmpty(param.getTown())){collectTruckLocation.setFullAddress(collectTruckLocation.getFullAddress()+param.getTown());}
if (!StringUtils.isEmpty(param.getStreet())){collectTruckLocation.setFullAddress(collectTruckLocation.getFullAddress()+param.getStreet());}
if (!StringUtils.isEmpty(param.getAddress())){collectTruckLocation.setFullAddress(collectTruckLocation.getFullAddress()+param.getAddress());}
}
collectTruckLocation.setReportTime(LocalDateTime.now());
collectTruckLocation.setCreateTime(collectTruckLocation.getReportTime());
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论