新检验项目功能

This commit is contained in:
jiangs 2025-09-18 17:58:00 +08:00
parent cb6a18921a
commit 50eba4ed43
12 changed files with 208 additions and 11 deletions

View File

@ -29,4 +29,5 @@ public class XmDouble {
private String yxgs; private String yxgs;
private String mrmb; private String mrmb;
private String mrsjph; private String mrsjph;
private String yq;
} }

View File

@ -68,5 +68,6 @@ public class XmInfoNew {
private String val3; private String val3;
private String val4; private String val4;
private String val5; private String val5;
private String isWsw;
} }

View File

@ -0,0 +1,32 @@
package com.czlis.common.core.domain.entity.lis;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import java.math.BigDecimal;
@Data
@AllArgsConstructor
@NoArgsConstructor
public class XmRefNew {
private Integer xmid;
private String xmdh;
private Integer xh;
private String xb;
private BigDecimal nl1;
private BigDecimal nl2;
private String bblx;
private BigDecimal cksx;
private BigDecimal ckxx;
private String dyck;
private String nldw;
private BigDecimal redoxx;
private BigDecimal redosx;
private BigDecimal alterxx;
private BigDecimal altersx;
private String slzq;
private String zd;
private String instrid;
private String yq;
}

View File

@ -0,0 +1,19 @@
package com.czlis.common.core.domain.entity.lis;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
@Data
@AllArgsConstructor
@NoArgsConstructor
public class XmTextresultNew {
private Integer xmid;
private String xmdh;
private Integer xh;
private String textresult;
private String reserve;
private String yxjs;
private String cjyy;
private String zd;
}

View File

@ -0,0 +1,17 @@
package com.czlis.common.core.domain.entity.lis;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
@Data
@AllArgsConstructor
@NoArgsConstructor
public class XmValNew {
private Integer xmid;
private String xmdh;
private String qz;
private String srm;
private Integer xh;
private String jgbz;
}

View File

@ -1,5 +1,6 @@
package com.czlis.liswork.controller.dict; package com.czlis.liswork.controller.dict;
import com.czlis.common.annotation.Anonymous;
import com.czlis.common.annotation.Log; import com.czlis.common.annotation.Log;
import com.czlis.common.core.controller.BaseController; import com.czlis.common.core.controller.BaseController;
import com.czlis.common.core.domain.Result; import com.czlis.common.core.domain.Result;
@ -19,7 +20,7 @@ import org.springframework.web.bind.annotation.*;
import java.util.List; import java.util.List;
/** /**
* 检验项目维护 * 检验项目维护(新)
*/ */
@Api(tags = "检验项目维护") @Api(tags = "检验项目维护")
@RestController @RestController
@ -29,13 +30,22 @@ public class ReportItemController extends BaseController {
@Autowired @Autowired
private ReportItemService reportItemService; private ReportItemService reportItemService;
@ApiOperation("查询检验项目列表") @ApiOperation("查询检验项目列表")
@GetMapping("/query") @GetMapping("/query")
public TableDataInfo query(String xmid,String yq,String xmdh){ @Anonymous
public TableDataInfo query(XmInfoNew xmInfoNew) {
startPage(); startPage();
List<XmInfoNew> xmInfoNewList = reportItemService.query(xmid,yq,xmdh); List<XmInfoNew> xmInfoNewList = reportItemService.query(xmInfoNew);
return getDataTable(xmInfoNewList); return getDataTable(xmInfoNewList);
}
@ApiOperation("查询检验项目明细")
@GetMapping("/queryDetail")
@Anonymous
public Result queryDetail(String xmid,String yq,String xmdh){
XmInfoNewDTO xmInfoNewDTO = reportItemService.queryDetail(xmid,yq,xmdh);
return new Result("0","查询成功!",xmInfoNewDTO);
} }
@Log(title = "检验项目",businessType = BusinessType.INSERT) @Log(title = "检验项目",businessType = BusinessType.INSERT)
@ -99,12 +109,14 @@ public class ReportItemController extends BaseController {
return reportItemService.getXmLot(); return reportItemService.getXmLot();
} }
@Log(title = "试剂维护",businessType = BusinessType.INSERT)
@ApiOperation("新增试剂维护数据") @ApiOperation("新增试剂维护数据")
@PostMapping("/addXmLot") @PostMapping("/addXmLot")
public Result addXmLot(XmLot xmLot){ public Result addXmLot(@RequestBody XmLot xmLot){
return reportItemService.addXmLot(xmLot); return reportItemService.addXmLot(xmLot);
} }
@Log(title = "试剂维护",businessType = BusinessType.DELETE)
@ApiOperation("删除试剂维护数据") @ApiOperation("删除试剂维护数据")
@GetMapping("/delXmLot") @GetMapping("/delXmLot")
public Result deleteXmLot(String yq,String sjph){ public Result deleteXmLot(String yq,String sjph){

View File

@ -1,9 +1,11 @@
package com.czlis.liswork.controller.dict; package com.czlis.liswork.controller.dict;
import com.czlis.common.annotation.Log;
import com.czlis.common.core.controller.BaseController; import com.czlis.common.core.controller.BaseController;
import com.czlis.common.core.domain.Result; import com.czlis.common.core.domain.Result;
import com.czlis.common.core.page.TableDataInfo; import com.czlis.common.core.page.TableDataInfo;
import com.czlis.common.core.domain.entity.lis.XmFeeInstr; import com.czlis.common.core.domain.entity.lis.XmFeeInstr;
import com.czlis.common.enums.BusinessType;
import com.czlis.liswork.service.XmFeeInstrService; import com.czlis.liswork.service.XmFeeInstrService;
import io.swagger.annotations.Api; import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation; import io.swagger.annotations.ApiOperation;
@ -32,18 +34,21 @@ public class XmFeeInstrController extends BaseController {
return getDataTable(xmFeeInstrList); return getDataTable(xmFeeInstrList);
} }
@Log(title = "仪器收费项目对照",businessType = BusinessType.INSERT)
@ApiOperation("新增仪器收费项目对照") @ApiOperation("新增仪器收费项目对照")
@PostMapping("/add") @PostMapping("/add")
public Result add(XmFeeInstr xmFeeInstr){ public Result add(XmFeeInstr xmFeeInstr){
return xmFeeInstrService.add(xmFeeInstr); return xmFeeInstrService.add(xmFeeInstr);
} }
@Log(title = "仪器收费项目对照",businessType = BusinessType.UPDATE)
@ApiOperation("修改仪器收费项目对照") @ApiOperation("修改仪器收费项目对照")
@PostMapping("/update") @PostMapping("/update")
public Result update(XmFeeInstr xmFeeInstr){ public Result update(XmFeeInstr xmFeeInstr){
return xmFeeInstrService.update(xmFeeInstr); return xmFeeInstrService.update(xmFeeInstr);
} }
@Log(title = "仪器收费项目对照",businessType = BusinessType.DELETE)
@ApiOperation("删除仪器收费项目对照") @ApiOperation("删除仪器收费项目对照")
@DeleteMapping("/del") @DeleteMapping("/del")
public Result delete(@NotBlank(message = "yq参数不能为空!") String yq,@NotBlank(message = "sfxmdh参数不能为空!") String sfxmdh){ public Result delete(@NotBlank(message = "yq参数不能为空!") String yq,@NotBlank(message = "sfxmdh参数不能为空!") String sfxmdh){

View File

@ -6,7 +6,13 @@ import org.apache.ibatis.annotations.Param;
import java.util.List; import java.util.List;
public interface ReportItemMapper { public interface ReportItemMapper {
List<XmInfoNew> query(@Param("xmid") String xmid,@Param("yq") String yq,@Param("xmdh") String xmdh); List<XmInfoNew> query(XmInfoNew xmInfoNew);
List<XmDouble> queryXmDouble(XmDouble xmDouble);
List<XmValNew> queryXmValNew(XmValNew xmValNew);
List<XmInter> queryXmInter(XmInter xmInter);
List<XmRefNew> queryXmRefNew(XmRefNew xmRefNew);
List<XmInfoVs> queryXmInfoVs(XmInfoVs xmInfoVs);
List<XmTextresultNew> queryXmTextresultNew(XmTextresultNew xmTextresultNew);
void addXmInfoNew(XmInfoNew xmInfoNew); void addXmInfoNew(XmInfoNew xmInfoNew);
void addXmDoubleRow(XmDouble xmDoubleRow); void addXmDoubleRow(XmDouble xmDoubleRow);
void addXmInterRow(XmInter xmInterRow); void addXmInterRow(XmInter xmInterRow);

View File

@ -17,4 +17,8 @@ public class XmInfoNewDTO {
private List<XmInter> xmInterRows; private List<XmInter> xmInterRows;
private List<XmRef> xmRefRows; private List<XmRef> xmRefRows;
private List<XmTextResult> xmTextResultRows; private List<XmTextResult> xmTextResultRows;
private List<XmValNew> xmValNewRows;
private List<XmRefNew> xmRefNewRows;
private List<XmInfoVs> xmInfoVsRows;
private List<XmTextresultNew> xmTextresultNewRows;
} }

View File

@ -10,7 +10,7 @@ import com.czlis.common.core.domain.entity.lis.XmInfoVs;
import java.util.List; import java.util.List;
public interface ReportItemService { public interface ReportItemService {
List<XmInfoNew> query(String xmid,String yq, String xmdh); XmInfoNewDTO queryDetail(String xmid,String yq, String xmdh);
Result add(XmInfoNewDTO xmInfoNewDTO); Result add(XmInfoNewDTO xmInfoNewDTO);
@ -34,4 +34,6 @@ public interface ReportItemService {
Result addXmLot(XmLot xmLot); Result addXmLot(XmLot xmLot);
Result deleteXmLot(String yq, String sjph); Result deleteXmLot(String yq, String sjph);
List<XmInfoNew> query(XmInfoNew xmInfoNew);
} }

View File

@ -11,6 +11,7 @@ import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional; import org.springframework.transaction.annotation.Transactional;
import java.util.Collections;
import java.util.List; import java.util.List;
@Service @Service
@ -21,8 +22,42 @@ public class ReportItemServiceImpl implements ReportItemService {
private ReportItemMapper reportItemMapper; private ReportItemMapper reportItemMapper;
@Override @Override
public List<XmInfoNew> query(String xmid, String yq, String xmdh) { public XmInfoNewDTO queryDetail(String xmid, String yq, String xmdh) {
return reportItemMapper.query(xmid,yq,xmdh); XmInfoNew xmInfoNew = new XmInfoNew();
xmInfoNew.setXmid(Integer.parseInt(xmid));
xmInfoNew.setYq(yq);
xmInfoNew.setXmdh(xmdh);
List<XmInfoNew> xmInfoNews = reportItemMapper.query(xmInfoNew);
XmDouble xmDouble = new XmDouble();
xmDouble.setYq(yq);
xmDouble.setXmdh(xmdh);
List<XmDouble> xmDoubles = reportItemMapper.queryXmDouble(xmDouble);
XmValNew xmValNew = new XmValNew();
xmValNew.setXmid(Integer.parseInt(xmid));
List<XmValNew> xmValNews = reportItemMapper.queryXmValNew(xmValNew);
XmInter xmInter = new XmInter();
xmInter.setYq(yq);
xmInter.setXmid(Integer.parseInt(xmid));
List<XmInter> xmInters = reportItemMapper.queryXmInter(xmInter);
XmRefNew xmRefNew = new XmRefNew();
xmRefNew.setXmid(Integer.parseInt(xmid));
xmRefNew.setYq(yq);
List<XmRefNew> xmRefNews = reportItemMapper.queryXmRefNew(xmRefNew);
XmInfoVs xmInfoVs = new XmInfoVs();
xmInfoVs.setXmid(Integer.parseInt(xmid));
List<XmInfoVs> xmInfoVss = reportItemMapper.queryXmInfoVs(xmInfoVs);
XmTextresultNew xmTextresultNew = new XmTextresultNew();
xmTextresultNew.setXmid(Integer.parseInt(xmid));
List<XmTextresultNew> xmTextresultNews = reportItemMapper.queryXmTextresultNew(xmTextresultNew);
XmInfoNewDTO xmInfoNewDTO = new XmInfoNewDTO();
xmInfoNewDTO.setXmInfoNewRows(xmInfoNews);
xmInfoNewDTO.setXmDoubleRows(xmDoubles);
xmInfoNewDTO.setXmValNewRows(xmValNews);
xmInfoNewDTO.setXmInterRows(xmInters);
xmInfoNewDTO.setXmRefNewRows(xmRefNews);
xmInfoNewDTO.setXmInfoVsRows(xmInfoVss);
xmInfoNewDTO.setXmTextresultNewRows(xmTextresultNews);
return xmInfoNewDTO;
} }
@Transactional(rollbackFor = Exception.class) @Transactional(rollbackFor = Exception.class)
@ -72,7 +107,9 @@ public class ReportItemServiceImpl implements ReportItemService {
public Result delete(Integer xmid) { public Result delete(Integer xmid) {
Long xmInfoVsCount = reportItemMapper.getXmInfoVsCount(xmid); Long xmInfoVsCount = reportItemMapper.getXmInfoVsCount(xmid);
if(xmInfoVsCount > 0) return new Result("-1","已经有仪器做过这个项目的对照,不允许删除!"); if(xmInfoVsCount > 0) return new Result("-1","已经有仪器做过这个项目的对照,不允许删除!");
List<XmInfoNew> xmInfoNewList = reportItemMapper.query(String.valueOf(xmid), null, null); XmInfoNew xmInfoNew1 = new XmInfoNew();
xmInfoNew1.setXmid(xmid);
List<XmInfoNew> xmInfoNewList = reportItemMapper.query(xmInfoNew1);
for (XmInfoNew xmInfoNew : xmInfoNewList) { for (XmInfoNew xmInfoNew : xmInfoNewList) {
String yq = xmInfoNew.getYq(); String yq = xmInfoNew.getYq();
String xmdh = xmInfoNew.getXmdh(); String xmdh = xmInfoNew.getXmdh();
@ -170,5 +207,15 @@ public class ReportItemServiceImpl implements ReportItemService {
return new Result("0","删除成功!"); return new Result("0","删除成功!");
} }
@Override
public List<XmInfoNew> query(XmInfoNew xmInfoNew) {
if(xmInfoNew != null){
return reportItemMapper.query(xmInfoNew);
}else{
return reportItemMapper.query(null);
}
}
} }

View File

@ -9,6 +9,57 @@
<if test="xmid != null and xmid != ''"> and xmid = #{xmid}</if> <if test="xmid != null and xmid != ''"> and xmid = #{xmid}</if>
<if test="yq != null and yq != ''"> and yq = #{yq}</if> <if test="yq != null and yq != ''"> and yq = #{yq}</if>
<if test="xmdh != null and xmdh != ''"> and yq = #{xmdh}</if> <if test="xmdh != null and xmdh != ''"> and yq = #{xmdh}</if>
<if test="isWsw != null and isWsw !=''"><![CDATA[and yqdl <> '细菌仪']]></if>
</where>
</select>
<select id="queryXmDouble" resultType="com.czlis.common.core.domain.entity.lis.XmDouble">
select * from xm_double
<where>
<if test="yq != null and yq != ''">and yq = #{yq}</if>
<if test="xmdh != null and xmdh != ''">and xmdh = #{xmdh}</if>
</where>
</select>
<select id="queryXmValNew" resultType="com.czlis.common.core.domain.entity.lis.XmValNew">
select * from xm_val_new
<where>
<if test="xmid != null">and xmid = #{xmid}</if>
<if test="xmdh != null and xmdh != ''">and xmdh = #{xmdh}</if>
<if test="qz != null and qz != ''">and qz = #{qz}</if>
</where>
</select>
<select id="queryXmInter" resultType="com.czlis.common.core.domain.entity.lis.XmInter">
select * from xm_inter
<where>
<if test="yq !=null and yq !=''"> and yq = #{yq}</if>
<if test="tdh !=null and tdh !=''"> and tdh = #{tdh}</if>
</where>
</select>
<select id="queryXmRefNew" resultType="com.czlis.common.core.domain.entity.lis.XmRefNew">
select * from xm_ref_new
<where>
<if test="xmid != null"> and xmid = #{xmid}</if>
<if test="xmdh != null and xmdh != ''"> and xmdh = #{xmdh}</if>
<if test="xh != null"> and xh = #{xh}</if>
</where>
</select>
<select id="queryXmInfoVs" resultType="com.czlis.common.core.domain.entity.lis.XmInfoVs">
select * from xm_info_vs
<where>
<if test="vsid != null">and vsid = #{vsid}</if>
</where>
</select>
<select id="queryXmTextresultNew" resultType="com.czlis.common.core.domain.entity.lis.XmTextresultNew">
select * from xm_textresult_new
<where>
<if test="xmid != null">and xmid = #{xmid}</if>
<if test="xmdh != null and xmdh != ''">and xmdh = #{xmdh}</if>
<if test="xh != null">and xh = #{xh}</if>
</where> </where>
</select> </select>