|
|
@@ -67,77 +67,40 @@ import java.util.concurrent.TimeUnit;
|
|
|
public class CommonController extends AppBaseController {
|
|
|
Logger logger = LoggerFactory.getLogger(CommonController.class);
|
|
|
@Autowired
|
|
|
- JwtUtils jwtUtils;
|
|
|
- @Autowired
|
|
|
- private ServerConfig serverConfig;
|
|
|
+ private JwtUtils jwtUtils;
|
|
|
+
|
|
|
@Autowired
|
|
|
private ISysDictDataService dictDataService;
|
|
|
|
|
|
@Autowired
|
|
|
private ISysConfigService configService;
|
|
|
- @Autowired
|
|
|
- IPrescribeService prescribeService;
|
|
|
|
|
|
@Autowired
|
|
|
- IFsStoreOrderItemService orderItemService;
|
|
|
- @Autowired
|
|
|
- IFsStoreProductService productService;
|
|
|
- @Autowired
|
|
|
- FSSysConfig fsSysConfig;
|
|
|
- @Autowired
|
|
|
- IErpShopService erpShopService;
|
|
|
+ private FSSysConfig fsSysConfig;
|
|
|
+
|
|
|
@Autowired
|
|
|
- IErpUserService userService;
|
|
|
+ private IErpUserService userService;
|
|
|
@Autowired
|
|
|
- IPayService payService;
|
|
|
+ private IPayService payService;
|
|
|
@Autowired
|
|
|
- IErpOrderService erpOrderService;
|
|
|
+ private IErpOrderService erpOrderService;
|
|
|
@Autowired
|
|
|
- IErpGoodsService goodsService;
|
|
|
+ private IErpGoodsService goodsService;
|
|
|
@Autowired
|
|
|
- PayService ybPayService;
|
|
|
+ private PayService ybPayService;
|
|
|
@Autowired
|
|
|
private IFsWechatTemplateService wechatTemplateService;
|
|
|
|
|
|
-
|
|
|
@Autowired
|
|
|
private RedisCache redisCache;
|
|
|
-
|
|
|
- @Autowired
|
|
|
- private FSSysConfig sysConfig;
|
|
|
-
|
|
|
- @Autowired
|
|
|
- private IFsExpressService expressService;
|
|
|
-
|
|
|
- @Autowired
|
|
|
- private ICompanyService companyService;
|
|
|
-
|
|
|
- @Autowired
|
|
|
- ICompanyUserService companyUserService;
|
|
|
- @Autowired
|
|
|
- ICompanyMoneyLogsService logsService;
|
|
|
- @Autowired
|
|
|
- private IFsStoreOrderItemService storeOrderItemService;
|
|
|
@Autowired
|
|
|
private IFsCityService cityService;
|
|
|
@Autowired
|
|
|
- IFsStoreOrderService orderService;
|
|
|
- @Autowired
|
|
|
- IFsStorePaymentService paymentService;
|
|
|
+ private IFsStoreOrderService orderService;
|
|
|
@Autowired
|
|
|
private IFsProjectAddressConfigService projectAddressConfigService;
|
|
|
|
|
|
-// @ApiOperation("批量推送订单")
|
|
|
-// @GetMapping("pushOms")
|
|
|
-// public R pushOms(String startTime) throws Exception
|
|
|
-// {
|
|
|
-// List<Long> ids=orderService.selectFsStoreOrderToPushByIds(startTime);
|
|
|
-// for(Long id:ids){
|
|
|
-// orderService.createOmsOrder(id);
|
|
|
-// }
|
|
|
-// return R.ok();
|
|
|
-//
|
|
|
-// }
|
|
|
+
|
|
|
@ApiOperation("支付手动通知")
|
|
|
@GetMapping("payNotify")
|
|
|
public R payNotify(String payCode) throws Exception
|
|
|
@@ -148,42 +111,6 @@ public class CommonController extends AppBaseController {
|
|
|
return R.ok().put("data",orderResult);
|
|
|
}
|
|
|
|
|
|
-
|
|
|
-
|
|
|
-// @ApiOperation("testGetOrder")
|
|
|
-// @GetMapping("testGetOrder")
|
|
|
-// public R testGetOrder(String orderId) throws Exception
|
|
|
-// {
|
|
|
-// PayApiServiceImpl payService = new PayApiServiceImpl();
|
|
|
-// OrderQueryDTO o = new OrderQueryDTO();
|
|
|
-//// o.setLowOrderId("orderWx123456121");
|
|
|
-// o.setUpOrderId(orderId);
|
|
|
-// OrderResult order = payService.getOrder(o);
|
|
|
-//
|
|
|
-// return R.ok().put("data",order);
|
|
|
-// }
|
|
|
-
|
|
|
-
|
|
|
-// @ApiOperation("同步企业金额")
|
|
|
-// @PostMapping("testUpdateCompanyMoney")
|
|
|
-// public R testUpdateCompanyMoney(@RequestBody TestMoneyParam param) throws Exception
|
|
|
-// {
|
|
|
-// List<CompanyMoneyLogs> logs=logsService.selectCompanyMoneyLogsByCompanyId(param.getCompanyId(),param.getLogsId().toString());
|
|
|
-// if(logs!=null){
|
|
|
-// BigDecimal companyMoney=param.getMoney();
|
|
|
-// for(CompanyMoneyLogs log:logs){
|
|
|
-// companyMoney=companyMoney.add(log.getMoney());
|
|
|
-// CompanyMoneyLogs logMap=new CompanyMoneyLogs();
|
|
|
-// logMap.setLogsId(log.getLogsId());
|
|
|
-// logMap.setBalance(companyMoney);
|
|
|
-// logsService.updateCompanyMoneyLogs(logMap);
|
|
|
-// }
|
|
|
-// }
|
|
|
-// return R.ok();
|
|
|
-// }
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
@ApiOperation("testErpDeliverys")
|
|
|
@PostMapping("testErpDeliverys")
|
|
|
public R testErpDeliverys(@RequestBody ErpDeliverysRequest request) throws Exception
|
|
|
@@ -240,36 +167,6 @@ public class CommonController extends AppBaseController {
|
|
|
}
|
|
|
|
|
|
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-// @ApiOperation("testTask")
|
|
|
-// @PostMapping("testTask")
|
|
|
-// public void testErpGetOrder() throws Exception
|
|
|
-// {
|
|
|
-// Set<String> orders=redisTemplate.keys(DELIVERY+":*");
|
|
|
-// for(String extndOrderId:orders){
|
|
|
-// String orderCode=(String)redisTemplate.opsForValue().get(extndOrderId);
|
|
|
-// ErpOrderQueryRequert request=new ErpOrderQueryRequert();
|
|
|
-// String[] extendOrder=extndOrderId.split(":");
|
|
|
-// request.setCode(extendOrder[1]);
|
|
|
-// ErpOrderQueryResponse response=erpOrderService.getOrder(request);
|
|
|
-// if(response.getOrders()!=null&&response.getOrders().size()>0){
|
|
|
-// for(ErpOrderQuery orderQuery : response.getOrders()){
|
|
|
-// if(orderQuery.getDeliverys()!=null&&orderQuery.getDeliverys().size()>0){
|
|
|
-// //更新商订单状态 删除REDIS
|
|
|
-// orderService.deliveryOrder(orderCode,orderQuery.getDeliverys().get(0).getMail_no());
|
|
|
-// redisCache.deleteObject(DELIVERY+":"+extndOrderId);
|
|
|
-// }
|
|
|
-// }
|
|
|
-// }
|
|
|
-// }
|
|
|
-//
|
|
|
-// }
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
@ApiOperation("testErpGoods")
|
|
|
@PostMapping("testErpGoods")
|
|
|
public R testErpGoods() throws Exception
|
|
|
@@ -471,10 +368,6 @@ public class CommonController extends AppBaseController {
|
|
|
|
|
|
}
|
|
|
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
@Login
|
|
|
@GetMapping(value = "/getTlsSig")
|
|
|
@ApiOperation("获取腾讯云签名")
|
|
|
@@ -486,49 +379,6 @@ public class CommonController extends AppBaseController {
|
|
|
}
|
|
|
|
|
|
|
|
|
- //
|
|
|
- // @ApiOperation("测试开处方")
|
|
|
- // @PostMapping("/doPrescribe")
|
|
|
- // public R doPrescribe() throws Exception
|
|
|
- // {
|
|
|
- // PrescribeParam prescribeParam=new PrescribeParam();
|
|
|
- // List<Prescribe> data=new ArrayList<>();
|
|
|
- // Prescribe prescribe=new Prescribe();
|
|
|
- // prescribe.setRp_id(OrderUtils.getOrderNo());
|
|
|
- // prescribe.setPharmacy_code("00001");
|
|
|
- // prescribe.setPharmacy_name("测试门店");
|
|
|
- // prescribe.setPatient_name("张三");
|
|
|
- // prescribe.setPatient_age(12);
|
|
|
- // prescribe.setPatient_tel("15193190697");
|
|
|
- // prescribe.setPatient_gender("1");
|
|
|
- // prescribe.setIs_history_allergic("否");
|
|
|
- // prescribe.setLiver_unusual("否");
|
|
|
- // prescribe.setRenal_unusual("否");
|
|
|
- // prescribe.setLactation_flag("否");
|
|
|
- // SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
|
|
|
- // Date now = new Date();
|
|
|
- // prescribe.setRp_create_time(sdf.format(now));
|
|
|
- // prescribe.setRp_url_type("png");
|
|
|
- // prescribe.setLactation_flag("否");
|
|
|
- // prescribe.setCallback_url(fsSysConfig.getCallbackUrl());
|
|
|
- // data.add(prescribe);
|
|
|
- //
|
|
|
- // List<Drug> drug_list=new ArrayList<>();
|
|
|
- // Drug drug=new Drug();
|
|
|
- // drug.setDrug_common_name("维力青 恩替卡韦分散片 0.5mg*7片");
|
|
|
- // drug.setDrug_specification("0.5mg*7片");
|
|
|
- // drug.setSale_amount("1");
|
|
|
- // drug.setSale_unit("盒");
|
|
|
- // drug.setApproval_number("000001");
|
|
|
- // drug_list.add(drug);
|
|
|
- // prescribe.setDrug_list(drug_list);
|
|
|
- // prescribeParam.setData(data);
|
|
|
- //
|
|
|
- // prescribeService.doPrescribe(prescribeParam);
|
|
|
- // return R.ok();
|
|
|
- // }
|
|
|
-
|
|
|
-
|
|
|
@ApiOperation("创建ERP订单")
|
|
|
@GetMapping("createErpOrder")
|
|
|
public R createErpOrder(@RequestParam("orderCode") String orderCode) throws Exception
|