| | |
| | | @Select("SELECT * FROM tb_transition WHERE cus_id=#{cusId} and card_id=#{cardId}") |
| | | public List<TbTransition> getTbTransitionListByCusId(@Param("cusId")String cusId,@Param("cardId")String cardId); |
| | | |
| | | @Select("SELECT * FROM tb_transition WHERE cus_id=#{cusId} and card_id=#{cardId} and jxbz=#{jxbz}") |
| | | public List<TbTransition> getBlTbTransitionListByCusId(@Param("cusId")String cusId,@Param("cardId")String cardId,@Param("jxbz") String jxbz); |
| | | |
| | | @Delete("DELETE FROM tb_transition WHERE cus_id=#{cusId} AND !ISNULL(pac_id) and isnull(tj_num)") |
| | | public boolean deletedTbTransitionListByCusIdAndPac(@Param("cusId")String cusId,@Param("cardId")String cardId); |
| | | |
| | |
| | | boolean saveTemoTransitionByGroupingId(@Param("cusId")String cusId,@Param("groupingId")String groupingId); |
| | | |
| | | |
| | | @Insert("INSERT INTO tb_transition(\n" + |
| | | " cus_id,\n" + |
| | | " pac_id,\n" + |
| | | " pac_name,\n" + |
| | | " pro_id,\n" + |
| | | " pro_name,\n" + |
| | | " parent_pro_id,\n" + |
| | | " parent_pro_name,\n" + |
| | | " ord_price,\n" + |
| | | " now_price,\n" + |
| | | " create_time,\n" + |
| | | " pro_check_method,\n" + |
| | | " pro_type,\n" + |
| | | " card_id\n" + |
| | | ")\n" + |
| | | "SELECT\n" + |
| | | "#{cusId},\n" + |
| | | "#{groupingId},\n" + |
| | | "d.grouping_name,\n" + |
| | | "c.pro_id,\n" + |
| | | "c.pro_name,\n" + |
| | | "b.pro_id,\n" + |
| | | "b.pro_name,\n" + |
| | | "c.pro_price * (a.limits/10),\n" + |
| | | "c.pro_price * (a.limits/10),\n" + |
| | | "SYSDATE(),\n" + |
| | | "c.pro_check_method,\n" + |
| | | "c.pro_type,\n" + |
| | | "\t#{cardId}\n" + |
| | | "FROM\n" + |
| | | "\ttj_grouping_pro a \n" + |
| | | "JOIN tj_dw_grouping d ON d.id=a.grouping_id \n" + |
| | | "\tLEFT JOIN tj_project b ON a.pro_id = b.pro_id \n" + |
| | | "\tLEFT JOIN tj_project c ON c.pro_parent_id=b.pro_id\n" + |
| | | "WHERE 1=1 AND a.grouping_id =#{groupingId} and c.deleted=0 ") |
| | | boolean ttsaveTemoTransitionByGroupingId(@Param("cusId")String cusId,@Param("cardId") String cardId,@Param("groupingId") String groupingId); |
| | | |
| | | |
| | | // @Select("SELECT b.price_now FROM \n" + |
| | | // "(SELECT a.pac_id FROM tb_transition a WHERE\n" + |
| | | // "\ta.cus_id = #{cusId} \n" + |
| | |
| | | */ |
| | | @Select("SELECT SUM(now_price) FROM `tb_transition` WHERE `tj_num` = #{tjNum} AND `parent_pro_id` = #{parentProId}") |
| | | BigDecimal getLisPriceByTjNumAndParentProId(@Param("tjNum")String tjNum,@Param("parentProId")String parentProId); |
| | | |
| | | /** |
| | | * 根据tjNum和parentProId查询总价 |
| | | * @param tjNum |
| | | * @param parentProId |
| | | * @return |
| | | */ |
| | | @Select({ |
| | | "<script>", |
| | | "SELECT SUM(now_price) FROM `tb_transition`", |
| | | "WHERE `tj_num` = #{tjNum}", |
| | | "AND `parent_pro_id` IN", |
| | | "<foreach item='item' index='index' collection='parentProId' open='(' separator=',' close=')'>", |
| | | "#{item}", |
| | | "</foreach>", |
| | | "</script>" |
| | | }) |
| | | BigDecimal getLisPriceByTjNumAndInParentProId(@Param("tjNum") String tjNum, @Param("parentProId") List<String> parentProId); |
| | | |
| | | |
| | | |
| | | @Select("SELECT GROUP_CONCAT(c.pro_name SEPARATOR ' ; ' ) FROM tj_package_project b JOIN tj_project c ON c.pro_id=b.pro_id\n" + |
| | | "\n" + |
| | | "WHERE b.pro_id IN(SELECT DISTINCT a.parent_pro_id FROM tb_transition a WHERE a.cus_id=#{idCard} AND ISNULL(a.tj_num))" + |
| | | "AND b.pac_id=#{pacId}") |
| | | String panduantaocanshifouchongfu(@Param("idCard") String idCard,@Param("pacId") Long pacId); |
| | | |
| | | |
| | | |
| | | @Select("SELECT GROUP_CONCAT(c.pro_name SEPARATOR ' ; ' ) FROM tj_grouping_pro b JOIN tj_project c ON c.pro_id=b.pro_id\n" + |
| | | "\n" + |
| | | "WHERE b.pro_id IN(SELECT DISTINCT a.parent_pro_id FROM tb_transition a WHERE a.cus_id=#{idCard} AND ISNULL(a.tj_num))" + |
| | | "AND b.grouping_id=#{pacId}") |
| | | String ttpanduantaocanshifouchongfu(@Param("idCard") String idCard,@Param("pacId") Long pacId); |
| | | } |