修改若干问题
This commit is contained in:
parent
890ae37381
commit
9517d9a3ed
@ -39,11 +39,12 @@
|
||||
|
||||
<select id="selectHospitalAll" resultMap="RegHospitalResult">
|
||||
<include refid="selecthospitalVo"/>
|
||||
where status = '0'
|
||||
</select>
|
||||
|
||||
<select id="selectHospitalById" parameterType="Long" resultMap="RegHospitalResult">
|
||||
<include refid="selecthospitalVo"/>
|
||||
where hospital_id = #{hospitalId}
|
||||
where hospital_id = #{hospitalId} and status = '0'
|
||||
</select>
|
||||
|
||||
|
||||
@ -51,13 +52,13 @@
|
||||
<select id="checkHospitalNameUnique" parameterType="String" resultMap="RegHospitalResult">
|
||||
select top 1 hospital_id, hospital_code, hospital_name, hospital_userinfo, status, create_by, create_time, remark
|
||||
from Reg_hospital
|
||||
where hospital_name=#{hospitalName}
|
||||
where hospital_name=#{hospitalName} and status = '0'
|
||||
</select>
|
||||
|
||||
<select id="checkHospitalCodeUnique" parameterType="String" resultMap="RegHospitalResult">
|
||||
select top 1 hospital_id, hospital_code, hospital_name, hospital_userinfo, status, create_by, create_time, remark
|
||||
from Reg_hospital
|
||||
where hospital_code=#{hospitalCode}
|
||||
where hospital_code=#{hospitalCode} and status = '0'
|
||||
</select>
|
||||
|
||||
<update id="updateHospital" parameterType="RegHospital">
|
||||
|
||||
@ -44,9 +44,9 @@ public class RegTransitSampleController extends BaseController {
|
||||
|
||||
@ApiOperation("获取未签收的标本")
|
||||
@GetMapping("/querySampleSign")
|
||||
public TableDataInfo getSampleSign(){
|
||||
public TableDataInfo getSampleSign(RegTransitSample regTransitSample){
|
||||
startPage();
|
||||
List<RegTransitSample> regTransitSampleList = regTransitSampleService.getSampleSign();
|
||||
List<RegTransitSample> regTransitSampleList = regTransitSampleService.getSampleSign(regTransitSample);
|
||||
return getDataTable(regTransitSampleList);
|
||||
}
|
||||
|
||||
|
||||
@ -38,14 +38,16 @@ public class RegDictController extends BaseController {
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(RegDict post) {
|
||||
startPage();
|
||||
List<RegDict> list = regDictService.selectDictList(post);
|
||||
String loginYLJG = getLoginUser().getSysLoginParam().getLoginYLJG();
|
||||
List<RegDict> list = regDictService.selectDictList(post,loginYLJG);
|
||||
return getDataTable(list);
|
||||
}
|
||||
@ApiOperation("字典导出")
|
||||
@Log(title = SysLogConstants.DICT, businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
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);
|
||||
util.exportExcel(response, list, "字典数据");
|
||||
}
|
||||
@ -62,7 +64,8 @@ public class RegDictController extends BaseController {
|
||||
@ApiOperation("获取字典信息")
|
||||
@GetMapping("/getInfoOne")
|
||||
public Result getInfoOne(String dict_type){
|
||||
return regDictService.getInfoOne(dict_type);
|
||||
String loginYLJG = getLoginUser().getSysLoginParam().getLoginYLJG();
|
||||
return regDictService.getInfoOne(dict_type,loginYLJG);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@ -79,7 +79,7 @@ public interface RegDictMapper {
|
||||
*/
|
||||
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);
|
||||
|
||||
|
||||
@ -19,7 +19,7 @@ public interface RegTransitSampleMapper {
|
||||
|
||||
void updateTest(@Param("checkPUR") String checkPUR,@Param("barcode") String barcode);
|
||||
|
||||
List<RegTransitSample> getRegTransitSampleSign();
|
||||
List<RegTransitSample> getRegTransitSampleSign(RegTransitSample regTransitSample);
|
||||
|
||||
void updateRegTransitSample(RegTransitSample regTransitSample);
|
||||
|
||||
|
||||
@ -13,7 +13,7 @@ public interface RegDictService {
|
||||
* @param Dict 字典信息
|
||||
* @return 字典列表
|
||||
*/
|
||||
List<RegDict> selectDictList(RegDict Dict);
|
||||
List<RegDict> selectDictList(RegDict Dict,String loginYLJG);
|
||||
|
||||
/**
|
||||
* 查询所有字典
|
||||
@ -87,7 +87,7 @@ public interface RegDictService {
|
||||
*/
|
||||
int updateDict(RegDict Dict);
|
||||
|
||||
Result getInfoOne(String dictType);
|
||||
Result getInfoOne(String dictType,String loginYLJG);
|
||||
|
||||
AjaxResult getMaxDictCode(String dictType,String loginYLJG);
|
||||
|
||||
|
||||
@ -11,7 +11,7 @@ public interface RegTransitSampleService {
|
||||
|
||||
Result invoke(String jsonStr);
|
||||
|
||||
List<RegTransitSample> getSampleSign();
|
||||
List<RegTransitSample> getSampleSign(RegTransitSample regTransitSample);
|
||||
|
||||
Result sampleSign(SampleSignVO sampleSignVO, String userId);
|
||||
|
||||
|
||||
@ -16,6 +16,7 @@ import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
|
||||
import static com.transitPlatForm.common.core.domain.AjaxResult.success;
|
||||
@ -28,6 +29,9 @@ public class RegDictServiceImpl implements RegDictService {
|
||||
@Autowired
|
||||
private CommonUtil commonUtil;
|
||||
|
||||
|
||||
private static final String[] ksdhArray = new String[]{"DEPT","DOCTOR"};
|
||||
|
||||
/**
|
||||
* 查询字典信息集合
|
||||
*
|
||||
@ -35,7 +39,10 @@ public class RegDictServiceImpl implements RegDictService {
|
||||
* @return 字典信息集合
|
||||
*/
|
||||
@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);
|
||||
}
|
||||
|
||||
@ -115,7 +122,7 @@ public class RegDictServiceImpl implements RegDictService {
|
||||
int i = dictMapper.deleteDictById(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;
|
||||
}
|
||||
|
||||
@ -159,7 +166,7 @@ public class RegDictServiceImpl implements RegDictService {
|
||||
}
|
||||
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);
|
||||
return i;
|
||||
}
|
||||
@ -174,17 +181,22 @@ public class RegDictServiceImpl implements RegDictService {
|
||||
public int updateDict(RegDict 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);
|
||||
return i;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Result getInfoOne(String dictType) {
|
||||
List<RegDict> dictCacheList = RegDictCache.getDictCache(dictType);
|
||||
public Result getInfoOne(String dictType,String loginYLJG) {
|
||||
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) {
|
||||
//没取到缓存,则设置缓存
|
||||
dictCacheList = dictMapper.getInfoOne(dictType);
|
||||
dictCacheList = dictMapper.getInfoOne(dictType,null);
|
||||
RegDictCache.setDictCache(dictType,dictCacheList);
|
||||
}
|
||||
return new Result("0","获取数据成功!",dictCacheList);
|
||||
|
||||
@ -4,11 +4,14 @@ import cn.hutool.json.JSONArray;
|
||||
import cn.hutool.json.JSONObject;
|
||||
import cn.hutool.json.JSONUtil;
|
||||
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.transitPF.mapper.RegTransitSampleMapper;
|
||||
import com.transitPlatForm.transitPF.pojo.DTO.SampleSignVO;
|
||||
import com.transitPlatForm.common.core.domain.entity.reg.RegTransitSample;
|
||||
import com.transitPlatForm.common.core.domain.entity.reg.RegTransitSampleDetail;
|
||||
import com.transitPlatForm.transitPF.service.util.RequestInfoUtil;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Component;
|
||||
@ -23,6 +26,8 @@ public class RegInterfaceImpl {
|
||||
RegTransitSampleMapper regTransitSampleMapper;
|
||||
@Autowired
|
||||
private CommonUtil commonUtil;
|
||||
@Autowired
|
||||
RequestInfoUtil requestInfoUtil;
|
||||
|
||||
/**
|
||||
*{
|
||||
@ -131,6 +136,11 @@ public class RegInterfaceImpl {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 平台状态修改
|
||||
* @param jsonStr
|
||||
* @return
|
||||
*/
|
||||
public Result updateStatus(String jsonStr){
|
||||
try{
|
||||
JSONObject jsonObject = JSONUtil.parseObj(jsonStr);
|
||||
@ -145,6 +155,10 @@ public class RegInterfaceImpl {
|
||||
List<RegTransitSample> regTransitSampleList = regTransitSampleMapper.getRegTransitSample(regTransitSample1);
|
||||
if(regTransitSampleList.size() <= 0) return new Result("-1","没有查到该标本的信息!");
|
||||
String status = regTransitSampleList.get(0).getStatus();
|
||||
|
||||
String regApplyId = requestInfoUtil.getRegApplyId(barcode);
|
||||
RegApply regApply = new RegApply();
|
||||
regApply.setApplyid(regApplyId);
|
||||
switch (statusParam){
|
||||
case "20": //标本采集
|
||||
if(Integer.parseInt(status) >= 20) continue;//return new Result("0","该标本已经采集!");
|
||||
@ -160,7 +174,9 @@ public class RegInterfaceImpl {
|
||||
regTransitSample20.setAffirmUserCode(affirmUserCode);
|
||||
regTransitSample20.setAffirmUserName(affirmUserName);
|
||||
regTransitSample20.setStatus("20");
|
||||
regTransitSampleMapper.updateRegTransitSample(regTransitSample20);
|
||||
|
||||
regApply.setStatus("20");
|
||||
requestInfoUtil.updateRegTransitSampleStatus(regTransitSample20,regApply);
|
||||
case "30": //标本送检
|
||||
Date sendPackTime = sampleSignVO.getSendPackTime();
|
||||
String sendUserCode = sampleSignVO.getSendUserCode();
|
||||
@ -180,7 +196,9 @@ public class RegInterfaceImpl {
|
||||
return new Result("-1","日期时间格式不正确!");
|
||||
}
|
||||
regTransitSample.setStatus("30");
|
||||
regTransitSampleMapper.updateRegTransitSample(regTransitSample);
|
||||
|
||||
regApply.setStatus("30");
|
||||
requestInfoUtil.updateRegTransitSampleStatus(regTransitSample,regApply);
|
||||
break;
|
||||
case "40": //标本外送
|
||||
break;
|
||||
@ -198,7 +216,9 @@ public class RegInterfaceImpl {
|
||||
regTransitSample50.setSignInUserCode(signUserCode);
|
||||
regTransitSample50.setSignInUserName(signUserName);
|
||||
regTransitSample50.setStatus("50");
|
||||
regTransitSampleMapper.updateRegTransitSample(regTransitSample50);
|
||||
|
||||
regApply.setStatus("50");
|
||||
requestInfoUtil.updateRegTransitSampleStatus(regTransitSample50,regApply);
|
||||
break;
|
||||
case "60": //上机检测
|
||||
break;
|
||||
@ -215,7 +235,9 @@ public class RegInterfaceImpl {
|
||||
regTransitSample70.setReportUserCode(reportUserCode);
|
||||
regTransitSample70.setReportUserName(reportUserName);
|
||||
regTransitSample70.setStatus("70");
|
||||
regTransitSampleMapper.updateRegTransitSample(regTransitSample70);
|
||||
|
||||
regApply.setStatus("70");
|
||||
requestInfoUtil.updateRegTransitSampleStatus(regTransitSample70,regApply);
|
||||
break;
|
||||
case "90": //申请作废
|
||||
Date cancelTime = sampleSignVO.getCancelTime();
|
||||
@ -230,7 +252,9 @@ public class RegInterfaceImpl {
|
||||
regTransitSample90.setCancelCode(cancelCode);
|
||||
regTransitSample90.setCancelName(cancelName);
|
||||
regTransitSample90.setStatus("90");
|
||||
regTransitSampleMapper.updateRegTransitSample(regTransitSample90);
|
||||
|
||||
regApply.setStatus("90");
|
||||
requestInfoUtil.updateRegTransitSampleStatus(regTransitSample90,regApply);
|
||||
break;
|
||||
case "100": //标本退回
|
||||
String backUserCode = sampleSignVO.getBackUserCode();
|
||||
@ -245,7 +269,9 @@ public class RegInterfaceImpl {
|
||||
regTransitSample100.setBackUserCode(backUserCode);
|
||||
regTransitSample100.setBackUserName(backUserName);
|
||||
regTransitSample100.setStatus("100");
|
||||
regTransitSampleMapper.updateRegTransitSample(regTransitSample100);
|
||||
|
||||
regApply.setStatus("100");
|
||||
requestInfoUtil.updateRegTransitSampleStatus(regTransitSample100,regApply);
|
||||
break;
|
||||
|
||||
|
||||
@ -262,6 +288,9 @@ public class RegInterfaceImpl {
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
public Result test(){
|
||||
RegTransitSample regTransitSample = new RegTransitSample();
|
||||
List<RegTransitSample> regTransitSampleList = regTransitSampleMapper.getRegTransitSample(regTransitSample);
|
||||
|
||||
@ -5,6 +5,7 @@ import cn.hutool.json.JSONObject;
|
||||
import cn.hutool.json.JSONUtil;
|
||||
import com.transitPlatForm.common.core.domain.Result;
|
||||
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.pojo.inter.reg.GetRegInpInfo;
|
||||
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.common.core.domain.entity.reg.RegTransitSample;
|
||||
import com.transitPlatForm.transitPF.service.RegTransitSampleService;
|
||||
import com.transitPlatForm.transitPF.service.util.RequestInfoUtil;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
@ -33,6 +35,8 @@ public class RegTransitSampleServiceImpl implements RegTransitSampleService {
|
||||
private CommonUtil commonUtil;
|
||||
@Autowired
|
||||
LisInterfaceUtil lisInterfaceUtil;
|
||||
@Autowired
|
||||
RequestInfoUtil requestInfoUtil;
|
||||
|
||||
|
||||
@Override
|
||||
@ -68,8 +72,8 @@ public class RegTransitSampleServiceImpl implements RegTransitSampleService {
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<RegTransitSample> getSampleSign() {
|
||||
List<RegTransitSample> regTransitSampleSignList = regTransitSampleMapper.getRegTransitSampleSign();
|
||||
public List<RegTransitSample> getSampleSign(RegTransitSample regTransitSample) {
|
||||
List<RegTransitSample> regTransitSampleSignList = regTransitSampleMapper.getRegTransitSampleSign(regTransitSample);
|
||||
return regTransitSampleSignList;
|
||||
}
|
||||
|
||||
@ -93,48 +97,73 @@ public class RegTransitSampleServiceImpl implements RegTransitSampleService {
|
||||
String backUserCode = sampleSignVO.getBackUserCode();
|
||||
String backUserName = sampleSignVO.getBackUserName();
|
||||
|
||||
List<String> barcode = sampleSignVO.getBarcode();
|
||||
for (int i = 0; i < barcode.size(); i++) {
|
||||
List<String> barcodeList = sampleSignVO.getBarcode();
|
||||
for (String barcode : barcodeList) {
|
||||
RegTransitSample regTransitSample = new RegTransitSample();
|
||||
regTransitSample.setBarcode(barcode.get(i));
|
||||
regTransitSample.setBarcode(barcode);
|
||||
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);
|
||||
if(sysUserOne == null) return new Result("-1","未查询到员工信息!");
|
||||
if (sysUserOne == null) return new Result("-1", "未查询到员工信息!");
|
||||
String nickName = sysUserOne.getNickName();
|
||||
String statusSample = regTransitSampleList.get(0).getStatus();
|
||||
switch (status){
|
||||
|
||||
String regApplyId = requestInfoUtil.getRegApplyId(barcode);
|
||||
RegApply regApply = new RegApply();
|
||||
regApply.setApplyid(regApplyId);
|
||||
|
||||
switch (status) {
|
||||
case "20": //标本采集
|
||||
//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 (statusSample.equals("20")) return new Result("0", "该标本已经采集!");
|
||||
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.setAffirmUserCode(affirmUserCode);
|
||||
regTransitSample.setAffirmUserName(affirmUserName);
|
||||
regTransitSample.setStatus("20");
|
||||
|
||||
regApply.setStatus("20");
|
||||
requestInfoUtil.updateRegTransitSampleStatus(regTransitSample,regApply);
|
||||
break;
|
||||
case "30": //标本送检
|
||||
if(dstHospName == null || dstHospName.equals("")) return new Result("-1","dstHospName不能为空!");
|
||||
if(sendUserName == null || sendUserName.equals("")) return new Result("-1","sendUserName不能为空!");
|
||||
if(statusSample.equals("30")) return new Result("-1","该标本已经送检!");
|
||||
if(Integer.parseInt(backReasons) > 30) return new Result("-1","标本已经签收或者上机,不能再进行送检操作!");
|
||||
if (dstHospName == null || dstHospName.equals("")) return new Result("-1", "dstHospName不能为空!");
|
||||
if (sendUserName == null || sendUserName.equals(""))
|
||||
return new Result("-1", "sendUserName不能为空!");
|
||||
if (statusSample.equals("30")) return new Result("-1", "该标本已经送检!");
|
||||
if (Integer.parseInt(statusSample) > 30)
|
||||
return new Result("-1", barcode+"标本已经签收或者上机,不能再进行送检操作!");
|
||||
regTransitSample.setDstHospCode(dstHospCode);
|
||||
regTransitSample.setDstHospName(dstHospName);
|
||||
regTransitSample.setSendPackTime(commonUtil.getCurrentTime()); //
|
||||
regTransitSample.setSendUserCode(sendUserCode);
|
||||
regTransitSample.setSendUserName(sendUserName);
|
||||
|
||||
regApply.setStatus("30");
|
||||
requestInfoUtil.updateRegTransitSampleStatus(regTransitSample,regApply);
|
||||
break;
|
||||
case "50": //标本签收
|
||||
if(statusSample.equals("50")) return new Result("0","该标本已经签收!");
|
||||
if(Integer.parseInt(statusSample) > 50) return new Result("-1","该标本已经上机或者报告,不能再签收!");
|
||||
if (statusSample.equals("50")) return new Result("0", "该标本已经签收!");
|
||||
if (Integer.parseInt(statusSample) > 50)
|
||||
return new Result("-1", barcode+"该标本已经上机或者报告,不能再签收!");
|
||||
regTransitSample.setSignInTime(commonUtil.getCurrentTime());
|
||||
regTransitSample.setSignInUserCode(userId);
|
||||
regTransitSample.setSignInUserName(nickName);
|
||||
|
||||
regApply.setStatus("50");
|
||||
requestInfoUtil.updateRegTransitSampleStatus(regTransitSample,regApply);
|
||||
break;
|
||||
case "100": //标本退回
|
||||
if(statusSample.equals("100")) return new Result("0","该标本已经退回!");
|
||||
if(Integer.parseInt(statusSample) < 50) return new Result("-1","该标本还未签收,不能退回!");
|
||||
if (statusSample.equals("100")) return new Result("0", "该标本已经退回!");
|
||||
if (Integer.parseInt(statusSample) < 50) return new Result("-1", barcode+"该标本还未签收,不能退回!");
|
||||
regTransitSample.setBackUserCode(backUserCode);
|
||||
regTransitSample.setBackUserName(backUserName);
|
||||
regTransitSample.setBackTime(commonUtil.getCurrentTime());
|
||||
|
||||
regApply.setStatus("100");
|
||||
requestInfoUtil.updateRegTransitSampleStatus(regTransitSample,regApply);
|
||||
break;
|
||||
|
||||
}
|
||||
@ -217,9 +246,9 @@ public class RegTransitSampleServiceImpl implements RegTransitSampleService {
|
||||
regTransitSample.setBarcode(barcode);
|
||||
List<RegTransitSample> regTransitSampleList = regTransitSampleMapper.getRegTransitSample(regTransitSample);
|
||||
if(regTransitSampleList.size() <= 0) return new Result("-1","没有找到该标本的数据!");
|
||||
String status = regTransitSampleList.get(0).getStatus();
|
||||
if(status.equals("30")) return new Result("-1","该标本已经送检!");
|
||||
if(!status.equals("10") && !status.equals("20")) return new Result("-1","该条码已经签收,或者已经上机!");
|
||||
//String status = regTransitSampleList.get(0).getStatus();
|
||||
//if(status.equals("30")) return new Result("-1","该标本已经送检!");
|
||||
//if(!status.equals("10") && !status.equals("20")) return new Result("-1","该条码已经签收,或者已经上机!");
|
||||
return new Result("0","获取数据成功!",regTransitSampleList.get(0));
|
||||
}
|
||||
|
||||
|
||||
@ -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;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
@ -38,6 +38,9 @@
|
||||
<if test="dictName != null and dictName != ''">
|
||||
AND dict_name like '%'+#{dictName}+'%'
|
||||
</if>
|
||||
<if test="hospital_id != null and hospital_id !=''">
|
||||
AND hospital_id = #{hospital_id}
|
||||
</if>
|
||||
</where>
|
||||
order by dict_Sort
|
||||
</select>
|
||||
@ -123,6 +126,9 @@
|
||||
|
||||
<select id="getInfoOne" resultMap="RegDictResult">
|
||||
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 id="getMaxDictCode">
|
||||
|
||||
@ -7,7 +7,9 @@
|
||||
<![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="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>
|
||||
order by OrderTime desc
|
||||
</select>
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user