增加字典缓存
This commit is contained in:
parent
e6a5f4ad48
commit
636de0d743
@ -43,11 +43,11 @@ public class CacheConstants
|
|||||||
public static final String PWD_ERR_CNT_KEY = "pwd_err_cnt:";
|
public static final String PWD_ERR_CNT_KEY = "pwd_err_cnt:";
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* lis字典缓存
|
* 字典缓存
|
||||||
*/
|
*/
|
||||||
public static final String COM_DICT_KEY = "com_dict:";
|
public static final String REG_DICT_KEY = "reg_dict:";
|
||||||
/**
|
/**
|
||||||
* lis设置缓存
|
* 参数
|
||||||
*/
|
*/
|
||||||
public static final String COM_OPT_KEY = "com_opt:";
|
public static final String COM_OPT_KEY = "com_opt:";
|
||||||
|
|
||||||
|
|||||||
@ -55,4 +55,5 @@ public class RegApply {
|
|||||||
private String applyid;
|
private String applyid;
|
||||||
private String reqDetailName;
|
private String reqDetailName;
|
||||||
private String bz;
|
private String bz;
|
||||||
|
private String slzq;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -302,6 +302,10 @@ public class RegTransitSample {
|
|||||||
* 标本退回时间
|
* 标本退回时间
|
||||||
*/
|
*/
|
||||||
private Date BackTime;
|
private Date BackTime;
|
||||||
|
/**
|
||||||
|
* 生理周期
|
||||||
|
*/
|
||||||
|
private String slzq;
|
||||||
|
|
||||||
private String DateType;
|
private String DateType;
|
||||||
private Date DateStart;
|
private Date DateStart;
|
||||||
|
|||||||
@ -1,61 +0,0 @@
|
|||||||
package com.transitPlatForm.common.utils;
|
|
||||||
|
|
||||||
import com.alibaba.fastjson2.JSONArray;
|
|
||||||
import com.transitPlatForm.common.constant.CacheConstants;
|
|
||||||
//import com.transitPlatForm.common.core.domain.entity.lis.ComDict;
|
|
||||||
import com.transitPlatForm.common.core.redis.RedisCache;
|
|
||||||
import com.transitPlatForm.common.utils.spring.SpringUtils;
|
|
||||||
|
|
||||||
import java.util.Collection;
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* lis字典工具类
|
|
||||||
*/
|
|
||||||
public class ComDictUtils {
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 设置代码字典缓存
|
|
||||||
*
|
|
||||||
* @param zdlb 字典类别
|
|
||||||
* @param dictDatas 字典数据列表
|
|
||||||
*/
|
|
||||||
// public static void setDictCache(String zdlb, List<ComDict> dictDatas) {
|
|
||||||
// //先清除该key的所有缓存,然后再重新设置该key的缓存
|
|
||||||
// SpringUtils.getBean(RedisCache.class).deleteObject(zdlb);
|
|
||||||
// SpringUtils.getBean(RedisCache.class).setCacheObject(getCacheKey(zdlb), dictDatas);
|
|
||||||
// }
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 清空字典缓存
|
|
||||||
*/
|
|
||||||
public static void clearDictCache() {
|
|
||||||
Collection<String> keys = SpringUtils.getBean(RedisCache.class).keys(CacheConstants.COM_DICT_KEY + "*");
|
|
||||||
SpringUtils.getBean(RedisCache.class).deleteObject(keys);
|
|
||||||
}
|
|
||||||
/**
|
|
||||||
* 获取字典缓存
|
|
||||||
*
|
|
||||||
* @param zdlb 字典类别
|
|
||||||
* @return dictDatas 字典数据列表
|
|
||||||
*/
|
|
||||||
// public static List<ComDict> getDictCache(String zdlb) {
|
|
||||||
// JSONArray arrayCache = SpringUtils.getBean(RedisCache.class).getCacheObject(getCacheKey(zdlb));
|
|
||||||
// if (StringUtils.isNotNull(arrayCache)) {
|
|
||||||
// return arrayCache.toList(ComDict.class);
|
|
||||||
// }
|
|
||||||
// return null;
|
|
||||||
// }
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 设置cache key
|
|
||||||
*
|
|
||||||
* @param configKey 参数键
|
|
||||||
* @return 缓存键key
|
|
||||||
*/
|
|
||||||
public static String getCacheKey(String configKey) {
|
|
||||||
return CacheConstants.COM_DICT_KEY + configKey;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@ -1,90 +0,0 @@
|
|||||||
package com.transitPlatForm.common.utils;
|
|
||||||
|
|
||||||
|
|
||||||
import cn.hutool.json.JSONUtil;
|
|
||||||
import com.transitPlatForm.common.constant.CacheConstants;
|
|
||||||
//import com.transitPlatForm.common.core.domain.entity.lis.ComOpt;
|
|
||||||
import com.transitPlatForm.common.core.redis.RedisCache;
|
|
||||||
import com.transitPlatForm.common.utils.spring.SpringUtils;
|
|
||||||
|
|
||||||
import java.util.Collection;
|
|
||||||
import java.util.HashMap;
|
|
||||||
import java.util.List;
|
|
||||||
import java.util.Map;
|
|
||||||
|
|
||||||
|
|
||||||
public class ComOptionUtils {
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 设置参数缓存
|
|
||||||
* 缓存格式:com_opt:HISOPT:SP_INTER com_opt:yq:xxdh
|
|
||||||
* @param yq 仪器
|
|
||||||
* @param xxdh 项目代码
|
|
||||||
* @param comOpt 参数数据
|
|
||||||
*/
|
|
||||||
// public static void setOptCache(String yq,String xxdh, ComOpt comOpt) {
|
|
||||||
// //先清除该key的所有缓存,然后再重新设置该key的缓存
|
|
||||||
// yq=yq.trim();
|
|
||||||
// xxdh=xxdh.toUpperCase();
|
|
||||||
// String key = yq+":"+xxdh;
|
|
||||||
// SpringUtils.getBean(RedisCache.class).deleteObject(key);
|
|
||||||
// SpringUtils.getBean(RedisCache.class).setCacheObject(getCacheKey(key), comOpt);
|
|
||||||
// }
|
|
||||||
/**
|
|
||||||
* 清空参数缓存
|
|
||||||
*/
|
|
||||||
public static void clearOptCache() {
|
|
||||||
Collection<String> keys = SpringUtils.getBean(RedisCache.class).keys(CacheConstants.COM_OPT_KEY + "*");
|
|
||||||
SpringUtils.getBean(RedisCache.class).deleteObject(keys);
|
|
||||||
}
|
|
||||||
|
|
||||||
public static void clearOptCache(String yq,String xxdh) {
|
|
||||||
xxdh=xxdh.toUpperCase();
|
|
||||||
yq=yq.trim();
|
|
||||||
Collection<String> keys = SpringUtils.getBean(RedisCache.class).keys(CacheConstants.COM_OPT_KEY + yq+":"+xxdh);
|
|
||||||
SpringUtils.getBean(RedisCache.class).deleteObject(keys);
|
|
||||||
}
|
|
||||||
/**
|
|
||||||
* 获取参数缓存
|
|
||||||
* 根据现在的参数,获取到的数据应该只有一条
|
|
||||||
* @param yq 仪器
|
|
||||||
* @param xxdh 项目代码
|
|
||||||
* @return ComOpt 参数数据
|
|
||||||
*/
|
|
||||||
// public static ComOpt getOptCache(String yq,String xxdh) {
|
|
||||||
// xxdh=xxdh.toUpperCase();
|
|
||||||
// yq=yq.trim();
|
|
||||||
// String key = yq+":"+xxdh;
|
|
||||||
// Object cacheObject = SpringUtils.getBean(RedisCache.class).getCacheObject(getCacheKey(key));
|
|
||||||
// if (StringUtils.isNotNull(cacheObject)) {
|
|
||||||
// return (ComOpt) cacheObject;
|
|
||||||
// }
|
|
||||||
// return null;
|
|
||||||
// }
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 设置cache key
|
|
||||||
*
|
|
||||||
* @param configKey 参数键
|
|
||||||
* @return 缓存键key
|
|
||||||
*/
|
|
||||||
public static String getCacheKey(String configKey) {
|
|
||||||
return CacheConstants.COM_OPT_KEY + configKey;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 设置参数值域
|
|
||||||
* @param dddwList
|
|
||||||
* @param inputList
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
public static String setValueRange(List<String> dddwList,List<String> inputList){
|
|
||||||
Map<String,Object> map = new HashMap<String,Object>();
|
|
||||||
map.put("dddwList",dddwList);
|
|
||||||
map.put("inputList",inputList);
|
|
||||||
return JSONUtil.toJsonStr(map);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@ -4,32 +4,6 @@ package com.transitPlatForm.interfaceCommon.constants;
|
|||||||
* 系统日志
|
* 系统日志
|
||||||
*/
|
*/
|
||||||
public class SysLogConstants {
|
public class SysLogConstants {
|
||||||
public static final String FEEITEMCLASS_LOG = "条码类别";
|
public static final String REQINPUT = "自助开单";
|
||||||
public static final String FEEITEMVSCLASS_LOG = "条码类别与项目对照";
|
public static final String DICT = "字典管理";
|
||||||
public static final String MZCX_LOG = "门诊采血";
|
|
||||||
public static final String RPTGETRULE_LOG = "报告领取规则";
|
|
||||||
public static final String XMFEE_LOG = "收费项目维护";
|
|
||||||
public static final String DICT_LOG = "常见字典";
|
|
||||||
public static final String INSTR_LOG = "仪器维护";
|
|
||||||
public static final String REPORTITEM_LOG = "检验项目";
|
|
||||||
public static final String XMFILTER_LOG = "光片波长对照表";
|
|
||||||
public static final String XMLOT_LOG = "试剂维护";
|
|
||||||
public static final String XMALARMDETAIL_LOG = "危急值特定判断条件";
|
|
||||||
public static final String XMBASE_LOG = "报告项目";
|
|
||||||
public static final String XMFEEINSTR_LOG = "仪器收费项目对照";
|
|
||||||
public static final String XMREQITEMVSREPORTITEM_LOG = "收费项目报告项目";
|
|
||||||
public static final String LISWORK_LOG = "主界面";
|
|
||||||
public static final String COMOPT_LOG = "后台参数";
|
|
||||||
public static final String LABINPUTMDL_LOG = "项目模板";
|
|
||||||
public static final String LABINSTRVSREQCLASS_LOG = "仪器条码类别对照";
|
|
||||||
public static final String LABTATCTRL_LOG = "TAT设定";
|
|
||||||
public static final String XMCOMP_LOG = "项目组合";
|
|
||||||
public static final String XMMED_LOG = "常用抗生素";
|
|
||||||
public static final String XMMEDGROUP_LOG = "常用抗生素组";
|
|
||||||
public static final String XMMEDINSTR_LOG = "抗生素通道号设定";
|
|
||||||
public static final String XMMEDMAIN_LOG = "细菌抗生素组对照";
|
|
||||||
public static final String XMKNOWLEDGE_LOG = "知识库";
|
|
||||||
public static final String LABCHECKRULES_LOG = "高级审核条件";
|
|
||||||
public static final String QCRULES_LOG = "质控设置";
|
|
||||||
public static final String REQINPUT = "科内开单";
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -0,0 +1,67 @@
|
|||||||
|
package com.transitPlatForm.interfaceCommon.utils.cache;
|
||||||
|
|
||||||
|
import com.alibaba.fastjson2.JSONArray;
|
||||||
|
import com.transitPlatForm.common.constant.CacheConstants;
|
||||||
|
import com.transitPlatForm.common.core.domain.entity.reg.RegDict;
|
||||||
|
import com.transitPlatForm.common.core.redis.RedisCache;
|
||||||
|
import com.transitPlatForm.common.utils.StringUtils;
|
||||||
|
import com.transitPlatForm.common.utils.spring.SpringUtils;
|
||||||
|
|
||||||
|
import java.util.Collection;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
public class RegDictCache {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 设置字典缓存
|
||||||
|
*
|
||||||
|
* @param key 参数键
|
||||||
|
* @param regDictList 字典数据列表
|
||||||
|
*/
|
||||||
|
public static void setDictCache(String key, List<RegDict> regDictList) {
|
||||||
|
SpringUtils.getBean(RedisCache.class).setCacheObject(getCacheKey(key), regDictList);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 设置cache key
|
||||||
|
*
|
||||||
|
* @param configKey 参数键
|
||||||
|
* @return 缓存键key
|
||||||
|
*/
|
||||||
|
public static String getCacheKey(String configKey) {
|
||||||
|
return CacheConstants.REG_DICT_KEY + configKey;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取字典缓存
|
||||||
|
*
|
||||||
|
* @param key 参数键
|
||||||
|
* @return dictDatas 字典数据列表
|
||||||
|
*/
|
||||||
|
public static List<RegDict> getDictCache(String key) {
|
||||||
|
JSONArray arrayCache = SpringUtils.getBean(RedisCache.class).getCacheObject(getCacheKey(key));
|
||||||
|
if (StringUtils.isNotNull(arrayCache)) {
|
||||||
|
return arrayCache.toList(RegDict.class);
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除指定字典缓存
|
||||||
|
*
|
||||||
|
* @param key 字典键
|
||||||
|
*/
|
||||||
|
public static void removeDictCache(String key) {
|
||||||
|
SpringUtils.getBean(RedisCache.class).deleteObject(getCacheKey(key));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 清空字典缓存
|
||||||
|
*/
|
||||||
|
public static void clearDictCache() {
|
||||||
|
Collection<String> keys = SpringUtils.getBean(RedisCache.class).keys(CacheConstants.REG_DICT_KEY + "*");
|
||||||
|
SpringUtils.getBean(RedisCache.class).deleteObject(keys);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@ -44,6 +44,7 @@
|
|||||||
<if test="Status != null and Status !=''">Status,</if>
|
<if test="Status != null and Status !=''">Status,</if>
|
||||||
<if test="reqDetailName != null and reqDetailName !=''">reqDetailName,</if>
|
<if test="reqDetailName != null and reqDetailName !=''">reqDetailName,</if>
|
||||||
<if test="bz != null and bz !=''">bz,</if>
|
<if test="bz != null and bz !=''">bz,</if>
|
||||||
|
<if test="slzq != null and slzq !=''">slzq,</if>
|
||||||
create_by,create_time
|
create_by,create_time
|
||||||
)
|
)
|
||||||
values (
|
values (
|
||||||
@ -87,6 +88,7 @@
|
|||||||
<if test="Status != null and Status !=''">#{Status},</if>
|
<if test="Status != null and Status !=''">#{Status},</if>
|
||||||
<if test="reqDetailName != null and reqDetailName !=''">#{reqDetailName},</if>
|
<if test="reqDetailName != null and reqDetailName !=''">#{reqDetailName},</if>
|
||||||
<if test="bz != null and bz !=''">#{bz},</if>
|
<if test="bz != null and bz !=''">#{bz},</if>
|
||||||
|
<if test="slzq != null and slzq !=''">#{slzq},</if>
|
||||||
#{create_by},#{create_time}
|
#{create_by},#{create_time}
|
||||||
)
|
)
|
||||||
</insert>
|
</insert>
|
||||||
@ -141,6 +143,7 @@
|
|||||||
<if test="Status != null and Status != ''">Status = #{Status},</if>
|
<if test="Status != null and Status != ''">Status = #{Status},</if>
|
||||||
<if test="reqDetailName != null and reqDetailName != ''">reqDetailName = #{reqDetailName},</if>
|
<if test="reqDetailName != null and reqDetailName != ''">reqDetailName = #{reqDetailName},</if>
|
||||||
<if test="bz != null and bz != ''">bz = #{bz},</if>
|
<if test="bz != null and bz != ''">bz = #{bz},</if>
|
||||||
|
<if test="slzq != null and slzq != ''">slzq = #{slzq},</if>
|
||||||
applyid = #{applyid}
|
applyid = #{applyid}
|
||||||
</set>
|
</set>
|
||||||
where applyid = #{applyid}
|
where applyid = #{applyid}
|
||||||
|
|||||||
@ -1,9 +1,13 @@
|
|||||||
package com.transitPlatForm.transitPF.controller;
|
package com.transitPlatForm.transitPF.controller;
|
||||||
|
|
||||||
|
import com.transitPlatForm.common.annotation.Log;
|
||||||
import com.transitPlatForm.common.core.controller.BaseController;
|
import com.transitPlatForm.common.core.controller.BaseController;
|
||||||
import com.transitPlatForm.common.core.domain.Result;
|
import com.transitPlatForm.common.core.domain.Result;
|
||||||
import com.transitPlatForm.transitPF.pojo.DTO.RegRequestInfoDTO;
|
import com.transitPlatForm.common.enums.BusinessType;
|
||||||
|
import com.transitPlatForm.interfaceCommon.constants.SysLogConstants;
|
||||||
|
import com.transitPlatForm.transitPF.pojo.DTO.reqinfo.RegRequestInfoDTO;
|
||||||
import com.transitPlatForm.transitPF.pojo.DTO.ReqApplyInfoDTO;
|
import com.transitPlatForm.transitPF.pojo.DTO.ReqApplyInfoDTO;
|
||||||
|
import com.transitPlatForm.transitPF.pojo.DTO.reqinfo.printDTO;
|
||||||
import com.transitPlatForm.transitPF.service.RegRequestInfoService;
|
import com.transitPlatForm.transitPF.service.RegRequestInfoService;
|
||||||
import io.swagger.annotations.Api;
|
import io.swagger.annotations.Api;
|
||||||
import io.swagger.annotations.ApiOperation;
|
import io.swagger.annotations.ApiOperation;
|
||||||
@ -11,6 +15,8 @@ import lombok.extern.slf4j.Slf4j;
|
|||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.web.bind.annotation.*;
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 自助开单界面
|
* 自助开单界面
|
||||||
*/
|
*/
|
||||||
@ -43,10 +49,13 @@ public class RegRequestInfoController extends BaseController {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@Log(title = SysLogConstants.REQINPUT, businessType = BusinessType.INSERT)
|
||||||
@ApiOperation("保存申请单信息")
|
@ApiOperation("保存申请单信息")
|
||||||
@PostMapping("/saveReqInfo")
|
@PostMapping("/saveReqInfo")
|
||||||
public Result saveReqInfo(@RequestBody ReqApplyInfoDTO reqApplyInfoDTO) {
|
public Result saveReqInfo(@RequestBody ReqApplyInfoDTO reqApplyInfoDTO) {
|
||||||
//设置操作员和登录机构
|
//设置操作员和登录机构
|
||||||
|
String loginYLJG = getLoginUser().getSysLoginParam().getLoginYLJG();
|
||||||
|
if (loginYLJG == null || loginYLJG.equals("")) return new Result("-1", "获取登录的医疗机构失败!");
|
||||||
reqApplyInfoDTO.getRegApply().setUserCode(getUsername());
|
reqApplyInfoDTO.getRegApply().setUserCode(getUsername());
|
||||||
reqApplyInfoDTO.getRegApply().setUserName(getLoginUser().getUser().getNickName());
|
reqApplyInfoDTO.getRegApply().setUserName(getLoginUser().getUser().getNickName());
|
||||||
reqApplyInfoDTO.getRegApply().setSrcHospCode(getLoginUser().getSysLoginParam().getLoginYLJG());
|
reqApplyInfoDTO.getRegApply().setSrcHospCode(getLoginUser().getSysLoginParam().getLoginYLJG());
|
||||||
@ -57,24 +66,29 @@ public class RegRequestInfoController extends BaseController {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* 打印条码
|
* 打印条码
|
||||||
|
*
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
|
@Log(title = SysLogConstants.REQINPUT, businessType = BusinessType.PRINT)
|
||||||
@ApiOperation("打印条码")
|
@ApiOperation("打印条码")
|
||||||
@GetMapping("/print")
|
@PostMapping("/print")
|
||||||
public Result printBarCode(String applyId){
|
public Result printBarCode(@RequestBody List<printDTO> barCodeList) {
|
||||||
return regRequestInfoService.printBarCode(applyId,getUsername());
|
return regRequestInfoService.printBarCode(barCodeList, getUsername());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Log(title = SysLogConstants.REQINPUT, businessType = BusinessType.DELETE)
|
||||||
@ApiOperation("作废申请单")
|
@ApiOperation("作废申请单")
|
||||||
@GetMapping("/cancelReq")
|
@GetMapping("/cancelReq")
|
||||||
public Result cancelReq(String applyId) {
|
public Result cancelReq(String applyId) {
|
||||||
return regRequestInfoService.cancelReq(applyId);
|
return regRequestInfoService.cancelReq(applyId);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ApiOperation("打印机插件设置")
|
@ApiOperation("打印机插件设置")
|
||||||
@GetMapping("/printsetup")
|
@GetMapping("/printsetup")
|
||||||
public Result printsetup() {
|
public Result printsetup() {
|
||||||
return regRequestInfoService.printsetup();
|
return regRequestInfoService.printsetup();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ApiOperation("打印机插件检查")
|
@ApiOperation("打印机插件检查")
|
||||||
@GetMapping("/printcheck")
|
@GetMapping("/printcheck")
|
||||||
public Result printcheck() {
|
public Result printcheck() {
|
||||||
|
|||||||
@ -59,12 +59,12 @@ public class RegTransitSampleController extends BaseController {
|
|||||||
}
|
}
|
||||||
|
|
||||||
//@ApiOperation("条码退回")
|
//@ApiOperation("条码退回")
|
||||||
@PostMapping("/sampleSignBack")
|
// @PostMapping("/sampleSignBack")
|
||||||
public Result sampleSignBack(@RequestBody SampleSignVO sampleSignVO){
|
// public Result sampleSignBack(@RequestBody SampleSignVO sampleSignVO){
|
||||||
List<String> barcode = sampleSignVO.getBarcode();
|
// List<String> barcode = sampleSignVO.getBarcode();
|
||||||
String status = sampleSignVO.getStatus();
|
// String status = sampleSignVO.getStatus();
|
||||||
return regTransitSampleService.sampleSignBack(barcode,getUsername(),status);
|
// return regTransitSampleService.sampleSignBack(barcode,getUsername(),status);
|
||||||
}
|
// }
|
||||||
|
|
||||||
@ApiOperation("获取标本条码退回数据")
|
@ApiOperation("获取标本条码退回数据")
|
||||||
@GetMapping("querySampleSignBack")
|
@GetMapping("querySampleSignBack")
|
||||||
|
|||||||
@ -8,6 +8,7 @@ import com.transitPlatForm.common.core.page.TableDataInfo;
|
|||||||
import com.transitPlatForm.common.enums.BusinessType;
|
import com.transitPlatForm.common.enums.BusinessType;
|
||||||
import com.transitPlatForm.common.utils.poi.ExcelUtil;
|
import com.transitPlatForm.common.utils.poi.ExcelUtil;
|
||||||
import com.transitPlatForm.common.core.domain.entity.reg.RegDict;
|
import com.transitPlatForm.common.core.domain.entity.reg.RegDict;
|
||||||
|
import com.transitPlatForm.interfaceCommon.constants.SysLogConstants;
|
||||||
import com.transitPlatForm.transitPF.service.RegDictService;
|
import com.transitPlatForm.transitPF.service.RegDictService;
|
||||||
import io.swagger.annotations.Api;
|
import io.swagger.annotations.Api;
|
||||||
import io.swagger.annotations.ApiOperation;
|
import io.swagger.annotations.ApiOperation;
|
||||||
@ -37,7 +38,7 @@ public class RegDictController extends BaseController {
|
|||||||
return getDataTable(list);
|
return getDataTable(list);
|
||||||
}
|
}
|
||||||
@ApiOperation("字典导出")
|
@ApiOperation("字典导出")
|
||||||
@Log(title = "字典导出", businessType = BusinessType.EXPORT)
|
@Log(title = SysLogConstants.DICT, businessType = BusinessType.EXPORT)
|
||||||
@PostMapping("/export")
|
@PostMapping("/export")
|
||||||
public void export(HttpServletResponse response, RegDict post) {
|
public void export(HttpServletResponse response, RegDict post) {
|
||||||
List<RegDict> list = regDictService.selectDictList(post);
|
List<RegDict> list = regDictService.selectDictList(post);
|
||||||
@ -64,7 +65,7 @@ public class RegDictController extends BaseController {
|
|||||||
* 新增字典
|
* 新增字典
|
||||||
*/
|
*/
|
||||||
@ApiOperation("新增字典")
|
@ApiOperation("新增字典")
|
||||||
@Log(title = "字典管理", businessType = BusinessType.INSERT)
|
@Log(title = SysLogConstants.DICT, businessType = BusinessType.INSERT)
|
||||||
@PostMapping
|
@PostMapping
|
||||||
public AjaxResult add(@Validated @RequestBody RegDict post) {
|
public AjaxResult add(@Validated @RequestBody RegDict post) {
|
||||||
if (!regDictService.checkDictNameUnique(post)) {
|
if (!regDictService.checkDictNameUnique(post)) {
|
||||||
@ -80,7 +81,7 @@ public class RegDictController extends BaseController {
|
|||||||
* 修改字典
|
* 修改字典
|
||||||
*/
|
*/
|
||||||
@ApiOperation("修改字典")
|
@ApiOperation("修改字典")
|
||||||
@Log(title = "字典管理", businessType = BusinessType.UPDATE)
|
@Log(title = SysLogConstants.DICT, businessType = BusinessType.UPDATE)
|
||||||
@PutMapping
|
@PutMapping
|
||||||
public AjaxResult edit(@Validated @RequestBody RegDict post) {
|
public AjaxResult edit(@Validated @RequestBody RegDict post) {
|
||||||
if (!regDictService.checkDictNameUnique(post)) {
|
if (!regDictService.checkDictNameUnique(post)) {
|
||||||
@ -96,7 +97,7 @@ public class RegDictController extends BaseController {
|
|||||||
* 删除字典
|
* 删除字典
|
||||||
*/
|
*/
|
||||||
@ApiOperation("删除字典")
|
@ApiOperation("删除字典")
|
||||||
@Log(title = "字典管理", businessType = BusinessType.DELETE)
|
@Log(title = SysLogConstants.DICT, businessType = BusinessType.DELETE)
|
||||||
@DeleteMapping("/{dictIds}")
|
@DeleteMapping("/{dictIds}")
|
||||||
public AjaxResult remove(@PathVariable Long[] dictIds) {
|
public AjaxResult remove(@PathVariable Long[] dictIds) {
|
||||||
return toAjax(regDictService.deleteDictByIds(dictIds));
|
return toAjax(regDictService.deleteDictByIds(dictIds));
|
||||||
@ -111,4 +112,12 @@ public class RegDictController extends BaseController {
|
|||||||
List<RegDict> posts = regDictService.selectDictAll();
|
List<RegDict> posts = regDictService.selectDictAll();
|
||||||
return success(posts);
|
return success(posts);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ApiOperation("获取字典最大编码")
|
||||||
|
@GetMapping("/getMaxDictCode")
|
||||||
|
public AjaxResult getMaxDictCode(String dictType) {
|
||||||
|
String loginYLJG = getLoginUser().getSysLoginParam().getLoginYLJG();
|
||||||
|
if(loginYLJG==null || loginYLJG.equals("")) return AjaxResult.error("获取登录的医疗机构失败!");
|
||||||
|
return regDictService.getMaxDictCode(dictType,loginYLJG);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -80,4 +80,7 @@ public interface RegDictMapper {
|
|||||||
RegDict checkDictCodeUnique(@Param("dictCode") String DictCode,@Param("dictType") String dictType);
|
RegDict checkDictCodeUnique(@Param("dictCode") String DictCode,@Param("dictType") String dictType);
|
||||||
|
|
||||||
List<RegDict> getInfoOne(String dict_type);
|
List<RegDict> getInfoOne(String dict_type);
|
||||||
|
|
||||||
|
String getMaxDictCode(@Param("dict_type")String dict_type,@Param("hospital_id")String hospital_id);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -3,7 +3,7 @@ package com.transitPlatForm.transitPF.mapper;
|
|||||||
import com.transitPlatForm.common.core.domain.entity.reg.RegApply;
|
import com.transitPlatForm.common.core.domain.entity.reg.RegApply;
|
||||||
import com.transitPlatForm.common.core.domain.entity.reg.RegApplyDetail;
|
import com.transitPlatForm.common.core.domain.entity.reg.RegApplyDetail;
|
||||||
import com.transitPlatForm.common.core.domain.entity.reg.RegTransitSampleDetail;
|
import com.transitPlatForm.common.core.domain.entity.reg.RegTransitSampleDetail;
|
||||||
import com.transitPlatForm.transitPF.pojo.DTO.RegRequestInfoDTO;
|
import com.transitPlatForm.transitPF.pojo.DTO.reqinfo.RegRequestInfoDTO;
|
||||||
import org.apache.ibatis.annotations.Param;
|
import org.apache.ibatis.annotations.Param;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
package com.transitPlatForm.transitPF.pojo.DTO;
|
package com.transitPlatForm.transitPF.pojo.DTO.reqinfo;
|
||||||
|
|
||||||
import lombok.AllArgsConstructor;
|
import lombok.AllArgsConstructor;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
@ -0,0 +1,13 @@
|
|||||||
|
package com.transitPlatForm.transitPF.pojo.DTO.reqinfo;
|
||||||
|
|
||||||
|
import lombok.AllArgsConstructor;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.NoArgsConstructor;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
@NoArgsConstructor
|
||||||
|
@AllArgsConstructor
|
||||||
|
public class printDTO {
|
||||||
|
private String applyId;
|
||||||
|
private String barcode;
|
||||||
|
}
|
||||||
@ -1,5 +1,6 @@
|
|||||||
package com.transitPlatForm.transitPF.service;
|
package com.transitPlatForm.transitPF.service;
|
||||||
|
|
||||||
|
import com.transitPlatForm.common.core.domain.AjaxResult;
|
||||||
import com.transitPlatForm.common.core.domain.Result;
|
import com.transitPlatForm.common.core.domain.Result;
|
||||||
import com.transitPlatForm.common.core.domain.entity.reg.RegDict;
|
import com.transitPlatForm.common.core.domain.entity.reg.RegDict;
|
||||||
|
|
||||||
@ -87,4 +88,7 @@ public interface RegDictService {
|
|||||||
int updateDict(RegDict Dict);
|
int updateDict(RegDict Dict);
|
||||||
|
|
||||||
Result getInfoOne(String dictType);
|
Result getInfoOne(String dictType);
|
||||||
|
|
||||||
|
AjaxResult getMaxDictCode(String dictType,String loginYLJG);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,8 +1,11 @@
|
|||||||
package com.transitPlatForm.transitPF.service;
|
package com.transitPlatForm.transitPF.service;
|
||||||
|
|
||||||
import com.transitPlatForm.common.core.domain.Result;
|
import com.transitPlatForm.common.core.domain.Result;
|
||||||
import com.transitPlatForm.transitPF.pojo.DTO.RegRequestInfoDTO;
|
import com.transitPlatForm.transitPF.pojo.DTO.reqinfo.RegRequestInfoDTO;
|
||||||
import com.transitPlatForm.transitPF.pojo.DTO.ReqApplyInfoDTO;
|
import com.transitPlatForm.transitPF.pojo.DTO.ReqApplyInfoDTO;
|
||||||
|
import com.transitPlatForm.transitPF.pojo.DTO.reqinfo.printDTO;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
public interface RegRequestInfoService {
|
public interface RegRequestInfoService {
|
||||||
Result queryRegRequestInfo(RegRequestInfoDTO regRequestInfoDTO);
|
Result queryRegRequestInfo(RegRequestInfoDTO regRequestInfoDTO);
|
||||||
@ -13,7 +16,7 @@ public interface RegRequestInfoService {
|
|||||||
|
|
||||||
Result saveReqInfo(ReqApplyInfoDTO reqApplyInfoDTO);
|
Result saveReqInfo(ReqApplyInfoDTO reqApplyInfoDTO);
|
||||||
|
|
||||||
Result printBarCode(String applyId,String userName);
|
Result printBarCode(List<printDTO> barCodeList, String userName);
|
||||||
|
|
||||||
Result cancelReq(String applyId);
|
Result cancelReq(String applyId);
|
||||||
Result printcheck();
|
Result printcheck();
|
||||||
|
|||||||
@ -1,9 +1,12 @@
|
|||||||
package com.transitPlatForm.transitPF.service.impl;
|
package com.transitPlatForm.transitPF.service.impl;
|
||||||
|
|
||||||
import com.transitPlatForm.common.constant.UserConstants;
|
import com.transitPlatForm.common.constant.UserConstants;
|
||||||
|
import com.transitPlatForm.common.core.domain.AjaxResult;
|
||||||
import com.transitPlatForm.common.core.domain.Result;
|
import com.transitPlatForm.common.core.domain.Result;
|
||||||
import com.transitPlatForm.common.exception.ServiceException;
|
import com.transitPlatForm.common.exception.ServiceException;
|
||||||
import com.transitPlatForm.common.utils.StringUtils;
|
import com.transitPlatForm.common.utils.StringUtils;
|
||||||
|
import com.transitPlatForm.interfaceCommon.utils.LisUtil;
|
||||||
|
import com.transitPlatForm.interfaceCommon.utils.cache.RegDictCache;
|
||||||
import com.transitPlatForm.transitPF.mapper.RegDictMapper;
|
import com.transitPlatForm.transitPF.mapper.RegDictMapper;
|
||||||
import com.transitPlatForm.common.core.domain.entity.reg.RegDict;
|
import com.transitPlatForm.common.core.domain.entity.reg.RegDict;
|
||||||
import com.transitPlatForm.transitPF.service.RegDictService;
|
import com.transitPlatForm.transitPF.service.RegDictService;
|
||||||
@ -13,6 +16,8 @@ import org.springframework.stereotype.Service;
|
|||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
|
import static com.transitPlatForm.common.core.domain.AjaxResult.success;
|
||||||
|
|
||||||
@Service
|
@Service
|
||||||
@Slf4j
|
@Slf4j
|
||||||
public class RegDictServiceImpl implements RegDictService {
|
public class RegDictServiceImpl implements RegDictService {
|
||||||
@ -103,7 +108,11 @@ public class RegDictServiceImpl implements RegDictService {
|
|||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public int deleteDictById(Long DictId) {
|
public int deleteDictById(Long DictId) {
|
||||||
return dictMapper.deleteDictById(DictId);
|
int i = dictMapper.deleteDictById(DictId);
|
||||||
|
//设置缓存
|
||||||
|
RegDict regDict = dictMapper.selectDictById(DictId);
|
||||||
|
RegDictCache.setDictCache(regDict.getDictType(),dictMapper.getInfoOne(regDict.getDictType()));
|
||||||
|
return i;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -131,7 +140,11 @@ public class RegDictServiceImpl implements RegDictService {
|
|||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public int insertDict(RegDict Dict) {
|
public int insertDict(RegDict Dict) {
|
||||||
return dictMapper.insertDict(Dict);
|
int i = dictMapper.insertDict(Dict);
|
||||||
|
//设置缓存
|
||||||
|
List<RegDict> regDictList = dictMapper.getInfoOne(Dict.getDictType());
|
||||||
|
RegDictCache.setDictCache(Dict.getDictType(),regDictList);
|
||||||
|
return i;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -142,12 +155,38 @@ public class RegDictServiceImpl implements RegDictService {
|
|||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public int updateDict(RegDict Dict) {
|
public int updateDict(RegDict Dict) {
|
||||||
return dictMapper.updateDict(Dict);
|
int i = dictMapper.updateDict(Dict);
|
||||||
|
//设置缓存
|
||||||
|
List<RegDict> regDictList = dictMapper.getInfoOne(Dict.getDictType());
|
||||||
|
RegDictCache.setDictCache(Dict.getDictType(),regDictList);
|
||||||
|
return i;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Result getInfoOne(String dictType) {
|
public Result getInfoOne(String dictType) {
|
||||||
List<RegDict> regDictList = dictMapper.getInfoOne(dictType);
|
List<RegDict> dictCacheList = RegDictCache.getDictCache(dictType);
|
||||||
return new Result("0","获取数据成功!",regDictList);
|
if(dictCacheList == null) {
|
||||||
|
//没取到缓存,则设置缓存
|
||||||
|
dictCacheList = dictMapper.getInfoOne(dictType);
|
||||||
|
RegDictCache.setDictCache(dictType,dictCacheList);
|
||||||
|
}
|
||||||
|
return new Result("0","获取数据成功!",dictCacheList);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取字典的最大值
|
||||||
|
* @param dictType
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public AjaxResult getMaxDictCode(String dictType,String loginYLJG) {
|
||||||
|
String maxDictCode = getMaxNo(dictType,loginYLJG);
|
||||||
|
return success((Object) maxDictCode);
|
||||||
|
}
|
||||||
|
|
||||||
|
public synchronized String getMaxNo(String dictType,String loginYLJG){
|
||||||
|
String maxDictCode = dictMapper.getMaxDictCode(dictType,loginYLJG);
|
||||||
|
if(LisUtil.isBank(maxDictCode).equals("")) maxDictCode = "0";
|
||||||
|
return LisUtil.isBank(Integer.parseInt(maxDictCode)+1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -14,15 +14,15 @@ import com.transitPlatForm.interfaceCommon.mapper.RegApplyDetailMapper;
|
|||||||
import com.transitPlatForm.interfaceCommon.mapper.RegApplyMapper;
|
import com.transitPlatForm.interfaceCommon.mapper.RegApplyMapper;
|
||||||
import com.transitPlatForm.interfaceCommon.utils.CommonUtil;
|
import com.transitPlatForm.interfaceCommon.utils.CommonUtil;
|
||||||
import com.transitPlatForm.interfaceCommon.utils.LisUtil;
|
import com.transitPlatForm.interfaceCommon.utils.LisUtil;
|
||||||
import com.transitPlatForm.interfaceCommon.utils.LoginConfigParamUtil;
|
|
||||||
import com.transitPlatForm.interfaceCommon.websocket.ChatWebSocketServer;
|
import com.transitPlatForm.interfaceCommon.websocket.ChatWebSocketServer;
|
||||||
import com.transitPlatForm.interfaceCommon.websocket.WebSocketMessage;
|
import com.transitPlatForm.interfaceCommon.websocket.WebSocketMessage;
|
||||||
import com.transitPlatForm.interfaceCommon.websocket.WebSocketUser;
|
import com.transitPlatForm.interfaceCommon.websocket.WebSocketUser;
|
||||||
import com.transitPlatForm.transitPF.mapper.LabIntersendListMapper;
|
import com.transitPlatForm.transitPF.mapper.LabIntersendListMapper;
|
||||||
import com.transitPlatForm.transitPF.mapper.RegRequestInfoMapper;
|
import com.transitPlatForm.transitPF.mapper.RegRequestInfoMapper;
|
||||||
import com.transitPlatForm.transitPF.mapper.RegTransitSampleMapper;
|
import com.transitPlatForm.transitPF.mapper.RegTransitSampleMapper;
|
||||||
import com.transitPlatForm.transitPF.pojo.DTO.RegRequestInfoDTO;
|
import com.transitPlatForm.transitPF.pojo.DTO.reqinfo.RegRequestInfoDTO;
|
||||||
import com.transitPlatForm.transitPF.pojo.DTO.ReqApplyInfoDTO;
|
import com.transitPlatForm.transitPF.pojo.DTO.ReqApplyInfoDTO;
|
||||||
|
import com.transitPlatForm.transitPF.pojo.DTO.reqinfo.printDTO;
|
||||||
import com.transitPlatForm.transitPF.service.RegRequestInfoService;
|
import com.transitPlatForm.transitPF.service.RegRequestInfoService;
|
||||||
import com.transitPlatForm.transitPF.service.util.RequestInfoUtil;
|
import com.transitPlatForm.transitPF.service.util.RequestInfoUtil;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
@ -34,8 +34,6 @@ import org.springframework.transaction.annotation.Transactional;
|
|||||||
import javax.annotation.Resource;
|
import javax.annotation.Resource;
|
||||||
import java.math.BigDecimal;
|
import java.math.BigDecimal;
|
||||||
import java.util.*;
|
import java.util.*;
|
||||||
import java.util.stream.Collectors;
|
|
||||||
import java.util.stream.Stream;
|
|
||||||
|
|
||||||
@Service
|
@Service
|
||||||
@Slf4j
|
@Slf4j
|
||||||
@ -63,6 +61,7 @@ public class RegRequestInfoServiceImpl implements RegRequestInfoService {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* 获取申请单列表
|
* 获取申请单列表
|
||||||
|
*
|
||||||
* @param regRequestInfoDTO
|
* @param regRequestInfoDTO
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@ -74,6 +73,7 @@ public class RegRequestInfoServiceImpl implements RegRequestInfoService {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* 获取明细信息
|
* 获取明细信息
|
||||||
|
*
|
||||||
* @param applyId
|
* @param applyId
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@ -93,6 +93,7 @@ public class RegRequestInfoServiceImpl implements RegRequestInfoService {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* 保存申请单信息和条码信息
|
* 保存申请单信息和条码信息
|
||||||
|
*
|
||||||
* @param reqApplyInfoDTO
|
* @param reqApplyInfoDTO
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@ -143,30 +144,27 @@ public class RegRequestInfoServiceImpl implements RegRequestInfoService {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* 打印条码
|
* 打印条码
|
||||||
* @param applyId
|
*
|
||||||
|
* @param barCodeList
|
||||||
|
* @param userName
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public Result printBarCode(String applyId,String userName) {
|
public Result printBarCode(List<printDTO> barCodeList, String userName) {
|
||||||
//产生条码信息
|
List<String> barcodeList1 = new ArrayList<>();
|
||||||
Result result1 = createBarcode(applyId);
|
for (printDTO printDTO : barCodeList) {
|
||||||
if(!result1.getCode().equals("0")) return result1;
|
String barcode = printDTO.getBarcode();
|
||||||
RegTransitSampleDetail regTransitSampleDetail = new RegTransitSampleDetail();
|
barcodeList1.add(barcode);
|
||||||
regTransitSampleDetail.setApplyid(applyId);
|
String applyId = printDTO.getApplyId();
|
||||||
List<RegTransitSampleDetail> regTransitSampleDetailList = regTransitSampleMapper.getRegTransitSampleDetail(regTransitSampleDetail);
|
RegTransitSample regTransitSample = new RegTransitSample();
|
||||||
if(regTransitSampleDetailList.size() <= 0) return new Result("-1","没有找到对应的条码信息!");
|
regTransitSample.setBarcode(barcode);
|
||||||
List<String> barcodeList = new ArrayList<>();
|
List<RegTransitSample> regTransitSampleList = regTransitSampleMapper.getRegTransitSample(regTransitSample);
|
||||||
for (RegTransitSampleDetail transitSampleDetail : regTransitSampleDetailList) {
|
if (regTransitSampleList.size() <= 0) return new Result("-1", "没有查到该标本的条码信息,请先保存数据!");
|
||||||
if(barcodeList.contains(transitSampleDetail.getBarcode())) continue;
|
//修改打印状态
|
||||||
barcodeList.add(transitSampleDetail.getBarcode());
|
applicationContext.getBean(RegRequestInfoServiceImpl.class).updatePrintStatus(applyId, barcode);
|
||||||
}
|
}
|
||||||
Result result = printBar(barcodeList,userName);
|
|
||||||
if(!result.equals("0")) return result;
|
|
||||||
for (String barCode: barcodeList) {
|
|
||||||
//修改状态
|
|
||||||
applicationContext.getBean(RegRequestInfoServiceImpl.class).updatePrintStatus(applyId,barCode);
|
|
||||||
|
|
||||||
}
|
printBar(barcodeList1, userName);
|
||||||
return new Result("0", "打印成功!");
|
return new Result("0", "打印成功!");
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -175,7 +173,7 @@ public class RegRequestInfoServiceImpl implements RegRequestInfoService {
|
|||||||
RegApply regApply = regApplyMapper.queryOne(applyId);
|
RegApply regApply = regApplyMapper.queryOne(applyId);
|
||||||
if (regApply == null) return new Result("-1", "没有找到申请单信息!");
|
if (regApply == null) return new Result("-1", "没有找到申请单信息!");
|
||||||
int status = Integer.parseInt(regApply.getStatus());
|
int status = Integer.parseInt(regApply.getStatus());
|
||||||
if(status > 40 && status != 100) return new Result("-1","条码已经签收,不允许作废!");
|
if (status > 40 && status != 100) return new Result("-1", "条码已经签收或者已经作废,不允许作废!");
|
||||||
List<String> barcodeList = getBarcodeList(applyId);
|
List<String> barcodeList = getBarcodeList(applyId);
|
||||||
requestInfoUtil.cancelRequest(applyId, barcodeList);
|
requestInfoUtil.cancelRequest(applyId, barcodeList);
|
||||||
return new Result("0", "作废申请单成功!");
|
return new Result("0", "作废申请单成功!");
|
||||||
@ -192,6 +190,7 @@ public class RegRequestInfoServiceImpl implements RegRequestInfoService {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* 产生条码信息
|
* 产生条码信息
|
||||||
|
*
|
||||||
* @param applyId
|
* @param applyId
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@ -318,7 +317,11 @@ public class RegRequestInfoServiceImpl implements RegRequestInfoService {
|
|||||||
} else {
|
} else {
|
||||||
xh = 1;
|
xh = 1;
|
||||||
//条码号
|
//条码号
|
||||||
barcode = regApply.getSrcHospCode() + DateUtil.format(commonUtil.getCurrentTime(), "yyyyMMdd") + commonUtil.getNextSeq_pro("barcode", 4);
|
String srcHospCode = regApply.getSrcHospCode();
|
||||||
|
if (srcHospCode.length() == 1) {
|
||||||
|
srcHospCode = String.format("%02d", Integer.valueOf(srcHospCode));
|
||||||
|
}
|
||||||
|
barcode = DateUtil.format(commonUtil.getCurrentTime(), "yyyyMMdd") + srcHospCode + commonUtil.getNextSeq_pro("barcode", 4);
|
||||||
itemClassOne = itemClass;
|
itemClassOne = itemClass;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -420,6 +423,7 @@ public class RegRequestInfoServiceImpl implements RegRequestInfoService {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* 删除条码信息
|
* 删除条码信息
|
||||||
|
*
|
||||||
* @param applyId
|
* @param applyId
|
||||||
*/
|
*/
|
||||||
@Transactional(rollbackFor = Exception.class)
|
@Transactional(rollbackFor = Exception.class)
|
||||||
@ -435,6 +439,7 @@ public class RegRequestInfoServiceImpl implements RegRequestInfoService {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* 打印条码
|
* 打印条码
|
||||||
|
*
|
||||||
* @param barcode
|
* @param barcode
|
||||||
*/
|
*/
|
||||||
public Result printBar(List<String> barcode, String userName) {
|
public Result printBar(List<String> barcode, String userName) {
|
||||||
@ -503,6 +508,7 @@ public class RegRequestInfoServiceImpl implements RegRequestInfoService {
|
|||||||
System.out.println("已给客户端[" + webSocketUser.getUsername() + "]推送打印通知,IP:" + webSocketUser.getLoginIp());
|
System.out.println("已给客户端[" + webSocketUser.getUsername() + "]推送打印通知,IP:" + webSocketUser.getLoginIp());
|
||||||
return new Result("0", "打印成功");
|
return new Result("0", "打印成功");
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Result printcheck() {
|
public Result printcheck() {
|
||||||
String ip = IpUtils.getIpAddr();
|
String ip = IpUtils.getIpAddr();
|
||||||
@ -517,6 +523,7 @@ public class RegRequestInfoServiceImpl implements RegRequestInfoService {
|
|||||||
}
|
}
|
||||||
return new Result("0", "客户端插件正常");
|
return new Result("0", "客户端插件正常");
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Result printsetup() {
|
public Result printsetup() {
|
||||||
WebSocketMessage wsMessage = new WebSocketMessage();
|
WebSocketMessage wsMessage = new WebSocketMessage();
|
||||||
@ -525,6 +532,7 @@ public class RegRequestInfoServiceImpl implements RegRequestInfoService {
|
|||||||
wsMessage.setSenderId(SecurityUtils.getUsername());
|
wsMessage.setSenderId(SecurityUtils.getUsername());
|
||||||
return sendprintmsg(JSONUtil.toJsonStr(wsMessage));
|
return sendprintmsg(JSONUtil.toJsonStr(wsMessage));
|
||||||
}
|
}
|
||||||
|
|
||||||
private String getLocalid() {
|
private String getLocalid() {
|
||||||
SysLoginParam user = SecurityUtils.getLoginUser().getSysLoginParam();
|
SysLoginParam user = SecurityUtils.getLoginUser().getSysLoginParam();
|
||||||
if (user != null) {
|
if (user != null) {
|
||||||
|
|||||||
@ -94,9 +94,11 @@ public class RegTransitSampleServiceImpl implements RegTransitSampleService {
|
|||||||
SysUser sysUserOne = commonUtil.getSysUserOne(userId);
|
SysUser sysUserOne = commonUtil.getSysUserOne(userId);
|
||||||
if(sysUserOne == null) return new Result("-1","未查询到员工信息!");
|
if(sysUserOne == null) return new Result("-1","未查询到员工信息!");
|
||||||
String nickName = sysUserOne.getNickName();
|
String nickName = sysUserOne.getNickName();
|
||||||
|
String statusSample = regTransitSample.getStatus();
|
||||||
switch (status){
|
switch (status){
|
||||||
case "20": //标本采集
|
case "20": //标本采集
|
||||||
if(affirmTime == null) return new Result("-1","affirmTime标本采集时间不能为空!");
|
if(affirmTime == null) return new Result("-1","affirmTime标本采集时间不能为空!");
|
||||||
|
if(statusSample.equals("20")) return new Result("0","该标本已经采集!");
|
||||||
if(affirmUserName == null || affirmUserName.equals("")) return new Result("-1","affirmUserName标本采集人姓名不能为空!");
|
if(affirmUserName == null || affirmUserName.equals("")) return new Result("-1","affirmUserName标本采集人姓名不能为空!");
|
||||||
regTransitSample.setAffirmTime(affirmTime);
|
regTransitSample.setAffirmTime(affirmTime);
|
||||||
regTransitSample.setAffirmUserCode(affirmUserCode);
|
regTransitSample.setAffirmUserCode(affirmUserCode);
|
||||||
@ -105,6 +107,7 @@ public class RegTransitSampleServiceImpl implements RegTransitSampleService {
|
|||||||
if(dstHospName == null || dstHospName.equals("")) return new Result("-1","dstHospName不能为空!");
|
if(dstHospName == null || dstHospName.equals("")) return new Result("-1","dstHospName不能为空!");
|
||||||
if(sendPackTime == null) return new Result("-1","sendPackTime不能为空!");
|
if(sendPackTime == null) return new Result("-1","sendPackTime不能为空!");
|
||||||
if(sendUserName == null || sendUserName.equals("")) return new Result("-1","sendUserName不能为空!");
|
if(sendUserName == null || sendUserName.equals("")) return new Result("-1","sendUserName不能为空!");
|
||||||
|
if(statusSample.equals("30")) return new Result("0","该标本已经送检!");
|
||||||
regTransitSample.setDstHospCode(dstHospCode);
|
regTransitSample.setDstHospCode(dstHospCode);
|
||||||
regTransitSample.setDstHospName(dstHospName);
|
regTransitSample.setDstHospName(dstHospName);
|
||||||
regTransitSample.setSendPackTime(sendPackTime);
|
regTransitSample.setSendPackTime(sendPackTime);
|
||||||
@ -112,12 +115,13 @@ public class RegTransitSampleServiceImpl implements RegTransitSampleService {
|
|||||||
regTransitSample.setSendUserName(sendUserName);
|
regTransitSample.setSendUserName(sendUserName);
|
||||||
break;
|
break;
|
||||||
case "50": //标本签收
|
case "50": //标本签收
|
||||||
|
if(statusSample.equals("50")) return new Result("0","该标本已经签收!");
|
||||||
regTransitSample.setSignInTime(commonUtil.getCurrentTime());
|
regTransitSample.setSignInTime(commonUtil.getCurrentTime());
|
||||||
regTransitSample.setSignInUserCode(userId);
|
regTransitSample.setSignInUserCode(userId);
|
||||||
regTransitSample.setSignInUserName(nickName);
|
regTransitSample.setSignInUserName(nickName);
|
||||||
break;
|
break;
|
||||||
case "100": //标本退回
|
case "100": //标本退回
|
||||||
regTransitSample.setBackReasons(backReasons);
|
if(statusSample.equals("100")) return new Result("0","该标本已经退回!");
|
||||||
regTransitSample.setBackUserCode(userId);
|
regTransitSample.setBackUserCode(userId);
|
||||||
regTransitSample.setBackUserName(nickName);
|
regTransitSample.setBackUserName(nickName);
|
||||||
regTransitSample.setBackTime(commonUtil.getCurrentTime());
|
regTransitSample.setBackTime(commonUtil.getCurrentTime());
|
||||||
|
|||||||
@ -122,5 +122,9 @@
|
|||||||
select * from reg_dict where dict_type = #{dict_type}
|
select * from reg_dict where dict_type = #{dict_type}
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
<select id="getMaxDictCode">
|
||||||
|
select max(dict_code) from reg_dict where dict_type = #{dict_type} and hospital_id = #{hospital_id}
|
||||||
|
</select>
|
||||||
|
|
||||||
|
|
||||||
</mapper>
|
</mapper>
|
||||||
@ -11,12 +11,12 @@
|
|||||||
</select>
|
</select>
|
||||||
|
|
||||||
<select id="queryReqDetail" resultType="com.transitPlatForm.common.core.domain.entity.reg.RegApplyDetail">
|
<select id="queryReqDetail" resultType="com.transitPlatForm.common.core.domain.entity.reg.RegApplyDetail">
|
||||||
select a.*,b.itemclass, c.classid,d.barcode from reg_apply_detail a left join reg_TransitSample_detail d on (d.applyid = a.applyid and d.applyDetailId = a.uid),reg_item b,reg_itemclass c
|
select a.*,b.itemclass, c.classid,d.barcode,c.itemclass_bkcolor,c.itemclass_tips from reg_apply_detail a left join reg_TransitSample_detail d on (d.applyid = a.applyid and d.applyDetailId = a.uid),reg_item b,reg_itemclass c
|
||||||
where a.applyid = #{applyid} and a.OrderItemCode = b.itemcode and c.itemclass_code = b.itemclass
|
where a.applyid = #{applyid} and a.OrderItemCode = b.itemcode and c.itemclass_code = b.itemclass
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<select id="getItemInfo" resultType="map">
|
<select id="getItemInfo" resultType="map">
|
||||||
select b.classid,(case when isnull(a.yblx,'') = '' then b.itemclass_yblx else a.yblx end) as itemclass_yblx, a.* from reg_item a,reg_itemclass b where a.itemclass = b.itemclass_code and a.status = '0'
|
select b.itemclass_tips, b.classid,(case when isnull(a.yblx,'') = '' then b.itemclass_yblx else a.yblx end) as itemclass_yblx, a.* from reg_item a,reg_itemclass b where a.itemclass = b.itemclass_code and a.status = '0'
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<select id="existSQD" resultType="com.transitPlatForm.common.core.domain.entity.reg.RegTransitSampleDetail">
|
<select id="existSQD" resultType="com.transitPlatForm.common.core.domain.entity.reg.RegTransitSampleDetail">
|
||||||
|
|||||||
@ -88,6 +88,7 @@
|
|||||||
<if test="ExpressComName != null and ExpressComName != ''">ExpressComName,</if>
|
<if test="ExpressComName != null and ExpressComName != ''">ExpressComName,</if>
|
||||||
<if test="PackSerial != null and PackSerial != ''">PackSerial,</if>
|
<if test="PackSerial != null and PackSerial != ''">PackSerial,</if>
|
||||||
<if test="ExpressNum != null and ExpressNum != ''">ExpressNum,</if>
|
<if test="ExpressNum != null and ExpressNum != ''">ExpressNum,</if>
|
||||||
|
<if test="slzq != null and slzq != ''">slzq,</if>
|
||||||
create_by,create_time,update_by,update_time
|
create_by,create_time,update_by,update_time
|
||||||
)values(
|
)values(
|
||||||
<if test="PatId != null and PatId != ''">#{PatId},</if>
|
<if test="PatId != null and PatId != ''">#{PatId},</if>
|
||||||
@ -144,6 +145,7 @@
|
|||||||
<if test="ExpressComName != null and ExpressComName != ''">#{ExpressComName},</if>
|
<if test="ExpressComName != null and ExpressComName != ''">#{ExpressComName},</if>
|
||||||
<if test="PackSerial != null and PackSerial != ''">#{PackSerial},</if>
|
<if test="PackSerial != null and PackSerial != ''">#{PackSerial},</if>
|
||||||
<if test="ExpressNum != null and ExpressNum != ''">#{ExpressNum},</if>
|
<if test="ExpressNum != null and ExpressNum != ''">#{ExpressNum},</if>
|
||||||
|
<if test="slzq != null and slzq != ''">#{slzq},</if>
|
||||||
#{create_by},#{create_time},#{update_by},#{update_time}
|
#{create_by},#{create_time},#{update_by},#{update_time}
|
||||||
)
|
)
|
||||||
</insert>
|
</insert>
|
||||||
@ -251,6 +253,7 @@
|
|||||||
<if test="BackUserCode != null and BackUserCode != ''">BackUserCode = #{BackUserCode},</if>
|
<if test="BackUserCode != null and BackUserCode != ''">BackUserCode = #{BackUserCode},</if>
|
||||||
<if test="BackUserName != null and BackUserName != ''">BackUserName = #{BackUserName},</if>
|
<if test="BackUserName != null and BackUserName != ''">BackUserName = #{BackUserName},</if>
|
||||||
<if test="BackTime != null">BackTime = #{BackTime},</if>
|
<if test="BackTime != null">BackTime = #{BackTime},</if>
|
||||||
|
<if test="slzq != null and slzq != ''">slzq,</if>
|
||||||
update_by = #{update_by},update_time = #{update_time}
|
update_by = #{update_by},update_time = #{update_time}
|
||||||
</set>
|
</set>
|
||||||
where barcode = #{barcode}
|
where barcode = #{barcode}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user