| | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.ltkj.hosp.domain.TjOrderDetail; |
| | | import com.ltkj.hosp.domain.TjProject; |
| | | import com.ltkj.hosp.vo.ProFcListVo; |
| | | import com.ltkj.hosp.vodomain.ShenGaoTiZhongVo; |
| | | import org.apache.ibatis.annotations.*; |
| | | |
| | |
| | | " create_id,\n" + |
| | | " pro_type) \n" + |
| | | " \n" + |
| | | " SELECT #{orderId},a.pro_id,IFNULL(trim(b.pro_default),null),'0',SYSDATE(),#{userName},b.is_sampling,#{userId},IFNULL(a.pac_id,0)" + |
| | | " SELECT #{orderId},a.pro_id,IFNULL(trim(b.pro_default),null),IF(b.need_report<>'Y',1,0),SYSDATE(),#{userName},b.is_sampling,#{userId},IFNULL(a.pac_id,0)" + |
| | | " FROM tb_transition a LEFT JOIN tj_project b ON a.pro_id=b.pro_id WHERE a.cus_id=#{cusId} AND a.card_id=#{cardId} \n" + |
| | | "\t\t\n" + |
| | | "\tUNION\n" + |
| | | " \n" + |
| | | "\tSELECT #{orderId},a.parent_pro_id,IFNULL(trim(b.pro_default),null),'0',SYSDATE(),#{userName},b.is_sampling,#{userId},IFNULL(a.pac_id,0) " + |
| | | "\tSELECT #{orderId},a.parent_pro_id,IFNULL(trim(b.pro_default),null),IF(b.need_report<>'Y',1,0),SYSDATE(),#{userName},b.is_sampling,#{userId},IFNULL(a.pac_id,0) " + |
| | | "FROM tb_transition a LEFT JOIN tj_project b ON a.parent_pro_id=b.pro_id WHERE a.cus_id=#{cusId} AND a.card_id=#{cardId} GROUP BY a.parent_pro_id") |
| | | boolean saveTjOrderDetailsByCusId(@Param("cusId")String cusId,@Param("orderId")String orderId,@Param("userName")String userName,@Param("userId") String userId,@Param("cardId") String cardId); |
| | | |
| | |
| | | "FROM `tj_order_detail` \n" + |
| | | "where order_id=#{orderId}\n" + |
| | | "and pro_id IN\n" + |
| | | "(select pro_id from tj_project where pro_parent_id=#{proParentId})") |
| | | "(select pro_id from tj_project where pro_parent_id=#{proParentId} and deleted=0 and pro_status=0)") |
| | | public List<TjOrderDetail> getDetailByOrderIdAndParId(@Param("orderId")Long orderId,@Param("proParentId")Long proParentId); |
| | | |
| | | public List<TjOrderDetail> getDetailByOrderIdAndParIds(@Param("orderId")Long orderId,@Param("proParentIds")List<Long> proParentIds); |
| | |
| | | "a.update_time=SYSDATE()\n" + |
| | | "WHERE a.order_id=#{orderId} and isnull(a.jxbz)") |
| | | void updateTjOrderDetailsFlowingWaterIdByJxbzisnull(@Param("orderId") String orderId,@Param("ls")String ls); |
| | | |
| | | |
| | | @Update("UPDATE tj_order_detail a SET\n" + |
| | | "a.deleted=1 \n" + |
| | | "WHERE a.order_detail_id=#{id}") |
| | | void updateTjOrderDetailDel(@Param("id") String id); |
| | | |
| | | @Select("SELECT p.pro_id,p.pro_name,p.pro_parent_id,o.order_id,p.sl * p.pro_price as price,d.dept_id,d.dept_name\n" + |
| | | " FROM tj_order_detail o \n" + |
| | | " LEFT JOIN tj_project p ON o.pro_id = p.pro_id\n" + |
| | | " LEFT JOIN sys_dept d ON p.dept_id = d.dept_id\n" + |
| | | " WHERE order_id = #{orderId} AND p.pro_parent_id <>0 AND o.is_return = #{type}") |
| | | List<ProFcListVo> getFcList(@Param("orderId") Long orderId, @Param("type") Integer type); |
| | | } |