住院条码修改,质控批号功能
This commit is contained in:
parent
37ed099615
commit
6a632c18c7
@ -0,0 +1,25 @@
|
||||
package com.czlis.common.core.domain.entity.lis;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
@Data
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
public class QcBatchno {
|
||||
private String yq;
|
||||
private String zkpph;
|
||||
private String zkph;
|
||||
private Date startda;
|
||||
private String conc;
|
||||
private Date expiredt;
|
||||
private Date endda;
|
||||
private String useflag;
|
||||
private String qcsrc;
|
||||
private String standsrc;
|
||||
private String bk;
|
||||
private String batchno;
|
||||
}
|
||||
@ -7,6 +7,7 @@ import java.util.Map;
|
||||
import java.util.Set;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
|
||||
import cn.hutool.core.util.BooleanUtil;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.data.redis.core.BoundSetOperations;
|
||||
import org.springframework.data.redis.core.HashOperations;
|
||||
@ -244,4 +245,23 @@ public class RedisCache {
|
||||
public Collection<String> keys(final String pattern) {
|
||||
return redisTemplate.keys(pattern);
|
||||
}
|
||||
|
||||
/**
|
||||
* 对redis修改操作增加互斥锁,解决缓存击穿问题
|
||||
* @param key
|
||||
* @return
|
||||
*/
|
||||
private boolean tryLock(String key){
|
||||
//如果10秒钟没有执行完毕,则锁过期
|
||||
Boolean flag = redisTemplate.opsForValue().setIfAbsent(key, "1", 10, TimeUnit.SECONDS);
|
||||
return BooleanUtil.isTrue(flag);
|
||||
}
|
||||
|
||||
/**
|
||||
* 释放互斥锁
|
||||
* @param key
|
||||
*/
|
||||
private void unLock(String key){
|
||||
redisTemplate.delete(key);
|
||||
}
|
||||
}
|
||||
|
||||
@ -1,3 +1,2 @@
|
||||
net.sf.jasperreports.extension.registry.factory.simple.font.families=net.sf.jasperreports.engine.fonts.SimpleFontExtensionsRegistryFactory
|
||||
net.sf.jasperreports.extension.simple.font.families.lobstertwo=stsong/fonts.xml
|
||||
net.sf.jasperreports.extension.text.null.value=
|
||||
net.sf.jasperreports.extension.simple.font.families.lobstertwo=stsong/fonts.xml
|
||||
@ -0,0 +1,44 @@
|
||||
package com.czlis.liswork.controller.qc;
|
||||
|
||||
import com.czlis.common.core.controller.BaseController;
|
||||
import com.czlis.common.core.domain.Result;
|
||||
import com.czlis.common.core.domain.entity.lis.QcBatchno;
|
||||
import com.czlis.common.core.page.TableDataInfo;
|
||||
import com.czlis.liswork.service.QcBatchnoService;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 质控批号设置
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/qc")
|
||||
@Slf4j
|
||||
@Api(tags = "质控批号设置")
|
||||
public class QcBatchnoController extends BaseController {
|
||||
|
||||
@Autowired
|
||||
private QcBatchnoService qcBatchnoService;
|
||||
|
||||
|
||||
@ApiOperation("查询质控批号")
|
||||
@GetMapping("/query")
|
||||
public TableDataInfo queryList(QcBatchno qcBatchno) {
|
||||
startPage();
|
||||
List<QcBatchno> qcBatchnoList = qcBatchnoService.queryList(qcBatchno);
|
||||
return getDataTable(qcBatchnoList);
|
||||
}
|
||||
|
||||
@ApiOperation("获取项目列表")
|
||||
@GetMapping("/queryVal")
|
||||
public Result queryValList(String yq){
|
||||
return qcBatchnoService.queryValList(yq);
|
||||
}
|
||||
}
|
||||
@ -1,6 +1,7 @@
|
||||
package com.czlis.liswork.controller.qc;
|
||||
|
||||
import com.czlis.common.annotation.Log;
|
||||
import com.czlis.common.core.controller.BaseController;
|
||||
import com.czlis.common.core.domain.Result;
|
||||
import com.czlis.common.core.domain.entity.lis.ComOpt;
|
||||
import com.czlis.common.core.domain.entity.lis.QcRules;
|
||||
@ -25,7 +26,7 @@ import java.util.List;
|
||||
@RequestMapping("/qc")
|
||||
@Slf4j
|
||||
@Api(tags = "质控设置界面")
|
||||
public class QualitySetController {
|
||||
public class QualitySetController extends BaseController {
|
||||
|
||||
@Autowired
|
||||
private QualitySetService qualitySetService;
|
||||
|
||||
@ -0,0 +1,14 @@
|
||||
package com.czlis.liswork.mapper;
|
||||
|
||||
import com.czlis.common.core.domain.entity.lis.QcBatchno;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
public interface QcBatchnoMapper {
|
||||
List<QcBatchno> selectList(QcBatchno qcBatchno);
|
||||
void insert(QcBatchno qcBatchno);
|
||||
void update(QcBatchno qcBatchno);
|
||||
void delete(QcBatchno qcBatchno);
|
||||
List<Map<String,Object>> qcSampleList(String yq);
|
||||
}
|
||||
@ -0,0 +1,13 @@
|
||||
package com.czlis.liswork.service;
|
||||
|
||||
import com.czlis.common.core.domain.Result;
|
||||
import com.czlis.common.core.domain.entity.lis.QcBatchno;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public interface QcBatchnoService {
|
||||
List<QcBatchno> queryList(QcBatchno qcBatchno);
|
||||
|
||||
Result queryValList(String yq);
|
||||
|
||||
}
|
||||
@ -0,0 +1,33 @@
|
||||
package com.czlis.liswork.service.impl.qc;
|
||||
|
||||
import com.czlis.common.core.domain.Result;
|
||||
import com.czlis.common.core.domain.entity.lis.QcBatchno;
|
||||
import com.czlis.liswork.mapper.QcBatchnoMapper;
|
||||
import com.czlis.liswork.service.QcBatchnoService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
@Service
|
||||
public class QcBatchnoServiceImpl implements QcBatchnoService {
|
||||
|
||||
@Autowired
|
||||
private QcBatchnoMapper qcBatchnoMapper;
|
||||
|
||||
|
||||
@Override
|
||||
public List<QcBatchno> queryList(QcBatchno qcBatchno) {
|
||||
List<QcBatchno> qcBatchnoList = qcBatchnoMapper.selectList(qcBatchno);
|
||||
return qcBatchnoList;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Result queryValList(String yq) {
|
||||
List<Map<String, Object>> mapList = qcBatchnoMapper.qcSampleList(yq);
|
||||
return new Result("0","获取数据成功!",mapList);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
65
liswork/src/main/resources/mapper/QcBatchnoMapper.xml
Normal file
65
liswork/src/main/resources/mapper/QcBatchnoMapper.xml
Normal file
@ -0,0 +1,65 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
|
||||
<mapper namespace="com.czlis.liswork.mapper.QcBatchnoMapper">
|
||||
<select id="selectList" resultType="com.czlis.common.core.domain.entity.lis.QcBatchno">
|
||||
select * from qc_batchno where yq = #{yq}
|
||||
<if test="zkpph != null and zkpph != ''">and zkpph = #{zkpph}</if>
|
||||
<if test="zkph != null and zkph != ''">and zkph = #{zkph}</if>
|
||||
</select>
|
||||
|
||||
<update id="update">
|
||||
update qc_batchno set
|
||||
<if test="startda != null">startda = #{startda},</if>
|
||||
<if test="conc != null and conc != ''">conc = #{conc},</if>
|
||||
<if test="conc != null">conc = #{conc},</if>
|
||||
<if test="expiredt != null">expiredt = #{expiredt},</if>
|
||||
<if test="endda != null">endda = #{endda},</if>
|
||||
<if test="useflag != null and useflag != ''">useflag = #{useflag},</if>
|
||||
<if test="qcsrc != null and qcsrc != ''">qcsrc = #{qcsrc},</if>
|
||||
<if test="standsrc != null and standsrc != ''">standsrc = #{standsrc},</if>
|
||||
<if test="bk != null and bk != ''">bk = #{bk},</if>
|
||||
<if test="batchno != null and batchno != ''">batchno = #{batchno},</if>
|
||||
yq = #{yq}
|
||||
where yq = #{yq} and zkpph = #{zkpph} and zkph = #{zkph}
|
||||
</update>
|
||||
|
||||
<delete id="delete">
|
||||
delete from qc_batchno where yq = #{yq} and zkpph = #{zkpph} and zkph = #{zkph}
|
||||
</delete>
|
||||
|
||||
<insert id="insert">
|
||||
insert into qc_batchno(yq, zkpph, zkph, startda, conc, expiredt, endda, useflag, qcsrc, standsrc, bk, batchno)
|
||||
values(#{yq},#{zkpph},#{startda},#{conc},#{expiredt},#{endda},#{useflag},#{qcsrc},#{standsrc},#{bk},#{batchno})
|
||||
</insert>
|
||||
|
||||
|
||||
<select id="qcSampleList" resultType="map">
|
||||
SELECT xm_info.yq,
|
||||
xm_info.xmdh,
|
||||
xm_info.xmmc,
|
||||
qc_sample.zkph,
|
||||
qc_sample.ksrq,
|
||||
qc_sample.zkpph,
|
||||
qc_sample.ld,
|
||||
qc_sample.cv,
|
||||
qc_sample.sd,
|
||||
qc_sample.zkbz,
|
||||
qc_sample.bc,
|
||||
qc_sample.ff,
|
||||
qc_sample.sjph,
|
||||
qc_sample.sm,
|
||||
qc_sample.bz1,
|
||||
qc_sample.expiredt,
|
||||
qc_sample.qcsrc,
|
||||
qc_sample.standsrc,
|
||||
qc_sample.outdt,
|
||||
qc_sample.stopdate,qc_sample.qccv,
|
||||
0 as rowid
|
||||
FROM xm_info LEFT OUTER JOIN qc_sample ON xm_info.yq = qc_sample.yq and qc_sample.xmdh = '@'
|
||||
WHERE ( xm_info.yq = #{yq} ) AND ( xm_info.zkxm = 'Y' )
|
||||
order by xm_info.dyxh
|
||||
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
@ -172,7 +172,19 @@ public class ZycxServiceImpl implements ZycxService {
|
||||
public Result printBarCode(String sqh){
|
||||
ReportParam reportParam = new ReportParam();
|
||||
reportParam.setSqh(sqh);
|
||||
return reportUtil.printToPdf("barcode_zy",reportParam, sqh,false);
|
||||
Result result = reportUtil.printToPdf("barcode_zy", reportParam, sqh, false);
|
||||
if(!result.getCode().equals("0")) return result;
|
||||
//修改打印状态
|
||||
LabReqmain labReqmainOne = commonUtil.getLabReqmainOne(sqh);
|
||||
if(labReqmainOne == null) return new Result("-1","没有找到申请单数据!");
|
||||
String zt = labReqmainOne.getZt();
|
||||
if(zt.trim().equals("1") || zt.trim().equals("8")){
|
||||
LabReqmain labReqmain = new LabReqmain();
|
||||
labReqmain.setZt("11");
|
||||
labReqmain.setSqh(sqh);
|
||||
commonUtil.updateLabReqmain(labReqmain);
|
||||
}
|
||||
return new Result("0","打印成功!",result.getData());
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -13,25 +13,28 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
(select yhxm from com_usr where yhdh = a.jsys) as jsysname,
|
||||
(select zdmc from com_dict where zdlb = 'DP' AND zddh = a.ksdh) as ksname,
|
||||
c.confirmdt as confirmdt
|
||||
from lab_reqmain a left join lab_feeitemclass b on (a.bgddh = b.sflbdh),lab_pat c where a.sqh = c.sqh
|
||||
from lab_reqmain a left join lab_feeitemclass b on (a.bgddh = b.sflbdh) left join lab_pat c on (a.sqh = c.sqh)
|
||||
</sql>
|
||||
|
||||
<select id="getSQDInfo" parameterType="com.czlis.zycx.pojo.Web_getBarcode" resultType="com.czlis.zycx.pojo.Web_getBarcode">
|
||||
<include refid="selectLabReqmainVo"></include>
|
||||
<if test="sqh != null and sqh != ''"> and a.sqh = #{sqh}</if>
|
||||
<if test="zt != null and zt != ''"> and a.zt = #{zt}</if>
|
||||
<if test="ksdh != null and ksdh != ''"> and a.ksdh = #{ksdh}</if>
|
||||
<if test="brly != null and brly != ''"> and a.brly = #{brly}</if>
|
||||
<if test="yljg != null and yljg != ''"> and a.yljg = #{yljg}</if>
|
||||
<if test="st != null"><!-- 开始时间检索 -->
|
||||
AND a.sqsj >= CONVERT(varchar(100), #{st}, 120)
|
||||
</if>
|
||||
<if test="et != null"><!-- 结束时间检索 -->
|
||||
AND a.sqsj <= CONVERT(varchar(100), #{et}, 120)
|
||||
</if>
|
||||
<if test="queryType == 'brdh'"> and a.brdh = #{queryValue}</if>
|
||||
<if test="queryType == 'ch'"> and a.ch = #{queryValue}</if>
|
||||
<if test="queryType == 'brxm'"> and a.brxm like '%'+#{queryValue}+'%' </if>
|
||||
<where>
|
||||
<if test="sqh != null and sqh != ''"> and a.sqh = #{sqh}</if>
|
||||
<if test="zt != null and zt != ''"> and a.zt = #{zt}</if>
|
||||
<if test="ksdh != null and ksdh != ''"> and a.ksdh = #{ksdh}</if>
|
||||
<if test="brly != null and brly != ''"> and a.brly = #{brly}</if>
|
||||
<if test="yljg != null and yljg != ''"> and a.yljg = #{yljg}</if>
|
||||
<if test="st != null"><!-- 开始时间检索 -->
|
||||
AND a.sqsj >= CONVERT(varchar(100), #{st}, 120)
|
||||
</if>
|
||||
<if test="et != null"><!-- 结束时间检索 -->
|
||||
AND a.sqsj <= CONVERT(varchar(100), #{et}, 120)
|
||||
</if>
|
||||
<if test="queryType == 'brdh'"> and a.brdh = #{queryValue}</if>
|
||||
<if test="queryType == 'ch'"> and a.ch = #{queryValue}</if>
|
||||
<if test="queryType == 'brxm'"> and a.brxm like '%'+#{queryValue}+'%' </if>
|
||||
</where>
|
||||
|
||||
</select>
|
||||
|
||||
<select id="createSQD" parameterType="map" statementType="CALLABLE" useCache="false">
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user