|
@@ -7,9 +7,11 @@ import com.fs.common.annotation.Log;
|
|
|
import com.fs.common.core.controller.BaseController;
|
|
|
import com.fs.common.core.domain.AjaxResult;
|
|
|
import com.fs.common.core.domain.R;
|
|
|
+import com.fs.common.core.domain.model.LoginUser;
|
|
|
import com.fs.common.core.page.TableDataInfo;
|
|
|
import com.fs.common.enums.BusinessType;
|
|
|
import com.fs.common.utils.ParseUtils;
|
|
|
+import com.fs.common.utils.ServletUtils;
|
|
|
import com.fs.common.utils.StringUtils;
|
|
|
import com.fs.common.utils.poi.ExcelUtil;
|
|
|
import com.fs.company.param.CompanyStoreOrderMoneyLogsListParam;
|
|
@@ -20,6 +22,7 @@ import com.fs.erp.domain.ErpOrderQuery;
|
|
|
import com.fs.erp.dto.ErpOrderQueryRequert;
|
|
|
import com.fs.erp.dto.ErpOrderQueryResponse;
|
|
|
import com.fs.erp.service.IErpOrderService;
|
|
|
+import com.fs.framework.web.service.TokenService;
|
|
|
import com.fs.his.domain.FsUser;
|
|
|
import com.fs.his.service.IFsExpressService;
|
|
|
import com.fs.his.service.IFsUserService;
|
|
@@ -101,6 +104,9 @@ public class FsStoreOrderScrmController extends BaseController {
|
|
|
@Autowired
|
|
|
private IFsStoreOrderAuditLogScrmService orderAuditLogService;
|
|
|
|
|
|
+ @Autowired
|
|
|
+ private TokenService tokenService;
|
|
|
+
|
|
|
private IErpOrderService getErpService(){
|
|
|
//判断是否开启erp
|
|
|
IErpOrderService erpOrderService = null;
|
|
@@ -255,6 +261,9 @@ public class FsStoreOrderScrmController extends BaseController {
|
|
|
List<FsStoreOrderExportVO> list = fsStoreOrderService.selectFsStoreOrderListVOByExport(param);
|
|
|
//对手机号脱敏
|
|
|
if (list != null) {
|
|
|
+ //获取当前账号角色权限
|
|
|
+ LoginUser loginUser = tokenService.getLoginUser(ServletUtils.getRequest());
|
|
|
+
|
|
|
for (FsStoreOrderExportVO vo : list) {
|
|
|
if (vo.getPhone() != null) {
|
|
|
vo.setPhone(vo.getPhone().replaceAll("(\\d{3})\\d*(\\d{4})", "$1****$2"));
|
|
@@ -272,6 +281,37 @@ public class FsStoreOrderScrmController extends BaseController {
|
|
|
}
|
|
|
|
|
|
|
|
|
+ /**
|
|
|
+ * 导出订单列表(明文)
|
|
|
+ */
|
|
|
+ @PreAuthorize("@ss.hasPermi('store:storeOrder:export:details')")
|
|
|
+ @Log(title = "订单", businessType = BusinessType.EXPORT)
|
|
|
+ @GetMapping("/exportDetails")
|
|
|
+ public AjaxResult exportDetails(FsStoreOrderParam param) {
|
|
|
+ if ("".equals(param.getBeginTime()) && "".equals(param.getEndTime())){
|
|
|
+ param.setBeginTime(null);
|
|
|
+ param.setEndTime(null);
|
|
|
+ }
|
|
|
+ if (fsStoreOrderService.isEntityNull(param)){
|
|
|
+ return AjaxResult.error("请筛选数据导出");
|
|
|
+ }
|
|
|
+ if(!StringUtils.isEmpty(param.getCreateTimeRange())){
|
|
|
+ param.setCreateTimeList(param.getCreateTimeRange().split("--"));
|
|
|
+ }
|
|
|
+ if(!StringUtils.isEmpty(param.getPayTimeRange())){
|
|
|
+ param.setPayTimeList(param.getPayTimeRange().split("--"));
|
|
|
+ }
|
|
|
+ if(!StringUtils.isEmpty(param.getDeliverySendTimeRange())){
|
|
|
+ param.setDeliverySendTimeList(param.getDeliverySendTimeRange().split("--"));
|
|
|
+ }
|
|
|
+ if(!StringUtils.isEmpty(param.getDeliveryImportTimeRange())){
|
|
|
+ param.setDeliveryImportTimeList(param.getDeliveryImportTimeRange().split("--"));
|
|
|
+ }
|
|
|
+ param.setNotHealth(1);
|
|
|
+ List<FsStoreOrderExportVO> list = fsStoreOrderService.selectFsStoreOrderListVOByExport(param);
|
|
|
+ ExcelUtil<FsStoreOrderExportVO> util = new ExcelUtil<FsStoreOrderExportVO>(FsStoreOrderExportVO.class);
|
|
|
+ return util.exportExcel(list, "订单数据");
|
|
|
+ }
|
|
|
|
|
|
@PreAuthorize("@ss.hasPermi('store:storeOrder:exportItems')")
|
|
|
@Log(title = "订单明细导出", businessType = BusinessType.EXPORT)
|
|
@@ -321,6 +361,49 @@ public class FsStoreOrderScrmController extends BaseController {
|
|
|
return util.exportExcel(list, "订单明细数据");
|
|
|
}
|
|
|
|
|
|
+ /**
|
|
|
+ * 订单明细导出(明文)
|
|
|
+ * **/
|
|
|
+ @PreAuthorize("@ss.hasPermi('store:storeOrder:exportItems:details')")
|
|
|
+ @Log(title = "订单明细导出", businessType = BusinessType.EXPORT)
|
|
|
+ @GetMapping("/exportItemsDetails")
|
|
|
+ public AjaxResult exportItemsDetails(FsStoreOrderParam param) {
|
|
|
+ if ("".equals(param.getBeginTime()) && "".equals(param.getEndTime())){
|
|
|
+ param.setBeginTime(null);
|
|
|
+ param.setEndTime(null);
|
|
|
+ }
|
|
|
+ if (fsStoreOrderService.isEntityNull(param)){
|
|
|
+ return AjaxResult.error("请筛选数据导出");
|
|
|
+ }
|
|
|
+ if(!StringUtils.isEmpty(param.getCreateTimeRange())){
|
|
|
+ param.setCreateTimeList(param.getCreateTimeRange().split("--"));
|
|
|
+ }
|
|
|
+ if(!StringUtils.isEmpty(param.getPayTimeRange())){
|
|
|
+ param.setPayTimeList(param.getPayTimeRange().split("--"));
|
|
|
+ }
|
|
|
+ if(!StringUtils.isEmpty(param.getDeliveryImportTimeRange())){
|
|
|
+ param.setDeliveryImportTimeList(param.getDeliveryImportTimeRange().split("--"));
|
|
|
+ }
|
|
|
+ if(!StringUtils.isEmpty(param.getDeliverySendTimeRange())){
|
|
|
+ param.setDeliverySendTimeList(param.getDeliverySendTimeRange().split("--"));
|
|
|
+ }
|
|
|
+ param.setNotHealth(1);
|
|
|
+ List<FsStoreOrderItemExportVO> list = orderItemService.selectFsStoreOrderItemListExportVO(param);
|
|
|
+ //对手机号脱敏
|
|
|
+ if (list != null) {
|
|
|
+ for (FsStoreOrderItemExportVO vo : list) {
|
|
|
+ if (!StringUtils.isEmpty(vo.getJsonInfo())) {
|
|
|
+ try {
|
|
|
+ StoreOrderProductDTO orderProductDTO = JSONObject.parseObject(vo.getJsonInfo(), StoreOrderProductDTO.class);
|
|
|
+ BeanUtil.copyProperties(orderProductDTO, vo);
|
|
|
+ } catch (Exception e) {
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ ExcelUtil<FsStoreOrderItemExportVO> util = new ExcelUtil<FsStoreOrderItemExportVO>(FsStoreOrderItemExportVO.class);
|
|
|
+ return util.exportExcel(list, "订单明细数据");
|
|
|
+ }
|
|
|
|
|
|
@GetMapping("/orderItemsNum")
|
|
|
public R orderItemsNum(FsStoreOrderParam param) {
|