检验项目修改

This commit is contained in:
jiangs 2025-12-18 16:27:31 +08:00
parent 9b0d6934f1
commit 7efeca72f6
5 changed files with 57 additions and 14 deletions

View File

@ -1,6 +1,6 @@
package com.czlis.liswork.controller.dict;
import com.czlis.common.annotation.Anonymous;
import com.czlis.common.annotation.Log;
import com.czlis.common.core.controller.BaseController;
import com.czlis.common.core.domain.Result;
@ -117,7 +117,7 @@ public class ReportItemController extends BaseController {
@Log(title = SysLogConstants.XMLOT_LOG,businessType = BusinessType.INSERT)
@ApiOperation("新增试剂维护数据")
@PostMapping("/addXmLot")
public Result addXmLot(@RequestBody XmLot xmLot){
public Result addXmLot(@RequestBody List<XmLot> xmLot){
return reportItemService.addXmLot(xmLot);
}
@ -195,4 +195,11 @@ public class ReportItemController extends BaseController {
return reportItemService.delXmRefNew(xmRefNew);
}
@ApiOperation("获取试剂厂家")
@GetMapping("/querySjcs")
public Result getSjcs(String yq){
if(yq == null || yq.equals("")) return new Result("-1","参数不能为空!");
return reportItemService.getSjcs(yq);
}
}

View File

@ -4,6 +4,8 @@ import com.czlis.common.core.domain.entity.lis.*;
import org.apache.ibatis.annotations.Param;
import java.util.List;
import java.util.Map;
import java.util.Objects;
public interface ReportItemMapper {
List<XmInfoNew> query(XmInfoNew xmInfoNew);
@ -47,7 +49,7 @@ public interface ReportItemMapper {
void deleteXmFilter(@Param("yq") String yq,@Param("lgph") String lgph);
List<XmLot> getXmLot();
List<XmLot> getXmLot(XmLot xmLot);
void addXmLot(XmLot xmLot);
@ -67,5 +69,9 @@ public interface ReportItemMapper {
void addBatch(@Param("xmInfoNewList") List<XmInfoNew> xmInfoNewList);
void delBatch(@Param("xmInfoNewList") List<XmInfoNew> xmInfoNewList);
void delBatch(XmInfoNew xmInfoNew);
void updateXmLot(XmLot xmLot);
List<Map<String, Objects>> getSjcs(String yq);
}

View File

@ -28,7 +28,7 @@ public interface ReportItemService {
Result getXmLot();
Result addXmLot(XmLot xmLot);
Result addXmLot(List<XmLot> xmLot);
Result deleteXmLot(String yq, String sjph);
@ -53,4 +53,6 @@ public interface ReportItemService {
Result delBatch(List<XmInfoNew> xmInfoNewList);
Result delXmRefNew(XmRefNew xmRefNew);
Result getSjcs(String yq);
}

View File

@ -13,6 +13,8 @@ import org.springframework.transaction.annotation.Transactional;
import java.util.Collections;
import java.util.List;
import java.util.Map;
import java.util.Objects;
@Service
@Slf4j
@ -296,13 +298,21 @@ public class ReportItemServiceImpl implements ReportItemService {
@Override
public Result getXmLot() {
List<XmLot> lotList = reportItemMapper.getXmLot();
List<XmLot> lotList = reportItemMapper.getXmLot(null);
return new Result("0","查询成功!",lotList);
}
@Override
public Result addXmLot(XmLot xmLot) {
reportItemMapper.addXmLot(xmLot);
public Result addXmLot(List<XmLot> xmLotList) {
for (XmLot xmLot : xmLotList) {
List<XmLot> xmlotList = reportItemMapper.getXmLot(xmLot);
if(xmlotList.size() > 0){
reportItemMapper.updateXmLot(xmLot);
}else{
reportItemMapper.addXmLot(xmLot);
}
}
return new Result("0","新增成功!");
}
@ -391,8 +401,10 @@ public class ReportItemServiceImpl implements ReportItemService {
@Override
public Result delBatch(List<XmInfoNew> xmInfoNewList) {
for (XmInfoNew xmInfoNew : xmInfoNewList) {
reportItemMapper.delBatch(xmInfoNew);
}
reportItemMapper.delBatch(xmInfoNewList);
return new Result("0","批量删除数据成功!");
}
@ -402,5 +414,11 @@ public class ReportItemServiceImpl implements ReportItemService {
return new Result("0","删除成功!");
}
@Override
public Result getSjcs(String yq) {
List<Map<String, Objects>> sjcsList = reportItemMapper.getSjcs(yq);
return new Result("0","获取数据成功!",sjcsList);
}
}

View File

@ -528,10 +528,19 @@
insert into xm_lot(
yq,sjph,sjcs,yxq,csff
)values(
#{yq},#{sjph},#{yxq},#{csff}
#{yq},#{sjph},#{sjcs},#{yxq},#{csff}
)
</insert>
<update id="updateXmLot">
update xm_lot set
<if test="sjcs != null and sjcs != ''">sjcs = #{sjcs},</if>
<if test="yxq != null"> yxq = #{yxq},</if>
<if test="csff != null and csff != ''">csff = #{csff},</if>
sjph = #{sjph}
where yq = #{yq} and sjph = #{sjph}
</update>
<delete id="deleteXmLot">
delete from xm_lot where yq = #{yq} and sjph = #{sjph}
</delete>
@ -597,9 +606,10 @@
</insert>
<delete id="delBatch">
delete from xm_info_vs where (yq,xmid) in
<foreach collection="xmInfoNewList" item="xmInfoNew" open="(" close=")" separator=",">
(#{xmInfoNew.yq},#{xmInfoNew.xmid})
</foreach>
delete from xm_info_vs where yq = #{yq} and xmid = #{xmid}
</delete>
<select id="getSjcs">
SELECT distinct sjcs as no,sjcs as na FROM xm_lot WHERE yq = #{yq} ORDER BY no asc
</select>
</mapper>