|
@@ -29,6 +29,7 @@ import com.fs.store.domain.*;
|
|
|
import com.fs.store.dto.ExpressDataDTO;
|
|
import com.fs.store.dto.ExpressDataDTO;
|
|
|
import com.fs.store.dto.ExpressInfoDTO;
|
|
import com.fs.store.dto.ExpressInfoDTO;
|
|
|
import com.fs.store.dto.ExpressNotifyDTO;
|
|
import com.fs.store.dto.ExpressNotifyDTO;
|
|
|
|
|
+import com.fs.store.mapper.FsWechatTemplateMapper;
|
|
|
import com.fs.store.param.SignParam;
|
|
import com.fs.store.param.SignParam;
|
|
|
import com.fs.store.service.*;
|
|
import com.fs.store.service.*;
|
|
|
import com.fs.pay.service.IPayService;
|
|
import com.fs.pay.service.IPayService;
|
|
@@ -38,6 +39,7 @@ import com.fs.system.oss.OSSFactory;
|
|
|
import com.fs.system.vo.DictVO;
|
|
import com.fs.system.vo.DictVO;
|
|
|
import com.fs.system.service.ISysConfigService;
|
|
import com.fs.system.service.ISysConfigService;
|
|
|
import com.fs.system.service.ISysDictDataService;
|
|
import com.fs.system.service.ISysDictDataService;
|
|
|
|
|
+import com.google.common.collect.Sets;
|
|
|
import com.hc.openapi.tool.util.Ids;
|
|
import com.hc.openapi.tool.util.Ids;
|
|
|
import com.tencentyun.TLSSigAPIv2;
|
|
import com.tencentyun.TLSSigAPIv2;
|
|
|
import io.swagger.annotations.Api;
|
|
import io.swagger.annotations.Api;
|
|
@@ -65,35 +67,31 @@ import java.util.*;
|
|
|
public class CommonController extends AppBaseController {
|
|
public class CommonController extends AppBaseController {
|
|
|
Logger logger = LoggerFactory.getLogger(CommonController.class);
|
|
Logger logger = LoggerFactory.getLogger(CommonController.class);
|
|
|
@Autowired
|
|
@Autowired
|
|
|
- JwtUtils jwtUtils;
|
|
|
|
|
- @Autowired
|
|
|
|
|
- private ServerConfig serverConfig;
|
|
|
|
|
|
|
+ private JwtUtils jwtUtils;
|
|
|
|
|
+
|
|
|
@Autowired
|
|
@Autowired
|
|
|
private ISysDictDataService dictDataService;
|
|
private ISysDictDataService dictDataService;
|
|
|
|
|
|
|
|
@Autowired
|
|
@Autowired
|
|
|
private ISysConfigService configService;
|
|
private ISysConfigService configService;
|
|
|
- @Autowired
|
|
|
|
|
- IPrescribeService prescribeService;
|
|
|
|
|
|
|
|
|
|
@Autowired
|
|
@Autowired
|
|
|
- IFsStoreOrderItemService orderItemService;
|
|
|
|
|
|
|
+ private IFsStoreOrderItemService orderItemService;
|
|
|
@Autowired
|
|
@Autowired
|
|
|
- IFsStoreProductService productService;
|
|
|
|
|
|
|
+ private IFsStoreProductService productService;
|
|
|
@Autowired
|
|
@Autowired
|
|
|
- FSSysConfig fsSysConfig;
|
|
|
|
|
- @Autowired
|
|
|
|
|
- IErpShopService erpShopService;
|
|
|
|
|
|
|
+ private FSSysConfig fsSysConfig;
|
|
|
|
|
+
|
|
|
@Autowired
|
|
@Autowired
|
|
|
- IErpUserService userService;
|
|
|
|
|
|
|
+ private IErpUserService userService;
|
|
|
@Autowired
|
|
@Autowired
|
|
|
- IPayService payService;
|
|
|
|
|
|
|
+ private IPayService payService;
|
|
|
@Autowired
|
|
@Autowired
|
|
|
- IErpOrderService erpOrderService;
|
|
|
|
|
|
|
+ private IErpOrderService erpOrderService;
|
|
|
@Autowired
|
|
@Autowired
|
|
|
- IErpGoodsService goodsService;
|
|
|
|
|
|
|
+ private IErpGoodsService goodsService;
|
|
|
@Autowired
|
|
@Autowired
|
|
|
- PayService ybPayService;
|
|
|
|
|
|
|
+ private PayService ybPayService;
|
|
|
@Autowired
|
|
@Autowired
|
|
|
private IFsWechatTemplateService wechatTemplateService;
|
|
private IFsWechatTemplateService wechatTemplateService;
|
|
|
|
|
|
|
@@ -119,7 +117,7 @@ public class CommonController extends AppBaseController {
|
|
|
@Autowired
|
|
@Autowired
|
|
|
private IFsCityService cityService;
|
|
private IFsCityService cityService;
|
|
|
@Autowired
|
|
@Autowired
|
|
|
- IFsStoreOrderService orderService;
|
|
|
|
|
|
|
+ private IFsStoreOrderService orderService;
|
|
|
@Autowired
|
|
@Autowired
|
|
|
IFsStorePaymentService paymentService;
|
|
IFsStorePaymentService paymentService;
|
|
|
// @ApiOperation("批量推送订单")
|
|
// @ApiOperation("批量推送订单")
|
|
@@ -143,42 +141,6 @@ public class CommonController extends AppBaseController {
|
|
|
return R.ok().put("data",orderResult);
|
|
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")
|
|
@ApiOperation("testErpDeliverys")
|
|
|
@PostMapping("testErpDeliverys")
|
|
@PostMapping("testErpDeliverys")
|
|
|
public R testErpDeliverys(@RequestBody ErpDeliverysRequest request) throws Exception
|
|
public R testErpDeliverys(@RequestBody ErpDeliverysRequest request) throws Exception
|
|
@@ -235,36 +197,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")
|
|
@ApiOperation("testErpGoods")
|
|
|
@PostMapping("testErpGoods")
|
|
@PostMapping("testErpGoods")
|
|
|
public R testErpGoods() throws Exception
|
|
public R testErpGoods() throws Exception
|
|
@@ -466,10 +398,6 @@ public class CommonController extends AppBaseController {
|
|
|
|
|
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
-
|
|
|
|
|
-
|
|
|
|
|
-
|
|
|
|
|
-
|
|
|
|
|
@Login
|
|
@Login
|
|
|
@GetMapping(value = "/getTlsSig")
|
|
@GetMapping(value = "/getTlsSig")
|
|
|
@ApiOperation("获取腾讯云签名")
|
|
@ApiOperation("获取腾讯云签名")
|
|
@@ -481,49 +409,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订单")
|
|
@ApiOperation("创建ERP订单")
|
|
|
@GetMapping("createErpOrder")
|
|
@GetMapping("createErpOrder")
|
|
|
public R createErpOrder(@RequestParam("orderCode") String orderCode) throws Exception
|
|
public R createErpOrder(@RequestParam("orderCode") String orderCode) throws Exception
|
|
@@ -584,7 +469,6 @@ public class CommonController extends AppBaseController {
|
|
|
|
|
|
|
|
@ApiOperation("获取微信模板")
|
|
@ApiOperation("获取微信模板")
|
|
|
@GetMapping("/getWeixinTemps")
|
|
@GetMapping("/getWeixinTemps")
|
|
|
- @Cacheable(value= "temps")
|
|
|
|
|
public R getWeixinTemps(
|
|
public R getWeixinTemps(
|
|
|
){
|
|
){
|
|
|
List<String> temp=wechatTemplateService.selectFsWechatTemplateIds();
|
|
List<String> temp=wechatTemplateService.selectFsWechatTemplateIds();
|
|
@@ -592,23 +476,24 @@ public class CommonController extends AppBaseController {
|
|
|
|
|
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+ @Autowired
|
|
|
|
|
+ private FsWechatTemplateMapper fsWechatTemplateMapper;
|
|
|
@ApiOperation("获取微信模板")
|
|
@ApiOperation("获取微信模板")
|
|
|
@GetMapping("/getWeixinOrderTemps")
|
|
@GetMapping("/getWeixinOrderTemps")
|
|
|
- @Cacheable(value= "orderTemps")
|
|
|
|
|
public R getWeixinOrderTemps(
|
|
public R getWeixinOrderTemps(
|
|
|
){
|
|
){
|
|
|
- List<String> temp=wechatTemplateService.selectFsWechatTemplateIdsByKeys("delivery_success,finish_success,cancel_success");
|
|
|
|
|
|
|
+ Set<String> keys = Sets.newHashSet("delivery_success","finish_success","cancel_success");
|
|
|
|
|
+
|
|
|
|
|
+ List<String> temp=fsWechatTemplateMapper.selectFsWechatTemplateIdsByKeySet(keys);
|
|
|
return R.ok().put("temp",temp);
|
|
return R.ok().put("temp",temp);
|
|
|
|
|
|
|
|
}
|
|
}
|
|
|
@ApiOperation("获取微信模板")
|
|
@ApiOperation("获取微信模板")
|
|
|
@GetMapping("/getWeixinPrescribeTemps")
|
|
@GetMapping("/getWeixinPrescribeTemps")
|
|
|
- @Cacheable(value= "prescribetemps")
|
|
|
|
|
public R getWeixinPrescribeTemps(
|
|
public R getWeixinPrescribeTemps(
|
|
|
){
|
|
){
|
|
|
List<String> temp=wechatTemplateService.selectFsWechatTemplateIdsByKeys("prescribe");
|
|
List<String> temp=wechatTemplateService.selectFsWechatTemplateIdsByKeys("prescribe");
|
|
|
return R.ok().put("temp",temp);
|
|
return R.ok().put("temp",temp);
|
|
|
-
|
|
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
|