Compare commits

..

No commits in common. "f3c1fa483263aab3e8c375a1ec6f9ed9460b1c6a" and "eff175d85d16d64ce3edd7b719c65b1de9691816" have entirely different histories.

8 changed files with 13 additions and 98 deletions

View File

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

View File

@ -7,7 +7,6 @@ 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;
@ -30,8 +29,10 @@ public class XmFeeInstrController extends BaseController {
@ApiOperation("查询仪器收费项目对照")
@GetMapping("/query")
public Result query(XmFeeInstr xmFeeInstr){
return xmFeeInstrService.query(xmFeeInstr);
public TableDataInfo query(String yq,String sfxmdh){
startPage();
List<XmFeeInstr> xmFeeInstrList = xmFeeInstrService.query(yq,sfxmdh);
return getDataTable(xmFeeInstrList);
}
@Log(title = SysLogConstants.XMFEEINSTR_LOG,businessType = BusinessType.INSERT)
@ -54,10 +55,4 @@ 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,7 +10,6 @@ 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;
@ -29,8 +28,6 @@ public class ComOptController extends BaseController {
@Autowired
private ComOptService comOptService;
@Autowired
CommonUtil commonUtil;
@ApiOperation("查询参数列表")
@GetMapping("/query")
@ -78,11 +75,4 @@ 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,19 +1,13 @@
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(XmFeeInstr xmFeeInstr);
List<XmFeeInstr> query(@Param("yq") String yq,@Param("sfxmdh") String sfxmdh);
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

@ -1,17 +0,0 @@
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,18 +2,15 @@ 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 {
Result query(XmFeeInstr xmFeeInstr);
List<XmFeeInstr> query(String yq, String sfxmdh);
Result add(XmFeeInstr xmFeeInstr);
Result update(XmFeeInstr xmFeeInstr);
Result delete(String yq, String sfxmdh);
Result queryXm(QueryXmDTO queryXmDTO);
}

View File

@ -1,10 +1,8 @@
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;
@ -12,9 +10,6 @@ import org.springframework.stereotype.Service;
import java.util.List;
import java.util.Map;
import java.util.Objects;
import java.util.stream.Collectors;
@Service
@Slf4j
@ -25,9 +20,8 @@ public class XmFeeInstrServiceImpl implements XmFeeInstrService {
@Override
public Result query(XmFeeInstr xmFeeInstr) {
List<XmFeeInstr> xmFeeInstrList = xmFeeInstrMapper.query(xmFeeInstr);
return new Result("0","查询成功!",xmFeeInstrList);
public List<XmFeeInstr> query(String yq, String sfxmdh) {
return xmFeeInstrMapper.query(yq,sfxmdh);
}
@Override
@ -47,22 +41,4 @@ 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,9 +4,11 @@
<mapper namespace="com.czlis.liswork.mapper.dict.XmFeeInstrMapper">
<select id="query" resultType="com.czlis.common.core.domain.entity.lis.XmFeeInstr">
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 * 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>
<insert id="add">
@ -35,27 +37,6 @@
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>