| | |
| | | import com.matrix.core.tools.excl.ExcelSheetPO; |
| | | import com.matrix.core.tools.excl.ExcelUtil; |
| | | import com.matrix.core.tools.excl.ExcelVersion; |
| | | import com.matrix.system.common.bean.BusParameterSettings; |
| | | import com.matrix.system.common.bean.SysUsers; |
| | | import com.matrix.system.common.constance.AppConstance; |
| | | import com.matrix.system.common.dao.BusParameterSettingsDao; |
| | | import com.matrix.system.common.dao.SysCompanyDao; |
| | | import com.matrix.system.common.tools.DataAuthUtil; |
| | | import com.matrix.system.common.tools.ResponseHeadUtil; |
| | | import com.matrix.system.constance.Dictionary; |
| | | import com.matrix.system.hive.bean.*; |
| | |
| | | |
| | | @Autowired |
| | | RabiitMqTemplate rabiitMqTemplate; |
| | | |
| | | @Autowired |
| | | private BusParameterSettingsDao busParameterSettingsDao; |
| | | |
| | | @Autowired |
| | | private SysProjServicesDao sysProjServicesDao; |
| | |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * 列表显示 |
| | | */ |
| | |
| | | if (StringUtils.isBlank(pageVo.getOrder())) { |
| | | pageVo.setOrder("desc"); |
| | | } |
| | | if (!DataAuthUtil.hasAllShopAuth()) { |
| | | sysOrder.setShopId(getMe().getShopId()); |
| | | } |
| | | return new AjaxResult(AjaxResult.STATUS_SUCCESS, orderService.findInPage(sysOrder, pageVo), |
| | | orderService.findTotal(sysOrder)); |
| | | } |
| | |
| | | |
| | | //查询会有所有有效的会员卡 |
| | | result.putInMap("totalMoney", moneyCardUseDao.selectVipCardTotalMoney(order.getVipId())); |
| | | |
| | | |
| | | |
| | | return result; |
| | |
| | | } |
| | | //=======================================页面转发END================================== |
| | | |
| | | |
| | | /** |
| | | * 2021-08-20 新增:erp系统取消订单接口,不做订单状态校验 |
| | | * 取消订单 |
| | | */ |
| | | @Transactional(rollbackFor = Exception.class) |
| | | @RequestMapping(value = "/cancelOrder") |
| | | @RequestMapping(value = "/erpCancelOrder") |
| | | public @ResponseBody |
| | | AjaxResult cancelOrder(Long id, Integer del) { |
| | | AjaxResult erpCancelOrder(Long id) { |
| | | |
| | | AjaxResult result = new AjaxResult(); |
| | | SysOrder order = orderService.findById(id); |
| | |
| | | } |
| | | |
| | | orderService.cancelOrder(id); |
| | | // if (del > 0) { |
| | | // orderService.removeById(id); |
| | | // result.setInfo("删除成功!"); |
| | | // } else { |
| | | |
| | | result.setInfo("取消成功!"); |
| | | // } |
| | | |
| | | result.setStatus(AjaxResult.STATUS_SUCCESS); |
| | | |
| | | return result; |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 取消订单 |
| | | */ |
| | | @Transactional(rollbackFor = Exception.class) |
| | | @RequestMapping(value = "/cancelOrder") |
| | | public @ResponseBody |
| | | AjaxResult cancelOrder(Long id, Integer del) { |
| | | |
| | | SysOrder order = orderService.findById(id); |
| | | BusParameterSettings shopManageAbleCancelDfkOrder = busParameterSettingsDao.selectCompanyParamByCode(AppConstance.SHOP_MANAGE_ABLE_CANCEL_DFK_ORDER, order.getCompanyId()); |
| | | if (StringUtils.isNotBlank(shopManageAbleCancelDfkOrder.getParamValue()) |
| | | && shopManageAbleCancelDfkOrder.getParamValue().equals(Dictionary.FLAG_YES)) { |
| | | if (!Dictionary.ORDER_STATU_DFK.equals(order.getStatu())) { |
| | | return new AjaxResult(AjaxResult.STATUS_FAIL, "您只能取消待付款订单"); |
| | | } |
| | | } |
| | | return erpCancelOrder(id); |
| | | } |
| | | |
| | | @RequestMapping(value = "/exportExcel") |
| | |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | /** |
| | | * 执行订单导出,总部和门店共用,但是搜索条件不一样 |
| | | * |
| | | * @param response |
| | | * @param sysOrder |
| | | * @throws IOException |