Merge remote-tracking branch 'origin/master'
This commit is contained in:
commit
734b78feca
@ -28,4 +28,8 @@ public class ReportParam {
|
||||
/**检验医生签名*/private String usernopic;
|
||||
/**审核医生签名*/private String checkerpic;
|
||||
/**初审医生签名*/private String checkercbpic;
|
||||
/**
|
||||
* 通用数组参数
|
||||
*/
|
||||
private String[] arrayParam;
|
||||
}
|
||||
|
||||
@ -522,4 +522,13 @@ public class LisUtil {
|
||||
// 检查目标字符串是否大于等于start且小于等于end
|
||||
return target.compareTo(start) >= 0 && target.compareTo(end) <= 0;
|
||||
}
|
||||
|
||||
public static String isBank(Object param){
|
||||
String s = String.valueOf(param);
|
||||
if(s.equals("null")){
|
||||
return "";
|
||||
}else{
|
||||
return s;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -451,3 +451,51 @@ if not exists(select 1 from dbo.com_dict where zdlb = 'ZKGZ' and zddh = '12X')
|
||||
begin
|
||||
insert into com_dict(zdlb,zddh,zdmc,zjf,zdbz,bz,yljg)values('ZKGZ','12X','十二个连续的质控测定值落在靶值(X)的同一侧','','','','1')
|
||||
end
|
||||
|
||||
if not exists(select 1 from dbo.com_dict where zdlb = 'ST' and zddh = '1')
|
||||
begin
|
||||
INSERT INTO dbo.com_dict (zdlb, zddh, zdmc, zjf, zdbz, bz, yljg, userflag)
|
||||
VALUES ('ST', '1', '开单', 'xz', 'N', NULL, '1', NULL)
|
||||
end
|
||||
|
||||
if not exists(select 1 from dbo.com_dict where zdlb = 'ST' and zddh = '11')
|
||||
begin
|
||||
INSERT INTO dbo.com_dict (zdlb, zddh, zdmc, zjf, zdbz, bz, yljg, userflag)
|
||||
VALUES ('ST', '11', '打印', 'dy', 'N', NULL, '1', NULL)
|
||||
end
|
||||
|
||||
if not exists(select 1 from dbo.com_dict where zdlb = 'ST' and zddh = '12')
|
||||
begin
|
||||
INSERT INTO dbo.com_dict (zdlb, zddh, zdmc, zjf, zdbz, bz, yljg, userflag)
|
||||
VALUES ('ST', '12', '采样', 'cy', 'N', NULL, '1', NULL)
|
||||
end
|
||||
|
||||
if not exists(select 1 from dbo.com_dict where zdlb = 'ST' and zddh = '13')
|
||||
begin
|
||||
INSERT INTO dbo.com_dict (zdlb, zddh, zdmc, zjf, zdbz, bz, yljg, userflag)
|
||||
VALUES ('ST', '13', '送检', 'sj', 'N', NULL, '1', NULL)
|
||||
end
|
||||
|
||||
if not exists(select 1 from dbo.com_dict where zdlb = 'ST' and zddh = '2')
|
||||
begin
|
||||
INSERT INTO dbo.com_dict (zdlb, zddh, zdmc, zjf, zdbz, bz, yljg, userflag)
|
||||
VALUES ('ST', '2', '上机', 'sj', 'N', NULL, '1', NULL)
|
||||
end
|
||||
|
||||
if not exists(select 1 from dbo.com_dict where zdlb = 'ST' and zddh = '4')
|
||||
begin
|
||||
INSERT INTO dbo.com_dict (zdlb, zddh, zdmc, zjf, zdbz, bz, yljg, userflag)
|
||||
VALUES ('ST', '4', '审核', 'sh', 'N', NULL, '1', NULL)
|
||||
end
|
||||
|
||||
if not exists(select 1 from dbo.com_dict where zdlb = 'ST' and zddh = '8')
|
||||
begin
|
||||
INSERT INTO dbo.com_dict (zdlb, zddh, zdmc, zjf, zdbz, bz, yljg, userflag)
|
||||
VALUES ('ST', '8', '剔回', 'th', 'N', NULL, '1', NULL)
|
||||
end
|
||||
|
||||
if not exists(select 1 from dbo.com_dict where zdlb = 'ST' and zddh = '9')
|
||||
begin
|
||||
INSERT INTO dbo.com_dict (zdlb, zddh, zdmc, zjf, zdbz, bz, yljg, userflag)
|
||||
VALUES ('ST', '9', '作废', 'zf', 'N', NULL, '1', NULL)
|
||||
end
|
||||
@ -32,71 +32,80 @@ public class ZycxController extends BaseController {
|
||||
private ZycxService zycxService;
|
||||
@Autowired
|
||||
PackBarcodeUtil packBarcodeUtil;
|
||||
|
||||
@ApiOperation("获取申请单")
|
||||
@GetMapping("/query")
|
||||
//@PreAuthorize("@ss.hasPermi('zycx:interface:query')")
|
||||
public Result getSQDInfo(QuerySqdVO querySqdVO){
|
||||
log.info("查询申请单,zyreq/query:{},",querySqdVO.toString());
|
||||
public Result getSQDInfo(QuerySqdVO querySqdVO) {
|
||||
log.info("查询申请单,zyreq/query:{},", querySqdVO.toString());
|
||||
List<Web_getBarcode> sqdInfoList = zycxService.getSQDInfo(querySqdVO);
|
||||
return new Result("0","查询成功!",sqdInfoList);
|
||||
return new Result("0", "查询成功!", sqdInfoList);
|
||||
}
|
||||
|
||||
@ApiOperation("生成条码")
|
||||
@GetMapping("/add")
|
||||
public Result createSQD(String dept,String userid,String st,String et,String yljg){
|
||||
log.info("调用生成条码接口,zyreq/add:{},{},{},{},{}",dept,userid,st,et,yljg);
|
||||
return zycxService.createSQD(dept,userid,st,et,yljg);
|
||||
public Result createSQD(String dept, String userid, String st, String et, String yljg) {
|
||||
log.info("调用生成条码接口,zyreq/add:{},{},{},{},{}", dept, userid, st, et, yljg);
|
||||
return zycxService.createSQD(dept, userid, st, et, yljg);
|
||||
}
|
||||
|
||||
|
||||
@ApiOperation("执行条码")
|
||||
@GetMapping("/exec")
|
||||
public Result execSQD(String[] sqh,String userid,String status,String yljg){
|
||||
log.info("执行条码接口,zyreq/print:{},{},{},{}",sqh,userid,status,yljg);
|
||||
return zycxService.execSQD(sqh,userid,status,yljg);
|
||||
public Result execSQD(String[] sqh, String userid, String status, String yljg) {
|
||||
log.info("执行条码接口,zyreq/print:{},{},{},{}", sqh, userid, status, yljg);
|
||||
return zycxService.execSQD(sqh, userid, status, yljg);
|
||||
}
|
||||
|
||||
@ApiOperation("获取申请单明细数据")
|
||||
@GetMapping("/detail")
|
||||
public Result getSQDDetail(String sqh){
|
||||
log.info("获取申请单明细数据,zyreq/detail:{}",sqh);
|
||||
public Result getSQDDetail(String sqh) {
|
||||
log.info("获取申请单明细数据,zyreq/detail:{}", sqh);
|
||||
return zycxService.getSQDDetail(sqh);
|
||||
}
|
||||
|
||||
@ApiOperation("获取申请单主表数据")
|
||||
@GetMapping("/reqmain")
|
||||
public Result getSQDMain(LabReqmain labReqmain){
|
||||
log.info("获取申请单主表数据,zyreq/reqmain:{}",labReqmain);
|
||||
public Result getSQDMain(LabReqmain labReqmain) {
|
||||
log.info("获取申请单主表数据,zyreq/reqmain:{}", labReqmain);
|
||||
return zycxService.getSQDMain(labReqmain);
|
||||
}
|
||||
|
||||
@ApiOperation("封箱码查询")
|
||||
@GetMapping("/checkpackid")
|
||||
public Result checkpackid(String packid){
|
||||
public Result checkpackid(String packid) {
|
||||
return packBarcodeUtil.checkpackid(packid);
|
||||
}
|
||||
|
||||
@ApiOperation("获取封箱申请单信息")
|
||||
@GetMapping("/getpackreq")
|
||||
public Result getpackreq(String sqh){
|
||||
public Result getpackreq(String sqh) {
|
||||
return packBarcodeUtil.getpackreq(sqh);
|
||||
}
|
||||
|
||||
@ApiOperation("封箱申请单")
|
||||
@PostMapping("/packup")
|
||||
public Result packup(@RequestBody List<LabReqpack> labReqpacks){
|
||||
public Result packup(@RequestBody List<LabReqpack> labReqpacks) {
|
||||
return packBarcodeUtil.packup(labReqpacks);
|
||||
}
|
||||
|
||||
@ApiOperation("打印封箱码")
|
||||
@GetMapping("/printpackid")
|
||||
public Result printpackid(String ksmc){
|
||||
public Result printpackid(String ksmc) {
|
||||
return packBarcodeUtil.printpackid(ksmc);
|
||||
}
|
||||
|
||||
@GetMapping("/test1")
|
||||
public Result test1(String sqh){
|
||||
public Result test1(String sqh) {
|
||||
return zycxService.test1(sqh);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
@ApiOperation("打印送检清单")
|
||||
@PostMapping("/printSendSample")
|
||||
public Result printSendSample(@RequestBody String[] sqhArray){
|
||||
return zycxService.printSendSample(sqhArray);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
@ -15,5 +15,6 @@ public class QuerySqdVO {
|
||||
private String yljg;
|
||||
private String queryType; //1.brdh,2.ch,3.brxm
|
||||
private String queryValue;
|
||||
private String zt;
|
||||
|
||||
}
|
||||
|
||||
@ -19,4 +19,6 @@ public interface ZycxService {
|
||||
Result getSQDMain(LabReqmain labReqmain);
|
||||
|
||||
Result test1(String sqh);
|
||||
|
||||
Result printSendSample(String[] sqhList);
|
||||
}
|
||||
|
||||
@ -1,5 +1,6 @@
|
||||
package com.czlis.zycx.service.impl;
|
||||
|
||||
import cn.hutool.core.collection.CollUtil;
|
||||
import cn.hutool.core.date.DateUtil;
|
||||
import com.czlis.common.core.domain.Result;
|
||||
import com.czlis.common.core.domain.entity.lis.LabReqdetail;
|
||||
@ -10,6 +11,7 @@ import com.czlis.interfaceCommon.pojo.inter.GetReqInterface;
|
||||
import com.czlis.interfaceCommon.pojo.inter.SetReqStatus;
|
||||
import com.czlis.interfaceCommon.utils.CommonUtil;
|
||||
import com.czlis.interfaceCommon.utils.LisInterfaceUtil;
|
||||
import com.czlis.interfaceCommon.utils.LisUtil;
|
||||
import com.czlis.interfaceCommon.utils.ReportUtil;
|
||||
import com.czlis.zycx.mapper.ZycxMapper;
|
||||
import com.czlis.zycx.pojo.QuerySqdVO;
|
||||
@ -20,10 +22,7 @@ import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.*;
|
||||
|
||||
@Slf4j
|
||||
@Service
|
||||
@ -52,7 +51,27 @@ public class ZycxServiceImpl implements ZycxService {
|
||||
webGetBarcode.setBrly("3");
|
||||
webGetBarcode.setQueryType(querySqdVO.getQueryType());
|
||||
webGetBarcode.setQueryValue(querySqdVO.getQueryValue());
|
||||
return zycxMapper.getSQDInfo(webGetBarcode);
|
||||
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;
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
return sqdInfoList;
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -103,6 +122,8 @@ public class ZycxServiceImpl implements ZycxService {
|
||||
labReqmain.setZt("12");
|
||||
labReqmain.setSqh(sqhOne);
|
||||
commonUtil.updateLabReqmain(labReqmain);
|
||||
}else{
|
||||
return new Result("-1","该条码已经送检或者上机或者已审核,不允许做采样操作!");
|
||||
}
|
||||
}
|
||||
|
||||
@ -113,6 +134,20 @@ public class ZycxServiceImpl implements ZycxService {
|
||||
labReqmain.setZt("13");
|
||||
labReqmain.setSqh(sqhOne);
|
||||
commonUtil.updateLabReqmain(labReqmain);
|
||||
}else{
|
||||
return new Result("-1","该条码已经送检或者上机或者已审核,不允许再送检!");
|
||||
}
|
||||
}
|
||||
|
||||
//作废
|
||||
if(status.equals("9")){
|
||||
if(zt.equals("1") || zt.equals("8") || zt.equals("11") || zt.equals("12")){
|
||||
LabReqmain labReqmain = new LabReqmain();
|
||||
labReqmain.setZt("9");
|
||||
labReqmain.setSqh(sqhOne);
|
||||
commonUtil.updateLabReqmain(labReqmain);
|
||||
}else{
|
||||
return new Result("-1","该条码已经送检或者上机或者已审核,不允许作废!");
|
||||
}
|
||||
}
|
||||
|
||||
@ -140,6 +175,20 @@ public class ZycxServiceImpl implements ZycxService {
|
||||
return printBarCode(sqh);
|
||||
}
|
||||
|
||||
/**
|
||||
* 打印送检清单
|
||||
* @param sqhArray
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public Result printSendSample(String[] sqhArray) {
|
||||
ReportParam reportParam = new ReportParam();
|
||||
reportParam.setArrayParam(sqhArray);
|
||||
String hospitalName = commonUtil.getCompany("1");
|
||||
reportParam.setHospitalName(hospitalName);
|
||||
return reportUtil.printToPdf("sendSample",reportParam,"",true);
|
||||
}
|
||||
|
||||
|
||||
public Result createSQDExecSP(String dept, String userid, String st, String et, String yljg){
|
||||
Map<String, Object> map = new HashMap<>();
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user