Merge remote-tracking branch 'origin/master'

This commit is contained in:
tangw 2026-05-12 16:23:29 +08:00
commit 6cd30879db
11 changed files with 262 additions and 12 deletions

View File

@ -131,4 +131,7 @@ public class LabReqmain extends BaseEntity {
private String qsyljg;
@ApiModelProperty(value = "采集部位")
private String cjbw;
private Date st;
private Date et;
}

View File

@ -32,16 +32,21 @@
</insert>
<update id="update">
update lab_reqdetail set sqh = #{sqh}
<if test="xh != null">xh = #{xh},</if>
<if test="sqxmdh != null">sqxmdh = #{sqxmdh},</if>
<if test="sqxmmc != null">sqxmmc = #{sqxmmc},</if>
<if test="sl != null">sl = #{sl},</if>
<if test="dj != null">dj = #{dj}</if>
<if test="zt != null and zt != ''">zt = #{zt}</if>
<if test="jjzt != null and jjzt != ''">jjzt = #{jjzt}</if>
<if test="bz1 != null and bz1 != ''">bz1 = #{bz1}</if>
<if test="bz2 != null and bz2 != ''">bz2 = #{bz2}</if>
update lab_reqdetail
<set>
<if test="xh != null">xh = #{xh},</if>
<if test="sqxmdh != null">sqxmdh = #{sqxmdh},</if>
<if test="sqxmmc != null">sqxmmc = #{sqxmmc},</if>
<if test="sl != null">sl = #{sl},</if>
<if test="dj != null">dj = #{dj},</if>
<if test="zt != null and zt != ''">zt = #{zt},</if>
<if test="jjzt != null and jjzt != ''">jjzt = #{jjzt},</if>
<if test="bz1 != null and bz1 != ''">bz1 = #{bz1},</if>
<if test="bz2 != null and bz2 != ''">bz2 = #{bz2},</if>
sqh = #{sqh}
</set>
where sqh = #{sqh}
<if test="xh != null"> and xh = #{xh}</if>
</update>
<select id="getLabReqdetailOne" resultType="com.czlis.common.core.domain.entity.lis.LabReqdetail">

View File

@ -16,6 +16,7 @@ import org.springframework.context.annotation.ComponentScan;
public class RuoYiApplication {
public static void main(String[] args) {
// System.setProperty("spring.devtools.restart.enabled", "false");
System.setProperty("user.timezone", "Etc/GMT-8");
SpringApplication.run(RuoYiApplication.class, args);
System.out.println("项目启动成功!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!");
}

View File

@ -0,0 +1,75 @@
package com.czlis.liswork.controller.work;
import com.czlis.common.core.controller.BaseController;
import com.czlis.common.core.domain.Result;
import com.czlis.common.core.domain.entity.lis.LabReqmain;
import com.czlis.common.core.page.TableDataInfo;
import com.czlis.liswork.pojo.VO.CancelCheckVO;
import com.czlis.liswork.service.CancelCheckService;
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("/cancelCheck")
@Slf4j
@Api(tags = "退检")
public class CancelCheckController extends BaseController {
@Autowired
CancelCheckService cancelCheckService;
@ApiOperation("查询数据列表")
@GetMapping("/queryList")
public TableDataInfo queryList(LabReqmain labReqmain){
startPage();
List<LabReqmain> labReqmainList = cancelCheckService.queryList(labReqmain);
return getDataTable(labReqmainList);
}
@ApiOperation("获取明细数据")
@GetMapping("/queryDetail")
public Result queryDetail(LabReqmain labReqmain){
String sqh = labReqmain.getSqh();
if(sqh == null || sqh.equals("")) return new Result("-1","入参申请单号不能为空!");
String zt = labReqmain.getZt();
if (zt == null || zt.equals("")) return new Result("-1","入参状态不能为空!");
//这里管理员确认不了,先默认允许退费
// String cancalfeeadmin = commonUtil.getComOptValue("HISOPT", "sp_cancalfeeadmin");
// if(cancalfeeadmin == null) cancalfeeadmin = "";
// if(cancalfeeadmin.equals("1")){
// return new Result("-1","非管理员不允许退费!");
// }
if(zt.equals("4")) return new Result("-1","已经审核的报告禁止退检,请先解除审核再退检!");
if(zt.equals("9")) return new Result("-1","已经作废的报告禁止退检!");
return cancelCheckService.queryDetail(labReqmain);
}
@ApiOperation("退检")
@GetMapping("/confirm")
public Result cancelCheck(CancelCheckVO cancelCheckVO){
String sqh = cancelCheckVO.getSqh();
if(sqh == null || sqh.equals("")) return new Result("-1","申请单号sqh不能为空!");
String userId = cancelCheckVO.getUserId();
if(userId == null) cancelCheckVO.setUserId(getUsername());
return cancelCheckService.cancelCheck(cancelCheckVO);
}
@ApiOperation("拒绝退费")
@GetMapping("/refuse")
public Result refuse(CancelCheckVO cancelCheckVO){
return cancelCheckService.refuse(cancelCheckVO);
}
}

View File

@ -0,0 +1,9 @@
package com.czlis.liswork.mapper.work;
import com.czlis.common.core.domain.entity.lis.LabReqmain;
import java.util.List;
public interface CancelCheckMapper {
List<LabReqmain> query(LabReqmain labReqmain);
}

View File

@ -0,0 +1,14 @@
package com.czlis.liswork.pojo.VO;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
@Data
@AllArgsConstructor
@NoArgsConstructor
public class CancelCheckVO {
private String sqh;
private String tfyy;
private String userId;
}

View File

@ -0,0 +1,18 @@
package com.czlis.liswork.service;
import com.czlis.common.core.domain.Result;
import com.czlis.common.core.domain.entity.lis.LabReqmain;
import com.czlis.liswork.pojo.VO.CancelCheckVO;
import java.util.List;
public interface CancelCheckService {
List<LabReqmain> queryList(LabReqmain labReqmain);
Result queryDetail(LabReqmain labReqmain);
Result cancelCheck(CancelCheckVO cancelCheckVO);
Result refuse(CancelCheckVO cancelCheckVO);
}

View File

@ -189,6 +189,8 @@ public class ReportItemServiceImpl implements ReportItemService {
if(xmRefNewRow.getXmid() == null || xmRefNewRow.getXmid().equals("")) xmRefNewRow.setXmid(xmInfoNew.getXmid());
XmRefNew newXmRef = new XmRefNew();
newXmRef.setXmid(xmRefNewRow.getXmid());
newXmRef.setXh(xmRefNewRow.getXh());
newXmRef.setYq(xmRefNewRow.getYq());
List<XmRefNew> xmRefNews = reportItemMapper.queryXmRefNew(newXmRef);
if(xmRefNews.size() > 0){
reportItemMapper.updateXmRefNewRow(xmRefNewRow);

View File

@ -0,0 +1,104 @@
package com.czlis.liswork.service.impl.work;
import com.czlis.common.core.domain.Result;
import com.czlis.common.core.domain.entity.lis.LabReqdetail;
import com.czlis.common.core.domain.entity.lis.LabReqmain;
import com.czlis.common.core.domain.entity.lis.LabReqsteplog;
import com.czlis.common.utils.ip.IpUtils;
import com.czlis.interfaceCommon.constants.LisinterfaceNameConstants;
import com.czlis.interfaceCommon.mapper.LabReqdetailMapper;
import com.czlis.interfaceCommon.mapper.LabReqsteplogMapper;
import com.czlis.interfaceCommon.pojo.inter.DayMessage;
import com.czlis.interfaceCommon.utils.CommonUtil;
import com.czlis.interfaceCommon.utils.LisInterfaceUtil;
import com.czlis.liswork.mapper.work.CancelCheckMapper;
import com.czlis.liswork.pojo.VO.CancelCheckVO;
import com.czlis.liswork.service.CancelCheckService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.ApplicationContext;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import java.util.List;
@Service
public class CancelCheckServiceImpl implements CancelCheckService {
@Autowired
CancelCheckMapper cancelCheckMapper;
@Autowired
private CommonUtil commonUtil;
@Autowired
LisInterfaceUtil lisInterfaceUtil;
@Autowired
LabReqsteplogMapper labReqsteplogMapper;
@Autowired
LabReqdetailMapper labReqdetailMapper;
@Autowired
private ApplicationContext applicationContext;
@Override
public List<LabReqmain> queryList(LabReqmain labReqmain) {
return cancelCheckMapper.query(labReqmain);
}
@Override
public Result queryDetail(LabReqmain labReqmain) {
List<LabReqdetail> labReqdetailList = commonUtil.getLabReqdetailList(labReqmain.getSqh());
return new Result("0","获取数据成功!",labReqdetailList);
}
@Override
public Result cancelCheck(CancelCheckVO cancelCheckVO) {
//调用接口
DayMessage dayMessage = new DayMessage();
dayMessage.setMsgid("123");
dayMessage.setMsg(cancelCheckVO.getSqh());
Result result = lisInterfaceUtil.invokeLisInterface(LisinterfaceNameConstants.DAYMESSAGE, dayMessage);
if(!result.getCode().equals("0")) return new Result("-1","退检失败:"+result.getMsg());
//修改状态
applicationContext.getBean(CancelCheckServiceImpl.class).updateStatus(cancelCheckVO.getSqh());
//写日志
Integer labReqsteplogMax = labReqsteplogMapper.getLabReqsteplogMax(cancelCheckVO.getSqh());
if(labReqsteplogMax == null) labReqsteplogMax = 0;
LabReqsteplog labReqsteplog = new LabReqsteplog();
labReqsteplog.setSqh(cancelCheckVO.getSqh());
labReqsteplog.setXh(labReqsteplogMax + 1);
labReqsteplog.setZt("9");
labReqsteplog.setUserid(cancelCheckVO.getUserId());
labReqsteplog.setChangedate(commonUtil.getCurrentTime());
labReqsteplog.setComip(IpUtils.getIpAddr());
labReqsteplog.setBz(cancelCheckVO.getTfyy());
labReqsteplogMapper.insertLabReqsteplog(labReqsteplog);
return new Result("0","退检成功!");
}
@Override
public Result refuse(CancelCheckVO cancelCheckVO) {
//调用接口
DayMessage dayMessage = new DayMessage();
dayMessage.setMsgid("995");
dayMessage.setMsg(cancelCheckVO.getSqh());
return lisInterfaceUtil.invokeLisInterface(LisinterfaceNameConstants.DAYMESSAGE, dayMessage);
}
@Transactional
public void updateStatus(String sqh){
LabReqmain labReqmain = new LabReqmain();
labReqmain.setZt("9");
labReqmain.setJjzt("0");
labReqmain.setSqh(sqh);
commonUtil.updateLabReqmain(labReqmain);
LabReqdetail labReqdetail = new LabReqdetail();
labReqdetail.setZt("9");
labReqdetail.setSqh(sqh);
labReqdetailMapper.update(labReqdetail);
}
}

View File

@ -374,11 +374,13 @@
<delete id="deleteXmTextResult">
delete from xm_textresult_new where xmid = #{xmid}
<if test="xh != null">and xh = #{xh}</if>
</delete>
<delete id="deleteXmRefNew">
delete from xm_ref_new where xmid = #{xmid}
<if test="xh != null">and xh = #{xh}</if>
<if test="yq != null and yq != ''">and yq = #{yq}</if>
</delete>
<delete id="deleteXmValNew">
@ -466,9 +468,9 @@
<if test="zd != null and zd != ''">zd = #{zd},</if>
<if test="instrid != null and instrid != ''">instrid = #{instrid},</if>
<if test="yq != null and yq != ''">yq = #{yq},</if>
xmid = #{xmid},xmdh = #{xmdh},xh = #{xh}
xmid = #{xmid},xmdh = #{xmdh}
</set>
where xmid = #{xmid}
where xmid = #{xmid} and xh = #{xh} and yq = #{yq}
</update>
<update id="updateXmValNewRow">

View File

@ -0,0 +1,17 @@
<?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.work.CancelCheckMapper">
<select id="query" resultType="com.czlis.common.core.domain.entity.lis.LabReqmain">
select * from lab_reqmain where
<![CDATA[sqsj >= #{st} and sqsj <= #{et}]]>
<if test="brdh != null and brdh != ''">and brdh = #{brdh}</if>
<if test="brxm != null and brxm != ''">and brxm like '%'+#{brxm}+'%' </if>
<if test="sqh != null and sqh != ''">and sqh = #{sqh}</if>
<if test="ksdh != null and ksdh != ''">and ksdh = #{ksdh}</if>
<if test="brly != null and brly != ''">and brly = #{brly}</if>
<if test="powerman != null and powerman != ''">and powerman = #{powerman}</if>
<if test="zt != null and zt != ''">and zt = #{zt}</if>
</select>
</mapper>