检验项目界面

This commit is contained in:
jiangs 2025-10-31 18:06:42 +08:00
parent e7e397545b
commit 1f780b73ca
9 changed files with 42 additions and 30 deletions

View File

@ -12,4 +12,6 @@ public class LabReportinstr {
private Integer xh; private Integer xh;
private Integer bgdh; private Integer bgdh;
private String yljg; private String yljg;
private String type;
private String condition;
} }

View File

@ -34,11 +34,10 @@ public class ReportItemController extends BaseController {
@ApiOperation("查询检验项目列表") @ApiOperation("查询检验项目列表")
@GetMapping("/query") @GetMapping("/query")
public TableDataInfo query(XmInfoNew xmInfoNew) { public Result query(XmInfoNew xmInfoNew) {
log.info("查询列表:"+xmInfoNew); log.info("查询列表:"+xmInfoNew);
startPage();
List<XmInfoNew> xmInfoNewList = reportItemService.query(xmInfoNew); List<XmInfoNew> xmInfoNewList = reportItemService.query(xmInfoNew);
return getDataTable(xmInfoNewList); return new Result("0","查询成功!",xmInfoNewList);
} }

View File

@ -9,6 +9,7 @@ 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.*;
import java.util.List;
@Api(tags = "报告单仪器对应表") @Api(tags = "报告单仪器对应表")
@ -28,8 +29,9 @@ public class LabReportinstrController {
@ApiOperation("新增对应表数据") @ApiOperation("新增对应表数据")
@PostMapping("/add") @PostMapping("/add")
public Result add(@RequestBody LabReportinstr labReportinstr){ public Result add(@RequestBody List<LabReportinstr> labReportinstrList){
return labReportinstrService.add(labReportinstr); log.info("labReportinstrList:{}",labReportinstrList);
return labReportinstrService.add(labReportinstrList);
} }
@ApiOperation("删除对应表数据") @ApiOperation("删除对应表数据")
@ -40,7 +42,7 @@ public class LabReportinstrController {
@ApiOperation("修改对应表数据") @ApiOperation("修改对应表数据")
@PostMapping("update") @PostMapping("update")
public Result update(@RequestBody LabReportinstr labReportinstr){ public Result update(@RequestBody List<LabReportinstr> labReportinstrList){
return labReportinstrService.update(labReportinstr); return labReportinstrService.update(labReportinstrList);
} }
} }

View File

@ -3,12 +3,14 @@ package com.czlis.liswork.service;
import com.czlis.common.core.domain.Result; import com.czlis.common.core.domain.Result;
import com.czlis.common.core.domain.entity.lis.LabReportinstr; import com.czlis.common.core.domain.entity.lis.LabReportinstr;
import java.util.List;
public interface LabReportinstrService { public interface LabReportinstrService {
Result getLabReportinstr(LabReportinstr labReportinstr); Result getLabReportinstr(LabReportinstr labReportinstr);
Result add(LabReportinstr labReportinstr); Result add(List<LabReportinstr> labReportinstr);
Result delete(LabReportinstr labReportinstr); Result delete(LabReportinstr labReportinstr);
Result update(LabReportinstr labReportinstr); Result update(List<LabReportinstr> labReportinstr);
} }

View File

@ -24,8 +24,10 @@ public class LabReportinstrServiceImpl implements LabReportinstrService {
} }
@Override @Override
public Result add(LabReportinstr labReportinstr) { public Result add(List<LabReportinstr> labReportinstrList) {
labReportinstrMapper.add(labReportinstr); for (LabReportinstr labReportinstr : labReportinstrList) {
labReportinstrMapper.add(labReportinstr);
}
return new Result("0","新增数据成功!"); return new Result("0","新增数据成功!");
} }
@ -36,8 +38,10 @@ public class LabReportinstrServiceImpl implements LabReportinstrService {
} }
@Override @Override
public Result update(LabReportinstr labReportinstr) { public Result update(List<LabReportinstr> labReportinstrList) {
labReportinstrMapper.update(labReportinstr); for (LabReportinstr labReportinstr : labReportinstrList) {
labReportinstrMapper.update(labReportinstr);
}
return new Result("0","修改数据成功!"); return new Result("0","修改数据成功!");
} }
} }

View File

@ -25,23 +25,19 @@ public class ReportItemServiceImpl implements ReportItemService {
public XmInfoNewDTO queryDetail(String xmid, String yq, String xmdh) { public XmInfoNewDTO queryDetail(String xmid, String yq, String xmdh) {
XmInfoNew xmInfoNew = new XmInfoNew(); XmInfoNew xmInfoNew = new XmInfoNew();
xmInfoNew.setXmid(Integer.parseInt(xmid)); xmInfoNew.setXmid(Integer.parseInt(xmid));
xmInfoNew.setYq(yq);
xmInfoNew.setXmdh(xmdh);
List<XmInfoNew> xmInfoNews = reportItemMapper.query(xmInfoNew); List<XmInfoNew> xmInfoNews = reportItemMapper.query(xmInfoNew);
XmDouble xmDouble = new XmDouble(); XmDouble xmDouble = new XmDouble();
xmDouble.setYq(yq); xmDouble.setYq(yq);
xmDouble.setXmdh(xmdh); xmDouble.setXmdh(xmdh);
List<XmDouble> xmDoubles = reportItemMapper.queryXmDouble(xmDouble); List<XmDouble> xmDoubles = reportItemMapper.queryXmDouble(xmDouble);
XmValNew xmValNew = new XmValNew(); // XmValNew xmValNew = new XmValNew();
xmValNew.setXmid(Integer.parseInt(xmid)); // xmValNew.setXmid(Integer.parseInt(xmid));
List<XmValNew> xmValNews = reportItemMapper.queryXmValNew(xmValNew); // List<XmValNew> xmValNews = reportItemMapper.queryXmValNew(xmValNew);
XmInter xmInter = new XmInter(); // XmInter xmInter = new XmInter();
xmInter.setYq(yq); // xmInter.setXmid(Integer.parseInt(xmid));
xmInter.setXmid(Integer.parseInt(xmid)); // List<XmInter> xmInters = reportItemMapper.queryXmInter(xmInter);
List<XmInter> xmInters = reportItemMapper.queryXmInter(xmInter);
XmRefNew xmRefNew = new XmRefNew(); XmRefNew xmRefNew = new XmRefNew();
xmRefNew.setXmid(Integer.parseInt(xmid)); xmRefNew.setXmid(Integer.parseInt(xmid));
xmRefNew.setYq(yq);
List<XmRefNew> xmRefNews = reportItemMapper.queryXmRefNew(xmRefNew); List<XmRefNew> xmRefNews = reportItemMapper.queryXmRefNew(xmRefNew);
XmInfoVs xmInfoVs = new XmInfoVs(); XmInfoVs xmInfoVs = new XmInfoVs();
xmInfoVs.setXmid(Integer.parseInt(xmid)); xmInfoVs.setXmid(Integer.parseInt(xmid));
@ -52,8 +48,8 @@ public class ReportItemServiceImpl implements ReportItemService {
XmInfoNewDTO xmInfoNewDTO = new XmInfoNewDTO(); XmInfoNewDTO xmInfoNewDTO = new XmInfoNewDTO();
xmInfoNewDTO.setXmInfoNewRows(xmInfoNews); xmInfoNewDTO.setXmInfoNewRows(xmInfoNews);
xmInfoNewDTO.setXmDoubleRows(xmDoubles); xmInfoNewDTO.setXmDoubleRows(xmDoubles);
xmInfoNewDTO.setXmValNewRows(xmValNews); // xmInfoNewDTO.setXmValNewRows(xmValNews);
xmInfoNewDTO.setXmInterRows(xmInters); // xmInfoNewDTO.setXmInterRows(xmInters);
xmInfoNewDTO.setXmRefNewRows(xmRefNews); xmInfoNewDTO.setXmRefNewRows(xmRefNews);
xmInfoNewDTO.setXmInfoVsRows(xmInfoVss); xmInfoNewDTO.setXmInfoVsRows(xmInfoVss);
xmInfoNewDTO.setXmTextresultNewRows(xmTextresultNews); xmInfoNewDTO.setXmTextresultNewRows(xmTextresultNews);

View File

@ -14,9 +14,9 @@
<insert id="add"> <insert id="add">
insert into lab_reportinstr( insert into lab_reportinstr(
bgdh,yq,xh,yljg,myhs bgdh,yq,xh,yljg,type,condition
)values( )values(
#{bgdh},#{yq},#{xh},#{yljg},#{myhs} #{bgdh},#{yq},#{xh},#{yljg},#{type},#{condition}
) )
</insert> </insert>
@ -27,7 +27,10 @@
<update id="update"> <update id="update">
update lab_reportinstr update lab_reportinstr
<set> <set>
bgdh = #{bgdh} <if test="bgdh != null and bgdh != ''">bgdh = #{bgdh},</if>
<if test="type != null and type != ''">type = #{type},</if>
<if test="condition != null and condition != ''">condition = #{condition},</if>
yq = #{yq}
</set> </set>
where yq = #{yq} and xh = #{xh} where yq = #{yq} and xh = #{xh}
</update> </update>

View File

@ -14,6 +14,7 @@
<if test="xmgl != null and xmgl !=''">and xmgl = #{xmgl}</if> <if test="xmgl != null and xmgl !=''">and xmgl = #{xmgl}</if>
<if test="itemclass != null and itemclass !=''">and itemclass = #{itemclass}</if> <if test="itemclass != null and itemclass !=''">and itemclass = #{itemclass}</if>
<if test="inputcode != null and inputcode !=''">and (xmdh like '%'+#{inputcode}+'%' or xmmc like '%'+#{inputcode}+'%' or zjf like '%'+#{inputcode}+'%' )</if> <if test="inputcode != null and inputcode !=''">and (xmdh like '%'+#{inputcode}+'%' or xmmc like '%'+#{inputcode}+'%' or zjf like '%'+#{inputcode}+'%' )</if>
<if test="yqdl != null and yqdl != ''">and yqdl = #{yqdl}</if>
</where> </where>
</select> </select>
@ -38,6 +39,7 @@
select * from xm_inter select * from xm_inter
<where> <where>
<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 xmdh = #{xmdh}</if>
<if test="xmid !=null and xmid !=''"> and xmid = #{xmid}</if> <if test="xmid !=null and xmid !=''"> and xmid = #{xmid}</if>
</where> </where>
</select> </select>
@ -54,7 +56,7 @@
<select id="queryXmInfoVs" resultType="com.czlis.common.core.domain.entity.lis.XmInfoVs"> <select id="queryXmInfoVs" resultType="com.czlis.common.core.domain.entity.lis.XmInfoVs">
select * from xm_info_vs select * from xm_info_vs
<where> <where>
<if test="vsid != null">and vsid = #{vsid}</if> <if test="xmid != null">and xmid = #{xmid}</if>
</where> </where>
</select> </select>

View File

@ -106,8 +106,10 @@ if not exists(SELECT 1 FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME = 'lab_
( (
yq varchar(10), yq varchar(10),
xh int , xh int ,
bgdh int, bgdh varchar(100),
yljg varchar(10), yljg varchar(10),
type int, --1.默认,2.参数,3.根据项目来判断
condition varchar(500),
PRIMARY KEY (yq, xh,bgdh) PRIMARY KEY (yq, xh,bgdh)
) )
end end