Quellcode durchsuchen

导出减少字段

yuhongqi vor 1 Woche
Ursprung
Commit
758a34633e

+ 7 - 2
fs-company/src/main/java/com/fs/company/controller/live/LiveOrderController.java

@@ -31,6 +31,7 @@ import com.fs.live.service.ILiveOrderService;
 import com.fs.live.vo.LiveGoodsVo;
 import com.fs.live.vo.LiveOrderQueryVO;
 import com.fs.live.vo.LiveOrderVo;
+import org.springframework.beans.BeanUtils;
 import com.fs.store.domain.*;
 import com.fs.store.param.FsStoreOrderBindCustomerParam;
 import com.fs.store.param.FsStoreOrderExpressParam;
@@ -214,12 +215,16 @@ public class LiveOrderController extends BaseController
     {
         liveOrder.setCompanyId(LoginContextManager.getCurrentCompanyId());
         List<LiveOrder> list = liveOrderService.selectLiveOrderListExport(liveOrder);
+        List<LiveOrderQueryVO> exportList = new java.util.ArrayList<>();
         for (LiveOrder order : list) {
             order.setUserPhone(ParseUtils.parsePhone(order.getUserPhone()));
             order.setUserAddress(ParseUtils.parseAddress(order.getUserAddress()));
+            LiveOrderQueryVO exportVo = new LiveOrderQueryVO();
+            BeanUtils.copyProperties(order, exportVo);
+            exportList.add(exportVo);
         }
-        ExcelUtil<LiveOrder> util = new ExcelUtil<LiveOrder>(LiveOrder.class);
-        return util.exportExcel(list, "订单数据");
+        ExcelUtil<LiveOrderQueryVO> util = new ExcelUtil<>(LiveOrderQueryVO.class);
+        return util.exportExcel(exportList, "订单数据");
     }
 
     /**

+ 14 - 10
fs-company/src/main/java/com/fs/store/controller/FsStoreOrderController.java

@@ -28,9 +28,11 @@ import com.fs.store.param.FsStoreOrderCreateUserParam;
 import com.fs.store.param.FsStoreOrderFinishParam;
 import com.fs.store.param.FsStoreOrderParam;
 import com.fs.store.service.*;
+import com.fs.store.vo.FsStoreOrderCompanyExportVO;
 import com.fs.store.vo.FsStoreOrderExportVO;
 import com.fs.store.vo.FsStoreOrderItemExportVO;
 import com.fs.store.vo.FsStoreOrderVO;
+import org.springframework.beans.BeanUtils;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.security.access.prepost.PreAuthorize;
 import org.springframework.validation.annotation.Validated;
@@ -157,23 +159,25 @@ public class FsStoreOrderController extends BaseController
             param.setDeliveryImportTimeList(param.getDeliveryImportTimeRange().split("--"));
         }
         List<FsStoreOrderExportVO> list = fsStoreOrderService.selectFsStoreOrderListVOByExport(param);
-        //对手机号脱敏
-        if(list!=null){
-            for(FsStoreOrderExportVO vo:list){
+        List<FsStoreOrderCompanyExportVO> exportList = new java.util.ArrayList<>();
+        if (list != null) {
+            for (FsStoreOrderExportVO vo : list) {
+                FsStoreOrderCompanyExportVO exportVo = new FsStoreOrderCompanyExportVO();
+                BeanUtils.copyProperties(vo, exportVo);
                 if (vo.getPhone() != null) {
-                    vo.setPhone(vo.getPhone().replaceAll("(\\d{3})\\d*(\\d{4})", "$1****$2"));
+                    exportVo.setPhone(vo.getPhone().replaceAll("(\\d{3})\\d*(\\d{4})", "$1****$2"));
                 }
                 if (vo.getUserPhone() != null) {
-                    vo.setUserPhone(vo.getUserPhone().replaceAll("(\\d{3})\\d*(\\d{4})", "$1****$2"));
+                    exportVo.setUserPhone(vo.getUserPhone().replaceAll("(\\d{3})\\d*(\\d{4})", "$1****$2"));
                 }
-                if (vo.getUserAddress()!=null){
-                    vo.setUserAddress(ParseUtils.parseAddress(vo.getUserAddress()));
+                if (vo.getUserAddress() != null) {
+                    exportVo.setUserAddress(ParseUtils.parseAddress(vo.getUserAddress()));
                 }
-
+                exportList.add(exportVo);
             }
         }
-        ExcelUtil<FsStoreOrderExportVO> util = new ExcelUtil<FsStoreOrderExportVO>(FsStoreOrderExportVO.class);
-        return util.exportExcel(list,"订单数据");
+        ExcelUtil<FsStoreOrderCompanyExportVO> util = new ExcelUtil<>(FsStoreOrderCompanyExportVO.class);
+        return util.exportExcel(exportList, "订单数据");
     }
 
 

+ 1 - 0
fs-service-system/src/main/java/com/fs/live/vo/LiveOrderQueryVO.java

@@ -27,6 +27,7 @@ public class LiveOrderQueryVO extends BaseEntity {
     private String userId;
 
     /** 院端用户ID(his_java) */
+    @Excel(name = "院端用户")
     private Long appUserId;
 
     /** 院端部门名称(his_java) */

+ 158 - 0
fs-service-system/src/main/java/com/fs/store/vo/FsStoreOrderCompanyExportVO.java

@@ -0,0 +1,158 @@
+package com.fs.store.vo;
+
+import com.fasterxml.jackson.annotation.JsonFormat;
+import com.fs.common.annotation.Excel;
+import lombok.Data;
+
+import java.io.Serializable;
+import java.math.BigDecimal;
+import java.util.Date;
+
+/**
+ * 公司端订单导出(不含院端部门)
+ */
+@Data
+public class FsStoreOrderCompanyExportVO implements Serializable
+{
+    private static final long serialVersionUID = 1L;
+
+    private Long id;
+
+    @Excel(name = "订单号")
+    private String orderCode;
+    @Excel(name = "会员ID")
+    private Long userId;
+
+    @Excel(name = "院端用户")
+    private Long appUserId;
+
+    @Excel(name = "管易云订单号")
+    private String extendOrderId;
+
+    @Excel(name = "所属公司")
+    private String companyName;
+    @Excel(name = "所属销售")
+    private String companyUserNickName;
+
+    @Excel(name = "推线编号")
+    private String pushCode;
+
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+    @Excel(name = "客户创建时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
+    private Date customerCreateTime;
+
+    @Excel(name = "客户来源",dictType = "crm_customer_source")
+    private String source;
+
+    @Excel(name = "成单类型", dictType = "store_order_type")
+    private String orderType;
+    @Excel(name = "套餐包分类", dictType = "store_product_package_cate")
+    private String cateId;
+
+    @Excel(name = "收货人姓名")
+    private String realName;
+
+    @Excel(name = "收货人电话")
+    private String userPhone;
+
+    @Excel(name = "详细地址")
+    private String userAddress;
+
+    @Excel(name = "商品金额",cellType= Excel.ColumnType.NUMERIC)
+    private BigDecimal totalPrice;
+
+    @Excel(name = "应付金额",cellType= Excel.ColumnType.NUMERIC)
+    private BigDecimal payPrice;
+
+    @Excel(name = "实付金额",cellType= Excel.ColumnType.NUMERIC)
+    private BigDecimal payMoney;
+
+    @Excel(name = "物流代收金额",cellType= Excel.ColumnType.NUMERIC)
+    private BigDecimal payDelivery;
+
+    @Excel(name = "支付邮费", cellType= Excel.ColumnType.NUMERIC)
+    private BigDecimal payPostage;
+
+    @Excel(name = "抵扣金额",cellType= Excel.ColumnType.NUMERIC)
+    private BigDecimal deductionPrice;
+
+    @Excel(name = "优惠券金额",cellType= Excel.ColumnType.NUMERIC)
+    private BigDecimal couponPrice;
+
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+    @Excel(name = "下单时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
+    private Date createTime;
+
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+    @Excel(name = "支付时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
+    private Date payTime;
+
+    @Excel(name = "支付方式")
+    private String payType;
+
+    @Excel(name = "订单状态", dictType = "store_order_status")
+    private String status;
+
+    @Excel(name = "交易单号")
+    private String bankTrxId;
+
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+    @Excel(name = "退款时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
+    private Date refundReasonTime;
+
+    @Excel(name = "退款金额",cellType= Excel.ColumnType.NUMERIC)
+    private BigDecimal refundPrice;
+
+    @Excel(name = "快递公司编号")
+    private String deliverySn;
+
+    @Excel(name = "快递公司")
+    private String deliveryName;
+
+    private String deliveryId;
+
+    @Excel(name = "快递单号")
+    private String deliverCode;
+
+    @Excel(name = "备注")
+    private String mark;
+
+    private String phone;
+
+    @Excel(name = "物流代收结算状态", dictType = "store_delivery_pay_status")
+    private Integer deliveryPayStatus;
+
+    @Excel(name = "快递帐单日期")
+    private String deliveryTime;
+
+    @Excel(name = "快递结算日期")
+    private String deliveryPayTime;
+
+    @Excel(name = "物流结算费用")
+    private BigDecimal deliveryPayMoney;
+
+    private String deliveryStatus;
+
+    private String deliveryType;
+    @Excel(name = "物流跟踪状态" , dictType = "store_order_delivery_type")
+    private String deliveryTypeCode;
+
+    @Excel(name = "物流状态" , dictType = "store_order_delivery_status")
+    private String kdnDeliveryStatus;
+
+    @Excel(name = "客户编码")
+    private String customerCode;
+
+    @Excel(name = "套餐名称",width = 60)
+    private String packageTitle;
+
+    @Excel(name = "是否上传凭证 0:未上传 1:已上传")
+    private Integer isUpload;
+
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+    @Excel(name = "上传时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
+    private Date uploadTime;
+
+    @Excel(name = "归属档期")
+    private String scheduleName;
+}

+ 35 - 23
fs-user-app/src/main/java/com/fs/app/controller/CommonController.java

@@ -143,32 +143,44 @@ public class CommonController extends AppBaseController {
 //		return R.ok();
 //
 //	}
+
+	@Autowired
+	IFsUserService fsUserService;
 	@ApiOperation("支付手动通知")
-	@GetMapping("/testaaa")
+	@GetMapping("/teasadc")
 	public R getPhoneByHttp(@RequestParam Integer addressId) {
 		try {
-//			String encryptedStr = CrossServiceRsaUtil.encryptForRequest("phone");
-//			String url = "http://42.194.245.189:8010/app/common/getEncryptedPhone";
-//			org.springframework.web.client.RestTemplate restTemplate = new org.springframework.web.client.RestTemplate();
-//			java.util.Map<String, Object> paramMap = new java.util.HashMap<>();
-//			paramMap.put("encryptedStr", encryptedStr);
-//			paramMap.put("addressId", addressId);
-//			org.springframework.http.HttpHeaders headers = new org.springframework.http.HttpHeaders();
-//			headers.setContentType(org.springframework.http.MediaType.APPLICATION_JSON);
-//			org.springframework.http.HttpEntity<java.util.Map<String, Object>> requestEntity = new org.springframework.http.HttpEntity<>(paramMap, headers);
-//			String responseBody = restTemplate.postForObject(url, requestEntity, String.class);
-//			if (StringUtils.isNotEmpty(responseBody)) {
-//				com.alibaba.fastjson.JSONObject respObj = com.alibaba.fastjson.JSON.parseObject(responseBody);
-//				if (respObj != null && "200".equals(respObj.getString("code"))) {
-//					String encryptedPhone = respObj.getString("data");
-//					if (StringUtils.isNotEmpty(encryptedPhone)) {
-//						String realPhone = CrossServiceRsaUtil.decryptResponse(encryptedPhone);
-//						if (StringUtils.isNotEmpty(realPhone)) {
-//							return R.ok().put("data", realPhone);
-//						}
-//					}
-//				}
-//			}
+			fsUserService.syncAppUsersForRecentLiveOrders(addressId);
+		} catch (Exception ex) {
+
+		}
+		return R.ok();
+	}
+	@ApiOperation("支付手动通知")
+	@GetMapping("/teasaaadc")
+	public R getPhoneByHtaatp(@RequestParam Integer addressId) {
+		try {
+			String encryptedStr = CrossServiceRsaUtil.encryptForRequest("phone");
+			String url = "http://42.194.245.189:8010/app/common/getEncryptedPhone";
+			org.springframework.web.client.RestTemplate restTemplate = new org.springframework.web.client.RestTemplate();
+			java.util.Map<String, Object> paramMap = new java.util.HashMap<>();
+			paramMap.put("encryptedStr", encryptedStr);
+			paramMap.put("addressId", addressId);
+			org.springframework.http.HttpHeaders headers = new org.springframework.http.HttpHeaders();
+			headers.setContentType(org.springframework.http.MediaType.APPLICATION_JSON);
+			org.springframework.http.HttpEntity<java.util.Map<String, Object>> requestEntity = new org.springframework.http.HttpEntity<>(paramMap, headers);
+			String responseBody = restTemplate.postForObject(url, requestEntity, String.class);
+
+			if (StringUtils.isNotEmpty(responseBody)) {
+				com.alibaba.fastjson.JSONObject respObj = com.alibaba.fastjson.JSON.parseObject(responseBody);
+				if (respObj != null && "200".equals(respObj.getString("code"))) {
+					String encryptedPhone = respObj.getString("data");
+					if (StringUtils.isNotEmpty(encryptedPhone)) {
+						String realPhone = CrossServiceRsaUtil.decryptResponse(encryptedPhone);
+						logger.info("realPhone:"+realPhone);
+					}
+				}
+			}
 		} catch (Exception ex) {
 
 		}