Compare commits
No commits in common. "6873ee83936c30a2c85eaeb2ed70f91df9037641" and "1465126135eb3bf7e12ed0aae7191c6c41fff2fc" have entirely different histories.
6873ee8393
...
1465126135
@ -1,18 +0,0 @@
|
|||||||
package com.czlis.common.core.domain.entity.lis;
|
|
||||||
|
|
||||||
import lombok.AllArgsConstructor;
|
|
||||||
import lombok.Data;
|
|
||||||
import lombok.NoArgsConstructor;
|
|
||||||
|
|
||||||
@Data
|
|
||||||
@AllArgsConstructor
|
|
||||||
@NoArgsConstructor
|
|
||||||
public class ComSeq {
|
|
||||||
|
|
||||||
private String seqid;
|
|
||||||
private long maxno;
|
|
||||||
private String bz;
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
||||||
@ -1,26 +0,0 @@
|
|||||||
package com.czlis.common.core.domain.entity.lis;
|
|
||||||
|
|
||||||
|
|
||||||
import lombok.AllArgsConstructor;
|
|
||||||
import lombok.Data;
|
|
||||||
import lombok.NoArgsConstructor;
|
|
||||||
|
|
||||||
import java.util.Date;
|
|
||||||
@NoArgsConstructor
|
|
||||||
@AllArgsConstructor
|
|
||||||
@Data
|
|
||||||
public class LabReqpack {
|
|
||||||
|
|
||||||
private String packno;
|
|
||||||
private Integer xh;
|
|
||||||
private String sqh;
|
|
||||||
private String ksdh;
|
|
||||||
private String packuser;
|
|
||||||
private Integer sl;
|
|
||||||
private String zt;
|
|
||||||
private Date packdate;
|
|
||||||
private Date senddate;
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
||||||
@ -1,7 +0,0 @@
|
|||||||
package com.czlis.interfaceCommon.mapper;
|
|
||||||
|
|
||||||
import java.util.Map;
|
|
||||||
|
|
||||||
public interface ComSeqMapper {
|
|
||||||
void getNextSeq(Map<String,Object> map);
|
|
||||||
}
|
|
||||||
@ -1,10 +0,0 @@
|
|||||||
package com.czlis.interfaceCommon.mapper;
|
|
||||||
|
|
||||||
import com.czlis.common.core.domain.entity.lis.LabReqpack;
|
|
||||||
import java.util.List;
|
|
||||||
public interface LabReqpackMapper {
|
|
||||||
List<LabReqpack> getLabReqpack(String packno);
|
|
||||||
int getLabReqpackConut(String packno);
|
|
||||||
int insertLabReqpack(LabReqpack labReqpack);
|
|
||||||
int batchInsertLabReqpack(List<LabReqpack> labReqpackList);
|
|
||||||
}
|
|
||||||
@ -82,10 +82,6 @@ public class CommonUtil {
|
|||||||
LabGraphMapper labGraphMapper;
|
LabGraphMapper labGraphMapper;
|
||||||
@Autowired
|
@Autowired
|
||||||
ComPatMapper comPatMapper;
|
ComPatMapper comPatMapper;
|
||||||
@Autowired
|
|
||||||
ComSeqMapper comSeqMapper;
|
|
||||||
@Autowired
|
|
||||||
LabReqpackMapper labReqpackMapper;
|
|
||||||
//====检验主表操作方法集合===
|
//====检验主表操作方法集合===
|
||||||
public LabPat getLabPatOne(Date jyrq, String yq, String ybh) {
|
public LabPat getLabPatOne(Date jyrq, String yq, String ybh) {
|
||||||
return labPatMapper.getLabPatOne(jyrq, yq, ybh);
|
return labPatMapper.getLabPatOne(jyrq, yq, ybh);
|
||||||
@ -333,21 +329,6 @@ public class CommonUtil {
|
|||||||
public void delLabResultMedAll(Date jyrq, String yq, String ybh) {
|
public void delLabResultMedAll(Date jyrq, String yq, String ybh) {
|
||||||
labResultMedMapper.delLabResultMedAll(jyrq, yq, ybh);
|
labResultMedMapper.delLabResultMedAll(jyrq, yq, ybh);
|
||||||
}
|
}
|
||||||
//封箱
|
|
||||||
public List<LabReqpack> getLabReqpack(String packno){
|
|
||||||
return labReqpackMapper.getLabReqpack(packno);
|
|
||||||
}
|
|
||||||
public int getLabReqpackConut(String packno){
|
|
||||||
return labReqpackMapper.getLabReqpackConut(packno);
|
|
||||||
}
|
|
||||||
@Transactional(rollbackFor = Exception.class)
|
|
||||||
public int insertLabReqpack(LabReqpack labReqpack){
|
|
||||||
return labReqpackMapper.insertLabReqpack(labReqpack);
|
|
||||||
}
|
|
||||||
@Transactional(rollbackFor = Exception.class)
|
|
||||||
public int batchInsertLabReqpack(List<LabReqpack> labReqpackList){
|
|
||||||
return labReqpackMapper.batchInsertLabReqpack(labReqpackList);
|
|
||||||
}
|
|
||||||
//=====项目字典查询=========
|
//=====项目字典查询=========
|
||||||
public List<XmInfo> getXmInfoList(String yq) {
|
public List<XmInfo> getXmInfoList(String yq) {
|
||||||
return xmInfoMapper.getXmInfoList(yq);
|
return xmInfoMapper.getXmInfoList(yq);
|
||||||
@ -424,15 +405,6 @@ public class CommonUtil {
|
|||||||
public int getLabReport2(Date jyrq, String yq, String ybh) {
|
public int getLabReport2(Date jyrq, String yq, String ybh) {
|
||||||
return labReportvsitemMapper.getLabReport2(jyrq, yq, ybh);
|
return labReportvsitemMapper.getLabReport2(jyrq, yq, ybh);
|
||||||
}
|
}
|
||||||
//获取流水号种子
|
|
||||||
@Transactional(rollbackFor = Exception.class)
|
|
||||||
public Long getNextSeq(String seqid) {
|
|
||||||
Map<String, Object> param = new HashMap<>();
|
|
||||||
param.put("seqid", seqid);
|
|
||||||
// 调用存储过程,出参将被设置到param的nextVal中
|
|
||||||
comSeqMapper.getNextSeq(param);
|
|
||||||
return (Long) param.get("retcode");
|
|
||||||
}
|
|
||||||
//服务器时间方法
|
//服务器时间方法
|
||||||
public Date getCurrentTime() {
|
public Date getCurrentTime() {
|
||||||
return commonMapper.getCurrentTime();
|
return commonMapper.getCurrentTime();
|
||||||
|
|||||||
@ -1,87 +0,0 @@
|
|||||||
package com.czlis.interfaceCommon.utils;
|
|
||||||
|
|
||||||
import cn.hutool.core.date.DateUtil;
|
|
||||||
import com.czlis.common.core.domain.Result;
|
|
||||||
import com.czlis.common.core.domain.entity.lis.LabReqmain;
|
|
||||||
import com.czlis.common.core.domain.entity.lis.LabReqpack;
|
|
||||||
import com.czlis.common.utils.DateUtils;
|
|
||||||
import com.czlis.interfaceCommon.pojo.entity.BarCodeParam;
|
|
||||||
import lombok.extern.slf4j.Slf4j;
|
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
|
||||||
import org.springframework.stereotype.Component;
|
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
import java.util.Map;
|
|
||||||
|
|
||||||
@Component
|
|
||||||
@Slf4j
|
|
||||||
public class PackBarcodeUtil {
|
|
||||||
@Autowired
|
|
||||||
CommonUtil commonUtil;
|
|
||||||
@Autowired
|
|
||||||
private ReportUtil reportUtil;
|
|
||||||
/**
|
|
||||||
* 获取下一个箱码
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
public String getNextPackID(){
|
|
||||||
String seqid="PACK";
|
|
||||||
String head="88"+ DateUtils.dateTimeNow("yyMMdd");
|
|
||||||
Long PackID=10000+commonUtil.getNextSeq(seqid);
|
|
||||||
String seqno=PackID.toString();
|
|
||||||
if (seqno.length ()<4) return"9999";
|
|
||||||
seqno.substring (seqno.length () - 4);
|
|
||||||
return head+seqno;
|
|
||||||
}
|
|
||||||
public Boolean checkPackID(String packID){
|
|
||||||
int sl=commonUtil.getLabReqpackConut(packID);
|
|
||||||
if (sl>0) return true;
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
public Result checkpackid(String packid) {
|
|
||||||
if (packid.length() < 12) {
|
|
||||||
return new Result("1", "箱码非法,请输入正确的箱码!");
|
|
||||||
}
|
|
||||||
if (!"88".equals(packid.substring(0, 2))) {
|
|
||||||
return new Result("1", "箱码非法,请输入正确的箱码!");
|
|
||||||
}
|
|
||||||
boolean checked =checkPackID(packid);
|
|
||||||
if (checked) {
|
|
||||||
return new Result("1", "此箱码已使用过,不能重复使用,请换一个新的!");
|
|
||||||
}
|
|
||||||
return new Result("0", "");
|
|
||||||
}
|
|
||||||
public Result getpackreq(String sqh){
|
|
||||||
LabReqmain labReqmain=commonUtil.getLabReqmainOne(sqh);
|
|
||||||
String zt=labReqmain.getZt();
|
|
||||||
if(zt==null)return new Result("-1", "条码号错误");
|
|
||||||
zt=zt.trim();
|
|
||||||
switch (zt){
|
|
||||||
case "1":
|
|
||||||
case "0":
|
|
||||||
return new Result("-1", "条码未打印");
|
|
||||||
case "13":
|
|
||||||
return new Result("-1", "标本已送出");
|
|
||||||
case "9":
|
|
||||||
return new Result("-1", "条码已作废");
|
|
||||||
case "2":
|
|
||||||
case "3":
|
|
||||||
case "4":
|
|
||||||
return new Result("-1", "标本已接收");
|
|
||||||
}
|
|
||||||
return new Result("0", "",labReqmain);
|
|
||||||
}
|
|
||||||
public Result printpackid(String ksmc){
|
|
||||||
String packid=getNextPackID();
|
|
||||||
BarCodeParam barCodeParam = new BarCodeParam();
|
|
||||||
barCodeParam.setSqh(packid);
|
|
||||||
barCodeParam.setBrxm("检验样本");
|
|
||||||
barCodeParam.setSfxmmc("样本数量____");
|
|
||||||
barCodeParam.setKsmc(ksmc);
|
|
||||||
return reportUtil.printToPdf(barCodeParam, packid);
|
|
||||||
}
|
|
||||||
public Result packup(List<LabReqpack> labReqpacks){
|
|
||||||
commonUtil.batchInsertLabReqpack(labReqpacks);
|
|
||||||
return new Result("0", "");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@ -1,11 +0,0 @@
|
|||||||
<?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.interfaceCommon.mapper.ComSeqMapper">
|
|
||||||
<select id="getNextSeq" statementType="CALLABLE" parameterType="map">
|
|
||||||
{call getnextseq(
|
|
||||||
#{seqid, mode=IN, jdbcType=VARCHAR},
|
|
||||||
#{retcode, mode=OUT, jdbcType=BIGINT}
|
|
||||||
)}
|
|
||||||
</select>
|
|
||||||
</mapper>
|
|
||||||
@ -1,21 +0,0 @@
|
|||||||
<?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.interfaceCommon.mapper.LabReqpackMapper">
|
|
||||||
<select id="getLabReqpack" resultType="com.czlis.common.core.domain.entity.lis.LabReqpack">
|
|
||||||
select * from lab_reqpack where packno = #{packno}
|
|
||||||
</select>
|
|
||||||
<select id="getLabReqpackConut" resultType="int">
|
|
||||||
select count(1) from lab_reqpack where packno = #{packno}
|
|
||||||
</select>
|
|
||||||
<insert id="insertLabReqpack" parameterType="com.czlis.common.core.domain.entity.lis.LabReqpack">
|
|
||||||
INSERT INTO lab_reqpack (packno,xh,sqh,ksdh,packuser,sl,zt,packdate,senddate)
|
|
||||||
values (#{packno}, #{xh}, #{sqh},#{ksdh}, #{packuser}, #{sl},#{zt}, #{packdate}, #{senddate})
|
|
||||||
</insert>
|
|
||||||
<insert id="batchInsertLabReqpack" parameterType="java.util.List">
|
|
||||||
INSERT INTO lab_reqpack (packno,xh,sqh,ksdh,packuser,sl,zt,packdate,senddate)
|
|
||||||
<foreach collection="list" item="item" separator="UNION ALL">
|
|
||||||
select #{item.packno},#{item.xh},#{item.sqh}, #{item.ksdh},#{item.packuser},#{item.sl}, #{item.zt},#{item.packdate},#{item.senddate}
|
|
||||||
</foreach>
|
|
||||||
</insert>
|
|
||||||
</mapper>
|
|
||||||
@ -4,9 +4,6 @@ import com.czlis.common.annotation.Anonymous;
|
|||||||
import com.czlis.common.core.controller.BaseController;
|
import com.czlis.common.core.controller.BaseController;
|
||||||
import com.czlis.common.core.domain.Result;
|
import com.czlis.common.core.domain.Result;
|
||||||
import com.czlis.common.core.domain.entity.lis.LabReqmain;
|
import com.czlis.common.core.domain.entity.lis.LabReqmain;
|
||||||
import com.czlis.common.core.domain.entity.lis.LabReqpack;
|
|
||||||
import com.czlis.common.core.domain.entity.lis.LabResult;
|
|
||||||
import com.czlis.interfaceCommon.utils.PackBarcodeUtil;
|
|
||||||
import com.czlis.zycx.pojo.Web_getBarcode;
|
import com.czlis.zycx.pojo.Web_getBarcode;
|
||||||
import com.czlis.zycx.service.ZycxService;
|
import com.czlis.zycx.service.ZycxService;
|
||||||
import io.swagger.annotations.Api;
|
import io.swagger.annotations.Api;
|
||||||
@ -29,8 +26,8 @@ import java.util.List;
|
|||||||
public class ZycxController extends BaseController {
|
public class ZycxController extends BaseController {
|
||||||
@Autowired
|
@Autowired
|
||||||
private ZycxService zycxService;
|
private ZycxService zycxService;
|
||||||
@Autowired
|
|
||||||
PackBarcodeUtil packBarcodeUtil;
|
|
||||||
@ApiOperation("获取申请单")
|
@ApiOperation("获取申请单")
|
||||||
@GetMapping("/query")
|
@GetMapping("/query")
|
||||||
//@PreAuthorize("@ss.hasPermi('zycx:interface:query')")
|
//@PreAuthorize("@ss.hasPermi('zycx:interface:query')")
|
||||||
@ -68,26 +65,8 @@ public class ZycxController extends BaseController {
|
|||||||
log.info("获取申请单主表数据,zyreq/reqmain:{}",labReqmain);
|
log.info("获取申请单主表数据,zyreq/reqmain:{}",labReqmain);
|
||||||
return zycxService.getSQDMain(labReqmain);
|
return zycxService.getSQDMain(labReqmain);
|
||||||
}
|
}
|
||||||
@ApiOperation("封箱码查询")
|
|
||||||
@GetMapping("/checkpackid")
|
|
||||||
public Result checkpackid(String packid){
|
|
||||||
return packBarcodeUtil.checkpackid(packid);
|
|
||||||
}
|
|
||||||
@ApiOperation("获取封箱申请单信息")
|
|
||||||
@GetMapping("/getpackreq")
|
|
||||||
public Result getpackreq(String sqh){
|
|
||||||
return packBarcodeUtil.getpackreq(sqh);
|
|
||||||
}
|
|
||||||
@ApiOperation("封箱申请单")
|
|
||||||
@PostMapping("/packup")
|
|
||||||
public Result packup(@RequestBody List<LabReqpack> labReqpacks){
|
|
||||||
return packBarcodeUtil.packup(labReqpacks);
|
|
||||||
}
|
|
||||||
@ApiOperation("打印封箱码")
|
|
||||||
@GetMapping("/printpackid")
|
|
||||||
public Result printpackid(String ksmc){
|
|
||||||
return packBarcodeUtil.printpackid(ksmc);
|
|
||||||
}
|
|
||||||
@GetMapping("/test1")
|
@GetMapping("/test1")
|
||||||
public Result test1(String sqh){
|
public Result test1(String sqh){
|
||||||
return zycxService.test1(sqh);
|
return zycxService.test1(sqh);
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user