Compare commits

..

2 Commits

Author SHA1 Message Date
jiangs
f3c1fa4832 Merge remote-tracking branch 'lis8.0/master' 2025-11-24 16:57:43 +08:00
jiangs
db774cb087 仪器收费项目对照 2025-11-24 16:57:36 +08:00
8 changed files with 98 additions and 13 deletions

View File

@ -12,4 +12,5 @@ public class XmFeeInstr {
private String sfxmdh;
private String mrz;
private Integer xh;
private String sfxmmc;
}

View File

@ -7,6 +7,7 @@ import com.czlis.common.core.page.TableDataInfo;
import com.czlis.common.core.domain.entity.lis.XmFeeInstr;
import com.czlis.common.enums.BusinessType;
import com.czlis.interfaceCommon.constants.SysLogConstants;
import com.czlis.liswork.pojo.DTO.QueryXmDTO;
import com.czlis.liswork.service.XmFeeInstrService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
@ -29,10 +30,8 @@ public class XmFeeInstrController extends BaseController {
@ApiOperation("查询仪器收费项目对照")
@GetMapping("/query")
public TableDataInfo query(String yq,String sfxmdh){
startPage();
List<XmFeeInstr> xmFeeInstrList = xmFeeInstrService.query(yq,sfxmdh);
return getDataTable(xmFeeInstrList);
public Result query(XmFeeInstr xmFeeInstr){
return xmFeeInstrService.query(xmFeeInstr);
}
@Log(title = SysLogConstants.XMFEEINSTR_LOG,businessType = BusinessType.INSERT)
@ -55,4 +54,10 @@ public class XmFeeInstrController extends BaseController {
public Result delete(@NotBlank(message = "yq参数不能为空!") String yq,@NotBlank(message = "sfxmdh参数不能为空!") String sfxmdh){
return xmFeeInstrService.delete(yq,sfxmdh);
}
@ApiOperation("查询仪器收费项目对照")
@GetMapping("/queryXm")
public Result queryXm(QueryXmDTO queryXmDTO){
return xmFeeInstrService.queryXm(queryXmDTO);
}
}

View File

@ -10,6 +10,7 @@ import com.czlis.common.core.domain.entity.lis.LabPat;
import com.czlis.common.core.page.TableDataInfo;
import com.czlis.common.enums.BusinessType;
import com.czlis.interfaceCommon.constants.SysLogConstants;
import com.czlis.interfaceCommon.utils.CommonUtil;
import com.czlis.liswork.service.ComOptService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
@ -28,6 +29,8 @@ public class ComOptController extends BaseController {
@Autowired
private ComOptService comOptService;
@Autowired
CommonUtil commonUtil;
@ApiOperation("查询参数列表")
@GetMapping("/query")
@ -75,4 +78,11 @@ public class ComOptController extends BaseController {
public Result queryTree(){
return comOptService.queryTree();
}
@ApiOperation("获取单个参数的值")
@GetMapping("/queryOne")
public Result getParamOne(String yq,String xxdh){
String value = commonUtil.getComOptValue(yq, xxdh);
return new Result("0","获取成功!",value);
}
}

View File

@ -1,13 +1,19 @@
package com.czlis.liswork.mapper.dict;
import com.czlis.common.core.domain.entity.lis.XmFeeInstr;
import com.czlis.liswork.pojo.DTO.QueryXmDTO;
import org.apache.ibatis.annotations.Param;
import java.util.List;
import java.util.Map;
import java.util.Objects;
public interface XmFeeInstrMapper {
List<XmFeeInstr> query(@Param("yq") String yq,@Param("sfxmdh") String sfxmdh);
List<XmFeeInstr> query(XmFeeInstr xmFeeInstr);
void add(XmFeeInstr xmFeeInstr);
void update(XmFeeInstr xmFeeInstr);
void delete(@Param("yq") String yq,@Param("sfxmdh") String sfxmdh);
List<Map<String, Object>> queryXm(QueryXmDTO queryXmDTO);
List<Map<String,Object>> queryYQData();
}

View File

@ -0,0 +1,17 @@
package com.czlis.liswork.pojo.DTO;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
@Data
@AllArgsConstructor
@NoArgsConstructor
public class QueryXmDTO {
private String sfxmdh;
private String sfxmmc;
private String zjf;
private String yljg;
private String yq;
private String queryValue;
}

View File

@ -2,15 +2,18 @@ package com.czlis.liswork.service;
import com.czlis.common.core.domain.Result;
import com.czlis.common.core.domain.entity.lis.XmFeeInstr;
import com.czlis.liswork.pojo.DTO.QueryXmDTO;
import java.util.List;
public interface XmFeeInstrService {
List<XmFeeInstr> query(String yq, String sfxmdh);
Result query(XmFeeInstr xmFeeInstr);
Result add(XmFeeInstr xmFeeInstr);
Result update(XmFeeInstr xmFeeInstr);
Result delete(String yq, String sfxmdh);
Result queryXm(QueryXmDTO queryXmDTO);
}

View File

@ -1,8 +1,10 @@
package com.czlis.liswork.service.impl;
import com.czlis.common.core.domain.Result;
import com.czlis.interfaceCommon.utils.LisUtil;
import com.czlis.liswork.mapper.dict.XmFeeInstrMapper;
import com.czlis.common.core.domain.entity.lis.XmFeeInstr;
import com.czlis.liswork.pojo.DTO.QueryXmDTO;
import com.czlis.liswork.service.XmFeeInstrService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
@ -10,6 +12,9 @@ import org.springframework.stereotype.Service;
import java.util.List;
import java.util.Map;
import java.util.Objects;
import java.util.stream.Collectors;
@Service
@Slf4j
@ -20,8 +25,9 @@ public class XmFeeInstrServiceImpl implements XmFeeInstrService {
@Override
public List<XmFeeInstr> query(String yq, String sfxmdh) {
return xmFeeInstrMapper.query(yq,sfxmdh);
public Result query(XmFeeInstr xmFeeInstr) {
List<XmFeeInstr> xmFeeInstrList = xmFeeInstrMapper.query(xmFeeInstr);
return new Result("0","查询成功!",xmFeeInstrList);
}
@Override
@ -41,4 +47,22 @@ public class XmFeeInstrServiceImpl implements XmFeeInstrService {
xmFeeInstrMapper.delete(yq,sfxmdh);
return new Result("0","删除项目成功!");
}
@Override
public Result queryXm(QueryXmDTO queryXmDTO) {
List<Map<String, Object>> xmFeeInstrList = xmFeeInstrMapper.queryXm(queryXmDTO);
String yqmcStr = "";
List<Map<String, Object>> queryYQDataList = xmFeeInstrMapper.queryYQData();
for (Map<String, Object> stringObjectsMap : xmFeeInstrList) {
String sfxmdh = String.valueOf(stringObjectsMap.get("sfxmdh"));
List<Map<String, Object>> collect = queryYQDataList.stream().filter(stringObjectMap -> stringObjectMap.get("sfxmdh").equals(sfxmdh)).collect(Collectors.toList());
yqmcStr = "";
for (Map<String, Object> objectsMap : collect) {
String yqmc = String.valueOf(objectsMap.get("yqmc"));
yqmcStr = yqmcStr + ";" + yqmc.trim();
}
stringObjectsMap.put("cp_yq",yqmcStr);
}
return new Result("0","查询项目成功!",xmFeeInstrList);
}
}

View File

@ -4,11 +4,9 @@
<mapper namespace="com.czlis.liswork.mapper.dict.XmFeeInstrMapper">
<select id="query" resultType="com.czlis.common.core.domain.entity.lis.XmFeeInstr">
select * from xm_feeinstr
<where>
<if test="yq != null and yq != ''"> and yq = #{yq}</if>
<if test="sfxmdh != null and sfxmdh != ''">and sfxmdh = #{sfxmdh}</if>
</where>
select a.*,(a.sfxmdh+' '+b.sfxmmc) as sfxmmc from xm_feeinstr a,xm_fee b where a.sfxmdh = b.sfxmdh
<if test="yq != null and yq != ''"> and a.yq = #{yq}</if>
<if test="sfxmdh != null and sfxmdh != ''">and a.sfxmdh = #{sfxmdh}</if>
</select>
<insert id="add">
@ -37,6 +35,27 @@
delete from xm_feeinstr where yq = #{yq} and sfxmdh = #{sfxmdh}
</delete>
<select id="queryXm" resultType="map">
SELECT xm_fee.sfxmdh,
xm_fee.sfxmmc,
xm_fee.xmlb,
xm_fee.dj,
xm_fee.zjf,
'0' as cp_flag,'' as cp_yq
FROM xm_fee
WHERE xm_fee.yljg=#{yljg} and not exists
( select * from xm_feeinstr
where xm_feeinstr.yq = #{yq}
and xm_feeinstr.sfxmdh = xm_fee.sfxmdh)
<if test="queryValue != null and queryValue != ''">and (sfxmmc like '%'+#{queryValue}+'%' or zjf like '%'+#{queryValue}+'%') </if>
</select>
<select id="queryYQData" resultType="map">
<![CDATA[select a.sfxmdh,b.yqmc from xm_feeinstr a,lab_instr b where a.yq<>'_KNXM_' and a.yq<>'_yljg_'
and a.yq = b.yq and b.useflag = '1'
]]>
</select>