|
|
@@ -26,6 +26,7 @@ import com.fs.common.core.domain.R;
|
|
|
import com.fs.common.core.domain.ResponseResult;
|
|
|
import com.fs.common.core.redis.RedisCache;
|
|
|
import com.fs.common.exception.file.OssException;
|
|
|
+import com.fs.common.utils.DateUtils;
|
|
|
import com.fs.common.utils.file.FileUploadUtils;
|
|
|
import com.fs.common.utils.http.HttpUtils;
|
|
|
import com.fs.common.utils.sign.Md5Utils;
|
|
|
@@ -44,10 +45,12 @@ import com.fs.framework.config.ServerConfig;
|
|
|
import com.fs.his.config.FsSmsConfig;
|
|
|
import com.fs.his.config.FsSysConfig;
|
|
|
import com.fs.his.domain.*;
|
|
|
+import com.fs.his.dto.InquiryConfigDTO;
|
|
|
import com.fs.his.param.FsInquiryOrderFinishParam;
|
|
|
import com.fs.his.service.*;
|
|
|
|
|
|
import com.fs.his.utils.ConfigUtil;
|
|
|
+import com.fs.his.vo.InquirySubTypeVo;
|
|
|
import com.fs.hisStore.mapper.FsWechatTemplateScrmMapper;
|
|
|
import com.fs.hisStore.service.IFsWechatTemplateScrmService;
|
|
|
import com.fs.im.dto.*;
|
|
|
@@ -352,6 +355,46 @@ public class CommonController {
|
|
|
|
|
|
}
|
|
|
|
|
|
+ @GetMapping(value = "/getInquiryConfig")
|
|
|
+ @ApiOperation("获取问诊配置")
|
|
|
+ public R getInquiryConfig()
|
|
|
+ {
|
|
|
+ String json=configService.selectConfigByKey("his.inquiryConfig");
|
|
|
+ InquiryConfigDTO configDTO= JSONUtil.toBean(json, InquiryConfigDTO.class);
|
|
|
+ Map<String, Object> result = new HashMap<>();
|
|
|
+ result.put("prices",configDTO.getPrices());
|
|
|
+ result.put("isAutoPrescribeAudit",configDTO.getIsAutoPrescribeAudit());
|
|
|
+ result.put("unPayCancelTime",configDTO.getUnPayCancelTime());
|
|
|
+ result.put("unReceiveCancelTime",configDTO.getUnReceiveCancelTime());
|
|
|
+ result.put("companyPrice",configDTO.getCompanyPrice());
|
|
|
+ result.put("companyPrescribePrice",configDTO.getCompanyPrescribePrice());
|
|
|
+ result.put("followMsg",configDTO.getFollowMsg());
|
|
|
+ result.put("prescribeMsg",configDTO.getPrescribeMsg());
|
|
|
+ result.put("inquirySubType",configDTO.getInquirySubType());
|
|
|
+ String inquirySubType = configDTO.getInquirySubType();
|
|
|
+ if (StringUtils.isNotBlank(inquirySubType)){
|
|
|
+ //查询现已下单数量
|
|
|
+ List<InquirySubTypeVo> list = JSON.parseArray(inquirySubType, InquirySubTypeVo.class);
|
|
|
+ if (list!=null&& !list.isEmpty()){
|
|
|
+ for (InquirySubTypeVo inquiryConfigDTO : list) {
|
|
|
+ Long num = inquiryConfigDTO.getNum();
|
|
|
+ Integer value = inquiryConfigDTO.getValue();
|
|
|
+ inquiryConfigDTO.setIsCanBuy(1);
|
|
|
+ if (num!=null && num > 0 && value != null){
|
|
|
+ Long actualNum =
|
|
|
+ inquiryOrderService.countByInquirySubTypeAndCreateTime(value, DateUtils.getDate());
|
|
|
+ if (actualNum!=null && actualNum > 0 && actualNum >= num){
|
|
|
+ inquiryConfigDTO.setIsCanBuy(0);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ result.put("inquirySubType",list);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ return R.ok().put("data",JSON.toJSONString(result));
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
|
|
|
@PostMapping("uploadOSS")
|
|
|
public R uploadOSS(@RequestParam("file") MultipartFile file) throws Exception
|