修改若干问题

This commit is contained in:
jiangs 2026-03-20 12:01:24 +08:00
parent 890ae37381
commit 9517d9a3ed
13 changed files with 148 additions and 48 deletions

View File

@ -39,11 +39,12 @@
<select id="selectHospitalAll" resultMap="RegHospitalResult"> <select id="selectHospitalAll" resultMap="RegHospitalResult">
<include refid="selecthospitalVo"/> <include refid="selecthospitalVo"/>
where status = '0'
</select> </select>
<select id="selectHospitalById" parameterType="Long" resultMap="RegHospitalResult"> <select id="selectHospitalById" parameterType="Long" resultMap="RegHospitalResult">
<include refid="selecthospitalVo"/> <include refid="selecthospitalVo"/>
where hospital_id = #{hospitalId} where hospital_id = #{hospitalId} and status = '0'
</select> </select>
@ -51,13 +52,13 @@
<select id="checkHospitalNameUnique" parameterType="String" resultMap="RegHospitalResult"> <select id="checkHospitalNameUnique" parameterType="String" resultMap="RegHospitalResult">
select top 1 hospital_id, hospital_code, hospital_name, hospital_userinfo, status, create_by, create_time, remark select top 1 hospital_id, hospital_code, hospital_name, hospital_userinfo, status, create_by, create_time, remark
from Reg_hospital from Reg_hospital
where hospital_name=#{hospitalName} where hospital_name=#{hospitalName} and status = '0'
</select> </select>
<select id="checkHospitalCodeUnique" parameterType="String" resultMap="RegHospitalResult"> <select id="checkHospitalCodeUnique" parameterType="String" resultMap="RegHospitalResult">
select top 1 hospital_id, hospital_code, hospital_name, hospital_userinfo, status, create_by, create_time, remark select top 1 hospital_id, hospital_code, hospital_name, hospital_userinfo, status, create_by, create_time, remark
from Reg_hospital from Reg_hospital
where hospital_code=#{hospitalCode} where hospital_code=#{hospitalCode} and status = '0'
</select> </select>
<update id="updateHospital" parameterType="RegHospital"> <update id="updateHospital" parameterType="RegHospital">

View File

@ -44,9 +44,9 @@ public class RegTransitSampleController extends BaseController {
@ApiOperation("获取未签收的标本") @ApiOperation("获取未签收的标本")
@GetMapping("/querySampleSign") @GetMapping("/querySampleSign")
public TableDataInfo getSampleSign(){ public TableDataInfo getSampleSign(RegTransitSample regTransitSample){
startPage(); startPage();
List<RegTransitSample> regTransitSampleList = regTransitSampleService.getSampleSign(); List<RegTransitSample> regTransitSampleList = regTransitSampleService.getSampleSign(regTransitSample);
return getDataTable(regTransitSampleList); return getDataTable(regTransitSampleList);
} }

View File

@ -38,14 +38,16 @@ public class RegDictController extends BaseController {
@GetMapping("/list") @GetMapping("/list")
public TableDataInfo list(RegDict post) { public TableDataInfo list(RegDict post) {
startPage(); startPage();
List<RegDict> list = regDictService.selectDictList(post); String loginYLJG = getLoginUser().getSysLoginParam().getLoginYLJG();
List<RegDict> list = regDictService.selectDictList(post,loginYLJG);
return getDataTable(list); return getDataTable(list);
} }
@ApiOperation("字典导出") @ApiOperation("字典导出")
@Log(title = SysLogConstants.DICT, 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); String loginYLJG = getLoginUser().getSysLoginParam().getLoginYLJG();
List<RegDict> list = regDictService.selectDictList(post,loginYLJG);
ExcelUtil<RegDict> util = new ExcelUtil<>(RegDict.class); ExcelUtil<RegDict> util = new ExcelUtil<>(RegDict.class);
util.exportExcel(response, list, "字典数据"); util.exportExcel(response, list, "字典数据");
} }
@ -62,7 +64,8 @@ public class RegDictController extends BaseController {
@ApiOperation("获取字典信息") @ApiOperation("获取字典信息")
@GetMapping("/getInfoOne") @GetMapping("/getInfoOne")
public Result getInfoOne(String dict_type){ public Result getInfoOne(String dict_type){
return regDictService.getInfoOne(dict_type); String loginYLJG = getLoginUser().getSysLoginParam().getLoginYLJG();
return regDictService.getInfoOne(dict_type,loginYLJG);
} }
/** /**

View File

@ -79,7 +79,7 @@ public interface RegDictMapper {
*/ */
RegDict checkDictCodeUnique(@Param("dictCode") String DictCode,@Param("dictType") String dictType,@Param("hospital_id") int hospital_id); RegDict checkDictCodeUnique(@Param("dictCode") String DictCode,@Param("dictType") String dictType,@Param("hospital_id") int hospital_id);
List<RegDict> getInfoOne(String dict_type); List<RegDict> getInfoOne(@Param("dict_type")String dict_type,@Param("hospital_id")String hospital_id);
String getMaxDictCode(@Param("dict_type")String dict_type,@Param("hospital_id")String hospital_id); String getMaxDictCode(@Param("dict_type")String dict_type,@Param("hospital_id")String hospital_id);

View File

@ -19,7 +19,7 @@ public interface RegTransitSampleMapper {
void updateTest(@Param("checkPUR") String checkPUR,@Param("barcode") String barcode); void updateTest(@Param("checkPUR") String checkPUR,@Param("barcode") String barcode);
List<RegTransitSample> getRegTransitSampleSign(); List<RegTransitSample> getRegTransitSampleSign(RegTransitSample regTransitSample);
void updateRegTransitSample(RegTransitSample regTransitSample); void updateRegTransitSample(RegTransitSample regTransitSample);

View File

@ -13,7 +13,7 @@ public interface RegDictService {
* @param Dict 字典信息 * @param Dict 字典信息
* @return 字典列表 * @return 字典列表
*/ */
List<RegDict> selectDictList(RegDict Dict); List<RegDict> selectDictList(RegDict Dict,String loginYLJG);
/** /**
* 查询所有字典 * 查询所有字典
@ -87,7 +87,7 @@ public interface RegDictService {
*/ */
int updateDict(RegDict Dict); int updateDict(RegDict Dict);
Result getInfoOne(String dictType); Result getInfoOne(String dictType,String loginYLJG);
AjaxResult getMaxDictCode(String dictType,String loginYLJG); AjaxResult getMaxDictCode(String dictType,String loginYLJG);

View File

@ -11,7 +11,7 @@ public interface RegTransitSampleService {
Result invoke(String jsonStr); Result invoke(String jsonStr);
List<RegTransitSample> getSampleSign(); List<RegTransitSample> getSampleSign(RegTransitSample regTransitSample);
Result sampleSign(SampleSignVO sampleSignVO, String userId); Result sampleSign(SampleSignVO sampleSignVO, String userId);

View File

@ -16,6 +16,7 @@ import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import java.util.Arrays;
import java.util.List; import java.util.List;
import static com.transitPlatForm.common.core.domain.AjaxResult.success; import static com.transitPlatForm.common.core.domain.AjaxResult.success;
@ -28,6 +29,9 @@ public class RegDictServiceImpl implements RegDictService {
@Autowired @Autowired
private CommonUtil commonUtil; private CommonUtil commonUtil;
private static final String[] ksdhArray = new String[]{"DEPT","DOCTOR"};
/** /**
* 查询字典信息集合 * 查询字典信息集合
* *
@ -35,7 +39,10 @@ public class RegDictServiceImpl implements RegDictService {
* @return 字典信息集合 * @return 字典信息集合
*/ */
@Override @Override
public List<RegDict> selectDictList(RegDict Dict) { public List<RegDict> selectDictList(RegDict Dict,String loginYLJG) {
if(Arrays.stream(ksdhArray).anyMatch(Dict.getDictType()::equals)){
Dict.setHospital_id(Integer.parseInt(loginYLJG));
}
return dictMapper.selectDictList(Dict); return dictMapper.selectDictList(Dict);
} }
@ -115,7 +122,7 @@ public class RegDictServiceImpl implements RegDictService {
int i = dictMapper.deleteDictById(DictId); int i = dictMapper.deleteDictById(DictId);
//设置缓存 //设置缓存
RegDict regDict = dictMapper.selectDictById(DictId); RegDict regDict = dictMapper.selectDictById(DictId);
RegDictCache.setDictCache(regDict.getDictType(),dictMapper.getInfoOne(regDict.getDictType())); RegDictCache.setDictCache(regDict.getDictType(),dictMapper.getInfoOne(regDict.getDictType(),null));
return i; return i;
} }
@ -159,7 +166,7 @@ public class RegDictServiceImpl implements RegDictService {
} }
int i = dictMapper.insertDict(Dict); int i = dictMapper.insertDict(Dict);
//设置缓存 //设置缓存
List<RegDict> regDictList = dictMapper.getInfoOne(Dict.getDictType()); List<RegDict> regDictList = dictMapper.getInfoOne(Dict.getDictType(),null);
RegDictCache.setDictCache(Dict.getDictType(),regDictList); RegDictCache.setDictCache(Dict.getDictType(),regDictList);
return i; return i;
} }
@ -174,17 +181,22 @@ public class RegDictServiceImpl implements RegDictService {
public int updateDict(RegDict Dict) { public int updateDict(RegDict Dict) {
int i = dictMapper.updateDict(Dict); int i = dictMapper.updateDict(Dict);
//设置缓存 //设置缓存
List<RegDict> regDictList = dictMapper.getInfoOne(Dict.getDictType()); List<RegDict> regDictList = dictMapper.getInfoOne(Dict.getDictType(),null);
RegDictCache.setDictCache(Dict.getDictType(),regDictList); RegDictCache.setDictCache(Dict.getDictType(),regDictList);
return i; return i;
} }
@Override @Override
public Result getInfoOne(String dictType) { public Result getInfoOne(String dictType,String loginYLJG) {
List<RegDict> dictCacheList = RegDictCache.getDictCache(dictType); List<RegDict> dictCacheList = null;
if(Arrays.stream(ksdhArray).anyMatch(dictType::equals)){
dictCacheList = dictMapper.getInfoOne(dictType,loginYLJG);
return new Result("0","获取数据成功!",dictCacheList);
}
dictCacheList = RegDictCache.getDictCache(dictType);
if(dictCacheList == null) { if(dictCacheList == null) {
//没取到缓存,则设置缓存 //没取到缓存,则设置缓存
dictCacheList = dictMapper.getInfoOne(dictType); dictCacheList = dictMapper.getInfoOne(dictType,null);
RegDictCache.setDictCache(dictType,dictCacheList); RegDictCache.setDictCache(dictType,dictCacheList);
} }
return new Result("0","获取数据成功!",dictCacheList); return new Result("0","获取数据成功!",dictCacheList);

View File

@ -4,11 +4,14 @@ import cn.hutool.json.JSONArray;
import cn.hutool.json.JSONObject; import cn.hutool.json.JSONObject;
import cn.hutool.json.JSONUtil; import cn.hutool.json.JSONUtil;
import com.transitPlatForm.common.core.domain.Result; import com.transitPlatForm.common.core.domain.Result;
import com.transitPlatForm.common.core.domain.entity.reg.RegApply;
import com.transitPlatForm.interfaceCommon.mapper.RegApplyMapper;
import com.transitPlatForm.interfaceCommon.utils.CommonUtil; import com.transitPlatForm.interfaceCommon.utils.CommonUtil;
import com.transitPlatForm.transitPF.mapper.RegTransitSampleMapper; import com.transitPlatForm.transitPF.mapper.RegTransitSampleMapper;
import com.transitPlatForm.transitPF.pojo.DTO.SampleSignVO; import com.transitPlatForm.transitPF.pojo.DTO.SampleSignVO;
import com.transitPlatForm.common.core.domain.entity.reg.RegTransitSample; import com.transitPlatForm.common.core.domain.entity.reg.RegTransitSample;
import com.transitPlatForm.common.core.domain.entity.reg.RegTransitSampleDetail; import com.transitPlatForm.common.core.domain.entity.reg.RegTransitSampleDetail;
import com.transitPlatForm.transitPF.service.util.RequestInfoUtil;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component; import org.springframework.stereotype.Component;
@ -23,6 +26,8 @@ public class RegInterfaceImpl {
RegTransitSampleMapper regTransitSampleMapper; RegTransitSampleMapper regTransitSampleMapper;
@Autowired @Autowired
private CommonUtil commonUtil; private CommonUtil commonUtil;
@Autowired
RequestInfoUtil requestInfoUtil;
/** /**
*{ *{
@ -131,6 +136,11 @@ public class RegInterfaceImpl {
} }
} }
/**
* 平台状态修改
* @param jsonStr
* @return
*/
public Result updateStatus(String jsonStr){ public Result updateStatus(String jsonStr){
try{ try{
JSONObject jsonObject = JSONUtil.parseObj(jsonStr); JSONObject jsonObject = JSONUtil.parseObj(jsonStr);
@ -145,6 +155,10 @@ public class RegInterfaceImpl {
List<RegTransitSample> regTransitSampleList = regTransitSampleMapper.getRegTransitSample(regTransitSample1); List<RegTransitSample> regTransitSampleList = regTransitSampleMapper.getRegTransitSample(regTransitSample1);
if(regTransitSampleList.size() <= 0) return new Result("-1","没有查到该标本的信息!"); if(regTransitSampleList.size() <= 0) return new Result("-1","没有查到该标本的信息!");
String status = regTransitSampleList.get(0).getStatus(); String status = regTransitSampleList.get(0).getStatus();
String regApplyId = requestInfoUtil.getRegApplyId(barcode);
RegApply regApply = new RegApply();
regApply.setApplyid(regApplyId);
switch (statusParam){ switch (statusParam){
case "20": //标本采集 case "20": //标本采集
if(Integer.parseInt(status) >= 20) continue;//return new Result("0","该标本已经采集!"); if(Integer.parseInt(status) >= 20) continue;//return new Result("0","该标本已经采集!");
@ -160,7 +174,9 @@ public class RegInterfaceImpl {
regTransitSample20.setAffirmUserCode(affirmUserCode); regTransitSample20.setAffirmUserCode(affirmUserCode);
regTransitSample20.setAffirmUserName(affirmUserName); regTransitSample20.setAffirmUserName(affirmUserName);
regTransitSample20.setStatus("20"); regTransitSample20.setStatus("20");
regTransitSampleMapper.updateRegTransitSample(regTransitSample20);
regApply.setStatus("20");
requestInfoUtil.updateRegTransitSampleStatus(regTransitSample20,regApply);
case "30": //标本送检 case "30": //标本送检
Date sendPackTime = sampleSignVO.getSendPackTime(); Date sendPackTime = sampleSignVO.getSendPackTime();
String sendUserCode = sampleSignVO.getSendUserCode(); String sendUserCode = sampleSignVO.getSendUserCode();
@ -180,7 +196,9 @@ public class RegInterfaceImpl {
return new Result("-1","日期时间格式不正确!"); return new Result("-1","日期时间格式不正确!");
} }
regTransitSample.setStatus("30"); regTransitSample.setStatus("30");
regTransitSampleMapper.updateRegTransitSample(regTransitSample);
regApply.setStatus("30");
requestInfoUtil.updateRegTransitSampleStatus(regTransitSample,regApply);
break; break;
case "40": //标本外送 case "40": //标本外送
break; break;
@ -198,7 +216,9 @@ public class RegInterfaceImpl {
regTransitSample50.setSignInUserCode(signUserCode); regTransitSample50.setSignInUserCode(signUserCode);
regTransitSample50.setSignInUserName(signUserName); regTransitSample50.setSignInUserName(signUserName);
regTransitSample50.setStatus("50"); regTransitSample50.setStatus("50");
regTransitSampleMapper.updateRegTransitSample(regTransitSample50);
regApply.setStatus("50");
requestInfoUtil.updateRegTransitSampleStatus(regTransitSample50,regApply);
break; break;
case "60": //上机检测 case "60": //上机检测
break; break;
@ -215,7 +235,9 @@ public class RegInterfaceImpl {
regTransitSample70.setReportUserCode(reportUserCode); regTransitSample70.setReportUserCode(reportUserCode);
regTransitSample70.setReportUserName(reportUserName); regTransitSample70.setReportUserName(reportUserName);
regTransitSample70.setStatus("70"); regTransitSample70.setStatus("70");
regTransitSampleMapper.updateRegTransitSample(regTransitSample70);
regApply.setStatus("70");
requestInfoUtil.updateRegTransitSampleStatus(regTransitSample70,regApply);
break; break;
case "90": //申请作废 case "90": //申请作废
Date cancelTime = sampleSignVO.getCancelTime(); Date cancelTime = sampleSignVO.getCancelTime();
@ -230,7 +252,9 @@ public class RegInterfaceImpl {
regTransitSample90.setCancelCode(cancelCode); regTransitSample90.setCancelCode(cancelCode);
regTransitSample90.setCancelName(cancelName); regTransitSample90.setCancelName(cancelName);
regTransitSample90.setStatus("90"); regTransitSample90.setStatus("90");
regTransitSampleMapper.updateRegTransitSample(regTransitSample90);
regApply.setStatus("90");
requestInfoUtil.updateRegTransitSampleStatus(regTransitSample90,regApply);
break; break;
case "100": //标本退回 case "100": //标本退回
String backUserCode = sampleSignVO.getBackUserCode(); String backUserCode = sampleSignVO.getBackUserCode();
@ -245,7 +269,9 @@ public class RegInterfaceImpl {
regTransitSample100.setBackUserCode(backUserCode); regTransitSample100.setBackUserCode(backUserCode);
regTransitSample100.setBackUserName(backUserName); regTransitSample100.setBackUserName(backUserName);
regTransitSample100.setStatus("100"); regTransitSample100.setStatus("100");
regTransitSampleMapper.updateRegTransitSample(regTransitSample100);
regApply.setStatus("100");
requestInfoUtil.updateRegTransitSampleStatus(regTransitSample100,regApply);
break; break;
@ -262,6 +288,9 @@ public class RegInterfaceImpl {
} }
public Result test(){ public Result test(){
RegTransitSample regTransitSample = new RegTransitSample(); RegTransitSample regTransitSample = new RegTransitSample();
List<RegTransitSample> regTransitSampleList = regTransitSampleMapper.getRegTransitSample(regTransitSample); List<RegTransitSample> regTransitSampleList = regTransitSampleMapper.getRegTransitSample(regTransitSample);

View File

@ -5,6 +5,7 @@ import cn.hutool.json.JSONObject;
import cn.hutool.json.JSONUtil; import cn.hutool.json.JSONUtil;
import com.transitPlatForm.common.core.domain.Result; import com.transitPlatForm.common.core.domain.Result;
import com.transitPlatForm.common.core.domain.entity.SysUser; import com.transitPlatForm.common.core.domain.entity.SysUser;
import com.transitPlatForm.common.core.domain.entity.reg.RegApply;
import com.transitPlatForm.interfaceCommon.constants.LisinterfaceNameConstants; import com.transitPlatForm.interfaceCommon.constants.LisinterfaceNameConstants;
import com.transitPlatForm.interfaceCommon.pojo.inter.reg.GetRegInpInfo; import com.transitPlatForm.interfaceCommon.pojo.inter.reg.GetRegInpInfo;
import com.transitPlatForm.interfaceCommon.pojo.inter.reg.GetRegOutPatientInfo; import com.transitPlatForm.interfaceCommon.pojo.inter.reg.GetRegOutPatientInfo;
@ -14,6 +15,7 @@ import com.transitPlatForm.transitPF.mapper.RegTransitSampleMapper;
import com.transitPlatForm.transitPF.pojo.DTO.SampleSignVO; import com.transitPlatForm.transitPF.pojo.DTO.SampleSignVO;
import com.transitPlatForm.common.core.domain.entity.reg.RegTransitSample; import com.transitPlatForm.common.core.domain.entity.reg.RegTransitSample;
import com.transitPlatForm.transitPF.service.RegTransitSampleService; import com.transitPlatForm.transitPF.service.RegTransitSampleService;
import com.transitPlatForm.transitPF.service.util.RequestInfoUtil;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
@ -33,6 +35,8 @@ public class RegTransitSampleServiceImpl implements RegTransitSampleService {
private CommonUtil commonUtil; private CommonUtil commonUtil;
@Autowired @Autowired
LisInterfaceUtil lisInterfaceUtil; LisInterfaceUtil lisInterfaceUtil;
@Autowired
RequestInfoUtil requestInfoUtil;
@Override @Override
@ -68,8 +72,8 @@ public class RegTransitSampleServiceImpl implements RegTransitSampleService {
} }
@Override @Override
public List<RegTransitSample> getSampleSign() { public List<RegTransitSample> getSampleSign(RegTransitSample regTransitSample) {
List<RegTransitSample> regTransitSampleSignList = regTransitSampleMapper.getRegTransitSampleSign(); List<RegTransitSample> regTransitSampleSignList = regTransitSampleMapper.getRegTransitSampleSign(regTransitSample);
return regTransitSampleSignList; return regTransitSampleSignList;
} }
@ -93,48 +97,73 @@ public class RegTransitSampleServiceImpl implements RegTransitSampleService {
String backUserCode = sampleSignVO.getBackUserCode(); String backUserCode = sampleSignVO.getBackUserCode();
String backUserName = sampleSignVO.getBackUserName(); String backUserName = sampleSignVO.getBackUserName();
List<String> barcode = sampleSignVO.getBarcode(); List<String> barcodeList = sampleSignVO.getBarcode();
for (int i = 0; i < barcode.size(); i++) { for (String barcode : barcodeList) {
RegTransitSample regTransitSample = new RegTransitSample(); RegTransitSample regTransitSample = new RegTransitSample();
regTransitSample.setBarcode(barcode.get(i)); regTransitSample.setBarcode(barcode);
List<RegTransitSample> regTransitSampleList = regTransitSampleMapper.getRegTransitSample(regTransitSample); List<RegTransitSample> regTransitSampleList = regTransitSampleMapper.getRegTransitSample(regTransitSample);
if(regTransitSampleList.size() <= 0) return new Result("-1","没有找到条码信息!"); if (regTransitSampleList.size() <= 0) return new Result("-1", "没有找到条码信息!");
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 = regTransitSampleList.get(0).getStatus(); String statusSample = regTransitSampleList.get(0).getStatus();
switch (status){
String regApplyId = requestInfoUtil.getRegApplyId(barcode);
RegApply regApply = new RegApply();
regApply.setApplyid(regApplyId);
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 (statusSample.equals("20")) return new Result("0", "该标本已经采集!");
if(affirmUserName == null || affirmUserName.equals("")) return new Result("-1","affirmUserName标本采集人姓名不能为空!"); if (Integer.parseInt(statusSample) > 30)
return new Result("-1", barcode+"标本已经签收或者上机,不能再进行送检操作!");
if (affirmUserName == null || affirmUserName.equals(""))
return new Result("-1", "affirmUserName标本采集人姓名不能为空!");
regTransitSample.setAffirmTime(commonUtil.getCurrentTime());//affirmTime regTransitSample.setAffirmTime(commonUtil.getCurrentTime());//affirmTime
regTransitSample.setAffirmUserCode(affirmUserCode); regTransitSample.setAffirmUserCode(affirmUserCode);
regTransitSample.setAffirmUserName(affirmUserName); regTransitSample.setAffirmUserName(affirmUserName);
regTransitSample.setStatus("20");
regApply.setStatus("20");
requestInfoUtil.updateRegTransitSampleStatus(regTransitSample,regApply);
break;
case "30": //标本送检 case "30": //标本送检
if(dstHospName == null || dstHospName.equals("")) return new Result("-1","dstHospName不能为空!"); if (dstHospName == null || dstHospName.equals("")) return new Result("-1", "dstHospName不能为空!");
if(sendUserName == null || sendUserName.equals("")) return new Result("-1","sendUserName不能为空!"); if (sendUserName == null || sendUserName.equals(""))
if(statusSample.equals("30")) return new Result("-1","该标本已经送检!"); return new Result("-1", "sendUserName不能为空!");
if(Integer.parseInt(backReasons) > 30) return new Result("-1","标本已经签收或者上机,不能再进行送检操作!"); if (statusSample.equals("30")) return new Result("-1", "该标本已经送检!");
if (Integer.parseInt(statusSample) > 30)
return new Result("-1", barcode+"标本已经签收或者上机,不能再进行送检操作!");
regTransitSample.setDstHospCode(dstHospCode); regTransitSample.setDstHospCode(dstHospCode);
regTransitSample.setDstHospName(dstHospName); regTransitSample.setDstHospName(dstHospName);
regTransitSample.setSendPackTime(commonUtil.getCurrentTime()); // regTransitSample.setSendPackTime(commonUtil.getCurrentTime()); //
regTransitSample.setSendUserCode(sendUserCode); regTransitSample.setSendUserCode(sendUserCode);
regTransitSample.setSendUserName(sendUserName); regTransitSample.setSendUserName(sendUserName);
regApply.setStatus("30");
requestInfoUtil.updateRegTransitSampleStatus(regTransitSample,regApply);
break; break;
case "50": //标本签收 case "50": //标本签收
if(statusSample.equals("50")) return new Result("0","该标本已经签收!"); if (statusSample.equals("50")) return new Result("0", "该标本已经签收!");
if(Integer.parseInt(statusSample) > 50) return new Result("-1","该标本已经上机或者报告,不能再签收!"); if (Integer.parseInt(statusSample) > 50)
return new Result("-1", barcode+"该标本已经上机或者报告,不能再签收!");
regTransitSample.setSignInTime(commonUtil.getCurrentTime()); regTransitSample.setSignInTime(commonUtil.getCurrentTime());
regTransitSample.setSignInUserCode(userId); regTransitSample.setSignInUserCode(userId);
regTransitSample.setSignInUserName(nickName); regTransitSample.setSignInUserName(nickName);
regApply.setStatus("50");
requestInfoUtil.updateRegTransitSampleStatus(regTransitSample,regApply);
break; break;
case "100": //标本退回 case "100": //标本退回
if(statusSample.equals("100")) return new Result("0","该标本已经退回!"); if (statusSample.equals("100")) return new Result("0", "该标本已经退回!");
if(Integer.parseInt(statusSample) < 50) return new Result("-1","该标本还未签收,不能退回!"); if (Integer.parseInt(statusSample) < 50) return new Result("-1", barcode+"该标本还未签收,不能退回!");
regTransitSample.setBackUserCode(backUserCode); regTransitSample.setBackUserCode(backUserCode);
regTransitSample.setBackUserName(backUserName); regTransitSample.setBackUserName(backUserName);
regTransitSample.setBackTime(commonUtil.getCurrentTime()); regTransitSample.setBackTime(commonUtil.getCurrentTime());
regApply.setStatus("100");
requestInfoUtil.updateRegTransitSampleStatus(regTransitSample,regApply);
break; break;
} }
@ -217,9 +246,9 @@ public class RegTransitSampleServiceImpl implements RegTransitSampleService {
regTransitSample.setBarcode(barcode); regTransitSample.setBarcode(barcode);
List<RegTransitSample> regTransitSampleList = regTransitSampleMapper.getRegTransitSample(regTransitSample); List<RegTransitSample> regTransitSampleList = regTransitSampleMapper.getRegTransitSample(regTransitSample);
if(regTransitSampleList.size() <= 0) return new Result("-1","没有找到该标本的数据!"); if(regTransitSampleList.size() <= 0) return new Result("-1","没有找到该标本的数据!");
String status = regTransitSampleList.get(0).getStatus(); //String status = regTransitSampleList.get(0).getStatus();
if(status.equals("30")) return new Result("-1","该标本已经送检!"); //if(status.equals("30")) return new Result("-1","该标本已经送检!");
if(!status.equals("10") && !status.equals("20")) return new Result("-1","该条码已经签收,或者已经上机!"); //if(!status.equals("10") && !status.equals("20")) return new Result("-1","该条码已经签收,或者已经上机!");
return new Result("0","获取数据成功!",regTransitSampleList.get(0)); return new Result("0","获取数据成功!",regTransitSampleList.get(0));
} }

View File

@ -41,4 +41,22 @@ public class RequestInfoUtil {
} }
@Transactional(rollbackFor = Exception.class)
public void updateRegTransitSampleStatus(RegTransitSample regTransitSample,RegApply regApply){
regTransitSampleMapper.updateRegTransitSample(regTransitSample);
regApplyMapper.update(regApply);
}
public String getRegApplyId(String barcode){
RegTransitSampleDetail regTransitSampleDetail = new RegTransitSampleDetail();
regTransitSampleDetail.setBarcode(barcode);
List<RegTransitSampleDetail> regTransitSampleDetailList = regTransitSampleMapper.getRegTransitSampleDetail(regTransitSampleDetail);
if(!regTransitSampleDetailList.isEmpty()){
return regTransitSampleDetailList.get(0).getApplyid();
}
return null;
}
} }

View File

@ -38,6 +38,9 @@
<if test="dictName != null and dictName != ''"> <if test="dictName != null and dictName != ''">
AND dict_name like '%'+#{dictName}+'%' AND dict_name like '%'+#{dictName}+'%'
</if> </if>
<if test="hospital_id != null and hospital_id !=''">
AND hospital_id = #{hospital_id}
</if>
</where> </where>
order by dict_Sort order by dict_Sort
</select> </select>
@ -123,6 +126,9 @@
<select id="getInfoOne" resultMap="RegDictResult"> <select id="getInfoOne" resultMap="RegDictResult">
select * from reg_dict where dict_type = #{dict_type} and status = '0' select * from reg_dict where dict_type = #{dict_type} and status = '0'
<if test="hospital_id != null and hospital_id != ''">
and hospital_id = #{hospital_id}
</if>
</select> </select>
<select id="getMaxDictCode"> <select id="getMaxDictCode">

View File

@ -7,7 +7,9 @@
<![CDATA[select *,CONVERT(VARCHAR(20), OrderTime, 23) as OrderDate from reg_apply where OrderTime >= #{begdate} and OrderTime <= #{enddate} ]]> <![CDATA[select *,CONVERT(VARCHAR(20), OrderTime, 23) as OrderDate from reg_apply where OrderTime >= #{begdate} and OrderTime <= #{enddate} ]]>
<if test="patId != null and patId != ''"> and PatId = #{patId}</if> <if test="patId != null and patId != ''"> and PatId = #{patId}</if>
<if test="brxm != null and brxm != ''">and PatName like '%'+#{brxm}+'%'</if> <if test="brxm != null and brxm != ''">and PatName like '%'+#{brxm}+'%'</if>
<if test="status != null and status != ''">and Status = #{status}</if> <if test="status == 1">and Status in ('10','20','30','40')</if>
<if test="status == 2">and Status in ('50','60')</if>
<if test="status == 3">and Status in ('70','80')</if>
<if test="SrcHospCode != null and SrcHospCode != ''">and SrcHospCode = #{SrcHospCode}</if> <if test="SrcHospCode != null and SrcHospCode != ''">and SrcHospCode = #{SrcHospCode}</if>
order by OrderTime desc order by OrderTime desc
</select> </select>