收费项目报告项目对照,模版界面
This commit is contained in:
parent
c3ac3882d8
commit
e370335a79
@ -9,7 +9,7 @@ import java.util.List;
|
|||||||
public interface LabInputmdlMapper {
|
public interface LabInputmdlMapper {
|
||||||
List<LabInputmdl> query(LabInputmdl labInputmdl);
|
List<LabInputmdl> query(LabInputmdl labInputmdl);
|
||||||
|
|
||||||
List<LabInputmdlDetail> queryDetail(LabInputmdl labInputmdl);
|
List<LabInputmdlDetail> queryDetail(LabInputmdlDetail labInputmdlDetail);
|
||||||
|
|
||||||
void add(LabInputmdl labInputmdl);
|
void add(LabInputmdl labInputmdl);
|
||||||
|
|
||||||
|
|||||||
@ -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);
|
||||||
|
}
|
||||||
@ -12,11 +12,12 @@
|
|||||||
</select>
|
</select>
|
||||||
|
|
||||||
<select id="queryDetail" resultType="com.czlis.common.core.domain.entity.lis.LabInputmdlDetail">
|
<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>
|
<where>
|
||||||
<if test="yq != null and yq !=''"> and yq = #{yq}</if>
|
a.yq = b.yq and a.xmdh = b.xmdh
|
||||||
<if test="mbmc != null and mbmc !=''"> and mbmc = #{mbmc}</if>
|
<if test="yq != null and yq !=''"> and a.yq = #{yq}</if>
|
||||||
<if test="xh != null "> and xh = #{xh}</if>
|
<if test="mbmc != null and mbmc !=''"> and a.mbmc = #{mbmc}</if>
|
||||||
|
<if test="xh != null "> and a.xh = #{xh}</if>
|
||||||
</where>
|
</where>
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
|||||||
@ -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>
|
||||||
@ -10,6 +10,7 @@ import com.czlis.interfaceCommon.constants.SysLogConstants;
|
|||||||
import com.czlis.liswork.service.XmReqitemVsReportitemService;
|
import com.czlis.liswork.service.XmReqitemVsReportitemService;
|
||||||
import io.swagger.annotations.Api;
|
import io.swagger.annotations.Api;
|
||||||
import io.swagger.annotations.ApiOperation;
|
import io.swagger.annotations.ApiOperation;
|
||||||
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.web.bind.annotation.*;
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
@ -21,6 +22,7 @@ import java.util.List;
|
|||||||
@Api(tags = "收费项目报告项目对照")
|
@Api(tags = "收费项目报告项目对照")
|
||||||
@RestController
|
@RestController
|
||||||
@RequestMapping("/vsReportitem")
|
@RequestMapping("/vsReportitem")
|
||||||
|
@Slf4j
|
||||||
public class XmReqitemVsReportitemController extends BaseController {
|
public class XmReqitemVsReportitemController extends BaseController {
|
||||||
|
|
||||||
@Autowired
|
@Autowired
|
||||||
@ -43,21 +45,28 @@ public class XmReqitemVsReportitemController extends BaseController {
|
|||||||
@ApiOperation("新增收费项目报告项目对照")
|
@ApiOperation("新增收费项目报告项目对照")
|
||||||
@PostMapping("/add")
|
@PostMapping("/add")
|
||||||
@Log(title = SysLogConstants.XMREQITEMVSREPORTITEM_LOG,businessType = BusinessType.INSERT)
|
@Log(title = SysLogConstants.XMREQITEMVSREPORTITEM_LOG,businessType = BusinessType.INSERT)
|
||||||
public Result add(XmReqitemVsReportitem xmReqitemVsReportitem){
|
public Result add(@RequestBody List<XmReqitemVsReportitem> xmReqitemVsReportitemList){
|
||||||
return xmReqitemVsReportitemService.add(xmReqitemVsReportitem);
|
return xmReqitemVsReportitemService.add(xmReqitemVsReportitemList);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ApiOperation("删除收费项目报告项目对照")
|
@ApiOperation("删除收费项目报告项目对照")
|
||||||
@DeleteMapping("/del")
|
@DeleteMapping("/del")
|
||||||
@Log(title = SysLogConstants.XMREQITEMVSREPORTITEM_LOG ,businessType = BusinessType.DELETE)
|
@Log(title = SysLogConstants.XMREQITEMVSREPORTITEM_LOG ,businessType = BusinessType.DELETE)
|
||||||
public Result delete(String sqxmdh,String yq,String xmdh,String tdh){
|
public Result delete(@RequestParam String sqxmdh,@RequestParam String yq,@RequestParam String xmdh,@RequestParam String seq){
|
||||||
return xmReqitemVsReportitemService.delete(sqxmdh,yq,xmdh,tdh);
|
return xmReqitemVsReportitemService.delete(sqxmdh,yq,xmdh,seq);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ApiOperation("修改收费项目报告项目对照")
|
@ApiOperation("修改收费项目报告项目对照")
|
||||||
@PostMapping("/update")
|
@PostMapping("/update")
|
||||||
@Log(title = SysLogConstants.XMREQITEMVSREPORTITEM_LOG ,businessType = BusinessType.UPDATE)
|
@Log(title = SysLogConstants.XMREQITEMVSREPORTITEM_LOG ,businessType = BusinessType.UPDATE)
|
||||||
public Result update(XmReqitemVsReportitem xmReqitemVsReportitem){
|
public Result update(@RequestBody XmReqitemVsReportitem xmReqitemVsReportitem){
|
||||||
return xmReqitemVsReportitemService.update(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);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -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);
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -34,8 +34,8 @@ public class LabInputmdlController {
|
|||||||
|
|
||||||
@ApiOperation("查询明细数据")
|
@ApiOperation("查询明细数据")
|
||||||
@GetMapping("/queryDetail")
|
@GetMapping("/queryDetail")
|
||||||
public Result queryDetail(LabInputmdl labInputmdl){
|
public Result queryDetail(LabInputmdlDetail labInputmdlDetail){
|
||||||
return labInputmdlService.queryDetail(labInputmdl);
|
return labInputmdlService.queryDetail(labInputmdlDetail);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Log(title = SysLogConstants.LABINPUTMDL_LOG,businessType = BusinessType.INSERT)
|
@Log(title = SysLogConstants.LABINPUTMDL_LOG,businessType = BusinessType.INSERT)
|
||||||
|
|||||||
@ -10,8 +10,11 @@ import java.util.Objects;
|
|||||||
public interface XmReqitemVsReportitemMapper {
|
public interface XmReqitemVsReportitemMapper {
|
||||||
List<XmReqitemVsReportitem> query(XmReqitemVsReportitem xmReqitemVsReportitem);
|
List<XmReqitemVsReportitem> query(XmReqitemVsReportitem xmReqitemVsReportitem);
|
||||||
void add(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);
|
void update(XmReqitemVsReportitem xmReqitemVsReportitem);
|
||||||
|
XmReqitemVsReportitem queryOne(XmReqitemVsReportitem xmReqitemVsReportitem);
|
||||||
List<Map<String, Object>> queryList(XmReqitemVsReportitem xmReqitemVsReportitem);
|
List<Map<String, Object>> queryList(XmReqitemVsReportitem xmReqitemVsReportitem);
|
||||||
|
String getSqxmdhOne(String yq);
|
||||||
|
void searchXmdh(String yq);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -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);
|
||||||
|
}
|
||||||
@ -10,7 +10,7 @@ import java.util.List;
|
|||||||
public interface LabInputmdlService {
|
public interface LabInputmdlService {
|
||||||
Result query(LabInputmdl labInputmdl);
|
Result query(LabInputmdl labInputmdl);
|
||||||
|
|
||||||
Result queryDetail(LabInputmdl labInputmdl);
|
Result queryDetail(LabInputmdlDetail labInputmdlDetail);
|
||||||
|
|
||||||
Result add(LabInputmdlDTO labInputmdlDTO);
|
Result add(LabInputmdlDTO labInputmdlDTO);
|
||||||
|
|
||||||
|
|||||||
@ -7,9 +7,11 @@ import java.util.List;
|
|||||||
|
|
||||||
public interface XmReqitemVsReportitemService {
|
public interface XmReqitemVsReportitemService {
|
||||||
List<XmReqitemVsReportitem> query(XmReqitemVsReportitem xmReqitemVsReportitem);
|
List<XmReqitemVsReportitem> query(XmReqitemVsReportitem xmReqitemVsReportitem);
|
||||||
Result add(XmReqitemVsReportitem xmReqitemVsReportitem);
|
Result add(List<XmReqitemVsReportitem> xmReqitemVsReportitem);
|
||||||
Result delete(String sqxmdh, String yq, String xmdh, String tdh);
|
Result delete(String sqxmdh, String yq, String xmdh, String seq);
|
||||||
Result update(XmReqitemVsReportitem xmReqitemVsReportitem);
|
Result update(XmReqitemVsReportitem xmReqitemVsReportitem);
|
||||||
|
|
||||||
Result queryList(XmReqitemVsReportitem xmReqitemVsReportitem);
|
Result queryList(XmReqitemVsReportitem xmReqitemVsReportitem);
|
||||||
|
|
||||||
|
Result searchXmdh(String yq);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -28,20 +28,24 @@ public class XmReqitemVsReportitemImpl implements XmReqitemVsReportitemService {
|
|||||||
|
|
||||||
@Transactional(rollbackFor = Exception.class)
|
@Transactional(rollbackFor = Exception.class)
|
||||||
@Override
|
@Override
|
||||||
public Result add(XmReqitemVsReportitem xmReqitemVsReportitem) {
|
public Result add(List<XmReqitemVsReportitem> xmReqitemVsReportitemList) {
|
||||||
List<XmReqitemVsReportitem> xmReqitemVsReportitemList = xmReqitemVsReportitemMapper.query(xmReqitemVsReportitem);
|
for (XmReqitemVsReportitem xmReqitemVsReportitem : xmReqitemVsReportitemList) {
|
||||||
if(xmReqitemVsReportitemList.size() > 0){
|
if(xmReqitemVsReportitem.getSeq() == null || xmReqitemVsReportitem.getSeq().equals("")) return new Result("-1","序号不能为空!");
|
||||||
|
XmReqitemVsReportitem xmReqitemVsReportitem1 = xmReqitemVsReportitemMapper.queryOne(xmReqitemVsReportitem);
|
||||||
|
if(xmReqitemVsReportitem1 != null){
|
||||||
xmReqitemVsReportitemMapper.update(xmReqitemVsReportitem);
|
xmReqitemVsReportitemMapper.update(xmReqitemVsReportitem);
|
||||||
}else {
|
}else {
|
||||||
xmReqitemVsReportitemMapper.add(xmReqitemVsReportitem);
|
xmReqitemVsReportitemMapper.add(xmReqitemVsReportitem);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return new Result("0","添加项目成功!");
|
return new Result("0","添加项目成功!");
|
||||||
}
|
}
|
||||||
|
|
||||||
@Transactional(rollbackFor = Exception.class)
|
@Transactional(rollbackFor = Exception.class)
|
||||||
@Override
|
@Override
|
||||||
public Result delete(String sqxmdh, String yq, String xmdh, String tdh) {
|
public Result delete(String sqxmdh, String yq, String xmdh, String seq) {
|
||||||
xmReqitemVsReportitemMapper.delete(sqxmdh,yq,xmdh,tdh);
|
xmReqitemVsReportitemMapper.delete(sqxmdh,yq,xmdh,seq);
|
||||||
return new Result("0","删除项目成功!");
|
return new Result("0","删除项目成功!");
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -54,7 +58,6 @@ public class XmReqitemVsReportitemImpl implements XmReqitemVsReportitemService {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Result queryList(XmReqitemVsReportitem xmReqitemVsReportitem) {
|
public Result queryList(XmReqitemVsReportitem xmReqitemVsReportitem) {
|
||||||
log.info("xmReqitemVsReportitem:{}",xmReqitemVsReportitem);
|
|
||||||
List<Map<String, Object>> xmReqitemVsReportitemList = xmReqitemVsReportitemMapper.queryList(xmReqitemVsReportitem);
|
List<Map<String, Object>> xmReqitemVsReportitemList = xmReqitemVsReportitemMapper.queryList(xmReqitemVsReportitem);
|
||||||
if(xmReqitemVsReportitem.getSl() != null ){
|
if(xmReqitemVsReportitem.getSl() != null ){
|
||||||
//过滤数据,只看仪器对照收费项目
|
//过滤数据,只看仪器对照收费项目
|
||||||
@ -66,4 +69,12 @@ public class XmReqitemVsReportitemImpl implements XmReqitemVsReportitemService {
|
|||||||
|
|
||||||
return new Result("0","获取数据成功!",xmReqitemVsReportitemList);
|
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","搜索项目成功!");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -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;
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -26,8 +26,8 @@ public class LabInputmdlServiceImpl implements LabInputmdlService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Result queryDetail(LabInputmdl labInputmdl) {
|
public Result queryDetail(LabInputmdlDetail labInputmdlDetail) {
|
||||||
List<LabInputmdlDetail> labInputmdlDetailList = labInputmdlMapper.queryDetail(labInputmdl);
|
List<LabInputmdlDetail> labInputmdlDetailList = labInputmdlMapper.queryDetail(labInputmdlDetail);
|
||||||
return new Result("0","查询成功!",labInputmdlDetailList);
|
return new Result("0","查询成功!",labInputmdlDetailList);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -55,13 +55,29 @@
|
|||||||
|
|
||||||
<delete id="delete">
|
<delete id="delete">
|
||||||
delete from xm_reqitem_vs_reportitem where sqxmdh = #{sqxmdh} and yq = #{yq} and xmdh = #{xmdh}
|
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>
|
</delete>
|
||||||
|
|
||||||
<select id="queryList">
|
<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
|
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} )
|
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>
|
||||||
|
|
||||||
|
<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>
|
</mapper>
|
||||||
|
|||||||
@ -6,9 +6,11 @@ import cn.hutool.core.util.StrUtil;
|
|||||||
import com.czlis.common.config.RuoYiConfig;
|
import com.czlis.common.config.RuoYiConfig;
|
||||||
import com.czlis.common.core.domain.Result;
|
import com.czlis.common.core.domain.Result;
|
||||||
import com.czlis.common.core.domain.entity.lis.LabPat;
|
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.core.domain.entity.lis.LabReqreportPdffile;
|
||||||
import com.czlis.common.utils.file.FileUtils;
|
import com.czlis.common.utils.file.FileUtils;
|
||||||
import com.czlis.common.utils.uuid.UUID;
|
import com.czlis.common.utils.uuid.UUID;
|
||||||
|
import com.czlis.interfaceCommon.mapper.LabPatInfoMapper;
|
||||||
import com.czlis.interfaceCommon.utils.CommonUtil;
|
import com.czlis.interfaceCommon.utils.CommonUtil;
|
||||||
import com.czlis.interfaceCommon.utils.LisUtil;
|
import com.czlis.interfaceCommon.utils.LisUtil;
|
||||||
import com.czlis.interfaceCommon.utils.PdfPaperConverter;
|
import com.czlis.interfaceCommon.utils.PdfPaperConverter;
|
||||||
@ -39,6 +41,8 @@ public class ZybgcxServcieImpl implements ZybgcxService {
|
|||||||
private CommonUtil commonUtil;
|
private CommonUtil commonUtil;
|
||||||
@Autowired
|
@Autowired
|
||||||
ReportUtil reportUtil;
|
ReportUtil reportUtil;
|
||||||
|
@Autowired
|
||||||
|
private LabPatInfoMapper labPatInfoMapper;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 获取报告信息
|
* 获取报告信息
|
||||||
@ -200,6 +204,12 @@ public class ZybgcxServcieImpl implements ZybgcxService {
|
|||||||
return new Result("-1",e.getMessage());
|
return new Result("-1",e.getMessage());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//修改打印标志
|
||||||
|
for (String string : bgdh) {
|
||||||
|
updatePrintStatus(string);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
return new Result("0","打印成功!",encode);
|
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);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user