yeguodong il y a 2 semaines
Parent
commit
de4c6249bc

+ 3 - 2
src/main/java/cn/hnthyy/thmz/controller/yb/YbController.java

@@ -4,6 +4,7 @@ import cn.hnthyy.thmz.comment.UserLoginToken;
 import cn.hnthyy.thmz.entity.jy.ResultVo;
 import cn.hnthyy.thmz.entity.yb.SelinfoReturn;
 import cn.hnthyy.thmz.entity.yb.SelinfoSold;
+import cn.hnthyy.thmz.entity.yb.SelinfoSoldTotal;
 import cn.hnthyy.thmz.service.yb.YbService;
 import lombok.extern.slf4j.Slf4j;
 import org.springframework.beans.factory.annotation.Autowired;
@@ -21,8 +22,8 @@ public class YbController {
     private YbService ybService;
 
     @RequestMapping(value = "/saleGoodsItem", method = {RequestMethod.POST})
-    public ResultVo saleGoodsItem(@RequestBody SelinfoSold selInfo) {
-        return ybService.saleGoodsItem(selInfo);
+    public ResultVo saleGoodsItem(@RequestBody SelinfoSoldTotal selinfoSoldTotal) {
+        return ybService.saleGoodsItem(selinfoSoldTotal);
     }
 
     @RequestMapping(value = "/returnGoodsItem", method = {RequestMethod.POST})

+ 6 - 0
src/main/java/cn/hnthyy/thmz/mapper/his/yb/SelinfoSoldMapper.java

@@ -4,10 +4,16 @@ import cn.hnthyy.thmz.entity.yb.SelinfoSold;
 import cn.hnthyy.thmz.vo.MzDrugWinVo;
 import com.baomidou.mybatisplus.core.mapper.BaseMapper;
 import org.apache.ibatis.annotations.Insert;
+import org.apache.ibatis.annotations.Select;
+
+import java.util.List;
 
 public interface SelinfoSoldMapper extends BaseMapper<SelinfoSold> {
 
     @Insert("insert into selinfo_sold_drugtrac(id,selinfo_sold_id,trac_codg)" +
             " values(#{id,jdbcType=VARCHAR},#{selinfoSoldId,jdbcType=VARCHAR},#{tracCodg,jdbcType=VARCHAR})")
     int insertSelinfoSoldDrugtrac(String id, String selinfoSoldId,  String tracCodg);
+
+    @Select("select * from selinfo_sold_drugtrac where patientId=#{selinfoSold.patientId}")
+    List<SelinfoSold> getSelinfoSoldList(SelinfoSold selinfoSold);
 }