住院条码查询排序,不合格标本登记
This commit is contained in:
parent
7f2d6c5c3e
commit
3db2537540
@ -14,6 +14,7 @@ public class SetReqStatus implements LisInterfaceType {
|
||||
private String userid;
|
||||
private String sqh;
|
||||
private String status;
|
||||
private String bz1;
|
||||
|
||||
@Override
|
||||
public String serializationJson() {
|
||||
|
||||
@ -34,7 +34,7 @@
|
||||
<if test="refuseder != null and refuseder != ''">#{refuseder},</if>
|
||||
<if test="ksdh != null and ksdh != ''">#{ksdh},</if>
|
||||
<if test="bz != null and bz != ''">#{bz},</if>
|
||||
<if test="refusetext != null and yljg != ''">#{refusetext},</if>
|
||||
<if test="refusetext != null and refusetext != ''">#{refusetext},</if>
|
||||
<if test="bz1 != null and bz1 != ''">#{bz1},</if>
|
||||
#{sqh}
|
||||
)
|
||||
|
||||
@ -11,6 +11,7 @@ import com.czlis.common.core.page.TableDataInfo;
|
||||
import com.czlis.common.enums.BusinessType;
|
||||
import com.czlis.common.utils.StringUtils;
|
||||
import com.czlis.common.utils.poi.ExcelUtil;
|
||||
import com.czlis.interfaceCommon.utils.CommonUtil;
|
||||
import com.czlis.system.domain.SysUserRole;
|
||||
import com.czlis.system.service.ISysDeptService;
|
||||
import com.czlis.system.service.ISysRoleService;
|
||||
@ -50,6 +51,8 @@ public class SysRoleController extends BaseController {
|
||||
|
||||
@Autowired
|
||||
private ISysDeptService deptService;
|
||||
@Autowired
|
||||
private CommonUtil commonUtil;
|
||||
|
||||
@PreAuthorize("@ss.hasPermi('system:role:list')")
|
||||
@GetMapping("/list")
|
||||
@ -241,6 +244,9 @@ public class SysRoleController extends BaseController {
|
||||
if(sysUser != null) {
|
||||
nickName = sysUser.getNickName();
|
||||
}
|
||||
if(nickName == null || nickName.equals("") ) {
|
||||
nickName = commonUtil.getComDictNameById("SRD", username);
|
||||
}
|
||||
return AjaxResult.success(nickName);
|
||||
}
|
||||
}
|
||||
|
||||
@ -7,10 +7,7 @@ import com.czlis.liswork.service.RcvBarcodeRefusedService;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@ -29,14 +26,15 @@ public class RcvBarcodeRefusedController extends BaseController {
|
||||
return rcvBarcodeRefusedService.getData(sqh,getUsername());
|
||||
}
|
||||
|
||||
@ApiOperation("刷新界面数据")
|
||||
//@ApiOperation("刷新界面数据")
|
||||
@GetMapping("/refreshData")
|
||||
public Result refreshData(String sqh){
|
||||
return rcvBarcodeRefusedService.refreshData(sqh);
|
||||
}
|
||||
|
||||
@ApiOperation("保存数据")
|
||||
@PostMapping("/saveData")
|
||||
public Result saveData(List<RcvBarcodeRefusedDTO> rcvBarcodeRefusedDTOList){
|
||||
public Result saveData(@RequestBody List<RcvBarcodeRefusedDTO> rcvBarcodeRefusedDTOList){
|
||||
return rcvBarcodeRefusedService.saveData(rcvBarcodeRefusedDTOList,getUsername(),getLoginUser().getUser().getNickName());
|
||||
}
|
||||
}
|
||||
|
||||
@ -3,6 +3,7 @@ package com.czlis.liswork.service.impl;
|
||||
import com.czlis.common.core.domain.Result;
|
||||
import com.czlis.common.core.domain.entity.lis.LabRefused;
|
||||
import com.czlis.common.core.domain.entity.lis.LabReqmain;
|
||||
import com.czlis.common.core.domain.entity.lis.LabReqsteplog;
|
||||
import com.czlis.interfaceCommon.constants.LisinterfaceNameConstants;
|
||||
import com.czlis.interfaceCommon.mapper.LabRefusedMapper;
|
||||
import com.czlis.interfaceCommon.pojo.inter.DayMessage;
|
||||
@ -10,6 +11,7 @@ import com.czlis.interfaceCommon.pojo.inter.GetReqInterface;
|
||||
import com.czlis.interfaceCommon.utils.CommonUtil;
|
||||
import com.czlis.interfaceCommon.utils.LisInterfaceUtil;
|
||||
import com.czlis.interfaceCommon.utils.LisUtil;
|
||||
import com.czlis.interfaceCommon.utils.LisWorkBase;
|
||||
import com.czlis.liswork.mapper.work.RcvBarcodeRefusedMapper;
|
||||
import com.czlis.liswork.pojo.DTO.RcvBarcodeRefusedDTO;
|
||||
import com.czlis.liswork.service.RcvBarcodeRefusedService;
|
||||
@ -33,6 +35,8 @@ public class RcvBarcodeRefusedServiceImpl implements RcvBarcodeRefusedService {
|
||||
private CommonUtil commonUtil;
|
||||
@Autowired
|
||||
LabRefusedMapper labRefusedMapper;
|
||||
@Autowired
|
||||
LisWorkBase lisWorkBase;
|
||||
|
||||
@Override
|
||||
public Result getData(String sqh,String userName) {
|
||||
@ -50,7 +54,7 @@ public class RcvBarcodeRefusedServiceImpl implements RcvBarcodeRefusedService {
|
||||
//判断条码状态
|
||||
LabReqmain labReqmainOne = commonUtil.getLabReqmainOne(sqh);
|
||||
if(labReqmainOne == null) return new Result("-1","没有找到该条码的信息!");
|
||||
String zt = labReqmainOne.getZt();
|
||||
String zt = labReqmainOne.getZt().trim();
|
||||
if(zt == null || zt.equals("")) return new Result("-1","没有获取到该条码的状态的信息!");
|
||||
switch (zt){
|
||||
case "1":
|
||||
@ -87,7 +91,6 @@ public class RcvBarcodeRefusedServiceImpl implements RcvBarcodeRefusedService {
|
||||
* 根据参数sp_refusedid确定,回写tzr 这个字段给我
|
||||
*
|
||||
*/
|
||||
|
||||
if(rcvBarcodeRefusedDTOList.size() == 0) return new Result("-1","入参不能为空!");
|
||||
//校验数据
|
||||
for (RcvBarcodeRefusedDTO rcvBarcodeRefusedDTO : rcvBarcodeRefusedDTOList) {
|
||||
@ -123,12 +126,12 @@ public class RcvBarcodeRefusedServiceImpl implements RcvBarcodeRefusedService {
|
||||
break;
|
||||
}
|
||||
|
||||
String lastUserNo = commonUtil.getComOptValue("_BAR_", "rcv_lastuserno");
|
||||
if(lastUserNo.equals("1") && userName != null && !userName.equals("")){
|
||||
|
||||
}else{
|
||||
//打开登录窗口,核对信息
|
||||
}
|
||||
// String lastUserNo = commonUtil.getComOptValue("_BAR_", "rcv_lastuserno");
|
||||
// if(lastUserNo.equals("1") && userName != null && !userName.equals("")){
|
||||
//
|
||||
// }else{
|
||||
// //打开登录窗口,核对信息
|
||||
// }
|
||||
|
||||
|
||||
}
|
||||
@ -162,7 +165,7 @@ public class RcvBarcodeRefusedServiceImpl implements RcvBarcodeRefusedService {
|
||||
|
||||
String refuseText = rcvBarcodeRefusedDTO.getRefuseText();
|
||||
String refName = commonUtil.getComDictNameById("JQLY", refuseText);
|
||||
if(refName == null || refName.equals("")) refuseText = refName;
|
||||
if(refName != null && !refName.equals("")) refuseText = refName;
|
||||
LabReqmain labReqmain = new LabReqmain();
|
||||
labReqmain.setSqh(sqh);
|
||||
labReqmain.setBz3(refuseText);
|
||||
@ -193,17 +196,20 @@ public class RcvBarcodeRefusedServiceImpl implements RcvBarcodeRefusedService {
|
||||
dayMessage.setMsgid(msgId);
|
||||
Result result = lisInterfaceUtil.invokeLisInterface(LisinterfaceNameConstants.DAYMESSAGE, dayMessage);
|
||||
if(!result.getCode().equals("0")) return new Result("-1","调用接口失败!"+result.getMsg());
|
||||
//保存数据
|
||||
saveDBData(labRefused,labReqmain,userName);
|
||||
}
|
||||
|
||||
|
||||
|
||||
return null;
|
||||
return new Result("0","保存数据成功!");
|
||||
}
|
||||
|
||||
|
||||
@Transactional
|
||||
public void saveDBData(LabRefused labRefused,LabReqmain labReqmain){
|
||||
public void saveDBData(LabRefused labRefused,LabReqmain labReqmain,String userName){
|
||||
labRefusedMapper.insertLabRefused(labRefused);
|
||||
log.info("labReqmain:{}",labReqmain);
|
||||
commonUtil.updateLabReqmain(labReqmain);
|
||||
//写操作记录
|
||||
lisWorkBase.setlabReqsteplog(labRefused.getSqh(),"8",userName);
|
||||
}
|
||||
}
|
||||
|
||||
@ -67,22 +67,22 @@ public class ZycxServiceImpl implements ZycxService {
|
||||
webGetBarcode.setZt(querySqdVO.getZt());
|
||||
List<Web_getBarcode> sqdInfoList = zycxMapper.getSQDInfo(webGetBarcode);
|
||||
//排序
|
||||
sqdInfoList.sort(new Comparator<Web_getBarcode>() {
|
||||
@Override
|
||||
public int compare(Web_getBarcode o1, Web_getBarcode o2) {
|
||||
String ch1 = LisUtil.isBank(o1.getCh()).trim();
|
||||
String ch2 = LisUtil.isBank(o2.getCh()).trim();
|
||||
int i = ch1.compareTo(ch2);
|
||||
if(i == 0){
|
||||
Date sqsj1 = o1.getSqsj();
|
||||
Date sqsj2 = o2.getSqsj();
|
||||
int i1 = sqsj1.compareTo(sqsj2);
|
||||
return i1;
|
||||
}else{
|
||||
return i;
|
||||
}
|
||||
}
|
||||
});
|
||||
// sqdInfoList.sort(new Comparator<Web_getBarcode>() {
|
||||
// @Override
|
||||
// public int compare(Web_getBarcode o1, Web_getBarcode o2) {
|
||||
// String ch1 = LisUtil.isBank(o1.getCh()).trim();
|
||||
// String ch2 = LisUtil.isBank(o2.getCh()).trim();
|
||||
// int i = ch1.compareTo(ch2);
|
||||
// if(i == 0){
|
||||
// Date sqsj1 = o1.getSqsj();
|
||||
// Date sqsj2 = o2.getSqsj();
|
||||
// int i1 = sqsj1.compareTo(sqsj2);
|
||||
// return i1;
|
||||
// }else{
|
||||
// return i;
|
||||
// }
|
||||
// }
|
||||
// });
|
||||
|
||||
return sqdInfoList;
|
||||
}
|
||||
@ -130,10 +130,10 @@ public class ZycxServiceImpl implements ZycxService {
|
||||
}
|
||||
|
||||
if(sp.equals("1")){
|
||||
Result result = execSQDExecSP(sqhOne, userid, status, yljg);
|
||||
Result result = execSQDExecSP(sqhOne, userid, status, yljg,i);
|
||||
if(!result.getCode().equals("0")) return result;
|
||||
}else{
|
||||
Result result = execSQDExecHTTP(sqhOne, userid, status, yljg);
|
||||
Result result = execSQDExecHTTP(sqhOne, userid, status, yljg,i);
|
||||
if(!result.getCode().equals("0")) return result;
|
||||
}
|
||||
|
||||
@ -270,7 +270,7 @@ public class ZycxServiceImpl implements ZycxService {
|
||||
}
|
||||
|
||||
@Transactional
|
||||
public Result execSQDExecSP(String sqh,String userid,String status,String yljg){
|
||||
public Result execSQDExecSP(String sqh,String userid,String status,String yljg,int i){
|
||||
Map<String,Object> map = new HashMap<>();
|
||||
map.put("sqh", sqh);
|
||||
map.put("userid", userid);
|
||||
@ -292,7 +292,7 @@ public class ZycxServiceImpl implements ZycxService {
|
||||
}
|
||||
|
||||
@Transactional
|
||||
public Result execSQDExecHTTP(String sqh,String userid,String status,String yljg){
|
||||
public Result execSQDExecHTTP(String sqh,String userid,String status,String yljg,int i){
|
||||
SetReqStatus setReqStatus = new SetReqStatus();
|
||||
setReqStatus.setStatus(status);
|
||||
setReqStatus.setSqh(sqh);
|
||||
|
||||
@ -33,6 +33,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<if test="queryType == 'ch'"> and a.ch = #{queryValue}</if>
|
||||
<if test="queryType == 'brxm'"> and a.brxm like '%'+#{queryValue}+'%' </if>
|
||||
</where>
|
||||
order by (case a.zt when '8' then '0' else zt end),ch,sqsj
|
||||
|
||||
</select>
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user