|
@@ -16,9 +16,15 @@ import com.fs.erp.service.IErpOrderService;
|
|
import com.fs.store.cache.IFsStoreProductCacheService;
|
|
import com.fs.store.cache.IFsStoreProductCacheService;
|
|
import com.fs.store.cache.IFsWarehouseCacheService;
|
|
import com.fs.store.cache.IFsWarehouseCacheService;
|
|
import com.fs.store.cache.impl.FsWarehouseCacheServiceImpl;
|
|
import com.fs.store.cache.impl.FsWarehouseCacheServiceImpl;
|
|
|
|
+import com.fs.store.domain.FsPatient;
|
|
|
|
+import com.fs.store.domain.FsPrescribe;
|
|
import com.fs.store.domain.FsStoreProduct;
|
|
import com.fs.store.domain.FsStoreProduct;
|
|
import com.fs.store.domain.FsWarehouses;
|
|
import com.fs.store.domain.FsWarehouses;
|
|
import com.fs.store.dto.StoreOrderProductDTO;
|
|
import com.fs.store.dto.StoreOrderProductDTO;
|
|
|
|
+import com.fs.store.mapper.FsPatientMapper;
|
|
|
|
+import com.fs.store.mapper.FsPrescribeMapper;
|
|
|
|
+import com.fs.store.mapper.FsStoreProductMapper;
|
|
|
|
+import com.fs.store.mapper.FsWarehousesMapper;
|
|
import com.fs.store.param.FsStoreOrderParam;
|
|
import com.fs.store.param.FsStoreOrderParam;
|
|
import com.fs.store.service.*;
|
|
import com.fs.store.service.*;
|
|
import com.fs.store.vo.FsStoreOrderExportVO;
|
|
import com.fs.store.vo.FsStoreOrderExportVO;
|
|
@@ -31,6 +37,7 @@ import org.springframework.web.bind.annotation.RequestMapping;
|
|
import org.springframework.web.bind.annotation.RestController;
|
|
import org.springframework.web.bind.annotation.RestController;
|
|
|
|
|
|
import java.util.List;
|
|
import java.util.List;
|
|
|
|
+import java.util.Map;
|
|
|
|
|
|
@RestController
|
|
@RestController
|
|
@RequestMapping("/store/storeOrder")
|
|
@RequestMapping("/store/storeOrder")
|
|
@@ -43,6 +50,14 @@ public class FsStoreHealthOrderController extends BaseController {
|
|
@Autowired
|
|
@Autowired
|
|
private IFsStoreProductCacheService fsStoreProductCacheService;
|
|
private IFsStoreProductCacheService fsStoreProductCacheService;
|
|
|
|
|
|
|
|
+ @Autowired
|
|
|
|
+ private FsWarehousesMapper warehousesMapper;
|
|
|
|
+
|
|
|
|
+ @Autowired
|
|
|
|
+ private FsPrescribeMapper fsPrescribeMapper;
|
|
|
|
+
|
|
|
|
+ @Autowired
|
|
|
|
+ private FsPatientMapper fsPatientMapper;
|
|
/**
|
|
/**
|
|
* 查询健康商城订单列表
|
|
* 查询健康商城订单列表
|
|
*/
|
|
*/
|
|
@@ -146,14 +161,28 @@ public class FsStoreHealthOrderController extends BaseController {
|
|
}
|
|
}
|
|
param.setIsHealth("1");
|
|
param.setIsHealth("1");
|
|
List<FsStoreOrderItemExportVO> list = orderItemService.selectFsStoreOrderItemListExportVO(param);
|
|
List<FsStoreOrderItemExportVO> list = orderItemService.selectFsStoreOrderItemListExportVO(param);
|
|
|
|
+ Map<Long, FsWarehouses> longFsWarehousesMap = warehousesMapper.queryAllWarehouses();
|
|
|
|
+ Map<Long, FsPrescribe> orderMapping = fsPrescribeMapper.queryOrderMapping();
|
|
|
|
+ Map<Long, FsPatient> patientMapping = fsPatientMapper.queryAllMapping();
|
|
//对手机号脱敏
|
|
//对手机号脱敏
|
|
if (list != null) {
|
|
if (list != null) {
|
|
for (FsStoreOrderItemExportVO vo : list) {
|
|
for (FsStoreOrderItemExportVO vo : list) {
|
|
// 设置仓库名称
|
|
// 设置仓库名称
|
|
if(ObjectUtil.isNotNull(vo.getProductId())){
|
|
if(ObjectUtil.isNotNull(vo.getProductId())){
|
|
- String warehouseCode = fsStoreProductCacheService.getWarehouseCodeByProductId(vo.getProductId());
|
|
|
|
- if(StringUtils.isNotBlank(warehouseCode)){
|
|
|
|
- vo.setWarehouseCode(warehouseCode);
|
|
|
|
|
|
+ FsWarehouses fsWarehouses = longFsWarehousesMap.get(vo.getProductId());
|
|
|
|
+ if(ObjectUtil.isNotNull(fsWarehouses)){
|
|
|
|
+ vo.setWarehouseCode(fsWarehouses.getWarehouseCode());
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ // 设置患者姓名和身份证号码
|
|
|
|
+ if(ObjectUtil.isNotNull(vo.getOrderId())) {
|
|
|
|
+ FsPrescribe fsPrescribe = orderMapping.get(vo.getOrderId());
|
|
|
|
+ if(ObjectUtil.isNotNull(fsPrescribe)){
|
|
|
|
+ FsPatient fsPatient = patientMapping.get(fsPrescribe.getPatientId());
|
|
|
|
+ if(ObjectUtil.isNotNull(fsPatient)){
|
|
|
|
+ vo.setPatientName(fsPatient.getPatientName());
|
|
|
|
+ vo.setIdCard(fsPatient.getIdCard());
|
|
|
|
+ }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
if (vo.getUserPhone() != null) {
|
|
if (vo.getUserPhone() != null) {
|