Commit d5b84372 by 张新旗

代码永远在路上

parent a5cf10e1
...@@ -541,8 +541,12 @@ public class WeixinServiceImpl { ...@@ -541,8 +541,12 @@ public class WeixinServiceImpl {
if("3".equals(shop1.getState())){ if("3".equals(shop1.getState())){
continue; continue;
} }
String aa = AppServiceImpl.GetDistance(Double.parseDouble(lng), Double.parseDouble(lat), Double.parseDouble(shop1.getLng()), Double.parseDouble(shop1.getLat())); if(StringUtils.isNotEmpty(lng)&&StringUtils.isNotEmpty(lat)){
shop1.setDistance(aa); String aa = AppServiceImpl.GetDistance(Double.parseDouble(lng), Double.parseDouble(lat), Double.parseDouble(shop1.getLng()), Double.parseDouble(shop1.getLat()));
shop1.setDistance(aa);
}else{
shop1.setDistance("-1");
}
String province = shop1.getProvince(); String province = shop1.getProvince();
if(proString.contains(province)){ if(proString.contains(province)){
for (JSONObject provinceObject : proviceList) { for (JSONObject provinceObject : proviceList) {
......
...@@ -33,7 +33,7 @@ public class Machine extends BaseEntity ...@@ -33,7 +33,7 @@ public class Machine extends BaseEntity
private String type; private String type;
/** 状态 1 正常 2 故障 3 关停 */ /** 状态 1 正常 2 故障 3 关停 */
@Excel(name = "状态 1 正常 2 故障 3 关停") @Excel(name = "状态 1 正常 2 故障 3 关停 11忙碌 99离线")
private String state; private String state;
/** 绑定时间 */ /** 绑定时间 */
......
...@@ -77,9 +77,18 @@ public class Shop extends BaseEntity ...@@ -77,9 +77,18 @@ public class Shop extends BaseEntity
@Excel(name = "店铺状态 1 正常 2 暂停营业 3 关闭") @Excel(name = "店铺状态 1 正常 2 暂停营业 3 关闭")
private String state; private String state;
public String getMachieStatus() {
return machieStatus;
}
public void setMachieStatus(String machieStatus) {
this.machieStatus = machieStatus;
}
private String distance; private String distance;
private String machieStatus;
/** 创建时间 */ /** 创建时间 */
@JsonFormat(pattern = "yyyy-MM-dd") @JsonFormat(pattern = "yyyy-MM-dd")
@Excel(name = "创建时间", width = 30, dateFormat = "yyyy-MM-dd") @Excel(name = "创建时间", width = 30, dateFormat = "yyyy-MM-dd")
......
...@@ -24,7 +24,7 @@ public class AppServiceImpl { ...@@ -24,7 +24,7 @@ public class AppServiceImpl {
if(StringUtils.isNotEmpty(lng)&&StringUtils.isNotEmpty(lat)){ if(StringUtils.isNotEmpty(lng)&&StringUtils.isNotEmpty(lat)){
//List<Shop> shopList = shopMapper.selectShopList(new Shop()); //List<Shop> shopList = shopMapper.selectShopList(new Shop());
shop.setDistance(AppServiceImpl.GetDistance(Double.parseDouble(lng),Double.parseDouble(lat),Double.parseDouble(shop1.getLng()),Double.parseDouble(shop1.getLat()))); shop1.setDistance(AppServiceImpl.GetDistance(Double.parseDouble(lng),Double.parseDouble(lat),Double.parseDouble(shop1.getLng()),Double.parseDouble(shop1.getLat())));
} }
return shop1; return shop1;
}else{ }else{
......
...@@ -256,9 +256,9 @@ public class MachineApiServiceImpl { ...@@ -256,9 +256,9 @@ public class MachineApiServiceImpl {
} }
public Object robotUpdate(JSONObject jsonObject) { public Object robotUpdate(JSONObject jsonObject) {
String robotID = jsonObject.getString("robotID"); String robotID = jsonObject.getString("robotId");
String status = jsonObject.getString("status"); String status = jsonObject.getString("status");
Long shopID = jsonObject.getLong("shopID"); Long shopID = jsonObject.getLong("shopId");
Machine machine = new Machine(); Machine machine = new Machine();
machine.setShopId(shopID); machine.setShopId(shopID);
machine.setId(robotID); machine.setId(robotID);
......
...@@ -100,7 +100,7 @@ public class OrderRefundServiceImpl implements IOrderRefundService ...@@ -100,7 +100,7 @@ public class OrderRefundServiceImpl implements IOrderRefundService
} }
// 制作中、制作完成、聚餐中、已完成 // 制作中、制作完成、聚餐中、已完成
String state = order.getState(); String state = order.getState();
List<String> status = Arrays.asList(OrderStatusConstant.production,OrderStatusConstant.productionCompleted,OrderStatusConstant.completed); List<String> status = Arrays.asList(OrderStatusConstant.production,OrderStatusConstant.productionCompleted,OrderStatusConstant.Taking,OrderStatusConstant.completed);
if(OrderStatusConstant.Paid.equals(state)){ if(OrderStatusConstant.Paid.equals(state)){
orderRefund.setRefundAmount(order.getAmount()); orderRefund.setRefundAmount(order.getAmount());
// 4 支付制作中 5 制作完成未取 6 取餐中 7 取餐完成 // 4 支付制作中 5 制作完成未取 6 取餐中 7 取餐完成
......
...@@ -79,6 +79,7 @@ public class ShopServiceImpl implements IShopService ...@@ -79,6 +79,7 @@ public class ShopServiceImpl implements IShopService
shop1.setMachineCount(machineMapper.selectMachineList(machine).size()); shop1.setMachineCount(machineMapper.selectMachineList(machine).size());
shop1.setSalesAmount(orderMapper.selectSalesAmount(shop1.getId())); shop1.setSalesAmount(orderMapper.selectSalesAmount(shop1.getId()));
shop1.setSalesVolume(orderMapper.selectSalesVolume(shop1.getId(),null)); shop1.setSalesVolume(orderMapper.selectSalesVolume(shop1.getId(),null));
shop1.setMachieStatus(machineMapper.selectMachineList(machine).get(0).getState());
} }
return shops; return shops;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment