Commit 5aa1d37f by zhengxj

finish 售后详情 on 20190304 by zhengxj

git-svn-id: svn://192.168.3.233/frms/code/car-service/trunk/car-service@18090 aeb6102e-e053-11e5-9fec-f9ebc45caf4b
1 parent df617fb6
...@@ -150,11 +150,12 @@ public class SysOrder { ...@@ -150,11 +150,12 @@ public class SysOrder {
@NotBlank(message="{param.not.null}", groups={Default.class}) @NotBlank(message="{param.not.null}", groups={Default.class})
private String installDeviceType; private String installDeviceType;
private Boolean isApplyAfterSale;
// @Value("${false}")
private Boolean isApplyAfterSale;
// @Value("${false}")
private Boolean isDismantle; private Boolean isDismantle;
public String getInstallDeviceType() { public String getInstallDeviceType() {
return installDeviceType; return installDeviceType;
} }
......
...@@ -927,19 +927,22 @@ public class OrderServiceImpl implements IOrderService { ...@@ -927,19 +927,22 @@ public class OrderServiceImpl implements IOrderService {
List<Integer> ids = new ArrayList<>(); List<Integer> ids = new ArrayList<>();
ids.add(sysOrderRepair.getSubOrderId()); ids.add(sysOrderRepair.getSubOrderId());
SysOrderExample orderExample = new SysOrderExample(); SysOrderExample orderExample = new SysOrderExample();
// 未完成订单(非取消 的) // 未完成检修单(非取消 的)
orderExample.createCriteria().andActiveStatusNotEqualTo((byte) 8); orderExample.createCriteria().andActiveStatusNotEqualTo((byte) 8).andIdIn(ids);
// orderDao.selectByExample(orderExample); // orderDao.selectByExample(orderExample);
long count = orderDao.countByExample(orderExample); long count = orderDao.countByExample(orderExample);
sysOrder.setIsApplyAfterSale(false);
if (count > 0) { if (count > 0) {
sysOrder.setIsApplyAfterSale(true); sysOrder.setIsApplyAfterSale(true);
} }
orderExample.clear(); orderExample.clear();
// 以完成的取消单 // 以完成的检修单
orderExample.createCriteria().andActiveStatusEqualTo((byte) 8) orderExample.createCriteria().andActiveStatusEqualTo((byte) 8)
.andOrderTypeEqualTo((byte) 2); .andOrderTypeEqualTo((byte) 2).andIdIn(ids);
count = orderDao.countByExample(orderExample); count = orderDao.countByExample(orderExample);
sysOrder.setIsDismantle(false);
if (count > 0) { if (count > 0) {
sysOrder.setIsDismantle(true); sysOrder.setIsDismantle(true);
} }
...@@ -1603,12 +1606,12 @@ public class OrderServiceImpl implements IOrderService { ...@@ -1603,12 +1606,12 @@ public class OrderServiceImpl implements IOrderService {
*/ */
@Override @Override
public SysOrder getAfterSaleDetail(Integer orderId) { public SysOrder getAfterSaleDetail(Integer orderId) {
SysOrder order=orderDao.getAfterSaleDetail(orderId); SysOrder order = orderDao.getAfterSaleDetail(orderId);
// 门店名称 // 门店名称
if (order.getShopId() != null) { if (order.getShopId() != null) {
MerchantInfo merchantInfo = new MerchantInfo(); MerchantInfo merchantInfo = new MerchantInfo();
SysMerchantExample example=new SysMerchantExample(); SysMerchantExample example = new SysMerchantExample();
example.createCriteria().andUserIdEqualTo(order.getMerchantId()); example.createCriteria().andUserIdEqualTo(order.getShopId());
merchantInfo.setName(sysMerchantDao.selectByExample(example).get(0).getShopName()); merchantInfo.setName(sysMerchantDao.selectByExample(example).get(0).getShopName());
order.setMerchantInfo(merchantInfo); order.setMerchantInfo(merchantInfo);
} }
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!