收费项目报告项目对照

This commit is contained in:
jiangs 2025-12-23 17:43:35 +08:00
parent 0291351702
commit c3ac3882d8
9 changed files with 118 additions and 15 deletions

View File

@ -18,4 +18,6 @@ public class XmReqitemVsReportitem {
private String tdh; private String tdh;
private String mrz; private String mrz;
private String def; private String def;
private String xmmc;
private String sl;
} }

View File

@ -0,0 +1,29 @@
package com.czlis.liswork.controller.dict;
import com.czlis.common.core.domain.Result;
import com.czlis.common.core.domain.entity.lis.XmInfo;
import com.czlis.liswork.service.XmInfoService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
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;
/**
* 老的xm_info数据查询
*/
@Api(tags = "老的xm_info数据查询")
@RestController
@RequestMapping("/oldxminfo")
public class XmInfoController {
@Autowired
private XmInfoService xmInfoService;
@ApiOperation("查询数据")
@GetMapping("/query")
public Result query(XmInfo xmInfo) {
return xmInfoService.query(xmInfo);
}
}

View File

@ -11,10 +11,7 @@ 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 org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.DeleteMapping; import org.springframework.web.bind.annotation.*;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import java.util.List; import java.util.List;
@ -30,7 +27,13 @@ public class XmReqitemVsReportitemController extends BaseController {
private XmReqitemVsReportitemService xmReqitemVsReportitemService; private XmReqitemVsReportitemService xmReqitemVsReportitemService;
@ApiOperation("查询收费项目报告项目对照") @ApiOperation("查询收费项目报告项目对照")
@PostMapping("/query") @GetMapping("/queryList")
public Result queryList(XmReqitemVsReportitem xmReqitemVsReportitem){
return xmReqitemVsReportitemService.queryList(xmReqitemVsReportitem);
}
@ApiOperation("查询收费项目报告项目对照")
@GetMapping("/query")
public TableDataInfo query(XmReqitemVsReportitem xmReqitemVsReportitem){ public TableDataInfo query(XmReqitemVsReportitem xmReqitemVsReportitem){
startPage(); startPage();
List<XmReqitemVsReportitem> xmReqitemVsReportitemList = xmReqitemVsReportitemService.query(xmReqitemVsReportitem); List<XmReqitemVsReportitem> xmReqitemVsReportitemList = xmReqitemVsReportitemService.query(xmReqitemVsReportitem);

View File

@ -4,6 +4,8 @@ import com.czlis.common.core.domain.entity.lis.XmReqitemVsReportitem;
import org.apache.ibatis.annotations.Param; import org.apache.ibatis.annotations.Param;
import java.util.List; import java.util.List;
import java.util.Map;
import java.util.Objects;
public interface XmReqitemVsReportitemMapper { public interface XmReqitemVsReportitemMapper {
List<XmReqitemVsReportitem> query(XmReqitemVsReportitem xmReqitemVsReportitem); List<XmReqitemVsReportitem> query(XmReqitemVsReportitem xmReqitemVsReportitem);
@ -11,4 +13,5 @@ public interface XmReqitemVsReportitemMapper {
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("tdh") String tdh);
void update(XmReqitemVsReportitem xmReqitemVsReportitem); void update(XmReqitemVsReportitem xmReqitemVsReportitem);
List<Map<String, Object>> queryList(XmReqitemVsReportitem xmReqitemVsReportitem);
} }

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.XmInfo;
public interface XmInfoService {
Result query(XmInfo xmInfo);
}

View File

@ -10,4 +10,6 @@ public interface XmReqitemVsReportitemService {
Result add(XmReqitemVsReportitem xmReqitemVsReportitem); Result add(XmReqitemVsReportitem xmReqitemVsReportitem);
Result delete(String sqxmdh, String yq, String xmdh, String tdh); Result delete(String sqxmdh, String yq, String xmdh, String tdh);
Result update(XmReqitemVsReportitem xmReqitemVsReportitem); Result update(XmReqitemVsReportitem xmReqitemVsReportitem);
Result queryList(XmReqitemVsReportitem xmReqitemVsReportitem);
} }

View File

@ -0,0 +1,27 @@
package com.czlis.liswork.service.impl;
import com.czlis.common.core.domain.Result;
import com.czlis.common.core.domain.entity.lis.XmInfo;
import com.czlis.interfaceCommon.mapper.XmInfoMapper;
import com.czlis.liswork.service.XmInfoService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.List;
@Service
@Slf4j
public class XmInfoServiceImpl implements XmInfoService {
@Autowired
XmInfoMapper xmInfoMapper;
@Override
public Result query(XmInfo xmInfo) {
if(xmInfo == null) return new Result("-1","入参不能为空");
if(xmInfo.getYq() == null || xmInfo.getYq().equals("")) return new Result("-1","入参yq不能为空!");
List<XmInfo> xmInfoList = xmInfoMapper.getXmInfoList(xmInfo.getYq());
return new Result("0","获取数据成功!",xmInfoList);
}
}

View File

@ -10,6 +10,9 @@ import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional; import org.springframework.transaction.annotation.Transactional;
import java.util.List; import java.util.List;
import java.util.Map;
import java.util.Objects;
import java.util.stream.Collectors;
@Service @Service
@Slf4j @Slf4j
@ -26,7 +29,12 @@ public class XmReqitemVsReportitemImpl implements XmReqitemVsReportitemService {
@Transactional(rollbackFor = Exception.class) @Transactional(rollbackFor = Exception.class)
@Override @Override
public Result add(XmReqitemVsReportitem xmReqitemVsReportitem) { public Result add(XmReqitemVsReportitem xmReqitemVsReportitem) {
xmReqitemVsReportitemMapper.add(xmReqitemVsReportitem); List<XmReqitemVsReportitem> xmReqitemVsReportitemList = xmReqitemVsReportitemMapper.query(xmReqitemVsReportitem);
if(xmReqitemVsReportitemList.size() > 0){
xmReqitemVsReportitemMapper.update(xmReqitemVsReportitem);
}else {
xmReqitemVsReportitemMapper.add(xmReqitemVsReportitem);
}
return new Result("0","添加项目成功!"); return new Result("0","添加项目成功!");
} }
@ -43,4 +51,19 @@ public class XmReqitemVsReportitemImpl implements XmReqitemVsReportitemService {
xmReqitemVsReportitemMapper.update(xmReqitemVsReportitem); xmReqitemVsReportitemMapper.update(xmReqitemVsReportitem);
return new Result("0","修改项目成功!"); return new Result("0","修改项目成功!");
} }
@Override
public Result queryList(XmReqitemVsReportitem xmReqitemVsReportitem) {
log.info("xmReqitemVsReportitem:{}",xmReqitemVsReportitem);
List<Map<String, Object>> xmReqitemVsReportitemList = xmReqitemVsReportitemMapper.queryList(xmReqitemVsReportitem);
if(xmReqitemVsReportitem.getSl() != null ){
//过滤数据,只看仪器对照收费项目
if(xmReqitemVsReportitem.getSl().equals("1")){
List<Map<String, Object>> collect = xmReqitemVsReportitemList.stream().filter(item -> item.get("sl").toString().equals("1")).collect(Collectors.toList());
return new Result("0","获取数据成功!",collect);
}
}
return new Result("0","获取数据成功!",xmReqitemVsReportitemList);
}
} }

View File

@ -4,16 +4,17 @@
<mapper namespace="com.czlis.liswork.mapper.dict.XmReqitemVsReportitemMapper"> <mapper namespace="com.czlis.liswork.mapper.dict.XmReqitemVsReportitemMapper">
<select id="query" resultType="com.czlis.common.core.domain.entity.lis.XmReqitemVsReportitem"> <select id="query" resultType="com.czlis.common.core.domain.entity.lis.XmReqitemVsReportitem">
select * from xm_reqitem_vs_reportitem select a.*,b.xmmc from xm_reqitem_vs_reportitem a, xm_info b
<where> <where>
<if test="sqxmdh != null and sqxmdh != ''">and sqxmdh = #{sqxmdh}</if> a.yq = b.yq and a.xmdh = b.xmdh
<if test="sqxmmc != null and sqxmmc != ''"> and sqxmmc = #{sqxmmc}</if> <if test="sqxmdh != null and sqxmdh != ''">and a.sqxmdh = #{sqxmdh}</if>
<if test="yq != null and yq != ''">and yq = #{yq}</if> <if test="sqxmmc != null and sqxmmc != ''"> and a.sqxmmc like '%'+#{sqxmmc}+'%' </if>
<if test="xmdh != null and xmdh != ''"> and xmdh = #{xmdh}</if> <if test="yq != null and yq != ''">and a.yq = #{yq}</if>
<if test="seq != null"> and seq = #{seq}</if> <if test="xmdh != null and xmdh != ''"> and a.xmdh = #{xmdh}</if>
<if test="tdh != null and tdh != ''"> and tdh = #{tdh}</if> <if test="seq != null"> and a.seq = #{seq}</if>
<if test="mrz != null and mrz != ''"> and mrz = #{mrz}</if> <if test="tdh != null and tdh != ''"> and a.tdh = #{tdh}</if>
<if test="def != null and def != ''"> and def = #{def}</if> <if test="mrz != null and mrz != ''"> and a.mrz = #{mrz}</if>
<if test="def != null and def != ''"> and a.def = #{def}</if>
</where> </where>
</select> </select>
@ -57,5 +58,10 @@
<if test="tdh != null and tdh != ''">and tdh = #{tdh}</if> <if test="tdh != null and tdh != ''">and tdh = #{tdh}</if>
</delete> </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} )
</select>
</mapper> </mapper>