| | |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.ltkj.hosp.domain.TjOrderRemark; |
| | | import org.apache.ibatis.annotations.Delete; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | import org.apache.ibatis.annotations.Param; |
| | | import org.apache.ibatis.annotations.Select; |
| | | import org.apache.ibatis.annotations.*; |
| | | |
| | | /** |
| | | * 医生备注Mapper接口 |
| | |
| | | |
| | | @Select("SELECT GROUP_CONCAT(pro_id ORDER BY pro_id) AS names FROM tj_order_remark WHERE tj_number=#{tjNumber} AND type=3 AND deleted='0' ") |
| | | String getTjOrderRemarkProIdList(String tjNumber); |
| | | |
| | | |
| | | |
| | | @Insert("INSERT INTO tj_order_remark(\n" + |
| | | "pro_id,\n" + |
| | | "dept_id,\n" + |
| | | "create_time,\n" + |
| | | "create_by,\n" + |
| | | "create_id,\n" + |
| | | "tj_number,\n" + |
| | | "update_by,\n" + |
| | | "update_time,\n" + |
| | | "update_id\n" + |
| | | ")\n" + |
| | | "\n" + |
| | | "SELECT b.pro_id,b.dept_id,SYSDATE(),#{userName},#{userId},#{tjNumber},#{userName},SYSDATE(),#{userId} FROM tj_order_detail a " + |
| | | "LEFT JOIN tj_project b ON a.pro_id=b.pro_id WHERE a.order_id=#{orderId} AND\n" + |
| | | "b.pro_parent_id=0") |
| | | boolean saveTjOrderRemarkByOrderId(@Param("tjNumber")String tjNumber,@Param("userName") String userName,@Param("userId") String userId,@Param("orderId")String orderId); |
| | | |
| | | |
| | | @Select("SELECT * FROM tj_order_remark WHERE tj_number=#{tjNumber} AND type =1 AND deleted='0'") |
| | | List<TjOrderRemark> getRemarkListByTjNumAndType(String tjNumber); |
| | | |
| | | |
| | | @Select("SELECT a.pro_id FROM tj_order_remark a WHERE a.deleted=0 AND a.tj_number=#{tjNumber} AND a.type !=2;") |
| | | List<Long> getTjProIdsByTjNum(String tjNumber); |
| | | |
| | | |
| | | @Select("SELECT b.pro_id FROM tj_package_project a " + |
| | | "LEFT JOIN tj_order_remark b ON a.pro_id=b.pro_id " + |
| | | "WHERE b.type !=2 AND b.pro_id = a.pro_id AND a.pac_id=#{pacId} AND b.tj_number=#{tjNumber}") |
| | | List<Long> getTjProIdsByTjNumAndPacIc(@Param("tjNumber") String tjNumber,@Param("pacId") String pacId); |
| | | |
| | | |
| | | @Select("SELECT b.pro_id FROM tj_package_project a " + |
| | | "LEFT JOIN tj_order_remark b ON a.pro_id=b.pro_id " + |
| | | "WHERE b.type !=2 AND b.pro_id != a.pro_id AND a.pac_id=#{pacId} AND b.tj_number=#{tjNumber}") |
| | | List<Long> getTjProIdsByTjNumAndPacIc1(@Param("tjNumber") String tjNumber,@Param("pacId") String pacId); |
| | | } |