检验项目修改
This commit is contained in:
parent
9b0d6934f1
commit
7efeca72f6
@ -1,6 +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;
|
||||||
@ -117,7 +117,7 @@ public class ReportItemController extends BaseController {
|
|||||||
@Log(title = SysLogConstants.XMLOT_LOG,businessType = BusinessType.INSERT)
|
@Log(title = SysLogConstants.XMLOT_LOG,businessType = BusinessType.INSERT)
|
||||||
@ApiOperation("新增试剂维护数据")
|
@ApiOperation("新增试剂维护数据")
|
||||||
@PostMapping("/addXmLot")
|
@PostMapping("/addXmLot")
|
||||||
public Result addXmLot(@RequestBody XmLot xmLot){
|
public Result addXmLot(@RequestBody List<XmLot> xmLot){
|
||||||
return reportItemService.addXmLot(xmLot);
|
return reportItemService.addXmLot(xmLot);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -195,4 +195,11 @@ public class ReportItemController extends BaseController {
|
|||||||
return reportItemService.delXmRefNew(xmRefNew);
|
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);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -4,6 +4,8 @@ import com.czlis.common.core.domain.entity.lis.*;
|
|||||||
import org.apache.ibatis.annotations.Param;
|
import org.apache.ibatis.annotations.Param;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
import java.util.Objects;
|
||||||
|
|
||||||
public interface ReportItemMapper {
|
public interface ReportItemMapper {
|
||||||
List<XmInfoNew> query(XmInfoNew xmInfoNew);
|
List<XmInfoNew> query(XmInfoNew xmInfoNew);
|
||||||
@ -47,7 +49,7 @@ public interface ReportItemMapper {
|
|||||||
|
|
||||||
void deleteXmFilter(@Param("yq") String yq,@Param("lgph") String lgph);
|
void deleteXmFilter(@Param("yq") String yq,@Param("lgph") String lgph);
|
||||||
|
|
||||||
List<XmLot> getXmLot();
|
List<XmLot> getXmLot(XmLot xmLot);
|
||||||
|
|
||||||
void addXmLot(XmLot xmLot);
|
void addXmLot(XmLot xmLot);
|
||||||
|
|
||||||
@ -67,5 +69,9 @@ public interface ReportItemMapper {
|
|||||||
|
|
||||||
void addBatch(@Param("xmInfoNewList") List<XmInfoNew> xmInfoNewList);
|
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);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -28,7 +28,7 @@ public interface ReportItemService {
|
|||||||
|
|
||||||
Result getXmLot();
|
Result getXmLot();
|
||||||
|
|
||||||
Result addXmLot(XmLot xmLot);
|
Result addXmLot(List<XmLot> xmLot);
|
||||||
|
|
||||||
Result deleteXmLot(String yq, String sjph);
|
Result deleteXmLot(String yq, String sjph);
|
||||||
|
|
||||||
@ -53,4 +53,6 @@ public interface ReportItemService {
|
|||||||
Result delBatch(List<XmInfoNew> xmInfoNewList);
|
Result delBatch(List<XmInfoNew> xmInfoNewList);
|
||||||
|
|
||||||
Result delXmRefNew(XmRefNew xmRefNew);
|
Result delXmRefNew(XmRefNew xmRefNew);
|
||||||
|
|
||||||
|
Result getSjcs(String yq);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -13,6 +13,8 @@ import org.springframework.transaction.annotation.Transactional;
|
|||||||
|
|
||||||
import java.util.Collections;
|
import java.util.Collections;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
import java.util.Objects;
|
||||||
|
|
||||||
@Service
|
@Service
|
||||||
@Slf4j
|
@Slf4j
|
||||||
@ -296,13 +298,21 @@ public class ReportItemServiceImpl implements ReportItemService {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Result getXmLot() {
|
public Result getXmLot() {
|
||||||
List<XmLot> lotList = reportItemMapper.getXmLot();
|
List<XmLot> lotList = reportItemMapper.getXmLot(null);
|
||||||
return new Result("0","查询成功!",lotList);
|
return new Result("0","查询成功!",lotList);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Result addXmLot(XmLot xmLot) {
|
public Result addXmLot(List<XmLot> xmLotList) {
|
||||||
reportItemMapper.addXmLot(xmLot);
|
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","新增成功!");
|
return new Result("0","新增成功!");
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -391,8 +401,10 @@ public class ReportItemServiceImpl implements ReportItemService {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Result delBatch(List<XmInfoNew> xmInfoNewList) {
|
public Result delBatch(List<XmInfoNew> xmInfoNewList) {
|
||||||
|
for (XmInfoNew xmInfoNew : xmInfoNewList) {
|
||||||
|
reportItemMapper.delBatch(xmInfoNew);
|
||||||
|
}
|
||||||
|
|
||||||
reportItemMapper.delBatch(xmInfoNewList);
|
|
||||||
return new Result("0","批量删除数据成功!");
|
return new Result("0","批量删除数据成功!");
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -402,5 +414,11 @@ public class ReportItemServiceImpl implements ReportItemService {
|
|||||||
return new Result("0","删除成功!");
|
return new Result("0","删除成功!");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Result getSjcs(String yq) {
|
||||||
|
List<Map<String, Objects>> sjcsList = reportItemMapper.getSjcs(yq);
|
||||||
|
return new Result("0","获取数据成功!",sjcsList);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -528,10 +528,19 @@
|
|||||||
insert into xm_lot(
|
insert into xm_lot(
|
||||||
yq,sjph,sjcs,yxq,csff
|
yq,sjph,sjcs,yxq,csff
|
||||||
)values(
|
)values(
|
||||||
#{yq},#{sjph},#{yxq},#{csff}
|
#{yq},#{sjph},#{sjcs},#{yxq},#{csff}
|
||||||
)
|
)
|
||||||
</insert>
|
</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 id="deleteXmLot">
|
||||||
delete from xm_lot where yq = #{yq} and sjph = #{sjph}
|
delete from xm_lot where yq = #{yq} and sjph = #{sjph}
|
||||||
</delete>
|
</delete>
|
||||||
@ -597,9 +606,10 @@
|
|||||||
</insert>
|
</insert>
|
||||||
|
|
||||||
<delete id="delBatch">
|
<delete id="delBatch">
|
||||||
delete from xm_info_vs where (yq,xmid) in
|
delete from xm_info_vs where yq = #{yq} and xmid = #{xmid}
|
||||||
<foreach collection="xmInfoNewList" item="xmInfoNew" open="(" close=")" separator=",">
|
|
||||||
(#{xmInfoNew.yq},#{xmInfoNew.xmid})
|
|
||||||
</foreach>
|
|
||||||
</delete>
|
</delete>
|
||||||
|
|
||||||
|
<select id="getSjcs">
|
||||||
|
SELECT distinct sjcs as no,sjcs as na FROM xm_lot WHERE yq = #{yq} ORDER BY no asc
|
||||||
|
</select>
|
||||||
</mapper>
|
</mapper>
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user