收费项目报告项目对照,模版界面

This commit is contained in:
jiangs 2025-12-24 17:16:10 +08:00
parent c3ac3882d8
commit e370335a79
16 changed files with 235 additions and 29 deletions

View File

@ -9,7 +9,7 @@ import java.util.List;
public interface LabInputmdlMapper {
List<LabInputmdl> query(LabInputmdl labInputmdl);
List<LabInputmdlDetail> queryDetail(LabInputmdl labInputmdl);
List<LabInputmdlDetail> queryDetail(LabInputmdlDetail labInputmdlDetail);
void add(LabInputmdl labInputmdl);

View File

@ -0,0 +1,9 @@
package com.czlis.interfaceCommon.mapper;
import com.czlis.common.core.domain.entity.lis.LabPatInfo;
public interface LabPatInfoMapper {
LabPatInfo selectLabPatInfoOne(LabPatInfo labPatInfo);
void insert(LabPatInfo labPatInfo);
void update(LabPatInfo labPatInfo);
}

View File

@ -12,11 +12,12 @@
</select>
<select id="queryDetail" resultType="com.czlis.common.core.domain.entity.lis.LabInputmdlDetail">
select * from lab_inputmdldetail
select a.*,b.xmmc from lab_inputmdldetail a,xm_info b
<where>
<if test="yq != null and yq !=''"> and yq = #{yq}</if>
<if test="mbmc != null and mbmc !=''"> and mbmc = #{mbmc}</if>
<if test="xh != null "> and xh = #{xh}</if>
a.yq = b.yq and a.xmdh = b.xmdh
<if test="yq != null and yq !=''"> and a.yq = #{yq}</if>
<if test="mbmc != null and mbmc !=''"> and a.mbmc = #{mbmc}</if>
<if test="xh != null "> and a.xh = #{xh}</if>
</where>
</select>

View File

@ -0,0 +1,32 @@
<?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.LabPatInfoMapper">
<select id="selectLabPatInfoOne" resultType="com.czlis.common.core.domain.entity.lis.LabPatInfo">
select * from lab_patinfo where jyrq = #{jyrq} and yq = #{yq} and ybh = #{ybh} and xxlb = #{xxlb}
</select>
<insert id="insert">
insert into lab_patinfo(
<if test="val1 != null and val1 != ''">val1,</if>
<if test="val2 != null and val2 != ''">val2,</if>
<if test="val3 != null and val3 != ''">val3,</if>
<if test="textinfo != null and textinfo != ''">textinfo,</if>
jyrq, yq, ybh, xxlb) values(
<if test="val1 != null and val1 != ''">#{val1},</if>
<if test="val2 != null and val2 != ''">#{val2},</if>
<if test="val3 != null and val3 != ''">#{val3},</if>
<if test="textinfo != null and textinfo != ''">#{textinfo},</if>
#{jyrq},#{yq},#{ybh},#{xxlb}
)
</insert>
<update id="update">
update lab_patinfo set
<if test="val1 != null and val1 != ''">val1 = #{val1},</if>
<if test="val2 != null and val2 != ''">val2 = #{val2},</if>
<if test="val3 != null and val3 != ''">val3 = #{val3},</if>
<if test="textinfo != null and textinfo != ''">textinfo = #{textinfo},</if>
jyrq = #{jyrq}, yq = #{yq} , ybh = #{ybh}
where jyrq = #{jyrq} and yq = #{yq} and ybh = #{ybh} and xxlb = #{xxlb}
</update>
</mapper>

View File

@ -10,6 +10,7 @@ import com.czlis.interfaceCommon.constants.SysLogConstants;
import com.czlis.liswork.service.XmReqitemVsReportitemService;
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.*;
@ -21,6 +22,7 @@ import java.util.List;
@Api(tags = "收费项目报告项目对照")
@RestController
@RequestMapping("/vsReportitem")
@Slf4j
public class XmReqitemVsReportitemController extends BaseController {
@Autowired
@ -43,21 +45,28 @@ public class XmReqitemVsReportitemController extends BaseController {
@ApiOperation("新增收费项目报告项目对照")
@PostMapping("/add")
@Log(title = SysLogConstants.XMREQITEMVSREPORTITEM_LOG,businessType = BusinessType.INSERT)
public Result add(XmReqitemVsReportitem xmReqitemVsReportitem){
return xmReqitemVsReportitemService.add(xmReqitemVsReportitem);
public Result add(@RequestBody List<XmReqitemVsReportitem> xmReqitemVsReportitemList){
return xmReqitemVsReportitemService.add(xmReqitemVsReportitemList);
}
@ApiOperation("删除收费项目报告项目对照")
@DeleteMapping("/del")
@Log(title = SysLogConstants.XMREQITEMVSREPORTITEM_LOG ,businessType = BusinessType.DELETE)
public Result delete(String sqxmdh,String yq,String xmdh,String tdh){
return xmReqitemVsReportitemService.delete(sqxmdh,yq,xmdh,tdh);
public Result delete(@RequestParam String sqxmdh,@RequestParam String yq,@RequestParam String xmdh,@RequestParam String seq){
return xmReqitemVsReportitemService.delete(sqxmdh,yq,xmdh,seq);
}
@ApiOperation("修改收费项目报告项目对照")
@PostMapping("/update")
@Log(title = SysLogConstants.XMREQITEMVSREPORTITEM_LOG ,businessType = BusinessType.UPDATE)
public Result update(XmReqitemVsReportitem xmReqitemVsReportitem){
public Result update(@RequestBody XmReqitemVsReportitem xmReqitemVsReportitem){
return xmReqitemVsReportitemService.update(xmReqitemVsReportitem);
}
@Log(title = SysLogConstants.XMREQITEMVSREPORTITEM_LOG ,businessType = BusinessType.UPDATE)
@ApiOperation("搜索项目")
@GetMapping("/search")
public Result searchXmdh(String yq){
return xmReqitemVsReportitemService.searchXmdh(yq);
}
}

View File

@ -0,0 +1,28 @@
package com.czlis.liswork.controller.xtwh;
import com.czlis.common.core.domain.Result;
import com.czlis.common.core.domain.entity.lis.LabCheckrules;
import com.czlis.liswork.service.LabCheckrulesService;
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;
@Api(tags = "高级审核条件")
@RestController
@RequestMapping("/labCheckrules")
@Slf4j
public class LabCheckrulesController {
@Autowired
private LabCheckrulesService labCheckrulesService;
@ApiOperation("获取报告列表")
@GetMapping("/queryList")
public Result queryList(LabCheckrules labCheckrules) {
return labCheckrulesService.queryList(labCheckrules);
}
}

View File

@ -34,8 +34,8 @@ public class LabInputmdlController {
@ApiOperation("查询明细数据")
@GetMapping("/queryDetail")
public Result queryDetail(LabInputmdl labInputmdl){
return labInputmdlService.queryDetail(labInputmdl);
public Result queryDetail(LabInputmdlDetail labInputmdlDetail){
return labInputmdlService.queryDetail(labInputmdlDetail);
}
@Log(title = SysLogConstants.LABINPUTMDL_LOG,businessType = BusinessType.INSERT)

View File

@ -10,8 +10,11 @@ import java.util.Objects;
public interface XmReqitemVsReportitemMapper {
List<XmReqitemVsReportitem> query(XmReqitemVsReportitem xmReqitemVsReportitem);
void add(XmReqitemVsReportitem xmReqitemVsReportitem);
void delete(@Param("sqxmdh") String sqxmdh,@Param("yq") String yq,@Param("xmdh") String xmdh,@Param("tdh") String tdh);
void delete(@Param("sqxmdh") String sqxmdh,@Param("yq") String yq,@Param("xmdh") String xmdh,@Param("seq") String seq);
void update(XmReqitemVsReportitem xmReqitemVsReportitem);
XmReqitemVsReportitem queryOne(XmReqitemVsReportitem xmReqitemVsReportitem);
List<Map<String, Object>> queryList(XmReqitemVsReportitem xmReqitemVsReportitem);
String getSqxmdhOne(String yq);
void searchXmdh(String yq);
}

View File

@ -0,0 +1,8 @@
package com.czlis.liswork.service;
import com.czlis.common.core.domain.Result;
import com.czlis.common.core.domain.entity.lis.LabCheckrules;
public interface LabCheckrulesService {
Result queryList(LabCheckrules labCheckrules);
}

View File

@ -10,7 +10,7 @@ import java.util.List;
public interface LabInputmdlService {
Result query(LabInputmdl labInputmdl);
Result queryDetail(LabInputmdl labInputmdl);
Result queryDetail(LabInputmdlDetail labInputmdlDetail);
Result add(LabInputmdlDTO labInputmdlDTO);

View File

@ -7,9 +7,11 @@ import java.util.List;
public interface XmReqitemVsReportitemService {
List<XmReqitemVsReportitem> query(XmReqitemVsReportitem xmReqitemVsReportitem);
Result add(XmReqitemVsReportitem xmReqitemVsReportitem);
Result delete(String sqxmdh, String yq, String xmdh, String tdh);
Result add(List<XmReqitemVsReportitem> xmReqitemVsReportitem);
Result delete(String sqxmdh, String yq, String xmdh, String seq);
Result update(XmReqitemVsReportitem xmReqitemVsReportitem);
Result queryList(XmReqitemVsReportitem xmReqitemVsReportitem);
Result searchXmdh(String yq);
}

View File

@ -28,20 +28,24 @@ public class XmReqitemVsReportitemImpl implements XmReqitemVsReportitemService {
@Transactional(rollbackFor = Exception.class)
@Override
public Result add(XmReqitemVsReportitem xmReqitemVsReportitem) {
List<XmReqitemVsReportitem> xmReqitemVsReportitemList = xmReqitemVsReportitemMapper.query(xmReqitemVsReportitem);
if(xmReqitemVsReportitemList.size() > 0){
public Result add(List<XmReqitemVsReportitem> xmReqitemVsReportitemList) {
for (XmReqitemVsReportitem xmReqitemVsReportitem : xmReqitemVsReportitemList) {
if(xmReqitemVsReportitem.getSeq() == null || xmReqitemVsReportitem.getSeq().equals("")) return new Result("-1","序号不能为空!");
XmReqitemVsReportitem xmReqitemVsReportitem1 = xmReqitemVsReportitemMapper.queryOne(xmReqitemVsReportitem);
if(xmReqitemVsReportitem1 != null){
xmReqitemVsReportitemMapper.update(xmReqitemVsReportitem);
}else {
xmReqitemVsReportitemMapper.add(xmReqitemVsReportitem);
}
}
return new Result("0","添加项目成功!");
}
@Transactional(rollbackFor = Exception.class)
@Override
public Result delete(String sqxmdh, String yq, String xmdh, String tdh) {
xmReqitemVsReportitemMapper.delete(sqxmdh,yq,xmdh,tdh);
public Result delete(String sqxmdh, String yq, String xmdh, String seq) {
xmReqitemVsReportitemMapper.delete(sqxmdh,yq,xmdh,seq);
return new Result("0","删除项目成功!");
}
@ -54,7 +58,6 @@ public class XmReqitemVsReportitemImpl implements XmReqitemVsReportitemService {
@Override
public Result queryList(XmReqitemVsReportitem xmReqitemVsReportitem) {
log.info("xmReqitemVsReportitem:{}",xmReqitemVsReportitem);
List<Map<String, Object>> xmReqitemVsReportitemList = xmReqitemVsReportitemMapper.queryList(xmReqitemVsReportitem);
if(xmReqitemVsReportitem.getSl() != null ){
//过滤数据,只看仪器对照收费项目
@ -66,4 +69,12 @@ public class XmReqitemVsReportitemImpl implements XmReqitemVsReportitemService {
return new Result("0","获取数据成功!",xmReqitemVsReportitemList);
}
@Override
public Result searchXmdh(String yq) {
String sqxmdhOne = xmReqitemVsReportitemMapper.getSqxmdhOne(yq);
if(sqxmdhOne != null && !sqxmdhOne.equals("")) return new Result("-1","有重复对应收费"+sqxmdhOne);
xmReqitemVsReportitemMapper.searchXmdh(yq);
return new Result("0","搜索项目成功!");
}
}

View File

@ -0,0 +1,22 @@
package com.czlis.liswork.service.impl.xtwh;
import com.czlis.common.core.domain.Result;
import com.czlis.common.core.domain.entity.lis.LabCheckrules;
import com.czlis.interfaceCommon.mapper.LabCheckrulesMapper;
import com.czlis.liswork.service.LabCheckrulesService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
@Service
@Slf4j
public class LabCheckrulesServiceImpl implements LabCheckrulesService {
@Autowired
private LabCheckrulesMapper labCheckrulesMapper;
@Override
public Result queryList(LabCheckrules labCheckrules) {
return null;
}
}

View File

@ -26,8 +26,8 @@ public class LabInputmdlServiceImpl implements LabInputmdlService {
}
@Override
public Result queryDetail(LabInputmdl labInputmdl) {
List<LabInputmdlDetail> labInputmdlDetailList = labInputmdlMapper.queryDetail(labInputmdl);
public Result queryDetail(LabInputmdlDetail labInputmdlDetail) {
List<LabInputmdlDetail> labInputmdlDetailList = labInputmdlMapper.queryDetail(labInputmdlDetail);
return new Result("0","查询成功!",labInputmdlDetailList);
}

View File

@ -55,13 +55,29 @@
<delete id="delete">
delete from xm_reqitem_vs_reportitem where sqxmdh = #{sqxmdh} and yq = #{yq} and xmdh = #{xmdh}
<if test="tdh != null and tdh != ''">and tdh = #{tdh}</if>
<if test="seq != null and seq != ''">and seq = #{seq}</if>
</delete>
<select id="queryList">
SELECT DISTINCT xm_reqitem_vs_reportitem.sqxmdh , xm_reqitem_vs_reportitem.sqxmmc , '' as zjf, (SELECT count(*) FROM xm_feeinstr WHERE xm_feeinstr.yq = xm_reqitem_vs_reportitem.yq and xm_feeinstr.sfxmdh=xm_reqitem_vs_reportitem.sqxmdh) as sl
FROM xm_reqitem_vs_reportitem WHERE ( xm_reqitem_vs_reportitem.yq = #{yq} )
<if test="sqxmmc != null and sqxmmc != ''"> and sqxmmc like '%'+#{sqxmmc}+'%'</if>
</select>
<select id="queryOne" resultType="com.czlis.common.core.domain.entity.lis.XmReqitemVsReportitem">
select * from xm_reqitem_vs_reportitem where sqxmdh = #{sqxmdh} and sqxmmc = #{sqxmmc} and yq = #{yq} and xmdh = #{xmdh}
</select>
<select id="getSqxmdhOne" resultType="string">
select top 1 sqxmdh
from (select sqxmdh,xmdh,COUNT(1) sl from xm_reqitem_vs_reportitem where yq=#{yq} group by sqxmdh,xmdh) x where sl>1
</select>
<update id="searchXmdh">
<![CDATA[
update a set a.sqxmmc=b.sfxmmc
from xm_reqitem_vs_reportitem a,xm_fee b where a.sqxmdh=b.sfxmdh and a.yq=#{yq} and a.sqxmmc<>b.sfxmmc ]]>
</update>
</mapper>

View File

@ -6,9 +6,11 @@ import cn.hutool.core.util.StrUtil;
import com.czlis.common.config.RuoYiConfig;
import com.czlis.common.core.domain.Result;
import com.czlis.common.core.domain.entity.lis.LabPat;
import com.czlis.common.core.domain.entity.lis.LabPatInfo;
import com.czlis.common.core.domain.entity.lis.LabReqreportPdffile;
import com.czlis.common.utils.file.FileUtils;
import com.czlis.common.utils.uuid.UUID;
import com.czlis.interfaceCommon.mapper.LabPatInfoMapper;
import com.czlis.interfaceCommon.utils.CommonUtil;
import com.czlis.interfaceCommon.utils.LisUtil;
import com.czlis.interfaceCommon.utils.PdfPaperConverter;
@ -39,6 +41,8 @@ public class ZybgcxServcieImpl implements ZybgcxService {
private CommonUtil commonUtil;
@Autowired
ReportUtil reportUtil;
@Autowired
private LabPatInfoMapper labPatInfoMapper;
/**
* 获取报告信息
@ -200,6 +204,12 @@ public class ZybgcxServcieImpl implements ZybgcxService {
return new Result("-1",e.getMessage());
}
//修改打印标志
for (String string : bgdh) {
updatePrintStatus(string);
}
return new Result("0","打印成功!",encode);
}
@ -267,5 +277,60 @@ public class ZybgcxServcieImpl implements ZybgcxService {
}
public Result updatePrintStatus(String printId){
log.info("打印状态修改入参:"+printId);
String[] strings = StrUtil.splitToArray(printId, "_");
Date jyrq = DateUtil.parse(strings[0],"yyyyMMdd");
String yq = strings[1];
String ybh = strings[2];
LabPat labPatOne = commonUtil.getLabPatOne(jyrq, yq, ybh);
String jgbz = labPatOne.getJgbz();
if(!jgbz.equals("2")) return new Result("-1","报告还没有审核,不允许打印!");
LabPat labPat = new LabPat();
labPat.setDybz("1");
labPat.setJyrq(jyrq);
labPat.setYq(yq);
labPat.setYbh(ybh);
//labPat.setDysj(commonUtil.currentDateTime());
try{
LabPatInfo lab_patinfoOne = getLab_patinfoOne(jyrq, yq, ybh);
if(lab_patinfoOne == null){
LabPatInfo lab_patinfo = new LabPatInfo();
lab_patinfo.setJyrq(jyrq);
lab_patinfo.setYq(yq);
lab_patinfo.setYbh(ybh);
lab_patinfo.setXxlb("AUTOP_NEW");
lab_patinfo.setVal1("最后一次的打印时间:"+DateUtil.format(commonUtil.getCurrentTime(),"yyyy-MM-dd HH:mm:ss"));
lab_patinfo.setVal2("1");
labPatInfoMapper.insert(lab_patinfo);
}else{
LabPatInfo labPatinfo = new LabPatInfo();
labPatinfo.setVal1("最后一次的打印时间:"+DateUtil.format(commonUtil.getCurrentTime(),"yyyy-MM-dd HH:mm:ss"));
labPatinfo.setVal2("1");
labPatinfo.setJyrq(jyrq);
labPatinfo.setYq(yq);
labPatinfo.setYbh(ybh);
labPatinfo.setXxlb("AUTOP_NEW");
labPatInfoMapper.update(labPatinfo);
}
commonUtil.updateLabPat(labPat);
}catch (Exception e){
log.info("id:"+printId+",修改打印状态失败:",e);
return new Result("-1","修改打印状态失败:"+e.getMessage());
}
log.info("printID:"+printId+"修改打印状态成功!");
return new Result("0","修改打印状态成功!");
}
public LabPatInfo getLab_patinfoOne(Date jyrq,String yq,String ybh){
LabPatInfo labPatInfo = new LabPatInfo();
labPatInfo.setJyrq(jyrq);
labPatInfo.setYq(yq);
labPatInfo.setYbh(ybh);
labPatInfo.setXxlb("AUTOP_NEW");
return labPatInfoMapper.selectLabPatInfoOne(labPatInfo);
}
}