|
@@ -4,16 +4,16 @@ import cn.hnthyy.thmz.Utils.DateUtil;
|
|
|
import cn.hnthyy.thmz.Utils.TokenUtil;
|
|
|
import cn.hnthyy.thmz.comment.UserLoginToken;
|
|
|
import cn.hnthyy.thmz.entity.MzException;
|
|
|
-import cn.hnthyy.thmz.entity.his.yp.YpZdDict;
|
|
|
import cn.hnthyy.thmz.entity.his.mz.*;
|
|
|
+import cn.hnthyy.thmz.entity.his.yp.YpZdDict;
|
|
|
import cn.hnthyy.thmz.entity.his.zd.ZdUnitCode;
|
|
|
import cn.hnthyy.thmz.entity.thmz.DispensingWindows;
|
|
|
import cn.hnthyy.thmz.entity.thmz.RadSendRecord;
|
|
|
import cn.hnthyy.thmz.entity.thmz.User;
|
|
|
import cn.hnthyy.thmz.enums.ConfirmFlagEnum;
|
|
|
+import cn.hnthyy.thmz.service.his.mz.*;
|
|
|
import cn.hnthyy.thmz.service.his.yp.YpZdDictService;
|
|
|
import cn.hnthyy.thmz.service.his.yp.YpZdManufactoryService;
|
|
|
-import cn.hnthyy.thmz.service.his.mz.*;
|
|
|
import cn.hnthyy.thmz.service.his.zd.ZdUnitCodeService;
|
|
|
import cn.hnthyy.thmz.service.thmz.DispensingSocketService;
|
|
|
import cn.hnthyy.thmz.service.thmz.DispensingWindowsService;
|
|
@@ -21,6 +21,7 @@ import cn.hnthyy.thmz.vo.*;
|
|
|
import lombok.extern.slf4j.Slf4j;
|
|
|
import org.apache.commons.lang3.StringUtils;
|
|
|
import org.apache.commons.lang3.time.DateUtils;
|
|
|
+import org.json.JSONObject;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.web.bind.annotation.*;
|
|
|
|
|
@@ -894,6 +895,44 @@ public class MzPharmacyController {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+ /**
|
|
|
+ * 叫号语音生成
|
|
|
+ *
|
|
|
+ * @param name
|
|
|
+ * @return
|
|
|
+ */
|
|
|
+ @UserLoginToken
|
|
|
+ @RequestMapping(value = "/callNumberAudio", method = {RequestMethod.GET})
|
|
|
+ public Map<String, Object> callNumberAudio(@RequestParam("name") String name,@RequestParam("winNo") String winNo) {
|
|
|
+ Map<String, Object> resultMap = new HashMap<>();
|
|
|
+ try {
|
|
|
+ if (name == null) {
|
|
|
+ resultMap.put("code", -1);
|
|
|
+ resultMap.put("message", "叫号语音生成失败,病人姓名为空");
|
|
|
+ return resultMap;
|
|
|
+ }
|
|
|
+ String res = mzPharmacyService.callNumberAudio("请"+name+"到"+winNo+"号窗口取药");
|
|
|
+ JSONObject resObj=new JSONObject(res);
|
|
|
+ Integer code = (Integer)resObj.get("code");
|
|
|
+ if(code != 200){
|
|
|
+ log.error("叫号语音生成失败,接口错误信息:{}", resObj.get("message").toString());
|
|
|
+ resultMap.put("code", -1);
|
|
|
+ resultMap.put("message", "叫号语音生成失败");
|
|
|
+ return resultMap;
|
|
|
+ }
|
|
|
+ resultMap.put("code", 0);
|
|
|
+ resultMap.put("data", resObj.get("data").toString());
|
|
|
+ resultMap.put("message", "叫号语音生成成功");
|
|
|
+ return resultMap;
|
|
|
+ } catch (Exception e) {
|
|
|
+ e.printStackTrace();
|
|
|
+ log.error("叫号语音生成失败,错误信息{}", e.getMessage());
|
|
|
+ resultMap.put("code", -1);
|
|
|
+ resultMap.put("message", "叫号语音生成失败");
|
|
|
+ return resultMap;
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
@UserLoginToken
|
|
|
@RequestMapping(value = "/getRadSendRecord", method = {RequestMethod.POST})
|
|
|
public Map<String, Object> getRadSendRecord(@RequestBody RadSendRecord radSendRecord) {
|