Compare commits

..

No commits in common. "e82c31b33e35e81707fe5e4fc963dc281feef21c" and "71e7c264e2c81a63f19bab5e169af0acdff74ce7" have entirely different histories.

9 changed files with 30 additions and 42 deletions

View File

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

View File

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

View File

@ -9,7 +9,6 @@ import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import java.util.List;
@Api(tags = "报告单仪器对应表")
@ -29,9 +28,8 @@ public class LabReportinstrController {
@ApiOperation("新增对应表数据")
@PostMapping("/add")
public Result add(@RequestBody List<LabReportinstr> labReportinstrList){
log.info("labReportinstrList:{}",labReportinstrList);
return labReportinstrService.add(labReportinstrList);
public Result add(@RequestBody LabReportinstr labReportinstr){
return labReportinstrService.add(labReportinstr);
}
@ApiOperation("删除对应表数据")
@ -42,7 +40,7 @@ public class LabReportinstrController {
@ApiOperation("修改对应表数据")
@PostMapping("update")
public Result update(@RequestBody List<LabReportinstr> labReportinstrList){
return labReportinstrService.update(labReportinstrList);
public Result update(@RequestBody LabReportinstr labReportinstr){
return labReportinstrService.update(labReportinstr);
}
}

View File

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

View File

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

View File

@ -25,19 +25,23 @@ public class ReportItemServiceImpl implements ReportItemService {
public XmInfoNewDTO queryDetail(String xmid, String yq, String 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.setXmid(Integer.parseInt(xmid));
// List<XmInter> xmInters = reportItemMapper.queryXmInter(xmInter);
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));
@ -48,8 +52,8 @@ public class ReportItemServiceImpl implements ReportItemService {
XmInfoNewDTO xmInfoNewDTO = new XmInfoNewDTO();
xmInfoNewDTO.setXmInfoNewRows(xmInfoNews);
xmInfoNewDTO.setXmDoubleRows(xmDoubles);
// xmInfoNewDTO.setXmValNewRows(xmValNews);
// xmInfoNewDTO.setXmInterRows(xmInters);
xmInfoNewDTO.setXmValNewRows(xmValNews);
xmInfoNewDTO.setXmInterRows(xmInters);
xmInfoNewDTO.setXmRefNewRows(xmRefNews);
xmInfoNewDTO.setXmInfoVsRows(xmInfoVss);
xmInfoNewDTO.setXmTextresultNewRows(xmTextresultNews);

View File

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

View File

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

View File

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