|
|
@@ -7,14 +7,17 @@ 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.CloudHostUtils;
|
|
|
+import com.fs.common.utils.ServletUtils;
|
|
|
import com.fs.common.utils.StringUtils;
|
|
|
import com.fs.common.utils.poi.ExcelUtil;
|
|
|
import com.fs.company.service.ICompanyMoneyLogsService;
|
|
|
import com.fs.course.dto.FsOrderDeliveryNoteDTO;
|
|
|
import com.fs.erp.service.IErpOrderService;
|
|
|
+import com.fs.framework.web.service.TokenService;
|
|
|
import com.fs.his.domain.FsStoreOrderDf;
|
|
|
import com.fs.his.service.IFsStoreOrderDfService;
|
|
|
import com.fs.his.service.IFsUserService;
|
|
|
@@ -48,6 +51,8 @@ public class FsStoreHealthOrderScrmController extends BaseController {
|
|
|
|
|
|
@Autowired
|
|
|
private IFsStoreOrderStatusScrmService orderStatusService;
|
|
|
+ @Autowired
|
|
|
+ private TokenService tokenService;
|
|
|
|
|
|
@Autowired
|
|
|
IErpOrderService erpOrderService;
|
|
|
@@ -93,6 +98,7 @@ public class FsStoreHealthOrderScrmController extends BaseController {
|
|
|
dataTable.setMsg("knt");
|
|
|
}
|
|
|
if (list != null) {
|
|
|
+ LoginUser loginUser = tokenService.getLoginUser(ServletUtils.getRequest());
|
|
|
for (FsStoreOrderVO vo : list) {
|
|
|
if(vo.getPhone()!=null){
|
|
|
vo.setPhone(vo.getPhone().replaceAll("(\\d{3})\\d*(\\d{4})", "$1****$2"));
|
|
|
@@ -105,6 +111,17 @@ public class FsStoreHealthOrderScrmController extends BaseController {
|
|
|
vo.setErpAccount(df.getLoginAccount());
|
|
|
}
|
|
|
}
|
|
|
+ //
|
|
|
+ if (loginUser.getPermissions().contains("his:storeAfterSales:finance") || loginUser.getPermissions().contains("*:*:*")) {
|
|
|
+ vo.setFPrice(vo.getCost().multiply(BigDecimal.valueOf(vo.getTotalNum())));
|
|
|
+ } else {
|
|
|
+ vo.setPayPostage(BigDecimal.ZERO);
|
|
|
+ vo.setCost(BigDecimal.ZERO);
|
|
|
+ vo.setFPrice(BigDecimal.ZERO);
|
|
|
+ vo.setPayDelivery(BigDecimal.ZERO);
|
|
|
+ vo.setBarCode("");
|
|
|
+ vo.setCateName("");
|
|
|
+ }
|
|
|
|
|
|
}
|
|
|
}
|
|
|
@@ -269,6 +286,7 @@ public class FsStoreHealthOrderScrmController extends BaseController {
|
|
|
List<FsStoreOrderItemExportVO> list = orderItemService.selectFsStoreOrderItemListExportVO(param);
|
|
|
//对手机号脱敏
|
|
|
if (list != null) {
|
|
|
+ LoginUser loginUser = tokenService.getLoginUser(ServletUtils.getRequest());
|
|
|
for (FsStoreOrderItemExportVO vo : list) {
|
|
|
if (vo.getUserPhone() != null) {
|
|
|
String phone = vo.getUserPhone().replaceAll("(\\d{3})\\d*(\\d{1})", "$1****$2");
|
|
|
@@ -281,6 +299,16 @@ public class FsStoreHealthOrderScrmController extends BaseController {
|
|
|
} catch (Exception e) {
|
|
|
}
|
|
|
}
|
|
|
+ //
|
|
|
+ if (loginUser.getPermissions().contains("his:storeAfterSales:finance") || loginUser.getPermissions().contains("*:*:*")) {
|
|
|
+ vo.setFPrice(vo.getCost().multiply(BigDecimal.valueOf(vo.getTotalNum())));
|
|
|
+ } else {
|
|
|
+ vo.setPayPostage(BigDecimal.ZERO);
|
|
|
+ vo.setCost(BigDecimal.ZERO);
|
|
|
+ vo.setFPrice(BigDecimal.ZERO);
|
|
|
+ vo.setBarCode("");
|
|
|
+ vo.setCateName("");
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
ExcelUtil<FsStoreOrderItemExportVO> util = new ExcelUtil<FsStoreOrderItemExportVO>(FsStoreOrderItemExportVO.class);
|
|
|
@@ -314,6 +342,7 @@ public class FsStoreHealthOrderScrmController extends BaseController {
|
|
|
List<FsStoreOrderItemExportVO> list = orderItemService.selectFsStoreOrderItemListExportVO(param);
|
|
|
//对手机号脱敏
|
|
|
if (list != null) {
|
|
|
+ LoginUser loginUser = tokenService.getLoginUser(ServletUtils.getRequest());
|
|
|
for (FsStoreOrderItemExportVO vo : list) {
|
|
|
if (!StringUtils.isEmpty(vo.getJsonInfo())) {
|
|
|
try {
|
|
|
@@ -322,6 +351,15 @@ public class FsStoreHealthOrderScrmController extends BaseController {
|
|
|
} catch (Exception e) {
|
|
|
}
|
|
|
}
|
|
|
+ if (loginUser.getPermissions().contains("his:storeAfterSales:finance") || loginUser.getPermissions().contains("*:*:*")) {
|
|
|
+ vo.setFPrice(vo.getCost().multiply(BigDecimal.valueOf(vo.getTotalNum())));
|
|
|
+ } else {
|
|
|
+ vo.setPayPostage(BigDecimal.ZERO);
|
|
|
+ vo.setCost(BigDecimal.ZERO);
|
|
|
+ vo.setFPrice(BigDecimal.ZERO);
|
|
|
+ vo.setBarCode("");
|
|
|
+ vo.setCateName("");
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
ExcelUtil<FsStoreOrderItemExportVO> util = new ExcelUtil<FsStoreOrderItemExportVO>(FsStoreOrderItemExportVO.class);
|