|
|
@@ -3,6 +3,7 @@ package com.fs.hisStore.service.categoryVal;
|
|
|
import com.fs.common.utils.txocr.ContainsResult;
|
|
|
import com.fs.hisStore.domain.FsStoreScrm;
|
|
|
import com.fs.hisStore.service.impl.FsStoreScrmServiceImpl;
|
|
|
+import org.apache.commons.lang3.ObjectUtils;
|
|
|
import org.apache.commons.lang3.StringUtils;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.context.annotation.Lazy;
|
|
|
@@ -35,11 +36,25 @@ public class WellnessFoodCheck extends AbstractHandler{
|
|
|
public ContainsResult check(String cateName, Long storeId, String medicalDeviceCode, String productType){
|
|
|
FsStoreScrm fsStoreScrm = fsStoreScrmService.selectFsStoreByStoreId(storeId);
|
|
|
ContainsResult result = new ContainsResult();
|
|
|
- boolean flag = StringUtils.isNotEmpty(fsStoreScrm.getFoodLicense());
|
|
|
- result.setFlag(flag);
|
|
|
- result.setMessage(flag ? "已上传健康食品经营许可证" : "未上传健康食品经营许可证");
|
|
|
- //目前没有办法通过文档抽取保健食品中前面的打勾,只能判断是否上传,当然可以重写TxOcrClient.ExtractDocBasic方法。
|
|
|
- return result;
|
|
|
+ if(ObjectUtils.isEmpty(fsStoreScrm.getFoodLicenseBusinessScope())){
|
|
|
+ result.setFlag(false);
|
|
|
+ result.setMessage("未填写传健康食品经营许可证");
|
|
|
+ return result;
|
|
|
+ }else{
|
|
|
+ String foodLicenseBusinessScope = fsStoreScrm.getFoodLicenseBusinessScope();
|
|
|
+
|
|
|
+ boolean ybz_flag = foodLicenseBusinessScope.contains("预包装食品");
|
|
|
+ boolean bj_flag = foodLicenseBusinessScope.contains("保健食品");
|
|
|
+ if(ybz_flag || bj_flag){
|
|
|
+ result.setFlag(true);
|
|
|
+ result.setMessage("通过");
|
|
|
+ }else {
|
|
|
+ result.setFlag(false);
|
|
|
+ result.setMessage("不符合!");
|
|
|
+ }
|
|
|
+ return result;
|
|
|
+ }
|
|
|
+
|
|
|
}
|
|
|
|
|
|
}
|