| | |
| | | " WHERE a.tj_num=#{tjNum}") |
| | | boolean updateTbTransitionByTjNum(String tjNum); |
| | | |
| | | @Select("SELECT * FROM tb_transition WHERE cus_id=#{cusId} AND pac_id=#{pacId}") |
| | | @Select("SELECT * FROM tb_transition WHERE cus_id=#{cusId} AND pac_id=#{pacId} and isnull(tj_num)") |
| | | public List<TbTransition> getTbTransitionListByCusIdAndPac(@Param("cusId") String cusId,@Param("pacId") String pacId); |
| | | |
| | | @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); |
| | |
| | | "a.ord_price=a.now_price,\n" + |
| | | "a.now_price=a.ord_price*(#{discount}/10)," + |
| | | "a.tj_num=#{tjNum}"+ |
| | | " WHERE a.cus_id=#{cusId} ") |
| | | " WHERE a.cus_id=#{cusId} AND ISNULL(a.tj_num) ") |
| | | boolean updateTbTransitionPriceByCusId(@Param("cusId")String cusId,@Param("discount")BigDecimal discount,@Param("tjNum")String tjNum); |
| | | |
| | | |
| | | @Update("UPDATE tb_transition a SET \n" + |
| | | " a.now_price=#{jg},\n" + |
| | | " a.tj_num=#{tjNum},\n" + |
| | | " a.card_id=#{cardId},\n" + |
| | | " a.jxbz=#{jxbz}\n" + |
| | | " WHERE a.id=#{id}") |
| | | public boolean updateTbTransitionById(@Param("id")String id,@Param("jxbz")String jxbz,@Param("tjNum")String tjNum,@Param("cardId")String cardId,@Param("jg")BigDecimal jg); |
| | | |
| | | |
| | | @Insert("INSERT INTO tb_transition(\n" + |
| | |
| | | |
| | | @Delete("DELETE FROM tb_transition WHERE jxbz=#{bldh}") |
| | | void deleteTjOrderDetailByjxbz(String bldh); |
| | | |
| | | /** |
| | | * 根据tjNum和parentProId查询总价 |
| | | * @param tjNum |
| | | * @param parentProId |
| | | * @return |
| | | */ |
| | | @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); |
| | | } |