|
@@ -40,15 +40,18 @@ public class CommonCheck extends AbstractHandler {
|
|
|
*/
|
|
*/
|
|
|
public ContainsResult check(String cateName, Long storeId, String medicalDeviceCode) {
|
|
public ContainsResult check(String cateName, Long storeId, String medicalDeviceCode) {
|
|
|
FsStoreScrm fsStoreScrm = fsStoreScrmService.selectFsStoreByStoreId(storeId);
|
|
FsStoreScrm fsStoreScrm = fsStoreScrmService.selectFsStoreByStoreId(storeId);
|
|
|
-
|
|
|
|
|
- //通过店铺id获取上传的药品经营许可证。
|
|
|
|
|
- String drugLicenseUrl = fsStoreScrm.getDrugLicense();
|
|
|
|
|
-
|
|
|
|
|
- FsStoreScrmOcr fsStoreScrmOcr = fsStoreScrmOcrMapper.selectByIdAndUrl(storeId, drugLicenseUrl, null);
|
|
|
|
|
//没有搜索到就调用一次识别
|
|
//没有搜索到就调用一次识别
|
|
|
ContainsResult result = new ContainsResult();
|
|
ContainsResult result = new ContainsResult();
|
|
|
result.setKeywords(cateName);
|
|
result.setKeywords(cateName);
|
|
|
-
|
|
|
|
|
|
|
+ if(cateName.contains("非处方") && fsStoreScrm.getBusinessScope().contains(cateName)){
|
|
|
|
|
+ result.setFlag(true);
|
|
|
|
|
+ result.setMessage("包含所属!");
|
|
|
|
|
+ result.setBusinessStr(fsStoreScrm.getBusinessScope());
|
|
|
|
|
+ return result;
|
|
|
|
|
+ }
|
|
|
|
|
+ //通过店铺id获取上传的药品经营许可证。
|
|
|
|
|
+ String drugLicenseUrl = fsStoreScrm.getDrugLicense();
|
|
|
|
|
+ FsStoreScrmOcr fsStoreScrmOcr = fsStoreScrmOcrMapper.selectByIdAndUrl(storeId, drugLicenseUrl, null);
|
|
|
if(ObjectUtil.isEmpty(fsStoreScrmOcr)){
|
|
if(ObjectUtil.isEmpty(fsStoreScrmOcr)){
|
|
|
String ocrResult = TxOcrClient.ExtractDocBasic(drugLicenseUrl);
|
|
String ocrResult = TxOcrClient.ExtractDocBasic(drugLicenseUrl);
|
|
|
if(null != ocrResult){
|
|
if(null != ocrResult){
|